[asterisk-users] How to send a SIP MESSAGE outside a call

Matthew Jordan mjordan at digium.com
Sat Jul 28 16:53:36 CDT 2012


----- Original Message -----
> From: "Tiago Vasconcelos" <tiago.o.vasconcelos at gmail.com>
> To: asterisk-users at lists.digium.com
> Sent: Saturday, July 28, 2012 1:12:57 PM
> Subject: Re: [asterisk-users] How to send a SIP MESSAGE outside a call
> 
> On 28-07-2012 18:23, Matthew Jordan wrote:
> 
> Thank you so much for your prompt and detailed answer!
> 
> Regarding the AMI MessageSend function available on Asterisk 11, I
> see
> on the syntax that it supports an argument named "Variable:". The doc
> is
> not very clear on this. Does this argument allows us to add custom
> SIP
> headers to the MESSAGE as well?

Yes.  The syntax is similar to the Variable: header in other AMI commands,
such as Originate.  Instead of setting a dialplan variable, however, you
are instead setting a Message technology variable that will be interpreted
by the channel technology that services the Message request.  For the SIP
channel driver, that implies that each one specifies a header to set.

For example:

Action: MessageSend
To: sip:foo.com
From: mypeer
Variable: X-Movial-Content=application/x-movial-control;forwarding=true
Variable: X-Other-Header=bar

--
Matthew Jordan
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org



More information about the asterisk-users mailing list