Re: [asterisk-users] SIP Trunk groups
i'm not so familiar with what youa re talking about .. but i beleive i've seen something like that in FreePBX where you can setup a failover trunk for a context.. try to have a look at it. and i hope it's what you are looking for -- AHD Tarek Sawah Integrated Digital Systems CCNA, MCSE, RHCE, VoIP Syria: +963 944 618286 USA: +1 347 562 2308 From: mlecu...@gmail.com Date: Wed, 27 May 2009 14:17:23 -0300 To: asterisk-users@lists.digium.com Subject: [asterisk-users] SIP Trunk groups Hey all, I have 2 GSM to Voip gateways and probably we will grow up to 4 more gateways. I already created a macro to make failover happen between gateways, but can imagine that everytime I add a new gateway I will need to modify the macro. The initial intention of this macro was to failover between different techonolgies. So I was hoping to create a Sip Trunk group using the same idea as truckgroup under dahdi but for sip trunks. Is that possible?, have you ever done this before? My Idea is: sip_trunk1 = SIP/gateway1 sip_trunk2 = SIP/gateway2 sip_trunk3 = SIP/gateway3 gsm_trunkgoup = sip_trunk1 ; sip_trunk2 ; sip_trunk3 [user] exten = _0.,1,wait() exten = _0.,n,Dial(gsm_trunkgoup/${ exten:1},30) exten = _0.,n,Hangup Thanks, -- -- Mariano Lecuona _ HotmailĀ® goes with you. http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] SIP Trunk groups
Hey all, I have 2 GSM to Voip gateways and probably we will grow up to 4 more gateways. I already created a macro to make failover happen between gateways, but can imagine that everytime I add a new gateway I will need to modify the macro. The initial intention of this macro was to failover between different techonolgies. So I was hoping to create a Sip Trunk group using the same idea as truckgroup under dahdi but for sip trunks. Is that possible?, have you ever done this before? My Idea is: sip_trunk1 = SIP/gateway1 sip_trunk2 = SIP/gateway2 sip_trunk3 = SIP/gateway3 gsm_trunkgoup = sip_trunk1 ; sip_trunk2 ; sip_trunk3 [user] exten = _0.,1,wait() exten = _0.,n,Dial(gsm_trunkgoup/${ exten:1},30) exten = _0.,n,Hangup Thanks, -- -- *Mariano Lecuona* ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] SIP Trunk groups
AFAIK, unfortunatelly it's not the same as with ZAP channels where you can group multiple lines together. I ended up using slightly modified superdial macro: http://www.voip-info.org/wiki/view/Superdial+macro. if you add new gateway it's not necesarry to edit the macro, just add new line in dialing context. [out_via_superdial] exten = s,1,Macro(superdial,IAX2/voip1/${tfnumber}voip,1,yourname,8005551234,voipjet) exten = s,2,Macro(superdial,IAX2/alpeh-com/${tfnumber}voip,1,yourname,8005551234,aleph) ... exten = s,9,Macro(superdial,IAX2/orange/${tfnumber}voip,1,yourname,8005551234,orange) On 5/27/09, Mariano Lecuona mlecu...@gmail.com wrote: Hey all, I have 2 GSM to Voip gateways and probably we will grow up to 4 more gateways. I already created a macro to make failover happen between gateways, but can imagine that everytime I add a new gateway I will need to modify the macro. The initial intention of this macro was to failover between different techonolgies. So I was hoping to create a Sip Trunk group using the same idea as truckgroup under dahdi but for sip trunks. Is that possible?, have you ever done this before? My Idea is: sip_trunk1 = SIP/gateway1 sip_trunk2 = SIP/gateway2 sip_trunk3 = SIP/gateway3 gsm_trunkgoup = sip_trunk1 ; sip_trunk2 ; sip_trunk3 [user] exten = _0.,1,wait() exten = _0.,n,Dial(gsm_trunkgoup/${ exten:1},30) exten = _0.,n,Hangup Thanks, -- -- *Mariano Lecuona* ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Mvh, Aurimas Skirgaila ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] SIP Trunk groups
I've improved this since this revision, but now a days I don't use limited systems. But my code has been used in places that need 100 concurrent outgoing lines. [macro-which-line] exten = s,1,set(TRIES=0) exten = s,n(nextone),set(TRIES=$[${TRIES} + 1]) ; increment TRIES by 1 exten = s,n,set(DIALSTRING=${TRY${TRIES}}) ; assign TRYn to DIALSTRING exten = s,n,gotoif($[${DIALSTRING} = ]?donehere) ; see if we've run out of things to try exten = s,n,ChanIsAvail(${DIALSTRING}) ; it will be up or down, no need for this to be exclusive exten = s,n,gotoif($[${AVAILSTATUS} = 0]?:nextone) exten = s,n,gotoif($[${GROUP_COUNT(${DIALSTRING})} = 2]?nextone) ; have we used up the allowed calls on this channel exten = s,n,set(GROUP()=${DIALSTRING}) ; Lock the line! Yay... exten = s,n,Dial(${DIALSTRING}/1${ARG1}) ; dial the phone exten = s,n,GotoIf($[${DIALSTATUS} = BUSY]?donehere) ; Don't keep dialing exten = s,n,NoOp(Moving to the next one...); exten = s,n,goto(nextone) ; TEMP exten = s,n(donehere),MacroExit() ; we only get here if everything failed Then in GLOBALS you just set things like: TRY0=SIP/trunk1 TRY1=SIP/trunk2 TRY3=SIP/other1 The above code is limited to 2 lines per channel. The code I used originally (not sure where I found it anymore, might have been this mailing list or might have been Voip-Info) support defining how many channels you wanted to use for each provider (ie, provider1 has 2 lines free, but provider2 has 5 lines). The original code didn't hold up though since if multiple lines were being dialed at the exact same instance they would both return the same availability before dialing the line. So in this one, I try to lock the line early and if I get some other kind of error I move on to the next group because I might have failed due to another race condition. Anyways, tons of problems when you're limited on channels. Mine is the best and one of a very few I've ever seen. SuperDial, I feel, is a silly idea. It's exactly the same as a regular Dial string. No clue why you'd use it over Dial. And the reason Dial doesn't work is because if the Dial'ed line hangs up it returns back to the orginal Dial Plan. Doesn't help at all. You hang up on the person, the person goes to the next line in the dial plan, and you get called again. You hang up, they call you back again. Soulds like a good way to use up air time. Nicholas Blasgen Partner / Network Operations Refractive Dialer LLC 415.692-5277 (w) 408.497.9796 (c) ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] SIP Trunk groups
He all, I have 2 GSM to Voip gateways and probably we will grow up to 4 more gateways. I already created a macro to make failover happen between gateways, but can imagine that everytime I add a new gateway I will need to modify the macro. The initial intention of this macro was to failover between different techonolgies. So I was hoping to create a Sip Trunk group using the same idea as truckgroup under dahdi but for sip trunks. Is that possible?, have you ever done this before? My Idea is: sip_trunk1 = SIP/gateway1 sip_trunk2 = SIP/gateway2 sip_trunk3 = SIP/gateway3 gsm_trunkgoup = sip_trunk1 ; sip_trunk2 ; sip_trunk3 [user] exten = _0.,1,wait() exten = _0.,n,Dial(gsm_trunkgoup/${exten:1},30) exten = _0.,n,Hangup Thanks, -- -- Mariano Lecuona ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Sip trunk groups, possible?
Hi Guys, I have couple of SIP trunks, everyone of them with different IP address. Is there a way to create some kind of SIP group trunks, like I can do with ZAP channels. With sip I have to do example below, in order to jump to next SIP trunk if first one is busy. Is there another, nicer way to do it? ... exten = _9[2345]X,3,Dial(SIP/${EXTEN:[EMAIL PROTECTED],${DIALTIME}) exten = _9[2345]X,104,Dial(SIP/${EXTEN:[EMAIL PROTECTED],${DIALTIME}) With zap trunks it very nice, I just put zap channels in groups: ... exten = _9[2345]X,3,Dial(ZAP/G2/${EXTEN:1},${DIALTIME})) ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users