thenos
asked on
Asterisk - Append area code for only selected SIP users using shared trunk
I have remote office in another state with 4 users connecting to our Asterisk (Trixbox 2.8) server via a IPsec VPN. They connect to it and use the same outgoing trunk as the 70 users at our main office using Cisco 7941 handsets and SIP.
As they are using our main office trunk they are effectively dialling from a different state to the one they are in physically. Due to this they have to enter the area code for the state they are in whenever making local calls. This is unacceptable and I need to come up with a workaround for these 4 users without impacting on the 70 head office users.
I don't believe you can manipulate numbers using dialplan.xml and I haven't delved too deep into the nitty gritty of the extensions.conf file yet.
Could someone suggest a way of automatically adding the area code 03 to all 10 digit numbers dialed for only the 4 users using a shared trunk without affecting the other users?
As they are using our main office trunk they are effectively dialling from a different state to the one they are in physically. Due to this they have to enter the area code for the state they are in whenever making local calls. This is unacceptable and I need to come up with a workaround for these 4 users without impacting on the 70 head office users.
I don't believe you can manipulate numbers using dialplan.xml and I haven't delved too deep into the nitty gritty of the extensions.conf file yet.
Could someone suggest a way of automatically adding the area code 03 to all 10 digit numbers dialed for only the 4 users using a shared trunk without affecting the other users?
You would need to edit the extensions_custom.conf file.
If you could post your extensions.conf file, as well as your extensions_custom.conf file...I can try to help you with this.
I use o-source asterisk like grblades, so I would need those files to refresh my memory of Trixbox dialplan flow.
Essentially we will add a custom context, that will be hardcoded to prepend the number and modify the dialed number variable if the ${CDR(src)}...meets the criteria.
Please also tell me what the 4 users extensions are.
If you could post your extensions.conf file, as well as your extensions_custom.conf file...I can try to help you with this.
I use o-source asterisk like grblades, so I would need those files to refresh my memory of Trixbox dialplan flow.
Essentially we will add a custom context, that will be hardcoded to prepend the number and modify the dialed number variable if the ${CDR(src)}...meets the criteria.
Please also tell me what the 4 users extensions are.
ASKER
Hi,
I have attached all three extensions.conf files.
Extensions 201 through to 209 (inclusive) need all 8 digit numbers to be prepended with an 03.
Thanks for your help,
extensions.conf.txt
extensions-custom.conf.txt
extensions-additional.conf.txt
I have attached all three extensions.conf files.
Extensions 201 through to 209 (inclusive) need all 8 digit numbers to be prepended with an 03.
Thanks for your help,
extensions.conf.txt
extensions-custom.conf.txt
extensions-additional.conf.txt
Sorry i'm just now getting a chance to look at this....
I'll have something for you to test soon.
I'll have something for you to test soon.
Can you place a call from one of the extensions, and capture the CLI output for me?
I need to see which contexts the call is traversing.
I need to see which contexts the call is traversing.
ASKER
Apologies for my delay in getting this to you, I have been a little distracted of late...
Each extension is currently set to from-internal
I outputed a putty session using Astersk CLI (~>Asterisk -rvvvvvvvvvv) and made an outgoing call from extension 109 using PortGo (softphone). See attached txt file
Note for attached file:
Hostname has been replaced by <Asterisk>
The external number called from extension 109 has been replaced by <External Phone #>
asterisk-cli.txt
Each extension is currently set to from-internal
I outputed a putty session using Astersk CLI (~>Asterisk -rvvvvvvvvvv) and made an outgoing call from extension 109 using PortGo (softphone). See attached txt file
Note for attached file:
Hostname has been replaced by <Asterisk>
The external number called from extension 109 has been replaced by <External Phone #>
asterisk-cli.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Tested and working
You would then have a piece of dialplan code to check the entered number and if its 10 digits jump to the main context all other extensions go to when making calls but add the area code to the start.
I only work with straight Asterisk where you modify the dialplan directly. Sorry I dont know how to would go about doing the same thing via the Trixbox web interface.