``` modparam("registrar", "max_contacts", 1) ``` Two REGISTERS with the same sip.instace+reg_id should produce an update, but: ``` 2015/08/06 20:26:33.903451 127.0.0.1:5061 -> 127.0.0.1:5060 REGISTER sip:127.0.0.1 SIP/2.0 Via: SIP/2.0/UDP 172.17.0.4:5061;branch=z9hG4bK-28433-1-0 From: sip:3000@127.0.0.1;tag=1 To: sip:3000@127.0.0.1 Call-ID: 1-28433@172.17.0.4 CSeq: 1 REGISTER Contact: sip:3000@127.0.0.1:5061; reg-id=1;+sip.instance="urn:uuid:C3DD6013-3000-40E3-8EA2-5849B02ED0C4" Max-Forwards: 10 Expires: 120 User-Agent: SIPp/Win32 Content-Length: 0
(null) (null) 127.0.0.1:5060 -> 127.0.0.1:5061 SIP/2.0 200 OK Via: SIP/2.0/UDP 172.17.0.4:5061;branch=z9hG4bK-28433-1-0;received=127.0.0.1 From: sip:3000@127.0.0.1;tag=1 To: sip:3000@127.0.0.1;tag=b27e1a1d33761e85846fc98f5f3a7e58.2c14 Call-ID: 1-28433@172.17.0.4 CSeq: 1 REGISTER Contact: sip:3000@127.0.0.1:5061;expires=30;+sip.instance="urn:uuid:C3DD6013-3000-40E3-8EA2-5849B02ED0C4";reg-id=1 Server: kamailio (4.3.0 (x86_64/linux)) Content-Length: 0
2015/08/06 20:26:34.315096 127.0.0.1:5061 -> 127.0.0.1:5060 REGISTER sip:127.0.0.1 SIP/2.0 Via: SIP/2.0/UDP 172.17.0.4:5061;branch=z9hG4bK-28437-1-0 From: sip:3000@127.1.0.1;tag=1 To: sip:3000@127.1.0.1 Call-ID: 1-28437@172.17.0.4 CSeq: 1 REGISTER Contact: sip:3000@127.1.0.1:5061; reg-id=1;+sip.instance="urn:uuid:C3DD6013-3000-40E3-8EA2-5849B02ED0C4" Max-Forwards: 10 Expires: 120 User-Agent: SIPp/Win32 Content-Length: 0
(null) (null) 127.0.0.1:5060 -> 127.0.0.1:5061 SIP/2.0 503 Service Unavailable Via: SIP/2.0/UDP 172.17.0.4:5061;branch=z9hG4bK-28437-1-0;received=127.0.0.1 From: sip:3000@127.1.0.1;tag=1 To: sip:3000@127.1.0.1;tag=b27e1a1d33761e85846fc98f5f3a7e58.2dc6 Call-ID: 1-28437@172.17.0.4 CSeq: 1 REGISTER Contact: sip:3000@127.0.0.1:5061;expires=29;+sip.instance="urn:uuid:C3DD6013-3000-40E3-8EA2-5849B02ED0C4";reg-id=1 P-Registrar-Error: Too many registered contacts Server: kamailio (4.3.0 (x86_64/linux)) Content-Length: 0 ```
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/278
With the proposed patch: ``` 2015/08/06 20:33:18.668584 127.0.0.1:5061 -> 127.0.0.1:5060 REGISTER sip:127.0.0.1 SIP/2.0 Via: SIP/2.0/UDP 172.17.0.4:5061;branch=z9hG4bK-29228-1-0 From: sip:3000@127.0.0.1;tag=1 To: sip:3000@127.0.0.1 Call-ID: 1-29228@172.17.0.4 CSeq: 1 REGISTER Contact: sip:3000@127.0.0.1:5061; reg-id=1;+sip.instance="urn:uuid:C3DD6013-3000-40E3-8EA2-5849B02ED0C4" Max-Forwards: 10 Expires: 120 User-Agent: SIPp/Win32 Content-Length: 0
(null) (null) 127.0.0.1:5060 -> 127.0.0.1:5061 SIP/2.0 200 OK Via: SIP/2.0/UDP 172.17.0.4:5061;branch=z9hG4bK-29228-1-0;received=127.0.0.1 From: sip:3000@127.0.0.1;tag=1 To: sip:3000@127.0.0.1;tag=b27e1a1d33761e85846fc98f5f3a7e58.77bd Call-ID: 1-29228@172.17.0.4 CSeq: 1 REGISTER Contact: sip:3000@127.0.0.1:5061;expires=30;+sip.instance="urn:uuid:C3DD6013-3000-40E3-8EA2-5849B02ED0C4";reg-id=1 Server: kamailio (4.3.0 (x86_64/linux)) Content-Length: 0
2015/08/06 20:33:19.081447 127.0.0.1:5061 -> 127.0.0.1:5060 REGISTER sip:127.0.0.1 SIP/2.0 Via: SIP/2.0/UDP 172.17.0.4:5061;branch=z9hG4bK-29232-1-0 From: sip:3000@127.1.0.1;tag=1 To: sip:3000@127.1.0.1 Call-ID: 1-29232@172.17.0.4 CSeq: 1 REGISTER Contact: sip:3000@127.1.0.1:5061; reg-id=1;+sip.instance="urn:uuid:C3DD6013-3000-40E3-8EA2-5849B02ED0C4" Max-Forwards: 10 Expires: 120 User-Agent: SIPp/Win32 Content-Length: 0
(null) (null) 127.0.0.1:5060 -> 127.0.0.1:5061 SIP/2.0 200 OK Via: SIP/2.0/UDP 172.17.0.4:5061;branch=z9hG4bK-29232-1-0;received=127.0.0.1 From: sip:3000@127.1.0.1;tag=1 To: sip:3000@127.1.0.1;tag=b27e1a1d33761e85846fc98f5f3a7e58.4f39 Call-ID: 1-29232@172.17.0.4 CSeq: 1 REGISTER Contact: sip:3000@127.1.0.1:5061;expires=30;+sip.instance="urn:uuid:C3DD6013-3000-40E3-8EA2-5849B02ED0C4";reg-id=1 Server: kamailio (4.3.0 (x86_64/linux)) Content-Length: 0 ```
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/278#issuecomment-128470440
To understand properly, is it like the Expires was not updated?
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/278#issuecomment-128643419
No the problem is: ``` P-Registrar-Error: Too many registered contacts ```
The check: https://github.com/kamailio/kamailio/blob/master/modules/registrar/save.c#L6... for a REGISTER that is updating gets rejected
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/278#issuecomment-128644142
Oh, ok, missed the response code in the first place, focused on returned contact -- apparently still jet lagged.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/278#issuecomment-128644543
The problem seems to be that ci_pack when calling only with msg was not setting the intance and reg_id into the contact_info, so ul.get_ucontact_by_instance at https://github.com/kamailio/kamailio/blob/master/modules/registrar/save.c#L5... was at https://github.com/kamailio/kamailio/blob/master/modules/usrloc/urecord.c#L7... using get_ucontact
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/278#issuecomment-128648029
Closed #278.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/278#event-376158117