[asterisk-users] Adding/Removing Prefixes

Thomas Kenyon digium at sanguinarius.co.uk
Wed Aug 23 04:12:36 MST 2006


Scott Pinhorne wrote:
> Hi All
> 
> When a user wishes to 'break out' they prefix there call with a 9.
> I know how to remove the 9 and then dial the remaining number and this
> is all working fine.
> 
> I now need to remove the 9 but then prefix another number onto the phone
> number before dialing now but am unsure how to do this is the dialplan.
> 
something like.

If 123 is the prefix.

Dial(ZAP/g2/123${EXTEN:1})

Failing that.

SetVar(PREFIX=123)
Dial(ZAP/g2/${PREFIX}${EXTEN:1})

> Would someone be able to point me in the right direction or provide an
> example diaplan that does this?
> 
Jussike at.




More information about the asterisk-users mailing list