[asterisk-users] RES: Messages out of calls. Is it really possible?

Rodrigo Pimenta Carvalho pimenta at inatel.br
Fri Jul 10 13:48:33 CDT 2015


Hi Matthew Jordan

Thank you very very much!

Now it seems to me that I have a direction to follow!
My intention is to create a way of receiving data from callees, in asterisk, even before the call being accepted by one of them. In my project there will be more than one callee ringing at same time.

In my project, when more than one callee rings, all of them sends SIP 183 message to asterisk. However, as long as asterisk doesn't forward every SIP 183 message to the caller, I have to find a way to callees send some data to the asterisk, containing information about media, for example.
In asterisk I intend do collect those information and pass it to the caller, to work around those not forwarded SIP 183 messages.

If it can work, I will try to implement early media with video.

Can you comment about my idea? Do you think it sounds feasible?

Best regards!!



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979   (Brasil)
________________________________________
De: asterisk-users-bounces at lists.digium.com [asterisk-users-bounces at lists.digium.com] em Nome de Matthew Jordan [mjordan at digium.com]
Enviado: sexta-feira, 10 de julho de 2015 15:29
Para: Asterisk Users Mailing List - Non-Commercial Discussion
Assunto: Re: [asterisk-users] Messages out of calls. Is it really possible?

On Fri, Jul 10, 2015 at 11:51 AM, Rodrigo Pimenta Carvalho
<pimenta at inatel.br> wrote:
>
> Hi.
>
> I have read in some web sites that ASTERISK can support messages out of calls. What does it exactly means?
>
> 1 - Can a dialplan script accept and handle a message from a callee party, even before the call be connected?

Since it is out of call, yes.

SIP MESSAGE requests are handled by the respective channel driver
(chan_sip or the res_pjsip stack) and passed to the dialplan using a
"special" hidden channel, Message. That channel caries the payload and
some meta information about the MESSAGE request, which can be accessed
using the generic out-of-call messaging functions [1].

Likewise, you can send an out of call SIP MESSAGE request using MessageSend [2].

Note that all of this has been supported since Asterisk 10.

> 2 - Can a ringing callee send SIP MESSAGE to the ASTERISK even before answer the call?

Yes, hence the term "out-of-call".

> 3- Could I use dialplan function MESSAGE() to receive SIP messages from callees, even before the call be connected?

It does not receive messages; it accesses data on the message
currently being serviced by the executing Message channel.

chan_sip/res_pjsip will receive and dispatch MESSAGE requests at any
point in time. They have nothing to do with your "normal" SIP or PJSIP
channels, and hence nothing to do with whatever INVITE request derived
channels are currently executing in the dialplan.

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_MESSAGE
and https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_MESSAGE_DATA
[2] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_MessageSend

--
Matthew Jordan
Digium, Inc. | Director of Technology
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://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



More information about the asterisk-users mailing list