[OpenSIPS-Users] Upstream gateway applying rport wrongly

Bogdan-Andrei Iancu bogdan at opensips.org
Fri Feb 1 09:59:22 CET 2013


Hi Michael,

It seems that fix_route_dialog() makes more fans - I would say it is a 
really powerful tool that helps dealing with such interoperability 
issues. Dialog + fixing is a much cheaper solution than a b2b ;)

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 01/31/2013 09:31 PM, Michael Schloh von Bennewitz wrote:
> Hello Bogdan,
>
> On Tues., Jan. 30, 2013, Bogdan-Andrei Iancu wrote:
>> On 01/28/2013 06:44 PM, Michael Schloh von Bennewitz wrote:
>>> My OpenSIPS relays INVITEs from registered UACs to a upstream
>>> gateway. OpenSIPS sends the INVITE over a random port. It listens
>>> on 12.34.56.78:5060.
>>>
>>> [...]
>>>
>> I'm afraid I'm not following the scenario - rport is used only for
>> routing back replies for a requests - it has no usage outside the
>> scope of a transaction, and there is no way for a rport value to get
>> into RURI...
>>
> The offending upstream gateway is simply storing the originating
> random port of the OpenSIPS INVITE and using that in later RURIs
> instead of taking the URI from the Contact header. It seems that
> placing the same random port in rport= is only a coincidence.
>
>> Do you have a full SIP trace to show your case ?
>>
> Thanks a lot for the consideration, but no further effort is needed.
>
> In the meantime I've tested and found that only one of all PSTN
> gateways that I know do this. It's likely that they expect a
> registration first and when their gateway is used without a
> registration their proxy shows its bizarre configuration problem.
>
>>> QUESTIONS
>>>
>>> How can I avoid getting the rport port number in the RURI?
>>>
> By asking the offending gateway operator to properly configure
> their proxy and stop ignoring the Contact header.
>
>>> Or what to do about it in the route block of the config?
>>>
> In the meantime I've used:
>
>      if ($DLG_status != NULL)
>          if (!validate_dialog()) {  # seems that fix...dlg is buggy
>              fix_route_dialog();    # and doesn't adjust $du, so force
>              $du = NULL;            # routing to $ru by removing $du
>      }
>
> ...after detecting sequential messages which allows upstream
> gateway operators to misconfigure their proxies.
>
> Regards,
> Michael
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



More information about the Users mailing list