[Kamailio-Users] Play Early Media

alex pappas rebel.pappas at gmail.com
Wed Nov 18 09:31:45 CET 2009


Daniel hi,

My first need to  implement this was early media message on queue 182 sip
message, in order to inform caller that he is on hold. After that I see many
mobile companies use these kind of features (ring tones etc..) and make a
fortune from that.
In any case I understand what you are saying but I don't understand
technically how and if possible for this to be implemented since i tried
both ways.

Cheers
Alex



On Tue, Nov 17, 2009 at 5:34 PM, Daniel-Constantin Mierla <miconda at gmail.com
> wrote:

> Hello,
>
>
> On 17.11.2009 14:22 Uhr, alex pappas wrote:
>
>> Hi.
>>
>> So the idea is when i get in my proxy an 180 Ringing message , to play
>> Early media on the one that initiated the INVITE in the first place. The 180
>> ringing is passing my onreply_route. In this case how can I extract the
>> related session of caller and send him the Early media?
>> Also Daniel what is the difference of playing media to the UAC  or the
>> UAS? who is who?
>>
>
> in sip terminology, UAC is the one that sends the request and UAS is the
> one that sends the reply. However, some people do a mixture and consider uac
> being the callerand uac being the callee. Not using the funtion, I thought
> it might be easier to test both variants instead of checking the code.
>
> Cheers,
> Daniel
>
>
>> Thank you in advance
>>
>> Alex
>>
>>
>>
>>
>> On Tue, Nov 17, 2009 at 3:05 PM, Daniel-Constantin Mierla <
>> miconda at gmail.com <mailto:miconda at gmail.com>> wrote:
>>
>>    Hello,
>>
>>    the idea is to send the audio to the one that sent the INVITE, not
>>    the one that sends the reply. So the respective SDP is not in
>>    current processed reply, but in the request.
>>
>>    Not sure if is possible, though, I thought it is since you can
>>    stream either to uac or uas.
>>
>>    Cheers,
>>    Daniel
>>
>>
>>
>>    On 17.11.2009 14:02 Uhr, Uriel Rozenbaum wrote:
>>
>>        Guys,
>>
>>        I agree with Edson, maybe you are using the function on a
>>        message that does not have an SDP. Print the METHOD and
>>        RESPONSE to be sure you are not passing all messages through
>>        the function.
>>
>>        Uriel
>>
>>        On Tue, Nov 17, 2009 at 9:53 AM, Edson - Lists
>>        <4lists at gmail.com <mailto:4lists at gmail.com>
>>        <mailto:4lists at gmail.com <mailto:4lists at gmail.com>>> wrote:
>>
>>           It seems like a report/information and not a problem...
>>
>>           To be sure, could You please paste one call exchanged messages
>>           captured with NGREP? Don`t forget to hide relevant IPs end
>>        tell us
>>           who is who... ;)
>>
>>           Edson.
>>
>>           alex pappas escreveu:
>>
>>               Daniel Hi,
>>
>>               I tried that in the first place but I had the following
>>        ERRORS:
>>
>>               Nov 17 14:18:42 YGOR /usr/local/sbin/kamailio[4862]:
>>               WARNING:core:run_actions: null action list (rec_level=2)
>>               Nov 17 14:18:47 YGOR /usr/local/sbin/kamailio[4862]:
>>               ERROR:nathelper:extract_body: message body has length zero
>>               Nov 17 14:18:47 YGOR /usr/local/sbin/kamailio[4862]:
>>               ERROR:nathelper:force_rtp_proxy: can't extract body
>>        from the
>>               message
>>               Nov 17 14:18:47 YGOR /usr/local/sbin/kamailio[4862]:
>>               ERROR:nathelper:select_rtpp_node: script error -no
>>        valid set
>>               selected
>>               Nov 17 14:18:47 YGOR /usr/local/sbin/kamailio[4862]:
>>               ERROR:nathelper:rtpproxy_stream: no available proxies
>>
>>
>>               Thanks
>>
>>               Alex
>>
>>
>>
>>               On Tue, Nov 17, 2009 at 2:17 PM, Daniel-Constantin Mierla
>>               <miconda at gmail.com <mailto:miconda at gmail.com>
>>        <mailto:miconda at gmail.com <mailto:miconda at gmail.com>>
>>               <mailto:miconda at gmail.com <mailto:miconda at gmail.com>
>>        <mailto:miconda at gmail.com <mailto:miconda at gmail.com>>>> wrote:
>>
>>                  Hello,
>>
>>
>>                  On 17.11.2009 13:14 Uhr, alex pappas wrote:
>>
>>                      Dear all,
>>
>>                      I'm trying to play Early Media instead of
>>        Ringing WHEN
>>               an 180
>>                      Ringing OR 182 Call Queue message is received
>>        from the
>>                      destination UAC. In the onreply_route[1] I added the
>>               following
>>                      lines in bold:
>>
>>                      I use kamailio 1.5 and I have NAT enabled.
>>
>>                      onreply_route[1] {
>>                             xdbg("incoming reply\n");
>>                             if ((isflagset(5) || isbflagset(6)) &&
>>                      status=~"*(180)|*(183)|(2[0-9][0-9])") {
>>                                     force_rtp_proxy();
>>                             }
>>                            * if (status=~"(180)") {
>>
>> rtpproxy_stream2uac("/usr/local/etc/rtpproxy/ast-ivr.alaw","");
>>                             } else {
>>                                 rtpproxy_stop_stream2uac();
>>                             }*
>>                             if (isbflagset(6)) {
>>                                     fix_nated_contact();
>>                             }
>>                      }
>>
>>
>>                  try rtpproxy_stream2uas(...) instead of stream to
>>        uac function.
>>
>>                  Cheers,
>>                  Daniel
>>
>>
>>                      When I get from a UAC an 180 Ringing does not
>>        play the
>>               media and
>>                      also in the syslog I see the following ERRORs:
>>
>>                      Nov 17 14:11:29 YGOR /usr/local/sbin/kamailio[4681]:
>>                      ERROR:nathelper:extract_body: message body has
>>        length zero
>>                      Nov 17 14:11:29 YGOR /usr/local/sbin/kamailio[4681]:
>>                      ERROR:nathelper:force_rtp_proxy: can't extract body
>>               from the message
>>                      Nov 17 14:11:29 YGOR /usr/local/sbin/kamailio[4681]:
>>                      ERROR:nathelper:select_rtpp_node: script error -no
>>               valid set
>>                      selected
>>                      Nov 17 14:11:29 YGOR /usr/local/sbin/kamailio[4681]:
>>                      ERROR:nathelper:rtpproxy_stream: no available
>>        proxies
>>
>>
>>                      Thanks in advance for any help
>>
>>                      Alex
>>
>>
>>  ------------------------------------------------------------------------
>>
>>                      _______________________________________________
>>                      Kamailio (OpenSER) - Users mailing list
>>                      Users at lists.kamailio.org
>>        <mailto:Users at lists.kamailio.org>
>>               <mailto:Users at lists.kamailio.org
>>        <mailto:Users at lists.kamailio.org>>
>>               <mailto:Users at lists.kamailio.org
>>        <mailto:Users at lists.kamailio.org>
>>               <mailto:Users at lists.kamailio.org
>>        <mailto:Users at lists.kamailio.org>>>
>>
>>
>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>>
>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>
>>
>>                  --    Daniel-Constantin Mierla
>>                  * http://www.asipto.com/
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>               _______________________________________________
>>               Kamailio (OpenSER) - Users mailing list
>>               Users at lists.kamailio.org
>>        <mailto:Users at lists.kamailio.org>
>>        <mailto:Users at lists.kamailio.org
>>        <mailto:Users at lists.kamailio.org>>
>>               http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>>
>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>
>>
>>           _______________________________________________
>>           Kamailio (OpenSER) - Users mailing list
>>           Users at lists.kamailio.org <mailto:Users at lists.kamailio.org>
>>        <mailto:Users at lists.kamailio.org
>>        <mailto:Users at lists.kamailio.org>>
>>           http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>>           http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>>  ------------------------------------------------------------------------
>>
>>        _______________________________________________
>>        Kamailio (OpenSER) - Users mailing list
>>        Users at lists.kamailio.org <mailto:Users at lists.kamailio.org>
>>        http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>>        http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>
>>
>>    --    Daniel-Constantin Mierla
>>    * http://www.asipto.com/
>>
>>
>>    _______________________________________________
>>    Kamailio (OpenSER) - Users mailing list
>>    Users at lists.kamailio.org <mailto:Users at lists.kamailio.org>
>>    http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>>    http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Kamailio (OpenSER) - Users mailing list
>> Users at lists.kamailio.org
>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>
>
> --
> Daniel-Constantin Mierla
> * http://www.asipto.com/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/users/attachments/20091118/5b3de1d4/attachment-0001.htm>


More information about the Users mailing list