[OpenSIPS-Users] Upstream gateway applying rport wrongly

Michael Schloh von Bennewitz osipslist at encambio.com
Thu Jan 31 20:31:03 CET 2013


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



More information about the Users mailing list