[OpenSIPS-Users] set_advertised_address usage
    Alexey Kazantsev 
    kurgan-rus at inbox.ru
       
    Thu Jan 17 07:38:20 EST 2019
    
    
  
Just added some lines to route[relay].
Thanks to Kirill Galinurov.
Not ideal in some cases but mostly what I need.
route[relay] {
  # for INVITEs enable some additional helper routes
  if (is_method("INVITE")) {
    t_on_branch("per_branch_ops");
    t_on_reply("handle_nat");
    t_on_failure("missed_call");
  }
  # fix address in Record-Route if this is a 100/200 reply to Multifon // this is only until OpenSIPS is behind NAT!
  if($td=="multifon.ru") {
    set_advertised_address("x.X.116.2");
  }
  if (!t_relay()) {
    send_reply("500","Internal Error");
  };
  exit;
}
-----------------------------------------------
BR, Alexey
http://alexeyka.zantsev.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190117/70e5c3f9/attachment.html>
    
    
More information about the Users
mailing list