[OpenSIPS-Users] fix_nated_sdp() not taking effect

Răzvan Crainea razvan at opensips.org
Mon Nov 18 07:48:28 EST 2019


Yes, the problem is definitely the fact that you are calling 
`rtpproxy_offer()` for the initial invite. Hence, when you run 
`fix_nated_sdp()`, you're trying to change the same IP once again - this 
is not possile in OpenSIPS.
But I wonder why you need the `fix_nated_sdp()` if you are using 
RTPProxy. Can't you just use the `ip_address`[1] field to advertise the 
proper IP int he c= line.

[1] 
https://opensips.org/html/docs/modules/3.0.x/rtpproxy.html#func_rtpproxy_offer

Best regards,
Răzvan

On 11/13/19 1:51 PM, Mark Farmer wrote:
> Hi everyone
> 
> In my failure_route I'm routing to an Asterisk box for voicemail & I 
> need to change the SDP c/o parameters to use the correct internal IP 
> address but using fix_nated_sdp() is not taking effect.
> 
> if (t_check_status("486|408|603")) {
>                  xlog("CUSTOM_LOG: User replied $T_reply_code - Routing 
> to Asterisk Voicemail service.");
>                  prefix("VMR_");
>                  rewritehostport("10.150.50.53:2404 
> <http://10.150.50.53:2404>");
>                  force_send_socket(udp:10.150.50.51);
>                  fix_nated_sdp(10,"10.150.50.51");
> 
>                  if (!t_relay()) {
>                          send_reply(500,"Internal Error");
>                  }
>                  exit;
> }
> 
> I get the CUSTOM_LOG entry so I know that the route is executing.
> 
> Maybe I'm doing something wrong with the flags, I've tried:
> fix_nated_sdp(2,"10.150.50.51");
> fix_nated_sdp(8,"10.150.50.51");
> fix_nated_sdp(10,"10.150.50.51");
> 
> But when I examine the SDP in the resulting invite, the c/o parameters 
> are never changed.
> I'm using rtpengine_offer/answer in the initial routing, could it be 
> related to that?
> 
> I'm using OpenSIPS 3.0.1
> 
> Best regards
> Mark.
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 

-- 
Răzvan Crainea
OpenSIPS Core Developer
   http://www.opensips-solutions.com



More information about the Users mailing list