Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

removing prefixes

Status
Not open for further replies.

johnnyasterisk

IS-IT--Management
Apr 2, 2008
26
0
0
IE
I have some calls that come into asterisk as a normal number in the format:

09X XXX XXX

However depending on the carrier i sometimes get

03539X XXX XXX

I want a way to remove the 353 ONLY if it is received in that format...


Any Ideas?
 
This is what I did on a bandwidth.com trunk to strip the "+" sign from what they were sending.


[from-bandwidth-com]
exten => _X.,1,Noop(Entering from-bandwidth-com context)
exten => _X.,n,Set(CALLERID(number)=${CALLERIDNUM:1})
include => from-trunk

Go to your bandwidth.com trunk and set the context to:

context=from-bandwidth-com

You would just change the line to

exten => _X.,n,Set(CALLERID(number)=${CALLERIDNUM:3})

to strip off three characters.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top