[asterisk-users] Respond to an out of call SIP MESSAGE
Emil Ohlsson
emo at svep.se
Tue Sep 29 07:45:21 CDT 2015
Thanks,
I actually ended up using the MESSAGE(from), which included the sender.
Br,
Emil
________________________________________
From: asterisk-users-bounces at lists.digium.com <asterisk-users-bounces at lists.digium.com> on behalf of Matthew Jordan <mjordan at digium.com>
Sent: Tuesday, September 29, 2015 2:15 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [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.
--
_____________________________________________________________________
-- 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
More information about the asterisk-users
mailing list