MediaProxy + OpenSIPS Integration

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

MediaProxy + OpenSIPS Integration

symack
Hello Everyone,

We have been successful so far with our virutal machine prototpe:

2 VM for HA Mysql
2 VM for Asterisk
2 VM for OpenSIPS (in/out)

Now we would like to iinclude MediaProxy with the OpenSIPS-in VM
however, the webiste mentioned not to install MediaProxy on a VM?
This is just a protoype, and will be installed on the host once the entire
architecture is complete, configs etc..
We want to compile it from source. Do you feel this will be a problem,
and not function as expected? Good documentation from install to
configuration of MediaProxy + OpenSIPS would be greatly appreciated.

Thanks in Advnace,

Nick.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: MediaProxy + OpenSIPS Integration

Dan Pascu
The reason for the recommendation not to install in a VM, is the fact that media relaying requires accurate timing in order to work well and a VM is prone to have timing accuracy issues.

Otherwise it'll work, but if the VM cannot forward the packets as they arrive, it'll introduce jitter in the RTP streams which will be reflected in the quality of the audio.

On 1 Dec 2011, at 5:17, Nick Khamis wrote:

> Hello Everyone,
>
> We have been successful so far with our virutal machine prototpe:
>
> 2 VM for HA Mysql
> 2 VM for Asterisk
> 2 VM for OpenSIPS (in/out)
>
> Now we would like to iinclude MediaProxy with the OpenSIPS-in VM
> however, the webiste mentioned not to install MediaProxy on a VM?
> This is just a protoype, and will be installed on the host once the entire
> architecture is complete, configs etc..
> We want to compile it from source. Do you feel this will be a problem,
> and not function as expected? Good documentation from install to
> configuration of MediaProxy + OpenSIPS would be greatly appreciated.
>
> Thanks in Advnace,
>
> Nick.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


--
Dan





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

1-way audio (OpenSIPS + rtpproxy + NAT)

Matt Hamilton
I have phones (some behind NAT, some Public - on the same subnet as proxy server) connecting to Opensips server fronting an Asterisk cluster via rtpproxy (bridge mode) as seen below:


10.0.1.0/24 - external
192.168.100.0/24 - internal
rtpproxy (bridge mode) started with '-l 10.0.1.75/192.168.100.75' option.




                                UAC2      
                               10.0.1.70  
                                   |
                                   |
UAC1--------------Firewall-----------------Opensips----------------Asterisk
10.0.2.50         10.0.1.12        |       10.0.1.75               192.168.100.128
                                   |       192.168.100.75          outboundproxy=192.168.100.75
                                   |
                                   |
                                UAC3
                                10.0.1.71




This is what I see:

- Calls between UAC2 and UAC3 are OK (both SIP and RTP). There is no NAT between them and Opensips.
- If UAC2 (or UAC3) initiates a call to UAC1, it is still OK (both SIP and RTP).
- If UAC1 initiates a call to UAC2, I get 1-way audio - only at UAC2 (no incoming audio at UAC1).

Below is my opensips.cfg (only included the relevant code in modules, the route section is complete). Is there anything in there that seems suspicious? The SIP messages and rtpproxy translations look OK (but obvioulsy some are not). What should I be looking for in the SIP/RTP packets to debug this problem?

Thanks,
Matt
P.S. Firewall is open to all traffic. If I put Asterisk on the same subnet with Opensips (after fixing the IPs in cfg), the calls go thru OK both ways over NAT.


***************************************************************************
Dispatcher list has 192.168.100.128

listen=udp:10.0.1.75:5060
listen=udp:192.168.100.75:5060
alias=192.168.100.75:5060


modparam("dispatcher", "ds_ping_from", "sip:proxy@192.168.100.75")
modparam("dispatcher", "ds_probing_sock", "udp:192.168.100.75:5060")
modparam("dispatcher", "force_dst", 1)   /* necessary?? */

modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7890")
modparam("nathelper", "natping_interval", 5)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "sipping_bflag", 7)   /* use OPTIONS */
modparam("nathelper", "sipping_from", "sip:pinger@10.0.1.75:5060")



route{
    if (!mf_process_maxfwd_header("10")) {
        sl_send_reply("483","Too Many Hops");
        exit;
    }

   
    if($si=="10.0.1.12"){        # replace with nat_uac_test("19") when public IPs are assigned
        fix_nated_contact();                                       
        search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
        setflag(5);
    }
         else if (dst_ip == 192.168.100.75){
        setflag(11);
    }
    else if (dst_ip == 10.0.1.75) {
        setflag(12);
    }

   
    # ----------- sequential request ------------------------------------------
         
    if (has_totag()) {     
        if (loose_route()) {
            if (is_method("BYE")) {
                #setflag(1);
             }
                   else if (is_method("INVITE")) {
                record_route();
             }
             route(1);
        }
            else {
            if ( is_method("ACK") ) {
                if ( t_check_trans() ) {
                    t_relay();
                    exit;
                }
                                else exit;
            }
            send_reply("404","Not here");
        }
        exit;
    }

    # ----------- the initial request ------------------------------------------
       
    if (is_method("CANCEL")){
        if (t_check_trans())
            t_relay();
        exit;
    }

    if (is_method("OPTIONS")) {
        t_relay();
        exit;
    }

    if (!is_method("REGISTER|MESSAGE"))
        record_route();


    if (is_method("INVITE")) {
        if (!ds_is_in_list("$si", "$sp")) {                
            ds_select_dst("1", "7");
            force_send_socket(192.168.100.75);
            xlog("SENDING TO ASTERISK....External to Internal  RURI: $ru");
         }
        else {
              force_send_socket(10.0.1.75);
                  xlog("FROM ASTERISK....Internal to External  RURI: $ru");
                }
    }
    else if (is_method("REGISTER")) {
        ds_select_dst("1", "7");
        force_send_socket(192.168.100.75);
    }
    else if (is_method("SUBSCRIBE")) {
        ds_select_dst("1", "7");
        force_send_socket(192.168.100.75);
    }
    else {
        send_reply("405","Method Not Allowed");
        exit;
    }

    route(1);
}


#----------- ROUTES ------------------------------------------------------------

route[1] {
    if (subst_uri('/((sip:.*)||(sip:.*:.*));nat=yes/\1/')){
          setflag(11);          /* necessary */
        #setbflag(6);        # ??
    };

    if (isflagset(11)||isflagset(12)||isflagset(5)||isbflagset(6)) {
        route(nat_fixups);
    };

    if (!t_relay()) {
        sl_reply_error();
    };
    exit;
}


route[nat_fixups] {                                         
      if (is_method("BYE|CANCEL")) {
        unforce_rtp_proxy();
       }
        else if (is_method("INVITE")){
        if(isflagset(5)||isbflagset(6)){
            rtpproxy_offer(); 
        }
        else if(isflagset(11)){
            rtpproxy_offer("FAEI");
        }
        else if(isflagset(12)){
            rtpproxy_offer("FAIE");
        }
        else {
            xlog("NAT FIXUP RTP OFFER - not Found");        }
       
    };
     
    t_on_reply("2"); 
}

onreply_route[2] {
      if ( is_method("INVITE") &&
           (isflagset(11) || isflagset(12) || isflagset(5) || isbflagset(6)) &&
           has_body("application/sdp") ){
            rtpproxy_answer();
    }
    if (isflagset(11) || isbflagset(6)) {                                             
        fix_nated_contact();
        search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
    }
    exit;
}

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: 1-way audio (OpenSIPS + rtpproxy + NAT)

Matt Hamilton
The following line was commented out by mistake in the post...

#setbflag(6); 


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: MediaProxy + OpenSIPS Integration

symack
In reply to this post by Dan Pascu
Hey Dan,

Thank you so much for your response. This is just for the prototype to get the
whitepaper and configs going. For production ,we will be put MediaProxy directly
on the host.

Is there any documentation that will get me up and running in no time? I want
to build everything from source. Finally, does ag-projects have a
mailing list for MediaProxy?
I feel bad taking up OpenSIPS bandwith for this....

Cheers,

Nick.


On Mon, Dec 5, 2011 at 12:43 PM, Dan Pascu <[hidden email]> wrote:

> The reason for the recommendation not to install in a VM, is the fact that media relaying requires accurate timing in order to work well and a VM is prone to have timing accuracy issues.
>
> Otherwise it'll work, but if the VM cannot forward the packets as they arrive, it'll introduce jitter in the RTP streams which will be reflected in the quality of the audio.
>
> On 1 Dec 2011, at 5:17, Nick Khamis wrote:
>
>> Hello Everyone,
>>
>> We have been successful so far with our virutal machine prototpe:
>>
>> 2 VM for HA Mysql
>> 2 VM for Asterisk
>> 2 VM for OpenSIPS (in/out)
>>
>> Now we would like to iinclude MediaProxy with the OpenSIPS-in VM
>> however, the webiste mentioned not to install MediaProxy on a VM?
>> This is just a protoype, and will be installed on the host once the entire
>> architecture is complete, configs etc..
>> We want to compile it from source. Do you feel this will be a problem,
>> and not function as expected? Good documentation from install to
>> configuration of MediaProxy + OpenSIPS would be greatly appreciated.
>>
>> Thanks in Advnace,
>>
>> Nick.
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
> --
> Dan
>
>
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: MediaProxy + OpenSIPS Integration

Adrian Georgescu

On Dec 5, 2011, at 10:17 PM, Nick Khamis wrote:

> Hey Dan,
>
> Thank you so much for your response. This is just for the prototype to get the
> whitepaper and configs going. For production ,we will be put MediaProxy directly
> on the host.
>
> Is there any documentation that will get me up and running in no time?

The software comes with documentation.

> I want
> to build everything from source. Finally, does ag-projects have a
> mailing list for MediaProxy?

MediaProxy mailing list is OpenSIPS users mailling list <[hidden email]>

> I feel bad taking up OpenSIPS bandwith for this....

Well don't

>
> Cheers,
>
> Nick.
>
>
> On Mon, Dec 5, 2011 at 12:43 PM, Dan Pascu <[hidden email]> wrote:
>> The reason for the recommendation not to install in a VM, is the fact that media relaying requires accurate timing in order to work well and a VM is prone to have timing accuracy issues.
>>
>> Otherwise it'll work, but if the VM cannot forward the packets as they arrive, it'll introduce jitter in the RTP streams which will be reflected in the quality of the audio.
>>
>> On 1 Dec 2011, at 5:17, Nick Khamis wrote:
>>
>>> Hello Everyone,
>>>
>>> We have been successful so far with our virutal machine prototpe:
>>>
>>> 2 VM for HA Mysql
>>> 2 VM for Asterisk
>>> 2 VM for OpenSIPS (in/out)
>>>
>>> Now we would like to iinclude MediaProxy with the OpenSIPS-in VM
>>> however, the webiste mentioned not to install MediaProxy on a VM?
>>> This is just a protoype, and will be installed on the host once the entire
>>> architecture is complete, configs etc..
>>> We want to compile it from source. Do you feel this will be a problem,
>>> and not function as expected? Good documentation from install to
>>> configuration of MediaProxy + OpenSIPS would be greatly appreciated.
>>>
>>> Thanks in Advnace,
>>>
>>> Nick.
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>
>>
>> --
>> Dan
>>
>>
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

signature.asc (169 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

multiple rtpproxy for multiple NAT?

Matt Hamilton
In reply to this post by Matt Hamilton
I'm trying to handle NAT in 2 different places - far-end between UAC and Opensips, and between Opensips and Asterisk cluster behind. I was able to get them going separately, but have been some audio problems when I try to put them together using only 1 rtpproxy (is this possible?). Anyway is it possible/easier/feasible to use a separate proxy for each NAT traversal?




rtpproxy1               started with '-l 12.157.5.6'
rtpproxy2 (bridge mode) started with '-l 12.157.5.6/192.168.100.75'

                                   |                     |
                                   |                     |
UAC--------------Firewall-----------------Opensips-----------------Asterisk
192.168.1.2      70.147.3.4        |      12.157.5.6     |         192.168.100.128
                                   |     192.168.100.75  |        
                                   |                     |
                                 NAT1                   NAT2             
                                rtpproxy1              rtpproxy2 (bridge mode)


Thanks a lot,
Matt

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: multiple rtpproxy for multiple NAT?

Bogdan-Andrei Iancu-2
Hi Matt,

If you need to change network on each NAT, then you will definitely need 2 instances of rtpproxies (of course, if the call requires the RTP to traverse all 3 networks.

For chaining multiple RTPproxyes, try to :
1) set the "f" flag
2) set the "r" flag

See http://www.opensips.org/html/docs/modules/1.7.x/rtpproxy.html#id292738

Regards,
Bogdan

On 12/06/2011 05:33 PM, Matt Hamilton wrote:
I'm trying to handle NAT in 2 different places - far-end between UAC and Opensips, and between Opensips and Asterisk cluster behind. I was able to get them going separately, but have been some audio problems when I try to put them together using only 1 rtpproxy (is this possible?). Anyway is it possible/easier/feasible to use a separate proxy for each NAT traversal?




rtpproxy1               started with '-l 12.157.5.6'
rtpproxy2 (bridge mode) started with '-l 12.157.5.6/192.168.100.75'

                                   |                     |
                                   |                     |
UAC--------------Firewall-----------------Opensips-----------------Asterisk
192.168.1.2      70.147.3.4        |      12.157.5.6     |         192.168.100.128
                                   |     192.168.100.75  |        
                                   |                     |
                                 NAT1                   NAT2             
                                rtpproxy1              rtpproxy2 (bridge mode)


Thanks a lot,
Matt
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: multiple rtpproxy for multiple NAT?

SamyGo
Hi Matt,
I don't totally understand to why you need to run two RTPproxy on one same opensips servers with one listening on Public IP and the other one also listening on the same public IP but bridged with LAN IP.!! ?

rtpproxy1               started with '-l 12.157.5.6' 
rtpproxy2 (bridge mode) started with '-l 12.157.5.6/192.168.100.75'

                                   |                     |
                                   |                     |
UAC--------------Firewall-----------------Opensips-----------------Asterisk
192.168.1.2      70.147.3.4        |      12.157.5.6     |         192.168.100.128
                                   |     192.168.100.75  |         
                                   |                     |
                                 NAT1                   NAT2              
                                rtpproxy1              rtpproxy2 (bridge mode)

My suggestion is to run RTPproxy just once in bridging mode and see what rtpproxy configuration options you are missing in your configurations to fix the audio issues. I seriously think that by handling NAT flags and forcing rtpproxy in correct "ie" and "ei" flags you'll be able to get 100% both way audio with just one RTPproxy bridged instance.

Regards,
Sammy. 

On Tue, Dec 6, 2011 at 10:14 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Matt,

If you need to change network on each NAT, then you will definitely need 2 instances of rtpproxies (of course, if the call requires the RTP to traverse all 3 networks.

For chaining multiple RTPproxyes, try to :
1) set the "f" flag
2) set the "r" flag

See http://www.opensips.org/html/docs/modules/1.7.x/rtpproxy.html#id292738

Regards,
Bogdan


On 12/06/2011 05:33 PM, Matt Hamilton wrote:
I'm trying to handle NAT in 2 different places - far-end between UAC and Opensips, and between Opensips and Asterisk cluster behind. I was able to get them going separately, but have been some audio problems when I try to put them together using only 1 rtpproxy (is this possible?). Anyway is it possible/easier/feasible to use a separate proxy for each NAT traversal?




rtpproxy1               started with '-l 12.157.5.6'
rtpproxy2 (bridge mode) started with '-l 12.157.5.6/192.168.100.75'

                                   |                     |
                                   |                     |
UAC--------------Firewall-----------------Opensips-----------------Asterisk
192.168.1.2      70.147.3.4        |      12.157.5.6     |         192.168.100.128
                                   |     192.168.100.75  |        
                                   |                     |
                                 NAT1                   NAT2             
                                rtpproxy1              rtpproxy2 (bridge mode)


Thanks a lot,
Matt
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: multiple rtpproxy for multiple NAT?

Matt Hamilton

Hi Sammy,

Thanks for the suggestion. I had actually tried it with one rttpproxy and got it mostly working. However, I'm new to this and I'm on a pretty tight schedule so no time for experimenting. I moved the Asterisk servers into the DMZ with Opensips, and the far-end NAT traversal is working OK now.  You are right, in this case, 2nd rtpproxy one seems redundant.

I'll give it a shot again when I completely understand what I'm doing...

Regards,
Matt



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

can't force rtpproxy use a new IP in SDP

Matt Hamilton
In reply to this post by Matt Hamilton
Hi,

I can't seem to force a new IP to change the connection in SDP; e.g.,

rtpproxy_offer("c", "1.2.3.4");

IP address I enter is always ignored. Any thoughts how I can resolve this?


Here is my setup:

private   NAT       public             NAT      private      
phones ----|------ internet ------------|--- opensips/rtpproxy-----asterisk cluster


I would like to force rtpproxy use the NATted public ip instead of the private ip of the opensips server when sending messages to UACs. advertised_address doesn't help btw.


I was able to get the following going using the bridge mode. Can bridge mode be somehow used for the above?


private   NAT       public                                NAT    private      
phones ----|------ internet ------ opensips/rtpproxy------|---asterisk cluster



Thanks,
Matt




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: can't force rtpproxy use a new IP in SDP

Razvan Crainea
Hi, Matt!

What version of OpenSIPS are you using? There was a bug reported by Ovidiu and fixed in revision 8639.
Both scenarios you presented can be implemented using the rtpproxy module.

Regards,
Răzvan

On 01/22/2012 07:15 PM, Matt Hamilton wrote:
Hi,

I can't seem to force a new IP to change the connection in SDP; e.g.,

rtpproxy_offer("c", "1.2.3.4");

IP address I enter is always ignored. Any thoughts how I can resolve this?


Here is my setup:

private   NAT       public             NAT      private      
phones ----|------ internet ------------|--- opensips/rtpproxy-----asterisk cluster


I would like to force rtpproxy use the NATted public ip instead of the private ip of the opensips server when sending messages to UACs. advertised_address doesn't help btw.


I was able to get the following going using the bridge mode. Can bridge mode be somehow used for the above?


private   NAT       public                                NAT    private      
phones ----|------ internet ------ opensips/rtpproxy------|---asterisk cluster



Thanks,
Matt





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: can't force rtpproxy use a new IP in SDP

Matt Hamilton
Hi Răzvan,

I'm using Opensips 1.7.1. I have seen Ovidiu's changes, but I think they are on the Kamailio side. if I'm not mistaken, sources are a little different, so I didn't want to mess with it (for now).

I don't think there are any changes in Opensips (not in the trunk, either).

> Both scenarios you presented can be implemented using the rtpproxy module.

Can I still use rtpproxy (without the fix) to get the first scenario going? Second one is all set.

Thanks a lot,
Matt



Date: Sun, 22 Jan 2012 19:25:04 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: [OpenSIPS-Users] can't force rtpproxy use a new IP in SDP

Hi, Matt!

What version of OpenSIPS are you using? There was a bug reported by Ovidiu and fixed in revision 8639.
Both scenarios you presented can be implemented using the rtpproxy module.

Regards,
Răzvan

On 01/22/2012 07:15 PM, Matt Hamilton wrote:
Hi,

I can't seem to force a new IP to change the connection in SDP; e.g.,

rtpproxy_offer("c", "1.2.3.4");

IP address I enter is always ignored. Any thoughts how I can resolve this?


Here is my setup:

private   NAT       public             NAT      private      
phones ----|------ internet ------------|--- opensips/rtpproxy-----asterisk cluster


I would like to force rtpproxy use the NATted public ip instead of the private ip of the opensips server when sending messages to UACs. advertised_address doesn't help btw.


I was able to get the following going using the bridge mode. Can bridge mode be somehow used for the above?


private   NAT       public                                NAT    private      
phones ----|------ internet ------ opensips/rtpproxy------|---asterisk cluster



Thanks,
Matt





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: can't force rtpproxy use a new IP in SDP

Razvan Crainea
Hi, Matt!

The fix was only reported by Ovidiu and I was the one that fixed it in OpenSIPS's revision 8616 on trunk and 8639 on 1.7.1. This doesn't have anything to do with Kamailio. Can you please check if you have these changes? Because otherwise I don't think it will work.

Regards,
Răzvan

On 01/22/2012 07:49 PM, Matt Hamilton wrote:
Hi Răzvan,

I'm using Opensips 1.7.1. I have seen Ovidiu's changes, but I think they are on the Kamailio side. if I'm not mistaken, sources are a little different, so I didn't want to mess with it (for now).

I don't think there are any changes in Opensips (not in the trunk, either).

> Both scenarios you presented can be implemented using the rtpproxy module.

Can I still use rtpproxy (without the fix) to get the first scenario going? Second one is all set.

Thanks a lot,
Matt



Date: Sun, 22 Jan 2012 19:25:04 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: [OpenSIPS-Users] can't force rtpproxy use a new IP in SDP

Hi, Matt!

What version of OpenSIPS are you using? There was a bug reported by Ovidiu and fixed in revision 8639.
Both scenarios you presented can be implemented using the rtpproxy module.

Regards,
Răzvan

On 01/22/2012 07:15 PM, Matt Hamilton wrote:
Hi,

I can't seem to force a new IP to change the connection in SDP; e.g.,

rtpproxy_offer("c", "1.2.3.4");

IP address I enter is always ignored. Any thoughts how I can resolve this?


Here is my setup:

private   NAT       public             NAT      private      
phones ----|------ internet ------------|--- opensips/rtpproxy-----asterisk cluster


I would like to force rtpproxy use the NATted public ip instead of the private ip of the opensips server when sending messages to UACs. advertised_address doesn't help btw.


I was able to get the following going using the bridge mode. Can bridge mode be somehow used for the above?


private   NAT       public                                NAT    private      
phones ----|------ internet ------ opensips/rtpproxy------|---asterisk cluster



Thanks,
Matt





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: can't force rtpproxy use a new IP in SDP

Matt Hamilton
Hi Răzvan,

I got the revised rtpproxy.c from http://opensips.svn.sourceforge.net/viewvc/opensips?view=revision&revision=8616.

The functions are working fine now.

Thank you very much!
Matt


Date: Sun, 22 Jan 2012 20:01:34 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: [OpenSIPS-Users] can't force rtpproxy use a new IP in SDP

Hi, Matt!

The fix was only reported by Ovidiu and I was the one that fixed it in OpenSIPS's revision 8616 on trunk and 8639 on 1.7.1. This doesn't have anything to do with Kamailio. Can you please check if you have these changes? Because otherwise I don't think it will work.

Regards,
Răzvan

On 01/22/2012 07:49 PM, Matt Hamilton wrote:
Hi Răzvan,

I'm using Opensips 1.7.1. I have seen Ovidiu's changes, but I think they are on the Kamailio side. if I'm not mistaken, sources are a little different, so I didn't want to mess with it (for now).

I don't think there are any changes in Opensips (not in the trunk, either).

> Both scenarios you presented can be implemented using the rtpproxy module.

Can I still use rtpproxy (without the fix) to get the first scenario going? Second one is all set.

Thanks a lot,
Matt



Date: Sun, 22 Jan 2012 19:25:04 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: [OpenSIPS-Users] can't force rtpproxy use a new IP in SDP

Hi, Matt!

What version of OpenSIPS are you using? There was a bug reported by Ovidiu and fixed in revision 8639.
Both scenarios you presented can be implemented using the rtpproxy module.

Regards,
Răzvan

On 01/22/2012 07:15 PM, Matt Hamilton wrote:
Hi,

I can't seem to force a new IP to change the connection in SDP; e.g.,

rtpproxy_offer("c", "1.2.3.4");

IP address I enter is always ignored. Any thoughts how I can resolve this?


Here is my setup:

private   NAT       public             NAT      private      
phones ----|------ internet ------------|--- opensips/rtpproxy-----asterisk cluster


I would like to force rtpproxy use the NATted public ip instead of the private ip of the opensips server when sending messages to UACs. advertised_address doesn't help btw.


I was able to get the following going using the bridge mode. Can bridge mode be somehow used for the above?


private   NAT       public                                NAT    private      
phones ----|------ internet ------ opensips/rtpproxy------|---asterisk cluster



Thanks,
Matt





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: can't force rtpproxy use a new IP in SDP

Matt Hamilton
In reply to this post by Razvan Crainea
Hi Răzvan,

As I said in my previous email I got the revision 8639 on 1.7.1 and that issue is fixed. However, I ran into a scenario where one of my scripts stopped working (audio issues).

In this scenario, I have a multihomed opensips with rtpproxy server bridging between opensips and and asterisk server.


 uac--------------------- opensips/rtpproxy           asterisk
                           65.30.40.50
                           192.168.100.76--------192.168.100.101



Very briefly, my cfg looks like:

route: 
if (dst_ip == 65.30.40.50)    # (SRC: 1.2.3.4)  call coming in from public uac
    rtpproxy_offer("IE");


onreply: 
if (dst_ip == 192.168.100.76)  # (SRC: 192.168.100.101) asterisk replying
    rtpproxy_answer("IE"); 

This runs fine with the rtpproxy.c that came with 1.7.1, but not with the revised rtpproxy.c

rtpproxy_answer places 192.168.100.76 instead of 65.30.40.50 in SDP (c) when replying to 1.2.3.4

I'm new to all this, so probably I'm doing something wrong, but jut wanted to let you know just in case. (I converted to the old rtpproxy.c, and it's working now.)

Regards,
Matt




Date: Sun, 22 Jan 2012 20:01:34 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: [OpenSIPS-Users] can't force rtpproxy use a new IP in SDP

Hi, Matt!

The fix was only reported by Ovidiu and I was the one that fixed it in OpenSIPS's revision 8616 on trunk and 8639 on 1.7.1. This doesn't have anything to do with Kamailio. Can you please check if you have these changes? Because otherwise I don't think it will work.

Regards,
Răzvan

On 01/22/2012 07:49 PM, Matt Hamilton wrote:
Hi Răzvan,

I'm using Opensips 1.7.1. I have seen Ovidiu's changes, but I think they are on the Kamailio side. if I'm not mistaken, sources are a little different, so I didn't want to mess with it (for now).

I don't think there are any changes in Opensips (not in the trunk, either).

> Both scenarios you presented can be implemented using the rtpproxy module.

Can I still use rtpproxy (without the fix) to get the first scenario going? Second one is all set.

Thanks a lot,
Matt



Date: Sun, 22 Jan 2012 19:25:04 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: [OpenSIPS-Users] can't force rtpproxy use a new IP in SDP

Hi, Matt!

What version of OpenSIPS are you using? There was a bug reported by Ovidiu and fixed in revision 8639.
Both scenarios you presented can be implemented using the rtpproxy module.

Regards,
Răzvan

On 01/22/2012 07:15 PM, Matt Hamilton wrote:
Hi,

I can't seem to force a new IP to change the connection in SDP; e.g.,

rtpproxy_offer("c", "1.2.3.4");

IP address I enter is always ignored. Any thoughts how I can resolve this?


Here is my setup:

private   NAT       public             NAT      private      
phones ----|------ internet ------------|--- opensips/rtpproxy-----asterisk cluster


I would like to force rtpproxy use the NATted public ip instead of the private ip of the opensips server when sending messages to UACs. advertised_address doesn't help btw.


I was able to get the following going using the bridge mode. Can bridge mode be somehow used for the above?


private   NAT       public                                NAT    private      
phones ----|------ internet ------ opensips/rtpproxy------|---asterisk cluster



Thanks,
Matt





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: can't force rtpproxy use a new IP in SDP

Razvan Crainea
Hello, Matt!

This part was not changed in OpenSIPS. The flags you are passing ("IE") are simply forwarded to RTPProxy, and he is the one who decides what IP to return to OpenSIPS. So I don't see why changing the rtpproxy.c behaves differently.
You could try to capture the traffic sent by OpenSIPS to RTPProxy and see if anything is different in the first part of the command.

Regards,
--
Răzvan Crainea
OpenSIPS Developer

On 01/23/2012 03:16 AM, Matt Hamilton wrote:
Hi Răzvan,

As I said in my previous email I got the revision 8639 on 1.7.1 and that issue is fixed. However, I ran into a scenario where one of my scripts stopped working (audio issues).

In this scenario, I have a multihomed opensips with rtpproxy server bridging between opensips and and asterisk server.


 uac--------------------- opensips/rtpproxy           asterisk
                           65.30.40.50
                           192.168.100.76--------192.168.100.101



Very briefly, my cfg looks like:

route: 
if (dst_ip == 65.30.40.50)    # (SRC: 1.2.3.4)  call coming in from public uac
    rtpproxy_offer("IE");


onreply: 
if (dst_ip == 192.168.100.76)  # (SRC: 192.168.100.101) asterisk replying
    rtpproxy_answer("IE"); 

This runs fine with the rtpproxy.c that came with 1.7.1, but not with the revised rtpproxy.c

rtpproxy_answer places 192.168.100.76 instead of 65.30.40.50 in SDP (c) when replying to 1.2.3.4

I'm new to all this, so probably I'm doing something wrong, but jut wanted to let you know just in case. (I converted to the old rtpproxy.c, and it's working now.)

Regards,
Matt




Date: Sun, 22 Jan 2012 20:01:34 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: [OpenSIPS-Users] can't force rtpproxy use a new IP in SDP

Hi, Matt!

The fix was only reported by Ovidiu and I was the one that fixed it in OpenSIPS's revision 8616 on trunk and 8639 on 1.7.1. This doesn't have anything to do with Kamailio. Can you please check if you have these changes? Because otherwise I don't think it will work.

Regards,
Răzvan

On 01/22/2012 07:49 PM, Matt Hamilton wrote:
Hi Răzvan,

I'm using Opensips 1.7.1. I have seen Ovidiu's changes, but I think they are on the Kamailio side. if I'm not mistaken, sources are a little different, so I didn't want to mess with it (for now).

I don't think there are any changes in Opensips (not in the trunk, either).

> Both scenarios you presented can be implemented using the rtpproxy module.

Can I still use rtpproxy (without the fix) to get the first scenario going? Second one is all set.

Thanks a lot,
Matt



Date: Sun, 22 Jan 2012 19:25:04 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: [OpenSIPS-Users] can't force rtpproxy use a new IP in SDP

Hi, Matt!

What version of OpenSIPS are you using? There was a bug reported by Ovidiu and fixed in revision 8639.
Both scenarios you presented can be implemented using the rtpproxy module.

Regards,
Răzvan

On 01/22/2012 07:15 PM, Matt Hamilton wrote:
Hi,

I can't seem to force a new IP to change the connection in SDP; e.g.,

rtpproxy_offer("c", "1.2.3.4");

IP address I enter is always ignored. Any thoughts how I can resolve this?


Here is my setup:

private   NAT       public             NAT      private      
phones ----|------ internet ------------|--- opensips/rtpproxy-----asterisk cluster


I would like to force rtpproxy use the NATted public ip instead of the private ip of the opensips server when sending messages to UACs. advertised_address doesn't help btw.


I was able to get the following going using the bridge mode. Can bridge mode be somehow used for the above?


private   NAT       public                                NAT    private      
phones ----|------ internet ------ opensips/rtpproxy------|---asterisk cluster



Thanks,
Matt





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

fix_nated_sdp options

Matt Hamilton
In reply to this post by Matt Hamilton
Hi,

I have a case where source IP of the incoming INVITE is different from the SDP connection (c) IP. They are both public IPs.

When relaying this INVITE to my PBX (Asterisk) I need to change the sdp so that it has this connection (c) IP. The default fix_nated_sdp("2") uses the source IP, and I didn't see any option that will use the (c) from SDP other than manually inserting that IP into fix_nated_sdp. Is there such an option that I'm missing?

Right now I'm extracting the (c) IP from SDP by (assuming there is only one (c) line in SDP):

$var(sdpc) = $(rb{sdp.line,c}{s.substr,9,0});               # c=IN IP4 1.2.3.4
fix_nated_sdp("2","$var(sdpc)");

Is this the only way for getting to that (c) address? Is there a "direct" variable I can use?

Thanks, 
Matt

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users