amygrant
Guru
- Joined
- Apr 4, 2010
- Messages
- 132
- Reaction score
- 3
[ Title of this post should be "Route with multiple GV trunks only using first GV trunk" but I cannot edit the title that is showing when looking at the Help section of the forums ]
I have a custom context named CHARLIESHEEN which only access to a route called WINNING. The WINNING route has 3 GV trunks in its trunk sequence: gvtrunk1, gvtrunk2, and gvtrunk3
I have 3 SIP extensions all of which are setup to use the custom context CHARLIESHEEN. All extensions work fine out outbound and inbound calling.
However, failure occurs when two of the extensions try to have an outbound call at the same time. If extension1 is already on an outbound call and then extension2 tries to make an outbound call, asterisk tries using the same trunk that extension1 is already on and I get this in my logs:
So I don't get the call back through jabber and asterisk times out after 30 seconds and then the call is aborted.
Alright, so the question is why is asterisk not selecting the gvtrunk2 since extension1 is already on gvtrunk1? The trunk definitions do have maximum channels set to 1.
Ironically, this setup is currently not winning.
The [googlein] section from my extensions_custom.conf
The trunk definition section of extensions_custom.cof
As a temporary fix I am going to create a separate outbound route for each of the trunks, a separate custom context corresponding to each of those routes, and then bind each extension to its own custom context... but I am trying to figure out the why trunk2 is not being selected because I would like to have a small pool of GV accounts that numerous extensions can share for outbound calling instead of having too many unnecessary google accounts
Status
I have a custom context named CHARLIESHEEN which only access to a route called WINNING. The WINNING route has 3 GV trunks in its trunk sequence: gvtrunk1, gvtrunk2, and gvtrunk3
I have 3 SIP extensions all of which are setup to use the custom context CHARLIESHEEN. All extensions work fine out outbound and inbound calling.
However, failure occurs when two of the extensions try to have an outbound call at the same time. If extension1 is already on an outbound call and then extension2 tries to make an outbound call, asterisk tries using the same trunk that extension1 is already on and I get this in my logs:
Code:
[2011-04-13 10:14:31] VERBOSE[3703] pbx.c: -- Executing [somephonenumber@gvoice-gvtrunk1:5] NoOp("Local/somephonenumber@gvoice-gvtrunk1-7474;2", "Never received callback from Google Voice on channel Local/somephonenumber@gvoice-gvtrunk1-7474;2 - exiting") in new stack
So I don't get the call back through jabber and asterisk times out after 30 seconds and then the call is aborted.
Alright, so the question is why is asterisk not selecting the gvtrunk2 since extension1 is already on gvtrunk1? The trunk definitions do have maximum channels set to 1.
Ironically, this setup is currently not winning.
The [googlein] section from my extensions_custom.conf
Code:
exten => [email protected],1,Wait(1)
exten => [email protected],n,Set([email protected])
exten => [email protected],n,JABBERSend(asterisk1,${ALERTNAME},Incoming Google Voice Call: ${CALLERID(name):2:10})
exten => [email protected],n,Set(CALLERID(number)=${CALLERID(name):2:10})
exten => [email protected],n,Set(CALLERID(name)=${CALLERID(number)})
exten => [email protected],n,GotoIf(${DB_EXISTS(gv_dialout_gvtrunk1/channel)}?bridged)
exten => [email protected],n,Goto(s,regcall)
exten => [email protected],n(bridged),Bridge(${DB_DELETE(gv_dialout_gvtrunk1/channel)}, p)
exten => [email protected],1,Wait(1)
exten => [email protected],n,Set([email protected])
exten => [email protected],n,JABBERSend(asterisk2,${ALERTNAME},Incoming Google Voice Call: ${CALLERID(name):2:10})
exten => [email protected],n,Set(CALLERID(number)=${CALLERID(name):2:10})
exten => [email protected],n,Set(CALLERID(name)=${CALLERID(number)})
exten => [email protected],n,GotoIf(${DB_EXISTS(gv_dialout_gvtrunk2/channel)}?bridged)
exten => [email protected],n,Goto(s,regcall)
exten => [email protected],n(bridged),Bridge(${DB_DELETE(gv_dialout_gvtrunk2/channel)}, p)
The trunk definition section of extensions_custom.cof
Code:
[gvoice-gvtrunk1]
exten => _X.,1,System(sudo /usr/bin/gvoice -e [email protected] -p PASSWORD call ${EXTEN} [email protected] 9 &)
exten => _X.,n,Background(pls-wait-connect-call)
exten => _X.,n,Set(DB(gv_dialout_gvtrunk1/channel)=${CHANNEL})
exten => _X.,n,Wait(30)
exten => _X.,n,Noop(Never received callback from Google Voice on channel ${DB_DELETE(gv_dialout_gvtrunk1/channel)} - exiting)
exten => h,1,GotoIf($["${CHANNEL(state)}" = "Ring"]?:bridged)
exten => h,n,Noop(Hangup on channel ${DB_DELETE(gv_dialout_gvtrunk1/channel)})
exten => h,n,System(sudo /usr/bin/gvoice -e [email protected] -p PASSWORD cancel &)
exten => h,n,Hangup()
exten => h,n(bridged),Noop(The channel has been bridged successfully)
[gvoice-gvtrunk2]
exten => _X.,1,System(sudo /usr/bin/gvoice -e [email protected] -p PASSWORD call ${EXTEN} [email protected] 9 &)
exten => _X.,n,Background(pls-wait-connect-call)
exten => _X.,n,Set(DB(gv_dialout_gvtrunk2/channel)=${CHANNEL})
exten => _X.,n,Wait(30)
exten => _X.,n,Noop(Never received callback from Google Voice on channel ${DB_DELETE(gv_dialout_gvtrunk2/channel)} - exiting)
exten => h,1,GotoIf($["${CHANNEL(state)}" = "Ring"]?:bridged)
exten => h,n,Noop(Hangup on channel ${DB_DELETE(gv_dialout_gvtrunk2/channel)})
exten => h,n,System(sudo /usr/bin/gvoice -e [email protected] -p PASSWORD cancel &)
exten => h,n,Hangup()
exten => h,n(bridged),Noop(The channel has been bridged successfully)
As a temporary fix I am going to create a separate outbound route for each of the trunks, a separate custom context corresponding to each of those routes, and then bind each extension to its own custom context... but I am trying to figure out the why trunk2 is not being selected because I would like to have a small pool of GV accounts that numerous extensions can share for outbound calling instead of having too many unnecessary google accounts
Status
Code:
+------------------------System Information---------------------------+
| Asterisk = ONLINE | Dahdi = ONLINE | MySQL = ONLINE |
| SSH = ONLINE | Apache = ONLINE | Iptables = ONLINE |
| Fail2ban = ONLINE | Internet = ONLINE | Ip6Tables = ONLINE |
| BlueTooth = ONLINE | Hidd = ONLINE | NTPD = ONLINE |
| SendMail = ONLINE | Samba = OFFLINE | Webmin = ONLINE |
| Ethernet0 = ONLINE | Ethernet1 = N/A | Wlan0 = N/A |
| |
| PBX in a Flash Version = 1.7.5.5 |
| FreePBX Version = 2.8.1.4 |
| Running Asterisk Version = Asterisk 1.8.0 |
| Asterisk Source Version = 1.8.0 |
| Dahdi Source Version = 2.4.0+2.4.0 |
| Libpri Source Version = 1.4.11.5 |
| IP Address = 192.168.1.5 on eth0 |
| Operating System = CentOS release 5.5 (Final) |
| Kernel Version = 2.6.18-194.26.1.el5 - 32 Bit |
| |
+---------------------------------------------------------------------+