Skip Menu |

This queue is for tickets about the Asterisk-AMI CPAN distribution.

Report information
The Basics
Id: 79639
Status: open
Priority: 0/
Queue: Asterisk-AMI

People
Owner: Nobody in particular
Requestors: marciorp [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: v0.2.5
Fixed in: (no value)



Subject: Message line of the response
When the Message line of the response is over a line, being broken by \r\n, only the string is returned to break, leaving incomplete. For example: ========================== Action:SendSMS Device:*Gsms Destination:06889786418 Message:Teste confirmation:true Response: Success Message: Message sent\r\nChannel: B1C4 ========================== print $response->{'Message'} Message sent He missed part of the string after \r\n. The expected serious: print $response->{'Message'} Message sent Channel: B1C4 I'm using: Debian 6 (Kernel 2.6.32-5-686) Asterisk 1.8.15.1 Perl 5.10.1 Asterisk::AMI 0.2.5
I can't find any references for a SendSMS action for asterisk. However any additional key-value pairs provided in the response can be found under $response->{'PARSED'}. For example you can should be able to retrieve the channel via the following: print $response->{'PARSED'}->{'Channel'},"\n";
From: marciorp [...] gmail.com
The command SendSMS is provided by channel of hardware I use. Using $response->{'PARSED'} worked, but is a doubt because the string "Channel: BnCnn" is part of the Message line of response, then regardless of whether the "\r\n" in the middle should not come at $response-> {'Message'}? How do I print all of data in the $response on format key->value? Best regards, Marcio.