On Mon, Sep 28, 2015 at 11:38 AM, Emil Ohlsson <e...@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. -- _____________________________________________________________________ -- 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