1

My application simulates multiple SIP instances that have the same address-of-record so I can support simultaneous incoming calls to that URI. I would also like these instances to be uniquely addressable. Therefore I would like to obtain a GRUU from the registrar for each of these SIP instances.

I'm using OpenSips v2.3.1 as registrar. When the application registers at the registrar the received response contains a contact address, with GRUU, for only one of the SIP instances (see below). When I use SIP instances with different local SIP URIs the response contains a GRUU for each of the contact addresses.

I have searched through RFC5627 (GRUU mechanism) but cannot find a reason for this behavior.

Is this correct behavior or could this be a problem with this OpenSips version?

Thank you for your reply.

--

The REGISTER request sent looks like this:

REGISTER sip:192.168.1.178 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.237:5060;branch=z9hG4bKde764961a60b4e2f8e809470a5c20f78
Max-Forwards: 70
From: sip:1010@192.168.1.178;tag=d455cae0a95f4229bcd2153dac7b3c5b
To: sip:1010@192.168.1.178
Call-ID: f8e77f1a8a604cc98a505bb7017045e4
CSeq: 22 REGISTER
Contact: <sip:1010@192.168.1.237>;+sip.instance="<urn:uuid:2f33883736cc4a3d91570e8c06df9b06-002>"
Contact: <sip:1010@192.168.1.237>;+sip.instance="<urn:uuid:55372b9295824de19c98a9db63386160-001>"
Supported: gruu
Expires: 600
Content-Length: 0

The REGISTER response received from the OpenSips registrar looks like this:

SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.237:5060;branch=z9hG4bKde764961a60b4e2f8e809470a5c20f78
From: sip:1010@192.168.1.178;tag=d455cae0a95f4229bcd2153dac7b3c5b
To: sip:1010@192.168.1.178;tag=672eb56ff27ea055e14e7cc9d1cbeb13.6345
Call-ID: f8e77f1a8a604cc98a505bb7017045e4
CSeq: 22 REGISTER
Contact: <sip:1010@192.168.1.237>;expires=600;pub-gruu="sip:1010@192.168.1.178:5060;gr=urn:uuid:55372b9295824de19c98a9db63386160-001";temp-gruu="sip:tgruu.AUUDWmUJQ2QCSRNfYwBAc0UCXVQmRBk3CkUGXWQDEmoCSQZWYQUUNgFJUFdrUEk3UkYAXWsHQWUAXQNeYhEWa1VHBAhiUEgyBkAHDTAISDIFQAYMMQZAYgdAB1s2BQ==@192.168.1.178:5060;gr";+sip.instance="urn:uuid:55372b9295824de19c98a9db63386160-001"
Server: OpenSIPS (2.3.1 (x86_64/linux))
Content-Length: 0
Bucq
  • 931
  • 6
  • 17
  • Have you tried to send separate REGISTER for each sip.instance? – Artemy Vysotsky Sep 20 '17 at 11:01
  • Yes, I have. The second REGISTER request just refreshes the registration instead of adding another binding. It seems OpensSips treats the SIP URI as primary key value. I think when working with GRUUs the instance ID would make a better primary key, or maybe a combination of both values. – Bucq Sep 20 '17 at 11:22
  • +sip.instance mechanism is described in the rfc5626. As I see - to separate registrations you need to provide different reg-id's. Maybe absence of this parameter confuses the server – Artemy Vysotsky Sep 20 '17 at 11:52
  • AFAIK: the reg-id parameter is used to identify different flows when registering the same instanceID, but these are different instanceIDs and the same flow. I have tried your suggestion and added the reg-id parameter to the contact addresses in the requests. OpenSips still returns only one contact address in the response (without the reg-id parameter). – Bucq Sep 20 '17 at 12:59
  • I see the same bug was reported and fixed on version 1.8/1.9 http://opensips-open-sip-server.1449251.n2.nabble.com/Registrar-Module-GRUU-Multiple-Instances-Causes-Infinite-Loop-td7586043.html - so theoretically - it should be supported. But maybe it was reintroduced into your version again. You probably need to contact OpenSips team for clarifications – Artemy Vysotsky Sep 21 '17 at 04:12
  • Thanks for your research! I don't think it's quite the same problem, since registering multiple instances succeeds if different SIP URIs are used. I already tried asking the OpenSips community ([link](http://opensips-open-sip-server.1449251.n2.nabble.com/Obtain-GRUU-for-multiple-instances-with-same-local-SIP-URI-td7608413.html)) but nobody responded. Therefore I thought I'd try my luck here. Maybe I should bump the question. Thanks again! – Bucq Sep 21 '17 at 06:43

1 Answers1

0

Both +sip.instance= and reg-id= Contact header field parameters are defined by RFC 5626, which OpenSIPS currently does not support, hence the reason why the second contact overrides the first one during your registration attempts.

Liviu Chircu
  • 1,000
  • 3
  • 11
  • 24