# Ringing duration

**URL:** <https://forum.sierrawireless.com/t/ringing-duration/1076>\
**Category:** Legacy AirPrime modules\
**Created:** [February 7, 2007, 12:14pm UTC](https://forum.sierrawireless.com/t/ringing-duration/1076 "2007-02-07T12:14:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark.C](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@Mark.C](https://forum.sierrawireless.com/u/Mark.C)\
**Post date:** [February 7, 2007, 12:14pm UTC](https://forum.sierrawireless.com/t/ringing-duration/1076/1 "2007-02-07T12:14:26Z")

</div>

When incomming call is detected i have to split it ( regarding to ring duration ) on different ports.

The pseudocode goes like this:

> [@](#):
>
> - detect incomming call
> - true / false
> 
> - if true && if ringDuration \> 10 sec - option 1
> - if true && if ringDuration \< 10 sec - option 2
> - if true && if ringDuration = 10 sec - option 3
> 
> - false

How to define ringDuration?. Please post some code example.

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [February 7, 2007, 12:31pm UTC](https://forum.sierrawireless.com/t/ringing-duration/1076/2 "2007-02-07T12:31:30Z")

</div>

> [@Mark.C.](#):
>
> When incomming call is detected i have to split it ( regarding to ring duration…

As already noted, This is a very common, but fundamentally flawed idea!  
See: [wavecom.com/modules/movie/sc … lly+flawed](http://www.wavecom.com/modules/movie/scenes/forums/viewtopic.php?t=678&highlight=fundamentally+flawed)

You really can’t rely upon the duration of ringing!  
This is nothing to do with Wavecom or Open-AT - it’s just the way telephone networks work.

Anyhow, if you insist on it, you will need to subscribe to the Call Service and a Timer

Look-up the adl\_callSubscribe function: there is a list of the Events that your handler can receive - including RING events.

When you get a RING event, start a timer.

When you get a RELEASE ID event, the ringing has stopped and you can determine how long it lasted.

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [February 9, 2007, 11:30am UTC](https://forum.sierrawireless.com/t/ringing-duration/1076/3 "2007-02-09T11:30:38Z")

</div>

> [@Mark.C.](#):
>
> Strange, after two days and after 14 views no one can write some example or some comment how to solve, i guess, simple problem.  
> [wavecom.com/modules/movie/sc … ote&p=3861](http://www.wavecom.com/modules/movie/scenes/forums/posting.php?mode=quote&p=3861)

So what happened to your 2 day response rule, then?

You’ve had the suggestion for 2 days now - did it help?  
Have you got it working?

---

<div class="post-metadata">

**Author:** ![Mark.C](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@Mark.C](https://forum.sierrawireless.com/u/Mark.C)\
**Post date:** [February 9, 2007, 1:04pm UTC](https://forum.sierrawireless.com/t/ringing-duration/1076/4 "2007-02-09T13:04:12Z")

</div>

> [@](#):
>
> So what happened to your 2 day response rule, then?

That’s the spirit !. Thank you.

Im working on my project and i will send you my replay today, with my epinions.

Regards,  
Mark

---

<div class="post-metadata">

**Author:** ![Mark.C](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@Mark.C](https://forum.sierrawireless.com/u/Mark.C)\
**Post date:** [February 14, 2007, 11:35am UTC](https://forum.sierrawireless.com/t/ringing-duration/1076/5 "2007-02-14T11:35:52Z")

</div>

Hi mr. Awneil.  
After few free days am back at work.

> [@](#):
>
> Anyhow, if you insist on it, you will need to subscribe to the Call Service and a Timer

Im sorry if i understand you wrong but tell me how would you do it without timer and call service. BTW. I have read your post regarding this topic.

I will start now with call service and timer but if you have better idea please write down, so i can change the program.

Mark

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [February 15, 2007, 7:45pm UTC](https://forum.sierrawireless.com/t/ringing-duration/1076/6 "2007-02-15T19:45:51Z")

</div>

What I’m telling you (again) is that your idea of timing the ringing duration is fundamentally flawed!
