|Summary:||ASTERISK-16938: [patch] Manager Command 'SendText' reports failure on SIP channel|
|Reporter:||Ryan Bullock (rrb3942)||Labels:|
|Date Opened:||2010-11-09 14:48:03.000-0600||Date Closed:||2011-03-02 14:55:04.000-0600|
|Environment:||Attachments:||( 0) sendtext.debug|
( 1) sendtext.diff
|Description:||When issuing the SendText manager command on a SIP channel I get an Error response even though it still appears to send the text.|
Message: Hello There
Response from Asterisk:
The text still appears to go through and appear for the client.
****** ADDITIONAL INFORMATION ******
I have only tested this using Twinkle as a client.
SIP Signaling looks ok, I see the MESSAGE from asterisk and a 200 response from the client.
I have included the debug output that appears on the console when attempting to send the text.
|Comments:||By: Ryan Bullock (rrb3942) 2010-11-09 15:00:10.000-0600|
Just realized this should be under the manager and not app_sendtext.
By: Ryan Bullock (rrb3942) 2010-11-09 19:38:32.000-0600
This appears to be a bug in checking the return value of ast_sendtext.
From the documentation it states it returns 0 on success and -1 on failure. The current check tests if it returned > 0 for success.
I uploaded a patch that seems to fix the problem. On anything but a 0 response we consider it a failure.
This patch also removes some channel locking that does not seem to be require
according to the documentation for ast_sendtext.
Tested on my test system and it works fine.
By: Leif Madsen (lmadsen) 2010-11-18 14:05:31.000-0600
By: Claudio Villalobos (devmod) 2010-12-13 18:29:32.000-0600
Patch works for me. Thanks.
By: Richard Mudgett (rmudgett) 2011-03-02 14:55:04.000-0600
Found and fixed independently while working on something else.