Re: [OpenSIPS-Users] Call-ID changing on re-registration
I know about the expire, I just want to ignore them because I only care when new devices register, I've tried the contact issue but it didn't help, both phones came in with the same contact. On Wed, Jul 7, 2021, 11:31 Alexey Kazantsev via Users < users@lists.opensips.org> wrote: > Hello, > > maybe the second parameter (‘contact’) of the ‘is_contact_registered’ > function [1] could be useful? > And speaking about Expires: 0 — according to SIP RFC [2] it’s absolutely > normal, > it means tat a device disables its registration, this is done either by > sending Expires: 0 SIP header, > or by adding ;expires=0 as a parameter to the Contact header. > > > [1] > https://opensips.org/docs/modules/3.1.x/registrar.html#func_is_contact_registered > [2] https://datatracker.ietf.org/doc/html/rfc3261#section-10.3 > > --- > BR, Alexey > http://alexeyka.zantsev.com/ > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Call-ID changing on re-registration
Hello, maybe the second parameter (‘contact’) of the ‘is_contact_registered’ function [1] could be useful? And speaking about Expires: 0 — according to SIP RFC [2] it’s absolutely normal, it means tat a device disables its registration, this is done either by sending Expires: 0 SIP header, or by adding ;expires=0 as a parameter to the Contact header. [1] https://opensips.org/docs/modules/3.1.x/registrar.html#func_is_contact_registered [2] https://datatracker.ietf.org/doc/html/rfc3261#section-10.3 --- BR, Alexey http://alexeyka.zantsev.com/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Call-ID changing on re-registration
Hi, I'm trying to run a script when a new sip device registers, I want that if 2 devices have the same user name it should run the script when each device registers first time, I added this script to my REGISTER processing if (!is_contact_registered("location",,,"$ci") && $hdr(Expires) !="0") runscript.. I hoped this would only run once for each device registered, but I see lots of devices changing the Call-ID for each registration, hence running the script every few minutes instead of only once. I also have some devices sending registrations with Expires: 0, so I added the && $hdr(Expires) !="0" which seems to of solved that issue. is there a better way to do this? can I have a way of knowing its the same registration even though the Call-ID has changed? S. Rosenberg ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users