[OpenSIPS-Users] sdp

volga629 at networklab.ca volga629 at networklab.ca
Mon May 15 11:06:17 EDT 2017


Hello Everyone,
Thank you

That extract ip correctly.

$var(cline-ip) = $(rb{sdp.line,c}{s.select,2, });

My issue that I am trying make opensips handle music on hold resume 
working properly.
I am not sure if possible do simpler way.


Relevant code

route[ONHOLD] {
        if(is_method("INVITE|UPDATE") && has_body("application/sdp")) {
                if(is_audio_on_hold()) {
                        if(search_body("a=sendonly") || 
search_body("a=inactive.")) {
                                $var(cline-ip) = 
$(rb{sdp.line,c}{s.select,2, });
                                xlog("L_INFO", "[$rm] On hold call SDP 
IP [$var(cline-ip)]\n");
                                if(!nat_uac_test("8") || 
$(var(cline-ip){s.select,1,.})==0) {
                                        xlog("L_INFO", "[$rm] On hold 
call going from WAN SouceIP <$si> to LAN.\n");
                                        rtpengine_offer("replace-origin 
external internal RTP/AVP ICE=remove");
                                        t_on_reply("2");
                                }
                        }
                }
        }
}



volga629

On Mon, 15 May, 2017 at 5:23 AM, Bogdan-Andrei Iancu 
<bogdan at opensips.org> wrote:
> Hi Volga,
> 
> You can use the sdp transformation :
>     http://www.opensips.org/Documentation/Script-Tran-2-3#toc80
> 
> Regards,
>  Bogdan-Andrei Iancu
>   OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
> 
> OpenSIPS Summit May 2017 Amsterdam
>   http://www.opensips.org/events/Summit-2017Amsterdam.html
> On 05/14/2017 06:28 AM, volga629 at networklab.ca wrote:
>> Hello Everyone,
>> What good approach to test/detect 0.0.0.0 in sdp c IN = line ?
>> I don't see any functions to parse sdp properly.
>> 
>> volga629
>> 
>> 
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170515/018b2632/attachment.html>


More information about the Users mailing list