[Asterisk-Users] IAX outgoing redundancy

Andrew Kohlsmith akohlsmith-asterisk at benshaw.com
Sat Jan 22 23:50:21 MST 2005


On January 22, 2005 11:16 pm, Nabeel Jafferali wrote:
> > I have my IAX peers setup in iax.conf and use a qualify
> > statement to see whether the peer is up or not. I then use a
> > macro for each peer. This way I can take appropriate action
> > depending on the DIALSTATUS variable.

> That doesn't really solve the problem of when the peer is up but not
> able to complete the call due to PSTN issues (as opposed to IP issues)
> and is just waiting for progress (i.e. the call hasn't failed).

It works just fine.  I do it right now.  The only issue is that I posted bug 
3360 and Mark promptly closed it saying that CONGESTION was appropriate if 
the IAX peer could not be contacted, which I disagree with.  IMO a return 
code of CONGESTION is *only* appropriate if contact was made and the far end 
returns CONGESTION.... otherwise CHANUNAVAIL should be returned since, well, 
the channel is unavailable and you don't specifically know that it was 
congestion that was causing it.  Using qualify= returns CHANUNAVAIL if the 
peer is unreachable, so a network timeout should, IMO, return CHANUNAVAIL as 
well.

My nufone dialing macro looks something like this:
exten => _NXXNXXXXXX,1,Macro(nufone-dial,${EXTEN})

[macro-nufone-dial]
... (skip some stuff that sets the account code for my own billing)
exten => s,n,Dial(${NUFONEIAX}/1${ARG1},,g)
exten => s,n,Goto(dial-${DIALSTATUS},1)

exten => dial-CANCEL,1,Hangup
exten => dial-ANSWER,1,Hangup
exten => dial-NOANSWER,1,Hangup
exten => dial-BUSY,1,Busy
exten => dial-CONGESTION,1,Macro(pri-dial,${ARG1},${ARG2})
exten => dial-CHANUNAVAIL,1,Macro(pri-dial,${ARG1},${ARG2})

IMO I shouldn't have to try and use the backup on CONGESTION, only if the 
channel was unavailable.

-A.



More information about the asterisk-users mailing list