-
#5876 |
Hi,
How can I strip digits from the called number? For example I have the following extension to dial:
exten => _94xxx,2,Dial(SIP/105/${EXTEN},5)
but I wont to strip this two leading digits(94).
Thanks
#5877 |Stephon,
Why are you trying to remove the first 2 digits? Are the extensions not 5 digits long? Is the 94 a dial prefix? Usually prefixes can be removed from Asterisk itself. What are you trying to accomplish? More information is needed to try and give you the proper answer.Kevin
#5878 |Hi,
I have local SIP clients and SIP clients connected through trunk. The calls coming from that trunk comes with prefix=94. That’s how the system is set up by previous admin and I can not change it.
But now, in asterisk, I want to have the called number without this two
leading digits so the exten variable will be according to my actual
dialplan. Here is an example:exten => 200,1,Dial(SIP/105/${EXTEN},5)
It’s ok if I call 200 from local asterisk SIP client but If I want to reach this
extension from SIP client coming through trunk, I have to call 94200.#5879 |Hello Stephon,
The first two digits from the called number can be stripped using ${EXTEN:2} expression.
So, the dial plan code should be like this:
exten => _94xxx,2,Dial(SIP/105/${EXTEN:2},5)I hope this answers your question.
Best regards,
Michael DenichApstel support team
http://www.Apstel.com
You must be logged in to reply to this topic.