Page 1 of 1

MULTIPLE TRUNKS

PostPosted: Wed Feb 02, 2011 4:58 am
by sofcall
VERSION: 2.0.5-173
BUILD: 90320-0424
Asterisk 1.2.30.2
Vicidialnow(vicidial on centos)

With 2 servers (1 CORE 2 QUAND 4gig ram) for the vicidial and (1 CORE 2 QUAND 4gig ram 500gig Hdd
for Database.)with Eyebeam as a softphone with 20 seaters.
Connection to the Voip provider is an sip Trunk using the G729 codec ;
Below is our sip trung conf :
host=ourvoipprovider.
type=friend
context=from-trunk
username=our username
fromuser= our username
secret=our sercret
dtmfmode=rfc2833
qualify=600
disallow=all
allow=g729
insecure=very.

I'm wondering if there is a possibility to choose a special trunk for a compagne.
exemple: I want the compagne A to make calls using trunk 1.
and the compagne B to use the trunk 2.(another trunk).

Regards.

use different dial prefix

PostPosted: Wed Feb 02, 2011 11:32 am
by striker
Hi

you can multiple trunks.

use different diaprefix for each campaign and also write you dialplan entry in carrier settings according to that dialprefix

PostPosted: Mon Mar 14, 2011 6:44 am
by Mezzaz
hi striker,
how to configure dialplan entry in carrier settings for according to that dialprefix?

thx

dialprefix

PostPosted: Mon Mar 14, 2011 11:44 am
by striker
hi

exten => _888NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _888NXXXXXX,2,Dial(${TRUNK1}/${EXTEN:3},,tTor)
exten => _888NXXXXXX,3,Hangup

exten => _777NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _777NXXXXXX,2,Dial(${TRUNK2}/${EXTEN:3},,tTor)
exten => _777NXXXXXX,3,Hangup

TRUNK1 AND TRUNK2 should be registered with the provider
Use 888 as dial prefix for campaign 1
use 777 as dial prefix for campaign 2

PostPosted: Mon Mar 14, 2011 11:59 am
by Mezzaz
thank you for help

PostPosted: Mon Mar 14, 2011 4:22 pm
by williamconley
Remember that the "EXTEN:3" will strip off the first three digits of the number dialed (888 or 777 in this example) before sending the remaining portion to the carrier. This allows for an UNLIMITED number of carriers with associated campaigns, since you can change the number of digits as long as you also change the EXTEN:# to strip off the correct amount.

Most of us in the US use "_91NXXNXXXXXX", "_81NXXNXXXXXX", "_71NXXNXXXXXX", etc, for a single digit carrier choice (placing 9, 8 or 7 respectively) in the dial prefix field of the campaign. This allows for 10 carriers which is usually plenty. Of course, that would then require "EXTEN:1" instead of :3 so it would strip off only the first digit and send 1+10digit phone to the carrier.