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

administrator tootai admin at tootai.net
Sat Aug 14 10:22:12 MST 2004


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).

Till now I had prefix=1,2,3,4,5,6,7,8,9 in my h323.conf, so all call not 
starting with 0 are directed to *, others to a Gateway. In this case 
it's working, but endpoints are not able to call IP adresses :-(, those 
call are redirected to *

I tried with macro but a line like

${ARG1} => 100,1,Goto(demo,s,1)

is not accepted (no such host)

Is their not a variable containing the dialed number that could be 
modified? Is it not recommended? Has someone another solution (yes I 
know, I can duplicate my lines, but that's not what I want ;-))?

Thanks for any hint

-- 
Daniel



More information about the asterisk-users mailing list