[asterisk-users] receiving 1st digit from a variable

Danny Nicholas danny at debsinc.com
Tue Feb 24 15:32:47 CST 2009


Syntax should be
exten => _[0-1]X.,1,Set(MSNCHOICE=${EXTEN:1:1})

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Tamer Higazi
Sent: Tuesday, February 24, 2009 3:23 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] receiving 1st digit from a variable

exten => _[0-1]X.,1,Set(MSNCHOICE=${EXTEN,1:1})

brings me this output:

Executing [1017649374622 at officeie:1] Set("SIP/2000-007acf80",
"MSNCHOICE=") in new stack


and the result is always empty!

even if I make ${EXTEN,1:3} or whaever....


Danny Nicholas schrieb:
> Exten => x,n,Set($NEWVAR=${EXTEN,1:1})
>
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Tamer Higazi
> Sent: Tuesday, February 24, 2009 2:52 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: [asterisk-users] receiving 1st digit from a variable
>
> Hi people!
> I want to save the 1st letter from the ${EXTEN} variable. I don't want
> to trim it, I want to RESAVE it into a new variable.
>
> Let us assume the ${EXTEN} contains: 0698332977 then I'd love to get the 0
>
> I would thank you for all advises.
>
>
>
> Tamer
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>   


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.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