Eric Dantie
2008-Apr-23 13:37 UTC
[asterisk-users] how to copy a variable without interpretation of the content
Sorry, bad expressed, what I want to know is how can I do this in AEL:
I've already got a variable X-CALLID with the content ctprueba-123456789.12
How can I copy the content X-CALLID to the new variable TEST?
something like TEST=${X-CALLID};
(The problem comes because of the operator minus).
Thank you.
Eric Dantie
----- Original Message -----
From: Eric Dantie
To: asterisk-users at lists.digium.com
Sent: Wednesday, April 23, 2008 1:37 PM
Subject: AEL: how to copy a variable without interpretation of the content
I've got the next AEL:
TEST=${X-CALLID};
NoOp(${TEST});
where X-CALLID=ctprueba-1208953210.12 (passed by a custom sip header)
Executing I've got the error:
[2008-04-23 13:24:01] WARNING[15638]: ast_expr2.y:742 op_minus: non-numeric
argument
-- Executing [1009 at fromsip:8] Set("SIP/172.16.4.6-b6c06688",
"TEST=0") in new stack
-- Executing [1009 at fromsip:9] NoOp("SIP/172.16.4.6-b6c06688",
"0") in new stack
So my problem is how to copy the X-CALLID variable with no interpretation of
the content?
Thanks
Eric Dantie
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20080423/d4e8d9ed/attachment.htm
Tilghman Lesher
2008-Apr-23 13:48 UTC
[asterisk-users] how to copy a variable without interpretation of the content
On Wednesday 23 April 2008 08:37, Eric Dantie wrote:> Sorry, bad expressed, what I want to know is how can I do this in AEL: > > I've already got a variable X-CALLID with the content ctprueba-123456789.12 > > How can I copy the content X-CALLID to the new variable TEST? > > something like TEST=${X-CALLID}; > > (The problem comes because of the operator minus).TEST="${X-CALLID}"; -- Tilghman
Rob Hillis
2008-Apr-23 14:01 UTC
[asterisk-users] how to copy a variable without interpretation of the content
Try TEST="${X-CALLID}"; and see how you go.
Eric Dantie wrote:> Sorry, bad expressed, what I want to know is how can I do this in AEL:
>
> I've already got a variable X-CALLID with the
> content ctprueba-123456789.12
>
> How can I copy the content X-CALLID to the new variable TEST?
>
> something like TEST=${X-CALLID};
>
> (The problem comes because of the operator minus).
>
> Thank you.
> Eric Dantie
>
>
>
> ----- Original Message -----
> *From:* Eric Dantie <mailto:edantie at gmail.com>
> *To:* asterisk-users at lists.digium.com
> <mailto:asterisk-users at lists.digium.com>
> *Sent:* Wednesday, April 23, 2008 1:37 PM
> *Subject:* AEL: how to copy a variable without interpretation of
> the content
>
> I've got the next AEL:
>
> TEST=${X-CALLID};
> NoOp(${TEST});
> where X-CALLID=ctprueba-1208953210.12 (passed by a custom sip
> header)
>
> Executing I've got the error:
>
> [2008-04-23 13:24:01] WARNING[15638]: ast_expr2.y:742 op_minus:
> non-numeric argument
> -- Executing [1009 at fromsip:8]
Set("SIP/172.16.4.6-b6c06688",
> "TEST=0") in new stack
> -- Executing [1009 at fromsip:9]
NoOp("SIP/172.16.4.6-b6c06688",
> "0") in new stack
>
>
> So my problem is how to copy the X-CALLID variable with no
> interpretation of the content?
>
>
> Thanks
> Eric Dantie
>
> !DSPAM:480fcd5a213011511915117!
> ------------------------------------------------------------------------
>
> _______________________________________________
> -- 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
>
> !DSPAM:480fcd5a213011511915117!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20080424/05794eb1/attachment.htm
Philipp Kempgen
2008-Apr-23 14:06 UTC
[asterisk-users] how to copy a variable without interpretation of the content
Eric Dantie schrieb:> Sorry, bad expressed, what I want to know is how can I do this in AEL: > > I've already got a variable X-CALLID with the content ctprueba-123456789.12 > > How can I copy the content X-CALLID to the new variable TEST? > > something like TEST=${X-CALLID}; > > (The problem comes because of the operator minus).I'm not sure if "-" is a valid character in the name of a variable in AEL. It's not allowed in just about any other language. So first of all I'd rename X-CALLID to X_CALLID. Regards, Philipp Kempgen -- amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de Let's use IT to solve problems and not to create new ones. Asterisk? -> http://www.das-asterisk-buch.de Gesch?ftsf?hrer: Stefan Wintermeyer Handelsregister: Neuwied B 14998