[OpenSIPS-Users] Call forking, branches, Record-routing

Karsten Wemheuer kwem at gmx.de
Fri Apr 1 11:40:51 UTC 2022


Hi Bogdan-Andrei,

I tried with record_route and do some corrections.

The part for calls from the PBX via the proxy to the phones now looks
like this:

route[TOPHONES] {
  record_route();
  lookup("location");
  t_on_branch("AST2PHONE");
  if (!t_relay()) {
    sl_reply_error();
  }
}

branch_route[AST2PHONE] {
  if ( isbflagset("NAT") ) {
    set_advertised_address(PUBLIC-IP);
    set_advertised_port(PUBLIC-PORT);
  } else {
    set_advertised_address("10.0.2.3");
    set_advertised_port("5061");
  }
  t_on_reply("AST2PHONE_REPlY");
}

This works with calls to phones on the LAN and also with calls to
phones behind NAT.

If a call is to go to one local and one NAT accessible phone in
parallel, an error occurs after the call was taken on the local
phone. The CANCEL to the phone behind NAT is sent by the proxy without
routing information and the phone ignores this CANCEL.

A call to a telephone behind NAT can also not be terminated with
CANCEL.

Where is my mistake?

Thanks in advance

Best regards,
Karsten

Am Donnerstag, dem 31.03.2022 um 17:44 +0300 schrieb Bogdan-Andrei
Iancu:
> Hi Karsten,
>
> See my prev email, just to record_route() before the t_relay() for
> the
> initial INVITE. And the loose_route() stuff for whatever
> sequential/in-dialog requests.
>
> Best regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>    https://www.opensips-solutions.com
> OpenSIPS eBootcamp 23rd May - 3rd June 2022
>    https://opensips.org/training/OpenSIPS_eBootcamp_2022/
>
> On 3/31/22 2:50 PM, Karsten Wemheuer wrote:
> > Hi*,
> >
> > I have a understanding problem regarding branches and call forking.
> > A call from a PBX is to be routed to phone(s) via OpenSIPS. The
> > phones
> > are registered to OpenSIPs.
> >
> > INVITE --> lookup ----> 1. Destination
> >                     |
> >                     \--> 2. Destination
> >
> > When the call is terminated by the caller, the BYE request shall
> > take
> > the same path. Currently, the BYE is sent from the PBX directly to
> > the
> > Contact URI (which is not reachable by the PBX).
> >
> > Is it possible to use record_route in the branch_route so that
> > different record route headers are used? Or is there another way?
> >
> > Thanks in advance,
> >
> > Karsten
> >
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list