<div>Dear Michiel,</div>
<div> </div>
<div>Would you be kind enough to put more light on RAND stuff. How you do the load balancing.</div>
<div> </div>
<div>Regards,</div>
<div> </div>
<div>Umair Bari<br><br> </div>
<div><span class="gmail_quote">On 2/4/06, <b class="gmail_sendername">Michiel van Baak</b> <<a href="mailto:michiel@vanbaak.info">michiel@vanbaak.info</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On 04:47, Sat 04 Feb 06, Joseph Tanner wrote:<br>> This is probably a stupid question, but how do you specify multiple
<br>> fallovers? I.e., if provider1 is not reachable/busy, try provider2.<br>> If provider2 is down, try provider3. If provider3 is down...etc. I<br>> understand how to do it the old way, just keep adding 101 to the
<br>> extension. What would you add to a NOANSWER extension though? I<br>> guess you could send it to a different context, then you could use<br>> another NOANSWER, but I like keeping things short and easy.<br>
<br>[snip]<br><br>> > [macro-safedial]<br>> > ;exten = s,1,Dial(${ARG1},${ARG2},g,${ARG4})<br>> > exten = s,1,Dial(${ARG1},${ARG2},${ARG3},${ARG4})<br>> > exten = s,2,Goto(s-${DIALSTATUS},1)<br>> > exten = s-CANCEL,1,Hangup
<br>> > exten = s-NOANSWER,1,GotoIf($["${DIALEDTIME}" = "0"]?3)<br>> > exten = s-NOANSWER,2,Hangup<br>> > exten = s-NOANSWER,3,Verbose(1,Need failover for "${ARG1}")<br>> > exten = s-BUSY,1,Busy
<br>> > exten = s-CHANUNAVAIL,1,Verbose(1,Need failover for "${ARG1}")<br>> > exten = s-CONGESTION,1,Congestion<br>> > exten = _s-.,1,Congestion<br>> > exten = s-,1,Congestion<br><br>I have this macro too in my
extensions.conf<br>Later in the dialplan I use:<br><br>[outgoing-speakup]<br>;dutch telephone nrs.<br>exten => _0XXXXXXXXX,1,Set(CDR(ACCOUNTCODE)=outgoing-speakup)<br>exten => _0XXXXXXXXX,2,Set(CALLERID(all)=XXXXXXXXX)
<br>exten => _0XXXXXXXXX,3,Macro(safedial,${IAXTRUNK_SPEAKUP01}/31${EXTEN:1},50,Tr)<br>exten => _0XXXXXXXXX,4,Macro(safedial,${IAXTRUNK_SPEAKUP02}/31${EXTEN:1},50,Tr)<br>exten => _0XXXXXXXXX,5,Macro(safedial,${ZAPTRUNK}/${EXTEN},50,Tr)
<br>exten => _0XXXXXXXXX,6,Congestion()<br><br>Works like a charm.<br><br>In my production environment I actually load balance calls<br>using RAND so both IAXTRUNK_SPEAKUP01 and IAXTRUNK_SPEAKUP02<br>get an equal load of calls, but that's not relevant to your
<br>question :)<br><br>--<br>Michiel van Baak<br><a href="http://michiel.vanbaak.info">http://michiel.vanbaak.info</a><br><a href="mailto:michiel@vanbaak.info">michiel@vanbaak.info</a><br>GnuPG key: <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7E0B9A2D">
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7E0B9A2D</a><br><br>"Why is it drug addicts and computer afficionados are both called users?"<br><br>_______________________________________________<br>--Bandwidth and Colocation provided by
<a href="http://Easynews.com">Easynews.com</a> --<br><br>Asterisk-Users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users
</a><br></blockquote></div><br>