[Asterisk-Users] Dialstatus Oddity in 1.2

Greg Boehnlein damin at nacs.net
Sat Jan 21 12:30:25 MST 2006


Hello all,
	I am working on a creating some intelligent failover dial-plan 
logic and I'm running into something that I'd like some feedback on. 
Basically, it appears that if you place a call to an IAX2 peer that 
refuses the connection, or is unavailable, a NOANSWER dialstatus is 
returned.

Example:

    -- Executing Macro("IAX2/cubix-19", "nocdial|IAX2/boehnlein at pbx1/1216410XXXX") in new stack
    -- Executing Dial("IAX2/cubix-19", "IAX2/boehnlein at pbx1/1216410XXXX|30") in new stack
    -- Called boehnlein at pbx1/1216410XXXX
Jan 21 19:16:07 WARNING[1114]: chan_iax2.c:6970 socket_read: Call rejected by 207.166.192.188: No authority found
    -- Hungup 'IAX2/pbx1-21'
  == No one is available to answer at this time (1:0/0/0)
    -- Executing Goto("IAX2/cubix-19", "s-NOANSWER|1") in new stack
    -- Goto (macro-nocdial,s-NOANSWER,1)
    -- Executing Hangup("IAX2/cubix-19", "") in new stack
    -- Hungup 'IAX2/cubix-19'

Shouldn't that return CONGESTION instead? I thought that NOANSWER was 
reserved for calls that reach app_dial's timeout limit?

Or am I just missing something simple?

Here is the relevant extensions.conf logic that I am using

[e164]
; Dundi
exten => _1NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN})
; Dispatch First Trunk
exten => _1NXXNXXXXXX,2,Macro(nocdial,${TRUNK}/${EXTEN})
exten => _1NXXNXXXXXX,3,ResetCDR
; On Failure, Dispatch Second Trunk
exten => _1NXXNXXXXXX,4,Macro(nocdial,${TRUNK2}/${EXTEN})
exten => _1NXXNXXXXXX,5,ResetCDR
; Third time is a charm?
exten => _1NXXNXXXXXX,6,Macro(nocdial,${TRUNK3}/${EXTEN})

[macro-nocdial]
exten => s,1,Dial(${ARG1},30)
exten => s,2,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Hangup
exten => s-BUSY,1,Busy(15)
exten => s-BUSY,2,Hangup
exten => s-CONGESTION,1,NoOp
exten => s-CHANUNAVAIL,1,NoOp
exten => s-.,1,Goto(s-NOANSWER,1)

-- 
    Vice President of N2Net, a New Age Consulting Service, Inc. Company
         http://www.n2net.net Where everything clicks into place!
                             KP-216-121-ST






More information about the asterisk-users mailing list