UK and international dialplan

All installation and configuration problems and questions

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

UK and international dialplan

Postby attila.szabo » Mon Nov 24, 2014 12:09 pm

Hi,

I am setting up a Vicidial server But having trouble with the dialplans.

The SIP Carrier expects the phone numbers as [CC] [Phone number] where [CC] is the 2 digit country code
We would use 9 to dial out, so in the users depending on how they dial would have the fallowing options depending on where they direct their calls:
1. - 9[CC] [9 Digit number] - generic number international format - without 00 in front
2. - 9 00 [CC] [9 Digit number] - generic number international format - with 00 in front
3. - 9 0 [9 Digit number] - Uk Landline / mobile - with 0 in front

You would normally dial a landline from your mobile for example would look like this 0123456789 for UK numbers.
Acording to the requirements I would need to set up dialplans for the above cases like this :
1. - remove 9 and dial the rest of the numbers
2. - remove 9 and 00 and dial the rest of the numbers
2. - remove 9 and 0 from the front and add 44 to the begining and dial the rest of the numbers.

I have tried all sort of dialplans, but it doesnt seems to work for me.

My settings are:
Code: Select all
Carrier ID:    EntaTrunk1
Carrier Name:  Entanet
Registration String:    egister => 44xxxxxx8:xsssss1@DNSNAME
Template ID: None
 Account Entry:
[UK-Calling]
type=friend
username=44xxxxxx8
secret=xsssss1
host=DNSNAME
insecure=port,invite
context=default
fromuser=44xxxxxx8


Protocol: SIP
Globals String:
Code: Select all
TRUNK = SIP/UK-Calling

Dialplan Entry:
Code: Select all
exten => _90N[1-9]X.,1,AGI(agi://127......../call_log)
exten => _90N[1-9]X.,2,Dial(${TRUNK}/${EXTEN},,To)
exten => _90N[1-9]X.,3,Hangup

exten => _900N[1-9]X.,1,AGI(agi://127........./call_log)
exten => _900N[1-9]X.,2,Dial(${TRUNK}/${EXTEN},,To)
exten => _900N[1-9]X.,3,Hangup


I can see that the trunk registers to the currier:
Code: Select all
Host                                    dnsmgr Username       Refresh State                Reg.Time
DNSNAME:5060                 Y     44xxxxxx8       105 Registered           Mon, 24 Nov 2014 16:58:59
1 SIP registrations.




When I try to dial out I can see the logs like this:

Code: Select all
== Using SIP RTP CoS mark 5
[Nov 24 16:59:21]     -- Executing [90044123456789@default:1] AGI("SIP/cc229-0000004f", "agi://127.......:4577/call_log") in new stack
[Nov 24 16:59:21]     -- <SIP/cc229-0000004f>AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Nov 24 16:59:21]     -- Executing [90044123456789@default:2] Dial("SIP/cc229-0000004f", "SIP/UK-Calling/90044123456789,,To") in new stack
[Nov 24 16:59:21]   == Using SIP RTP CoS mark 5
[Nov 24 16:59:21]     -- Called SIP/UK-Calling/900447735556435
[Nov 24 16:59:21]   == Everyone is busy/congested at this time (1:0/0/1)
[Nov 24 16:59:21]     -- Executing [90044123456789@default:3] Hangup("SIP/cc229-0000004f", "") in new stack
[Nov 24 16:59:21]   == Spawn extension (default, 900447735556435, 3) exited non-zero on 'SIP/cc229-0000004f'
[Nov 24 16:59:21]     -- Executing [h@default:1] AGI("SIP/cc229-0000004f", "agi://127........:4577/call_log--HVcauses--PRI-----NODEBUG-----1-----CHANUNAVAIL----------") in new stack
[Nov 24 16:59:21]     -- <SIP/cc229-0000004f>AGI Script agi://127........:4577/call_log--HVcauses--PRI-----NODEBUG-----1-----CHANUNAVAIL---------- completed, returning 0

I don't really know where it goes wrong. Can anyone help me in this?
Before you ask: VERSION: 2.10-451a - BUILD: 140902-0816
attila.szabo
 
Posts: 9
Joined: Mon Nov 24, 2014 10:46 am

Re: UK and international dialplan

Postby attila.szabo » Tue Nov 25, 2014 12:09 pm

Anybody has a solution for me?

So fare this plan worked for UK numbers, but not in international formt....

Code: Select all
exten => _XXXXXX.,1,AGI(agi://127.0.0.1:4577/call_log)  remove spaces
exten => _XXXXXX.,2,Dial(${TRUNK}/${EXTEN},,To)
exten => _XXXXXX.,3,Hangup


Thanks
Before you ask: VERSION: 2.10-451a - BUILD: 140902-0816
attila.szabo
 
Posts: 9
Joined: Mon Nov 24, 2014 10:46 am

Re: UK and international dialplan

Postby attila.szabo » Wed Nov 26, 2014 10:21 am

OK 2 day’s research made me think that this is a badly documented topic, however I have a working dial plan. Set up for a UK located call centre and office

Code: Select all
exten => _944.,1,AGI(agi://127.0.0.1:4577/call_log)  remove spaces
exten => _944.,2,Dial(${TRUNK}/0${EXTEN:3},,To)
exten => _944.,3,Hangup

exten => _90044.,1,AGI(agi://127.0.0.1:4577/call_log)  remove spaces
exten => _90044.,2,Dial(${TRUNK}/0${EXTEN:5},,To)
exten => _90044.,3,Hangup

exten => _900.,1,AGI(agi://127.0.0.1:4577/call_log)  remove spaces
exten => _900.,2,Dial(${TRUNK}/${EXTEN:1},,To)
exten => _900.,3,Hangup

exten => _90[1-9].,1,AGI(agi://127.0.0.1:4577/call_log)  remove spaces
exten => _90[1-9].,2,Dial(${TRUNK}/${EXTEN:1},,To)
exten => _90[1-9].,3,Hangup

exten => _90044.,1,AGI(agi://127.0.0.1:4577/call_log)  remove spaces
exten => _90044.,2,Dial(${TRUNK}/0${EXTEN:5},,To)
exten => _90044.,3,Hangup

exten => _0044XX.,1,AGI(agi://127.0.0.1:4577/call_log)  remove spaces
exten => _0044XX.,2,Dial(${TRUNK}/0${EXTEN:4},,To)
exten => _0044XX.,3,Hangup

exten => _XXXXXX.,1,AGI(agi://127.0.0.1:4577/call_log)  remove spaces
exten => _XXXXXX.,2,Dial(${TRUNK}/${EXTEN},,To)
exten => _XXXXXX.,3,Hangup

exten => _999,1,AGI(agi://127.0.0.1:4577/call_log)  remove spaces
exten => _999,2,Dial(${TRUNK}/${EXTEN},,To)
exten => _999,3,Hangup

exten => _112,1,AGI(agi://127.0.0.1:4577/call_log)  remove spaces
exten => _112,2,Dial(${TRUNK}/${EXTEN},,To)
exten => _112,3,Hangup


These plans allows me to dial numbers with or without 9 in front and it is really important if your call centre have both desktop phone users and dialler users.

Just so you can understand it I explain it a bit more:
This is for emergency calls means if this number dialled (same for 112):
Code: Select all
999,2,Dial(${TRUNK}/${EXTEN},,To)


This means if it is at least 6 digit send it as it is to trunk:
Code: Select all
exten => _XXXXXX.,2,Dial(${TRUNK}/${EXTEN},,To)


This means if starts only with 0044 then remove 0044 (4 digits -
Code: Select all
EXTEN:4
) and add 0 in front of number (note 0 in
Code: Select all
:0${EXTEN:4}
) (UK number in my case expected in a non 0044.... format)
Code: Select all
exten => _0044XX.,2,Dial(${TRUNK}/0${EXTEN:4},,To)


This means if more than 6 digit send it as it is:
Code: Select all
exten => _XXXXXX.,2,Dial(${TRUNK}/${EXTEN},,To)




The rest you can figure out based on these examples.

I would add these examples with description to the documentation because what we have there is really poor. So if you guys read this think about it...

Have fun .
Before you ask: VERSION: 2.10-451a - BUILD: 140902-0816
attila.szabo
 
Posts: 9
Joined: Mon Nov 24, 2014 10:46 am

Re: UK and international dialplan

Postby DomeDan » Thu Dec 18, 2014 7:52 am

Hello!

Well done solving your problem by yourself!
for you an others reading, here is some info about dialplan patterns http://www.voip-info.org/wiki/view/Aste ... n+Patterns
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden


Return to Support

Who is online

Users browsing this forum: No registered users and 78 guests