[Asterisk-Users] Re: Prefix to CALLING Number ?

Tony Mountifield tony at softins.clara.co.uk
Fri Apr 29 00:41:44 MST 2005


In article <06f801c54c03$f7035210$cc04330a at NTBBRN>,
barney <barney at spirit.bentel.sk> wrote:
> 
> I`m trying to add some prefix before my local extensions, when my calls are routed to ZAP trunk.
> 
> (i.e.:  my local extension is 3333, and i would like to send request to my telco provider
> with source phone number 5555553333)
> 
> Is there any way to do this ? I just know to add prefix (via prefix application) to the
> called number (but not calling).

I haven't tried this, but the first thing I would try is this (replace
xxxx with the extension pattern you are using):

exten => xxxx,1,SetCIDNum(${PREFIX}${CALLERIDNUM})
exten => xxxx,2,Dial(.....)

where PREFIX is a global variable containing the prefix you want to prepend.

See http://www.voip-info.org/wiki-Asterisk+cmd+SetCIDNum

You may need the 'a' flag to SetCIDNum too, depending on your application.

> PS:  sorry for my poor english

It's much better than my non-existent Slovakian!

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list