custom context for incoming calls

drorla
Posts: 20
Member Since:
2007-09-04

Hi all.
This will sound an easy problem, but I can't seem to find an easy answer.
I did research and had some progress, but still not there yet.
I have an inbound trunk that I need to add a 00 prefix to all incoming calls, and then dial them as from-internal.
I know that in the incoming trunk details i need to add a special context like from-trunk-zeroz. something like this-
allow=all
canreinvite=no
context=from-trunk-zeroz
And then add a custom context somewhere. need the context code and it's specific location.
If someone can detail the process i will be very thankfull.
Thanks



SkykingOH
Posts: 9541
Member Since:
2007-12-17
All custom Asterisk

All custom Asterisk extension code goes in /etc/asterisk/extensions_custom.conf

--

Scott

aka "Skyking"



drorla
Posts: 20
Member Since:
2007-09-04
thanks

Thank you for your prompt answer.
What is the code itself, to add 00 to all incoming calls from yhat trunk and then dial it as "from-internal"?
Dror



drorla
Posts: 20
Member Since:
2007-09-04
self answer

I found the answer in this forum-
"in extensions_custom.conf add the following lines to the bottom of the config:
[from-trunk-custom]
exten => _X.,1,Set(CALLERID(num)=0${CALLERID(num)})
exten => _X.,n,Goto(from-trunk,${EXTEN},1)
Then go in to your trunk and change "context=from-trunk" TO "context=from-trunk-custom"
Drorla



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.