Before the changes the xml was always the same:
UL_CONTACT_UPDATE -> state="active" event="registered" ``` Jul 15 13:48:14 sp1 proxy[25780]: DEBUG: pua_reginfo [usrloc_cb.c:240]: reginfo_usrloc_cb(): AOR: 88835677110000@A.A.A.A (location) Jul 15 13:48:14 sp1 proxy[25780]: DEBUG: pua_reginfo [usrloc_cb.c:242]: reginfo_usrloc_cb(): type= UL_CONTACT_UPDATE Jul 15 13:48:14 sp1 proxy[25780]: DEBUG: pua_reginfo [usrloc_cb.c:108]: build_reginfo_full(): Contact sip:88835677110000@D.D.D.D:35315;transport=TLS;ob, 0x7f916090ce38 Jul 15 13:48:14 sp1 proxy[25780]: DEBUG: pua_reginfo [usrloc_cb.c:296]: reginfo_usrloc_cb(): XML-Body:#012<?xml version="1.0"?>#012<reginfo xmlns="urn:ietf:params:xml:ns:reginfo" version="0" state="full">#012 <registration aor="sip:88835677110000@A.A.A.A" id="0x7f9224e47260" state="active">#012 <contact id="0x7f916090ce38" state="active" event="registered" expires="300" callid="KlIcAz1dRJNMn-Le.83MbT8tqGFZ4nXp" cseq="35175" received="sip:B.B.B.B:44214;transport=tls" path="<sip:lb@C.C.C.C;lr;received=sip:B.B.B.B:44214%3Btransport%3Dtls;socket=sip:A.A.A.A:5061>" user_agent="forfoneSip r1 / hammerhead-22">#012 <uri>sip:88835677110000@D.D.D.D:35315;transport=TLS;ob</uri>#012 </contact>#012 </registration>#012</reginfo>#012 Jul 15 13:48:14 sp1 proxy[25780]: DEBUG: pua_reginfo [usrloc_cb.c:298]: reginfo_usrloc_cb(): Contact sip:88835677110000@D.D.D.D:35315;transport=TLS;ob, 0x7f916090c908 ``` UL_CONTACT_DELETE -> state="active" event="registered" ``` Jul 15 13:49:29 sp1 proxy[25775]: DEBUG: pua_reginfo [usrloc_cb.c:240]: reginfo_usrloc_cb(): AOR: 88835677220000@A.A.A.A (location) Jul 15 13:49:29 sp1 proxy[25775]: DEBUG: pua_reginfo [usrloc_cb.c:244]: reginfo_usrloc_cb(): type= UL_CONTACT_DELETE Jul 15 13:49:29 sp1 proxy[25775]: DEBUG: pua_reginfo [usrloc_cb.c:108]: build_reginfo_full(): Contact sip:88835677220000@E.E.E.E:55323;transport=TLS;ob, 0x7f916090d360 Jul 15 13:49:29 sp1 proxy[25775]: DEBUG: pua_reginfo [usrloc_cb.c:296]: reginfo_usrloc_cb(): XML-Body:#012<?xml version="1.0"?>#012<reginfo xmlns="urn:ietf:params:xml:ns:reginfo" version="0" state="full">#012 <registration aor="sip:88835677220000@A.A.A.A" id="0x7f9224e47260" state="active">#012 <contact id="0x7f916090d360" state="active" event="registered" expires="153" callid="tx2XjrkuqYlZ44PfliHvGEK4Her3IYcU" cseq="38095" received="sip:F.F.F.F:55323;transport=tls" path="<sip:lb@C.C.C.C;lr;received=sip:F.F.F.F:55323%3Btransport%3Dtls;socket=sip:A.A.A.A:5061>" user_agent="forfoneSip r1 / mako-22">#012 <uri>sip:88835677220000@E.E.E.E:55323;transport=TLS;ob</uri>#012 </contact>#012 </registration>#012</reginfo>#012 Jul 15 13:49:29 sp1 proxy[25775]: DEBUG: pua_reginfo [usrloc_cb.c:298]: reginfo_usrloc_cb(): Contact sip:88835677220000@E.E.E.E:55323;transport=TLS;ob, 0x7f916090ce38 ``` After changes: UL_CONTACT_DELETE -> state="terminated" event="unregistered" ``` Jul 15 15:44:04 sp1 proxy[7305]: DEBUG: pua_reginfo [usrloc_cb.c:248]: reginfo_usrloc_cb(): AOR: 88835677110000@A.A.A.A (location) Jul 15 15:44:04 sp1 proxy[7305]: DEBUG: pua_reginfo [usrloc_cb.c:252]: reginfo_usrloc_cb(): type= UL_CONTACT_DELETE Jul 15 15:44:04 sp1 proxy[7305]: DEBUG: pua_reginfo [usrloc_cb.c:106]: build_reginfo_full(): Updated Contact sip:88835677110000@B.B.B.B:58446;transport=TLS;ob[uloc-55a66069-1c88-4], 0x7f6cb06f2170 Jul 15 15:44:04 sp1 proxy[7305]: DEBUG: pua_reginfo [usrloc_cb.c:112]: build_reginfo_full(): Contact sip:88835677110000@B.B.B.B:58446;transport=TLS;ob[uloc-55a66069-1c88-4], 0x7f6cb06f2170 Jul 15 15:44:04 sp1 proxy[7305]: DEBUG: pua_reginfo [usrloc_cb.c:304]: reginfo_usrloc_cb(): XML-Body:#012<?xml version="1.0"?>#012<reginfo xmlns="urn:ietf:params:xml:ns:reginfo" version="0" state="full">#012 <re gistration aor="sip:88835677110000@A.A.A.A" id="0x7f6d74c44260" state="terminated">#012 <contact id="0x7f6cb073b0c0" state="terminated" event="unregistered" expires="163" callid="bpTyIZoJHDoF1edNqQ9oHmEgT7 tBEq25" cseq="20241" received="sip:C.C.C.C:54129;transport=tls" path="<sip:lb@F.F.F.F;lr;received=sip:C.C.C.C:54129%3Btransport%3Dtls;socket=sip:A.A.A.A:5061>" user_agent="forfoneSip r1 / hammerhead-22">#012 <uri>sip:88835677110000@B.B.B.B:58446;transport=TLS;ob</uri>#012 </contact>#012 </registration>#012</reginfo>#012 Jul 15 15:44:04 sp1 proxy[7305]: DEBUG: pua_reginfo [usrloc_cb.c:306]: reginfo_usrloc_cb(): Contact sip:88 835677110000@B.B.B.B:58446;transport=TLS;ob, 0x7f6cb073ab90 ``` UL_CONTACT_UPDATE -> state="active" event="refreshed" You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/247
-- Commit Summary --
* pua_reginfo: use ul.get_urecord_by_ruid instead of ul.get_urecord * pua_reginfo: use ruid to fix comparation of contact
-- File Changes --
M modules/pua_reginfo/usrloc_cb.c (24)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/247.patch https://github.com/kamailio/kamailio/pull/247.diff
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/247
It is ok to merge from my point of view.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/247#issuecomment-121722021
Merged #247.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/247#event-356827094