[asterisk-users] PSTN failover

Andrew Kohlsmith aklists at mixdown.ca
Mon Oct 15 22:21:45 CDT 2007


On Monday 15 October 2007 19:50:03 Philipp Kempgen wrote:
> I'd basically just Dial() 2 times:
> Dial(SIP/...);
> Dial(Zap/...);
>
> No need for priority jumping. And not need to check if
> the ChanIsAvail(). Just Dial().

Why not just do it the correct way?

Dial(SIP/,,g)
GotoIf($[${DIALSTATUS} = BUSY]?busy)
GotoIf($[${DIALSTATUS} = NOANSWER]?noanswer)
GotoIf($[${DIALSTATUS} = ANSWERED]?answered)
Dial(Zap/...)

Of course, I do this inside a macro, and I emit correct CDR and correct 
hangupcauses for those who use my system.

Dialing twice like that without checking your return value is an invitation 
for future problems.

-A.



More information about the asterisk-users mailing list