[OpenSIPS-Users] topology hiding bug?

M S medeanwz at gmail.com
Wed Nov 18 20:03:36 EST 2020


I investigated a bit more about this and although the effects might be
similar, I'm not sure if my case and yours are triggered by the same reason.
This is how this problem can be simulated: the problem of duplicating did
part in contact happens when the callee part sends back its contact with
the same username as opensip contact.
In my case, if opensips (during topology hiding) changes contact to
<sip:90006969.did.29c.2ed202e at opensips.public.ip> and sends it to callee,
if callee (B side) responds with 200 OK and sets its contact to be:
<sip:90006969.did.29c.2ed202e at Bside.public.ip:5060> which is the same
username as opensips contact, but different ip (which I guess is correct by
RFC?) then opensips changes the contact (incorrectly) to
<sip:90006969.did.29c.2ed202e.did.29c.2ed202e at opensips.private.ip:5060>
If developers of topology hiding module read this, maybe they have some
ideas about why this happens?

Thanks,
Mark

On Wed, Nov 18, 2020 at 2:03 PM Ricardo Martinez <rmartinez at redvoiss.net>
wrote:

> Hi.
>
> I have a very similar problem with the topology hiding module and with the
> mid_registrar module.
>
> I don’t know if maybe I’m doing something wrong or maybe this is the way
> it has to work?.  My scenario is as follows:
>
>
>
> Private PBX – OpenSIP (Topology Hiding + MidRegistrar) --  UAC
>
>
>
> When a REGISTER came from the UAC to the PBX I see something like this:
>
>
>
> 2020/11/18 09:49:00.290304 192.XXX.XXX.4:51045 -> 192.XXX.XXX.133:5060
>
> REGISTER sip:my.domain.com:5060 SIP/2.0
>
> Via: SIP/2.0/UDP
> 192.XXX.XXX.4:51045;branch=z9hG4bK-524287-1---300f9ecbae4e0c8d;rport
>
> Max-Forwards: 70
>
> *Contact:
> <sip:d1.922 at 192.XXX.XXX.4:51045;rinstance=355eb6c1f6b62875>;+sip.instance="<urn:uuid:4412d6b8-1095-5684-8e50-1e67ee70b6e2>";reg-id=1*
>
> To: "Ricardo Martinez"<sip:d1.922 at my.domain.com:5060>
>
> From: "Ricardo Martinez"<sip:d1.922 at my.domain.com:5060>;tag=7bb10a6e
>
> Call-ID: 104875NWY1NThmMTJmOWMyNTdlNmY3OGIwZjZlNWIzMzk4NDM
>
> CSeq: 1 REGISTER
>
> Expires: 600
>
> Allow: OPTIONS, SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO,
> MESSAGE
>
> Supported: outbound, path
>
> User-Agent: VEX release 6.2.2.0 stamp 104875
>
> Content-Length: 0
>
>
>
>
>
> But then pass through the OpenSIPS with Topology Hiding enabled and
> Mid_registrar enabled I see:
>
>
>
> 2020/11/18 09:49:00.291478 192.XXX.XXX.134:5060 -> 192.141.65.94:5060
>
> REGISTER sip:my.domain.com:5060 SIP/2.0
>
> Via: SIP/2.0/UDP 192.XXX.XXX.134:5060;branch=z9hG4bK4943.c7a48b07.0
>
> Max-Forwards: 69
>
> *Contact: <*
> *sip:d1.922 at 192.XXX.XXX.134;thinfo=VG9obzAdIFs3YnpWYl0DRWlTfWJgXn5ZdFpkW2ZiZFtlVDEdPhInMjoMNVJwQWUEMWU3XjZZIUJiWWRmQ28lCzNOYVhhfWVbYUF1QH5QYGBuWmBZcw--*
> *><**sip:2844375008405363167 at 192.XXX.XXX.134:5060**>;expires=3600*
>
> To: "Ricardo Martinez"<sip:d1.922 at 192.141.65.94>
>
> From: "Ricardo Martinez"<sip:d1.922 at 192.XXX.XXX.134:5060>;tag=7bb10a6e
>
> Call-ID: 104875NWY1NThmMTJmOWMyNTdlNmY3OGIwZjZlNWIzMzk4NDM
>
> CSeq: 1 REGISTER
>
> Expires: 3600
>
> Allow: OPTIONS, SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO,
> MESSAGE
>
> Supported: outbound, path
>
> User-Agent: VEX release 6.2.2.0 stamp 104875
>
> Content-Length: 0
>
>
>
>
>
> As you can see the CONTACT is duplicated and I’m getting the next error:
>
> ERROR:mid_registrar:save_restore_rpl_contacts: 200 OK reply does not
> include all req contacts! (ci:
> 104875NWY1NThmMTJmOWMyNTdlNmY3OGIwZjZlNWIzMzk4NDM)
>
> Nov 18 09:58:00 sbcar /usr/local/sbin/opensips[11924]:
> ERROR:mid_registrar:mid_reg_resp_in: failed to process rpl contacts for AoR
> 'd1.922'
>
>
>
>
>
> Does someone have a clue on this?
>
>
>
> Regards,
>
> Ricardo
>
>
>
> *De:* Users <users-bounces at lists.opensips.org> *En nombre de *M S
> *Enviado el:* martes, 17 de noviembre de 2020 22:24
> *Para:* OpenSIPS users mailling list <users at lists.opensips.org>
> *Asunto:* [OpenSIPS-Users] topology hiding bug?
>
>
>
> Dear OpenSIPS development team,
>
> I have come across a strange case that sometime when I use
> topology_hiding("UD"), it makes a mistake in changing Contact field.
>
> Scenario is:
>
>
>
> A: (Contact: <sip:90006969 at 172.24.8.5:5060>) sends Invite to private IP
> of opensips, opensips changes Contact field to: (Contact: <
> sip:90006969.did.29c.2ed202e at public.ip>) and sends Invite from public IP
> to B.
>
> Then B sends 200 OK back to Opensips public IP, with correct Contact:
> (Contact: <sip:90006969.did.29c.2ed202e at Bpublic.ip:5060>). so far so good.
>
> Now Opensips sends 200 OK back to A from its private IP, and changes
> Contact to:
>
> Contact: <sip:90006969.did.29c.2ed202e.did.29c.2ed202e at 172.24.8.37>
>
>
>
> As you see, did part is repeated twice.. and that means when A replies
> with:
>
> ACK sip:90006969.did.29c.2ed202e.did.29c.2ed202e at 172.24.8.37 SIP/2.0
>
>
>
> Opensips throws an error: ERROR:dialog:dlg_onroute: malformed route param
> [29c.2ed202e.did.29c.2ed202e]
>
>
>
> Is this a bug? I am using Opensips 3.1.0.
>
>
>
> Thanks,
>
> Mark
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20201118/e8547746/attachment.html>


More information about the Users mailing list