On Thu, Oct 28, 2010 at 11:08:12AM -0400, Tim King wrote: > I have a very simple setup with two SIP routes to my carrier. I need to have > every other phone call placed to that carrier go to a different address. > > This is what I need the call flow to look like. I have spent many hours > searching and have not found a working example. > Call1 exten => > NXXNXXXXX,2,Dial(SIP/${dialedn...@2.4.6.8<dialednum...@2.4.6.8> > ) > Call2 exten => > NXXNXXXXX,2,Dial(SIP/${dialedn...@1.2.3.4<dialednum...@1.2.3.4> > ) > Call3 exten => > NXXNXXXXX,2,Dial(SIP/${dialedn...@2.4.6.8<dialednum...@2.4.6.8> > ) > Call4 exten => > NXXNXXXXX,2,Dial(SIP/${dialedn...@1.2.3.4<dialednum...@1.2.3.4> > ) > Call5 exten => > NXXNXXXXX,2,Dial(SIP/${dialedn...@2.4.6.8<dialednum...@2.4.6.8> > ) > Call6 exten => > NXXNXXXXX,2,Dial(SIP/${dialedn...@1.2.3.4<dialednum...@1.2.3.4> > ) > Call7 exten => > NXXNXXXXX,2,Dial(SIP/${dialedn...@2.4.6.8<dialednum...@2.4.6.8> > ) > Call8 exten => > NXXNXXXXX,2,Dial(SIP/${dialedn...@1.2.3.4<dialednum...@1.2.3.4> > ) > ..........................
If your goal is really load balancing, not just alternating between providers, you might look at the GROUP* functions. Otherwise, if you hit a stretch where you have, e.g., several even-numbered calls of long duration mixed with short odd-numbered calls, most of your traffic will wind up on the same route. -- Barry -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users