[Asterisk-Users] How to strip a digit

Frederic Jean fjean at sunnetgroup.net
Tue May 30 13:12:27 MST 2006


You can do it adding a parameter to the ${EXTEN}:

exten => _91NXXNXXXXXX,1,AGI(call_log.agi,${EXTEN:1})
exten => _91NXXNXXXXXX,2,Dial(${SIPtrunk}/${EXTEN:1},55,o)

":1" would strip the first digit.

Fred

----- Original Message ----- 
From: "Erick Perez" <eaperezh at gmail.com>
To: "Asterisk Users Mailing List - Non-Commercial Discussion" 
<asterisk-users at lists.digium.com>
Sent: Tuesday, May 30, 2006 17:00
Subject: [Asterisk-Users] How to strip a digit


>I have the following extension to dial outside via SIP
> it's like this:
> phone----asterisk-----internet-----SIP provider----USA
>
> exten => _91NXXNXXXXXX,1,AGI(call_log.agi,${EXTEN})
> exten => _91NXXNXXXXXX,2,Dial(${SIPtrunk}/${EXTEN},55,o)
> exten => _91NXXNXXXXXX,3,Hangup
>
> I want to strip the digit 9 before sending it to the SIP provider.
> Also, any suggestions for the above definition?
> Thanks,
>
> Erick.
>
> --
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
> 






More information about the asterisk-users mailing list