Page 1 of 1

Help me improve the carrier setting mainly DialPlan

PostPosted: Sat Oct 13, 2012 10:42 am
by jamessmith
VICIBOX 4.0.0 ISO | ASTERISK: 1.4.44-vici | VERSION: 2.6-375a | BUILD: 120831-1523 | CPU: i7-3770 | No Timing Hardware or Extra software | Hosted Server with core i7-3770 on ASUS P8H77-M PRO with 32GB RAM + 2x3TB SATA II driver using mdadm RAID1

I have the following settings in my carrier .. its working fine, but I am not sure they are completely correct .. not sure how to use the Global String .. also I think there are lots of extra entries in the Account Entry
Carrier ID: 1001
Carrier Name: MyCarrier01
Registration String: register => UXXX:PYYY@IP:5040/UXXX
Account Entry
Code: Select all
[T1001]
disallow=all
allow=alaw
allow=ulaw
allow=g729
type=friend
username=UXXX
secret=PYYY
host=IP
port=5040
dtmfmode=rfc2833
qualify=yes
insecure=very
nat=no

Protocol: SIP
Globals String: GS_ABC = SIP/T1001
Dialplan Entry:
Code: Select all
exten => _944XXXXXXXX.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _944XXXXXXXX.,2,Dial(SIP/${EXTEN:1}@T1001,20,tTor)
exten => _944XXXXXXXX.,3,Hangup



I know the common saying "if it ain't broke, don't fix it", but we are going to deploy a 10 servers cluster, so want to make sure its optimize.

Re: Help me improve the carrier setting mainly DialPlan

PostPosted: Sun Oct 14, 2012 3:57 pm
by williamconley
there is no further optimization (pertaining in any way to faster or "better" execution). However, proper use of the globals string (which is an asterisk function, not really related to Vicidial ...) can be helpful when building dialplans.

Instead of
Code: Select all
Dial(SIP/${EXTEN:1}@T1001,20,tTor)

Use
Code: Select all
Dial(${GS_ABC}/${EXTEN:1},20,tTor)


Note the "SIP/" is missing because it is part of the Globals String variable. Also the dial information inside the command is reorganized a bit (as there is more than one way to order the information in the dial command)

If you look up proper use of the Dial command in asterisk and Variable use in asterisk, you'll find that it is possible to have a dial string that has only variables, no actual carrier information. So with the carrier removed from the dial string, they become "uniform" and you can have "dial 2 service" through "dial 9 service" with nothing "carrier related" in any of them, making them interchangeable (easily change between carriers by alteration of only the globals string on each one). The only difference from one to the next woulld be the first digit and the name of the global variable. When we do this, we use "${DIAL9SERVICE}" instead of something like ${GS_ABC}. Simply for uniformity across systems.

But that has no effect on the actual functioning of the system. Just an organizational tool.