[asterisk-dev] Read multi-line variables in AGI
Artem Makhutov
artem at makhutov.org
Sun Jul 18 15:41:18 CDT 2010
Hi,
Ok, here is some more explenation:
I am working on chan_datacard. You can use it to make voice calls using
a Huawei 3G datacard. You can also send and receive SMS with it.
A SMS can have multi-line content eg:
----
This is\n
a test\n
sms\n
\n
more text
----
When I receive a SMS I am setting the ${SMS} variable an firering up the
sms extension in the dialplan.
In asterisk 1.6.2.9 the variable get trimmed at the \n. (This was not
true in earlier asterisk releases. Sorry for the confusion.)
Now now only "This is" will be stored in the variable and the other
parts/lines get lost.
So for me the best way will be split up the message in multiple
variables - even if this is an ugly workaround.
To base64 encode the text looks like a more ugly workaround for it.
Are there any other ideas how to handle variables with multiple lines?
This problem should be addressed if asterisk want to support text
messages. This is also why I have posted it to the -dev list.
Thanks, Artem
Steve Edwards schrieb:
> On Sat, 17 Jul 2010, Artem Makhutov wrote:
>
>> I would like to read in multi-line variables using an AGI script.
>> The problem is that I can not determine the end the variable.
>
> Not a -dev question. Please re-post on -user.
>
> Please include a bit more detail like what the heck is a multi-line
> variable? Maybe and example and an appropriate snippet of your code.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6531 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20100718/f1979a3d/attachment.bin
More information about the asterisk-dev
mailing list