Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ims_registrar_pcscf: support for handling contact * value #3848

Open
deepak-git-account opened this issue May 13, 2024 · 4 comments
Open

ims_registrar_pcscf: support for handling contact * value #3848

deepak-git-account opened this issue May 13, 2024 · 4 comments
Assignees

Comments

@deepak-git-account
Copy link

Description

 If Deregistration contains * in a contact field as described in RFC-3261,
 then the Kamailio is not cleaning the in-memory and database record. And the next iteration is not working correctly. 
 Use of the "*" Contact header field value allows a registering UA
  to remove all bindings associated with an address-of-record
  without knowing their precise values.
Step:1 REGISTER USER UE-A
Step:2: Wait for the certain duration
Step:3: De-REGISTER USER UE-A (Contact header is using *)
Step:4: Repeat from the step-1
After step:3, clean-up is not happening. Record can be seen in SQL.

Note: If de-register contains specific CONTACT header, then cleanup is happening.

Troubleshooting

Reproduction

Debugging Data

(paste your debugging data here)

Log Messages

May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: DEBUG: <script>: Contact headervalue: *
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=25 a=63 n=assign
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=26 a=26 n=xlog
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: DEBUG: <script>: Full URI from sip:49404965200004@open-ims.test: sip:49404965200004@open-ims.test
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=33 a=63 n=assign
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=34 a=63 n=assign
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=36 a=63 n=assign
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=37 a=26 n=xlog
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=38 a=63 n=assign
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=39 a=26 n=xlog
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=46 a=16 n=if
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=43 a=26 n=xlog
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=54 a=16 n=if
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=46 a=25 n=is_present_hf
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=47 a=26 n=xlog
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=50 a=25 n=append_hf
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=54 a=26 n=xlog
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=55 a=25 n=pcscf_save_pending
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: ims_registrar_pcscf [save.c:318]: save_pending(): No contact headers
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: DEBUG: ims_registrar_pcscf [save.c:492]: save_pending(): Error saving pending contact
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=67 a=16 n=if
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=65 a=63 n=assign
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[] c=[] l=0 a=12 n=seturi
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=71 a=26 n=xlog

SIP Traffic

(paste your sip traffic here)

Possible Solutions

Additional Information

  • Kamailio Version - output of kamailio -v
kamailio -v
version: kamailio 5.7.5 (x86_64/linux) 58499a-dirty
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 58499a -dirty
compiled on 11:23:55 May  8 2024 with gcc 9.4.0

  • Operating System:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal

@xkaraman
Copy link
Contributor

xkaraman commented May 24, 2024

Hey there @deepak-git-account ,

The RFC also states that

The REGISTER-specific Contact header field value of "*" applies to all registrations, but it MUST NOT be used unless the Expires header field is present with a value of "0".

If you set the Expires header to 0, all all bindings associated with an address-of-record should be gone.

Contact: *
Expires: 0

@deepak-git-account
Copy link
Author

Thanks for the reply.. Both are set to Contact: * and Expires: 0. But Kamailio PCSCF is giving error:
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: ims_registrar_pcscf [save.c:318]: save_pending(): No contact headers

@xkaraman
Copy link
Contributor

@deepak-git-account
save_pending() does not seem to handle de-registrations according to function code

LM_DBG("not doing pending reg on de-registration\n");
.

Can you maybe use the save() function? It needs to be called from onreply_route though. It should handle the *.

if(!update_contacts(req, _m, _d, cb->star, expires_hdr, public_ids,

@miconda miconda changed the title During de-registration procedure, clean-up is not happening if contact has * value ims_registrar_pcscf: during de-registration procedure, clean-up is not happening if contact has * value Jun 3, 2024
@miconda
Copy link
Member

miconda commented Jun 3, 2024

I understand that this is about the ims modules, not about registrar/usrloc modules for the classic SIP.

The IMS modules are not full implementation of the specs, and given that not many are contributing to them, likely this is a missing feature.

One should write the code for it and make a pull request. I changed the title accordingly and if nobody commits to do it soon, this issue will be closed.

@miconda miconda changed the title ims_registrar_pcscf: during de-registration procedure, clean-up is not happening if contact has * value ims_registrar_pcscf: support for handling contact * value Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants