Help linking second GSM gateway to same server

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Help linking second GSM gateway to same server

Postby Merchant007 » Tue Dec 22, 2015 10:36 am

Goautodial 3.3 Base install with vicidial VERSION: 2.12-524a (updated via svc)
GSM Gateway 32 Port (SIP)
Xenon 4 Core 8 GB Server

hi all , currently everything is working with Vicidial VERSION: 2.12-524a + GSM gateway 32 Port linked using sip.conf

Code: Select all


exten => _91X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91X.,n,Dial(sip/gsmtrunk/${EXTEN:2},,tTo)
exten => _91X.,n,Hangup()

[gsmtrunk]
disallow=all
allow=gsm
allow=ulaw
type=friend
dtmfmode=rfc2833
context=trunkinbound
qualify=yes
insecure=very
nat=yes
host=192.168.0.210


we are planning to get 1 more gateway 16 Port and link to same server , kindly guide me how to link second gateway also to same server ?

I Just add 2 host ? like below ?
host=192.168.0.210
host=192.168.0.211

2) How will server know can send 32 calls to first gateway and Only 16 calls to second gateway

usingadmin > server setting we can limit overall calls but not how many calls per carrier ,kindly enlighten me
VERSION: 2.12-548a
BUILD: 160331-2204
asterisk 11.21.0-vici
Revision:2504
Merchant007
 
Posts: 58
Joined: Sat Oct 03, 2015 11:34 am

Re: Help linking second GSM gateway to same server

Postby Merchant007 » Wed Dec 23, 2015 10:41 am

can anyone help
VERSION: 2.12-548a
BUILD: 160331-2204
asterisk 11.21.0-vici
Revision:2504
Merchant007
 
Posts: 58
Joined: Sat Oct 03, 2015 11:34 am

Re: Help linking second GSM gateway to same server

Postby covarrubiasgg » Wed Dec 30, 2015 12:27 pm

You will have to create a separate trunk for each gateway (add another carrier in vicidial)

in order to decide how to route the calls to one gateway or another the simplest way to do it is by using a different prefix for each gateway on the dialplan

Code: Select all
; For Gateway 1
exten => _91X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91X.,n,Dial(sip/gsmtrunk/${EXTEN:2},,tTo)
exten => _91X.,n,Hangup()

; For Gateway 2
exten => _81X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _81X.,n,Dial(sip/gsmtrunk2/${EXTEN:2},,tTo)
exten => _81X.,n,Hangup()


if you dial with 9 you will use gateway 1, if you dial with 8 you will use gateway 2, so If you have multiple campaigns you can choose which one will use gateway 1 and which one will use gateway 2 by changing the dial prefix on the campaign.


If you dont have that option another way to it is like this:

Code: Select all
; For Gateway 1
exten => _91XXXXXXXXX[0-4],1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91XXXXXXXXX[0-4].,n,Dial(sip/gsmtrunk/${EXTEN:2},,tTo)
exten => _91XXXXXXXXX[0-4].,n,Hangup()

; For Gateway 2
exten => _91XXXXXXXXX[5-9],1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91XXXXXXXXX[5-9],n,Dial(sip/gsmtrunk2/${EXTEN:2},,tTo)
exten => _91XXXXXXXXX[5-9],n,Hangup()


This will send all the calls dialing numbers ending with 0,1,2,3 or 4 through the gateway 1 and the rest ending 5,6,7,8,9 through the gateway 2, i have test this on productions and the outcome is really good it does a good load balancing without having to use complicated macros.

If neither options are good for you, you will have to create a custom macro to load balance the calls between the 2 gateways.
covarrubiasgg
 
Posts: 420
Joined: Thu Jun 10, 2010 10:20 am
Location: Tijuana, Mexico

Re: Help linking second GSM gateway to same server

Postby Merchant007 » Thu Dec 31, 2015 6:29 am

thankyou, i changed carrier entry from

OLD
Code: Select all
exten => _91X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91X.,n,Dial(sip/gsmtrunk/${EXTEN:2},,tTo)
exten => _91X.,n,Hangup()


to

Code: Select all
exten => _91XXXXXXXXX[0-4],1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91XXXXXXXXX[0-4].,n,Dial(sip/gsmtrunk/${EXTEN:2},,tTo)
exten => _91XXXXXXXXX[0-4].,n,Hangup()


and dialed directly from phone 91895XXXXXX4 and call is not connecting

Code: Select all
[Dec 31 16:52:23]   == Spawn extension (default, 8600055, 1) exited non-zero on 'SIP/8077-00000070'
[Dec 31 16:52:23]     -- Executing [h@default:1] AGI("SIP/8077-00000070", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16---------------") in new stack
[Dec 31 16:52:23]     -- <SIP/8077-00000070>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------- completed, returning 0
[Dec 31 16:52:25]   == Using SIP RTP CoS mark 5
[Dec 31 16:52:25]     -- Executing [918955555554@defaultlog:1] AGI("SIP/8077-00000071", "agi-NVA_recording.agi,BOTH------Y---Y---Y") in new stack
[Dec 31 16:52:25]     -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-NVA_recording.agi
[Dec 31 16:52:25]     -- AGI Script Executing Application: (Monitor) Options: (wav,/var/spool/asterisk/monitor/MIX/20151231165225_8077_918955555554)
[Dec 31 16:52:25]     -- <SIP/8077-00000071>AGI Script agi-NVA_recording.agi completed, returning 0
[Dec 31 16:52:25]     -- Executing [918955555554@defaultlog:2] Goto("SIP/8077-00000071", "default,918955555554,1") in new stack
[Dec 31 16:52:25]     -- Goto (default,918955555554,1)
[Dec 31 16:52:25]     -- Executing [918955555554@default:1] AGI("SIP/8077-00000071", "agi://127.0.0.1:4577/call_log") in new stack
[Dec 31 16:52:25]     -- <SIP/8077-00000071>AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Dec 31 16:52:25]     -- Auto fallthrough, channel 'SIP/8077-00000071' status is 'UNKNOWN'
[Dec 31 16:52:25]     -- Executing [h@default:1] AGI("SIP/8077-00000071", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0---------------") in new stack
[Dec 31 16:52:25]     -- <SIP/8077-00000071>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0--------------- completed, returning 0[Dec 31 16:52:23]   == Spawn extension (default, 8600055, 1) exited non-zero on 'SIP/8077-00000070'
[Dec 31 16:52:23]     -- Executing [h@default:1] AGI("SIP/8077-00000070", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16---------------") in new stack
[Dec 31 16:52:23]     -- <SIP/8077-00000070>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------- completed, returning 0
[Dec 31 16:52:25]   == Using SIP RTP CoS mark 5
[Dec 31 16:52:25]     -- Executing [918955555554@defaultlog:1] AGI("SIP/8077-00000071", "agi-NVA_recording.agi,BOTH------Y---Y---Y") in new stack
[Dec 31 16:52:25]     -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-NVA_recording.agi
[Dec 31 16:52:25]     -- AGI Script Executing Application: (Monitor) Options: (wav,/var/spool/asterisk/monitor/MIX/20151231165225_8077_918955555554)
[Dec 31 16:52:25]     -- <SIP/8077-00000071>AGI Script agi-NVA_recording.agi completed, returning 0
[Dec 31 16:52:25]     -- Executing [918955555554@defaultlog:2] Goto("SIP/8077-00000071", "default,918955555554,1") in new stack
[Dec 31 16:52:25]     -- Goto (default,918955555554,1)
[Dec 31 16:52:25]     -- Executing [918955555554@default:1] AGI("SIP/8077-00000071", "agi://127.0.0.1:4577/call_log") in new stack
[Dec 31 16:52:25]     -- <SIP/8077-00000071>AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Dec 31 16:52:25]     -- Auto fallthrough, channel 'SIP/8077-00000071' status is 'UNKNOWN'
[Dec 31 16:52:25]     -- Executing [h@default:1] AGI("SIP/8077-00000071", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0---------------") in new stack
[Dec 31 16:52:25]     -- <SIP/8077-00000071>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0--------------- completed, returning 0



Call is not connected

to test , i changed carrier to old

now call is connecting

Code: Select all
[Dec 31 16:58:28]   == Using SIP RTP CoS mark 5
[Dec 31 16:58:28]     -- Executing [918955555554@defaultlog:1] AGI("SIP/8077-00000075", "agi-NVA_recording.agi,BOTH------Y---Y---Y") in new stack
[Dec 31 16:58:28]     -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-NVA_recording.agi
[Dec 31 16:58:28]     -- AGI Script Executing Application: (Monitor) Options: (wav,/var/spool/asterisk/monitor/MIX/20151231165828_8077_918955555554)
[Dec 31 16:58:28]     -- <SIP/8077-00000075>AGI Script agi-NVA_recording.agi completed, returning 0
[Dec 31 16:58:28]     -- Executing [918955555554@defaultlog:2] Goto("SIP/8077-00000075", "default,918955555554,1") in new stack
[Dec 31 16:58:28]     -- Goto (default,918955555554,1)
[Dec 31 16:58:28]     -- Executing [918955555554@default:1] AGI("SIP/8077-00000075", "agi://127.0.0.1:4577/call_log") in new stack
[Dec 31 16:58:28]     -- <SIP/8077-00000075>AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Dec 31 16:58:28]     -- Executing [918955555554@default:2] Dial("SIP/8077-00000075", "sip/gsmtrunk/8955555554,,tTo") in new stack
[Dec 31 16:58:28]   == Using SIP RTP CoS mark 5
[Dec 31 16:58:28]     -- Called sip/gsmtrunk/8955555554
[Dec 31 16:58:29]     -- SIP/gsmtrunk-00000076 is making progress passing it to SIP/8077-00000075
[Dec 31 16:58:29]     -- SIP/gsmtrunk-00000076 is making progress passing it to SIP/8077-00000075
[Dec 31 16:58:29]     -- SIP/gsmtrunk-00000076 is making progress passing it to SIP/8077-00000075
[Dec 31 16:58:29]     -- SIP/gsmtrunk-00000076 is making progress passing it to SIP/8077-00000075
[Dec 31 16:58:41]     -- SIP/gsmtrunk-00000076 answered SIP/8077-00000075


Note country code is 91 India
VERSION: 2.12-548a
BUILD: 160331-2204
asterisk 11.21.0-vici
Revision:2504
Merchant007
 
Posts: 58
Joined: Sat Oct 03, 2015 11:34 am

Re: Help linking second GSM gateway to same server

Postby covarrubiasgg » Thu Dec 31, 2015 1:37 pm

Merchant007 wrote:thankyou, i changed carrier entry from



Code: Select all
exten => _91XXXXXXXXX[0-4],1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91XXXXXXXXX[0-4].(REMOVE DOT HERE),n,Dial(sip/gsmtrunk/${EXTEN:2},,tTo)
exten => _91XXXXXXXXX[0-4].(REMOVE DOT HERE),n,Hangup()




Try removing the dots or add it to the first line too.
covarrubiasgg
 
Posts: 420
Joined: Thu Jun 10, 2010 10:20 am
Location: Tijuana, Mexico


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 117 guests

cron