Send text to the client on the connected channel.
This application accepts a text string as argument and attempts to send it to the calling client via the sendtext function of the channel driver.
See the channel driver documentation for support of text. In Asterisk SIP, for example, sendtext is implemented via the SIP MESSAGE method, sending payload data in the signalling messages with content type text/plain. This means any SIP phone that implements the SIP MESSAGE method should be supported.
The application does not encode characters in any special way, it simply passes the given text buffer to the channel driver service routine.
Note: You could consider to use Dial() with the 'M' option to call SendText() upon a successful connect. This way SendText() might be used also on outbound calls, not only on inbound ones.
New in Asterisk 1.8: SendText is now implemented in chan_gtalk and chan_jingle. It will simply send XMPP text messages to the remote JID.exten => 123, 1, Answer
exten => 123, 2, SendText(hello world)
exten => 123, 3, HangUp
NOTE: The Answer step at priority 1 is needed, since the channel need to be established before anything can be sent on it. Look at auto-answer mode on your phone, possibly together with an Asterisk .call file (or SIPSAK) to send text messages from a remote device or process.
Asterisk does not have a ReceiveText() dialplan application, however here is how you can send and receive text using an AGI script: print STDERR "1. Testing 'sendtext'...";
print "SEND TEXT \"hello world\"\n";
my $result =
&checkresult($result);
print STDERR "2. Receiving Text 'receivetext'...";
print "RECEIVE TEXT 3000\n";
my $result =
&checkresult($result);
See the SNOM FAQ entry for more on this topic.
Firmware 7 The XML Minibrowser is now also implemented for SNOM 320 and 300 (next to 370 and 360).
Firmware 4.0 & 4.1 Now it works even the SIPSAK option "-O desktop", just set the phone settings "Support broken registrar" to "on" and "Long SIP-Contact (RFC3840)" to "off" and "Refer-To Brackets" to "off". but off course it will only work after the call is answered. If you don't want this use SIPSAK via System() or TrySytem() in Asterisk to send a message.
Firmware 3.60r: Partial success together with Asterisk 1.0.2bristuffed and a SNOM line set to auto-answer mode: Depending on the line's SIP setting "Support broken registrar" the SNOM 360 will either reply with "404 Not Found" (broken registrar OFF) or "200 Ok" (broken registrar ON) in combination with Asterisk's SendText() application. SIPSAK also works, but only when the option "-O desktop" is not used.
Firmware 3.60i: Although above example gives the desired result of displaying the message, the recent revisions (3.60i) of SNOM phone firmware have a protocol bug, they sent a misformulated 200 OK response back to the server.
Firmware 3.56y: The snom200 phone does not implement receiving a MESSAGE request within a dialog. It returns a "501 Not Implemented" message, although you can send out-of-dialog MESSAGE requests successfully.
No comments:
Post a Comment