[asterisk-users] Strange behaviour with Dial cmd

Yuan LIU yliu11 at hotmail.com
Wed Feb 14 19:03:06 MST 2007


>From: "Il Neofita" <asteriskmail at gmail.com>
>Date: Wed, 14 Feb 2007 20:37:52 -0500
>
>This is the situation
>A call me at my provider 1
>I am not home and I would like to transfer the call
>I do not pickup the call for some reason
>I would like to hangup the caller, however, my asterisk try again to call 
>on my mobile over and over
>
>I would like to stop it.

Well, you'll have to decide how you want to "hang up" the caller: Do you 
want him/her to be ignored, or to be told that you are not available (like 
an answering machine)?  You also need to tell  Asterisk how to determine if 
the next "invite" comes from the same caller during the same "session". 
(These are not very easy tasks but doable.)

In either case, you need to add a flag to your dial plan, set it after it 
rings your cell, and reset it once Asterisk determines that THIS caller has 
been "hung up". (Of course you can do what "Vacation" does in E-mail: set up 
a flag for each identifiable caller, and only call your mobile once until 
you reset them all.  The algorithm would be simpler but more unidentifiable 
callers will be ignored.)  Your dial plan will check this flag before 
ringing your cell, then branch accordingly.

Hope this helps.

Yuan Liu

>Any idea?
>
>Thank you a lot.
>
>On 2/14/07, Yuan LIU <yliu11 at hotmail.com> wrote:
>>
>> >From: "Il Neofita" <asteriskmail at gmail.com>
>> >Date: Wed, 14 Feb 2007 19:30:51 -0500
>> >
>> >I have this simple context
>> >
>> >I am register to an external provider and when I am not home I would 
>>like
>> >to transfer the phone outside
>> >The problem that the call goes in loop
>>
>>I don't see any loop in records below?  What your dial plan does is what
>>you
>>told it to: ring for 5 sec, then hang up.  Because the calling party
>>hasn't
>>given up, your dial plan rings again.  Where's the error?
>>
>>Yuan Liu
>>
>> >I cannot understand why.
>> >
>> >Can you figure out my error?
>> >
>> >Thank you
>> >
>> >sip.conf
>> >register => user:pass at provider/400
>> >
>> >[inside]
>> >exten => _4X.,1,dial(SIP/ext_400_124/5551234444,5,tT)
>> >exten => _4X.,2,hangup
>> >
>> >-- Executing Dial("SIP/5551237777-081b8eb0",
>> >"SIP/ext_400_124/5551234444|5|tT") in new stack
>> >    -- Called ext_400_124/5551234444
>> >    -- SIP/ext_400_124-081bf848 is ringing
>> >    -- Nobody picked up in 5000 ms
>> >    -- Executing Hangup("SIP/5551237777-081b8eb0", "") in new stack
>> >  == Spawn extension (inside, 50000123, 2) exited non-zero on
>> >'SIP/5551237777-081b8eb0'
>> >    -- Executing Dial("SIP/5551237777-081c79a8",
>> >"SIP/ext_400_124/5551234444|5|tT") in new stack
>> >    -- Called ext_400_124/5551234444
>> >    -- SIP/ext_400_124-081ccee8 is ringing
>> >  == Spawn extension (inside, 50000123, 1) exited non-zero on
>> >'SIP/5551237777-081c79a8'
>>
>>
>>_______________________________________________
>>--Bandwidth and Colocation provided by Easynews.com --
>>
>>asterisk-users mailing list
>>To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>>


>_______________________________________________
>--Bandwidth and Colocation provided by Easynews.com --
>
>asterisk-users mailing list
>To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list