[asterisk-dev] 'IAX2 call variable passing between servers '

Andrew Kohlsmith akohlsmith-asterisk at benshaw.com
Fri Aug 11 13:09:32 MST 2006


On Friday 11 August 2006 15:00, Douglas Garstang wrote:
> It's my understanding that rdnis comes from the phone. When someone
> forwards their calls, the phone sends back the 'Moved Temporarily' message
> to Asterisk. Asterisk interprets the SIP message and passes rdnis, dnid and
> extension back to the dial plan when it re-enters it. It tries to dial the
> new extension. My original DIAL() command has 'g' in it... which I guess is
> what causes Asterisk to re-enter the dial plan as it does, and try to find
> a match for the new extension.

Asterisk doesn't "re-enter" the dialplan, it CONTINUES along the SAME 
extension, at the next priority when option 'g' is used for Dial().

e.g.

[ooga]
exten => 500,1,Dial(SIP/500,,)
exten => 500,n,NoOp(After trying 500...)
exten => 501,1,Dial(SIP/501,,g)
exten => 501,n,NoOp(After trying 501...)
exten => 501,n,Goto(${RDNIS},1)

(this is all untested, I don't have a SIP phone handy.)

In this example, if 500 has a redirect, Asterisk will (should) send back a 
CHANUNAVAIL to whoever tried to call 500.  However, whomever called 501 
(which has the same redirect) should get "another kick at the cat" with 
whatever the RDNIS was set to.

I think.  

-A.



More information about the asterisk-dev mailing list