[Asterisk-Users] Howto remove digits from a called number

administrator tootai admin at tootai.net
Sun Aug 15 08:05:56 MST 2004


Greg Hill a écrit :

>On Sat, 14 Aug 2004, administrator tootai wrote:
>
>  
>
>>Hi list,
>>
>>I have SIP clients and H323 GK connected through h323 channel (Nufone).
>>In h323 conf I gave prefix=09 so all call starting with this prefix are
>>send to asterisk. The context is also given their as [fromh323]
>>
>>But now, in asterisk, I want to have the called number without this 2
>>leading digits so the exten variable will be according to my actual
>>dialplan. Here's an exemple:
>>
>>In extensions.conf I have
>>
>>exten => 100,1,Goto(demo,s,1)
>>
>>If I call #100 from SIP it's ok. So now, if I want to reach this
>>extension from an h323 EP, I have to call 09100. This call will never
>>succeed (or I create a new exten line, same as above, with this prefix).
>>    
>>
>
>You're right, you will have to create an extension to match the 09xxx
>numbers. But you don't have to create one for every "real" SIP extension
>you have. Instead, make one that matches all 09xxx extensions and does a
>goto:
>
>exten => _09XXX,1,Goto(yoursipextensionscontext,${EXTEN:2},1)
>  
>
That did the trick.

>for three digit "real" extensions. Add or remove X's for more or fewer
>digits, or just use _09. for _ANYTHING_ that starts with 09 (keep that in
>mind.. sometimes that wildcard extension comes back to bite you!).
>  
>
Already done ;-) Thanks for you help
-- 
Daniel



More information about the asterisk-users mailing list