On 15-09-28 10:19 AM, Emil Ohlsson wrote:> (Still no not receiving the mail, revisited the settings.) > > OK, so SendText doesn't work with this scenario. But can MessageSend > handle this, and respond even when the transport protocol is TLS? Or > do I need to modify Asterisk to add this support?MessageSend has no concept of TLS, it gets passed to chan_sip which then sends it. It's therefore up to chan_sip to do it. It should work. Haven't done it though. -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org
Ah, so I can use MessageSend(sip:alice) to send a message to Alice then (reusing the existing TLS session). That does seem to work. Thanks :-). I didn't know you could use users there. Is there a variable or some other method to see which user that did send the message? I'm thinking something in the lines of [context] exten => _X!,1,NoOp(Handling message from ${SENDER}) I didn't see any useful information using dumpchan, so I'm guessing there isn't any variable for it. $CALLERID(name) didn't contain the name and $SIP_HEADER seems to be focused on calls. Since the information is in the SIP header it should be possible to get. /E ________________________________________ From: asterisk-users-bounces at lists.digium.com <asterisk-users-bounces at lists.digium.com> on behalf of Joshua Colp <jcolp at digium.com> Sent: Monday, September 28, 2015 3:53 PM To: asterisk-users at lists.digium.com Subject: Re: [asterisk-users] Respond to an out of call SIP MESSAGE On 15-09-28 10:19 AM, Emil Ohlsson wrote:> (Still no not receiving the mail, revisited the settings.) > > OK, so SendText doesn't work with this scenario. But can MessageSend > handle this, and respond even when the transport protocol is TLS? Or > do I need to modify Asterisk to add this support?MessageSend has no concept of TLS, it gets passed to chan_sip which then sends it. It's therefore up to chan_sip to do it. It should work. Haven't done it though. -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Matthew Jordan
2015-Sep-29 12:15 UTC
[asterisk-users] Respond to an out of call SIP MESSAGE
On Mon, Sep 28, 2015 at 11:38 AM, Emil Ohlsson <emo at svep.se> wrote:> Ah, so I can use > > MessageSend(sip:alice) > > to send a message to Alice then (reusing the existing TLS session). That does seem to work. Thanks :-). I didn't know you could use users there. > > Is there a variable or some other method to see which user that did send the message? I'm thinking something in the lines of > > [context] > exten => _X!,1,NoOp(Handling message from ${SENDER}) > > I didn't see any useful information using dumpchan, so I'm guessing there isn't any variable for it. $CALLERID(name) didn't contain the name and $SIP_HEADER seems to be focused on calls. > > Since the information is in the SIP header it should be possible to get. >Since MESSAGE requests are serviced on a single, special channel that is not a SIP channel, chan_sip specific functions/variables will not work on that channel. The MESSAGE_DATA function will read headers off of a received SIP MESSAGE request: https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_MESSAGE_DATA You can also add headers to an outbound SIP MESSAGE request using that same function.