[asterisk-users] Failover SIP logic

Andrea Spadaccini a.spadaccini at mediatechnologies.it
Mon Sep 10 10:58:41 CDT 2007


Ciao Jeremy,

> I need some extensions logic assistance, I'm trying to dial out one of
> multiple SIP trunks, in sequence.  I need to detect a busy SIP trunk(I only
> allow 1 call per trunk) and roll over to a second or third depending on that
> busy status
> 
> Here's what I've got for a macro thusfar, but it's not working(fails if the
> 1st trunk is busy) extensions.conf:
> 
> [globals]
> trunk_1 => SIP/trunk1
> trunk_2 => SIP/trunk2
> trunk_3 => SIP/trunk3
> 
> [macro-trunkdial]
> exten => s,1,Dial(${trunk_1}/${ARG1})
> exten => s,2,Hangup()
> exten => s,102,Dial(${trunk_2}/${ARG1})
> exten => s,103,Hangup()
> exten => s,203,Dial(${trunk_3}/${ARG1})
> exten => s,204,Hangup()


Which asterisk version are you using?
IIRC, priority jumping (ie. going to n+101) was disabled by default in some
1.2.x version. You should rely on DIALSTATUS. See Dial() page in voip-info.org.

HTH,

-- 
Dr. Andrea Spadaccini
Multimedia Technologies Institute - MTI S.r.l.
Web: www.x-voice.it - Tel: +39 (0) 95 7224945



More information about the asterisk-users mailing list