Hello everyone,
I have previously set up Kamailio 5.7.2 IMS configuration (including P-CSCF, S-CSCF and I-CSCF) and successfully made voice calls. Now I'm trying to set up an IP-SM-GW AS using the example here (with some tweaks): https://github.com/kamailio/kamailio/blob/master/src/modules/smsops/examples... Currently I'm trying to send the SMS using a SIP software client (MicroSIP).
The problem is, while the SMS is received at the AS and stored in the database, it does not send it to the callee.
While troubleshooting the problem, I've found that reg_fetch_contacts("location", "$var(uri)", "caller") in route[SEND_SMS] cannot find the contact which was added by reginfo_handle_notify("location") in route[NOTIFY] in the usrloc database. By tracing the problem more, I've found that reginfo_handle_notify (when handling reg event NOTIFY) adds the complete AoR in the "username" field in the location table, e.g. as "bob@ims.mnc001.mcc001.3gppnetwork.org". But reg_fetch_contacts (when trying to send the SMS) looks up the table using only the user part in the "username" field, e.g. "bob". So it cannot find the callee contact and the configuration assumes the callee is still not registered; so it tries to send out a SUBSCRIBE every time it tries to send an SMS to the callee, instead of actually sending the SMS.
Does anybody have any idea on what could have caused this inconsistent behavior between reginfo_handle_notify and reg_fetch_contacts?
Hello,
I think you could just give the proper URI with domain part in the variable, according to the documentation: https://kamailio.org/docs/modules/5.5.x/modules/ims_registrar_scscf.html#idm...
Cheers,
Henning
-----Original Message----- From: Mohammad Hossein Ahmadi via sr-users sr-users@lists.kamailio.org Sent: Mittwoch, 8. November 2023 14:03 To: sr-users@lists.kamailio.org Cc: Mohammad Hossein Ahmadi m.ahmadi@sinacomsys.com Subject: [SR-Users] Inconsistent behavior between reg_fetch_contacts (registrar module) and reginfo_handle_notify (pua_reginfo module)?
Hello everyone,
I have previously set up Kamailio 5.7.2 IMS configuration (including P-CSCF, S- CSCF and I-CSCF) and successfully made voice calls. Now I'm trying to set up an IP-SM-GW AS using the example here (with some tweaks): https://github.com/kamailio/kamailio/blob/master/src/modules/smsops/exa mples/kamailio.cfg Currently I'm trying to send the SMS using a SIP software client (MicroSIP).
The problem is, while the SMS is received at the AS and stored in the database, it does not send it to the callee.
While troubleshooting the problem, I've found that reg_fetch_contacts("location", "$var(uri)", "caller") in route[SEND_SMS] cannot find the contact which was added by reginfo_handle_notify("location") in route[NOTIFY] in the usrloc database. By tracing the problem more, I've found that reginfo_handle_notify (when handling reg event NOTIFY) adds the complete AoR in the "username" field in the location table, e.g. as "bob@ims.mnc001.mcc001.3gppnetwork.org". But reg_fetch_contacts (when trying to send the SMS) looks up the table using only the user part in the "username" field, e.g. "bob". So it cannot find the callee contact and the configuration assumes the callee is still not registered; so it tries to send out a SUBSCRIBE every time it tries to send an SMS to the callee, instead of actually sending the SMS.
Does anybody have any idea on what could have caused this inconsistent behavior between reginfo_handle_notify and reg_fetch_contacts? __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
(sending again since I noticed my previous reply might not have been sent properly)
Hi Henning,
The script already does that. As seen at lines 380-382 here: https://github.com/kamailio/kamailio/blob/master/src/modules/smsops/examples...
... $var(uri) = "sip:"+$avp(to)+"@"+DOMAIN; if (reg_fetch_contacts("location", "$var(uri)", "caller")) { ...
I even printed the value of $var(uri) to the log to make sure it was correct, and it was! ("sip:bob@ims.mnc001.mcc001.3gppnetwork.org")*
I'm still perplexed.
Any idea which would help resolve the problem would be greatly appreciated.
Regards, Mohammad
*actually I have changed the mnc and mcc numbers here
Henning Westerholt wrote:
Hello,
I think you could just give the proper URI with domain part in the variable, according to the documentation: https://kamailio.org/docs/modules/5.5.x/modules/ims_registrar_scscf.html#id%...
Cheers,
Henning
-----Original Message----- From: Mohammad Hossein Ahmadi via sr-users <sr-users(a)lists.kamailio.org> Sent: Mittwoch, 8. November 2023 14:03 To: sr-users(a)lists.kamailio.org Cc: Mohammad Hossein Ahmadi <m.ahmadi(a)sinacomsys.com> Subject: [SR-Users] Inconsistent behavior between reg_fetch_contacts (registrar module) and reginfo_handle_notify (pua_reginfo module)?
Hello everyone,
I have previously set up Kamailio 5.7.2 IMS configuration (including P-CSCF, S- CSCF and I-CSCF) and successfully made voice calls. Now I'm trying to set up an IP-SM-GW AS using the example here (with some tweaks): https://github.com/kamailio/kamailio/blob/master/src/modules/smsops/exa mples/kamailio.cfg Currently I'm trying to send the SMS using a SIP software client (MicroSIP).
The problem is, while the SMS is received at the AS and stored in the database, it does not send it to the callee.
While troubleshooting the problem, I've found that reg_fetch_contacts("location", "$var(uri)", "caller") in route[SEND_SMS] cannot find the contact which was added by reginfo_handle_notify("location") in route[NOTIFY] in the usrloc database. By tracing the problem more, I've found that reginfo_handle_notify (when handling reg event NOTIFY) adds the complete AoR in the "username" field in the location table, e.g. as "bob(a)ims.mnc001.mcc001.3gppnetwork.org".org". But reg_fetch_contacts (when trying to send the SMS) looks up the table using only the user part in the "username" field, e.g. "bob". So it cannot find the callee contact and the configuration assumes the callee is still not registered; so it tries to send out a SUBSCRIBE every time it tries to send an SMS to the callee, instead of actually sending the SMS.
Does anybody have any idea on what could have caused this inconsistent behavior between reginfo_handle_notify and reg_fetch_contacts? __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-leave(a)lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
Hello,
strange. You probably did already that, but if you activate debug log level you should be able to also see the database queries that are executed, just to double check. If might be just a bug in the cfg or possible also in the code.
Cheers,
Henning
-----Original Message----- From: Mohammad Hossein Ahmadi via sr-users sr-users@lists.kamailio.org Sent: Montag, 13. November 2023 13:14 To: sr-users@lists.kamailio.org Cc: Mohammad Hossein Ahmadi m.ahmadi@sinacomsys.com Subject: [SR-Users] Re: Inconsistent behavior between reg_fetch_contacts (registrar module) and reginfo_handle_notify (pua_reginfo module)?
(sending again since I noticed my previous reply might not have been sent properly)
Hi Henning,
The script already does that. As seen at lines 380-382 here: https://github.com/kamailio/kamailio/blob/master/src/modules/smsops/exa mples/kamailio.cfg
... $var(uri) = "sip:"+$avp(to)+"@"+DOMAIN; if (reg_fetch_contacts("location", "$var(uri)", "caller")) { ...
I even printed the value of $var(uri) to the log to make sure it was correct, and it was! ("sip:bob@ims.mnc001.mcc001.3gppnetwork.org")*
I'm still perplexed.
Any idea which would help resolve the problem would be greatly appreciated.
Regards, Mohammad
*actually I have changed the mnc and mcc numbers here
Henning Westerholt wrote:
Hello,
I think you could just give the proper URI with domain part in the variable, according to the documentation: https://kamailio.org/docs/modules/5.5.x/modules/ims_registrar_scscf.ht ml#id…
Cheers,
Henning
-----Original Message----- From: Mohammad Hossein Ahmadi via sr-users <sr-users(a)lists.kamailio.org> Sent: Mittwoch, 8. November 2023 14:03 To: sr-users(a)lists.kamailio.org Cc: Mohammad Hossein Ahmadi <m.ahmadi(a)sinacomsys.com> Subject: [SR-Users] Inconsistent behavior between reg_fetch_contacts (registrar module) and reginfo_handle_notify
(pua_reginfo module)?
Hello everyone,
I have previously set up Kamailio 5.7.2 IMS configuration (including P-CSCF, S- CSCF and I-CSCF) and successfully made voice calls. Now I'm trying to set up an IP-SM-GW AS using the example here
(with some tweaks):
https://github.com/kamailio/kamailio/blob/master/src/modules/smsops/ exa mples/kamailio.cfg Currently I'm trying to send the SMS using a SIP software client (MicroSIP).
The problem is, while the SMS is received at the AS and stored in the database, it does not send it to the callee.
While troubleshooting the problem, I've found that reg_fetch_contacts("location", "$var(uri)", "caller") in route[SEND_SMS] cannot find the contact which was added by reginfo_handle_notify("location") in route[NOTIFY] in the usrloc database. By tracing the problem more, I've found that reginfo_handle_notify (when handling reg event NOTIFY) adds the complete AoR in the "username" field in the location table, e.g. as "bob(a)ims.mnc001.mcc001.3gppnetwork.org".org". But reg_fetch_contacts (when trying to send the SMS) looks up the table using only the user part in the "username" field, e.g. "bob". So it cannot find the callee contact and the configuration assumes the callee is still not registered; so it tries to send out a SUBSCRIBE every time it tries to send an SMS to the callee, instead of actually sending
the SMS.
Does anybody have any idea on what could have caused this inconsistent behavior between reginfo_handle_notify and
reg_fetch_contacts?
Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-leave(a)lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
Hi,
Yes, I learned about the inconsistent behavior between reginfo_handle_notify and reg_fetch_contacts by going through the debug log and seeing the DB queries.
I even tried to avoid the problem by changing the Kamailio C code (extract_aor function in registrar/common.c) and recompiling it, but that doesn't seem right to me. Both registrar and pua_reginfo appear to be central and widely used modules, and unlikely to have such a bug. So it has to be a problem with my config, but I can't seem to spot it. (I have already played with "use_domain" parameter in usrloc)
Thanks, Mohammad
Henning Westerholt wrote:
Hello,
strange. You probably did already that, but if you activate debug log level you should be able to also see the database queries that are executed, just to double check. If might be just a bug in the cfg or possible also in the code.
Cheers,
Henning
-----Original Message----- From: Mohammad Hossein Ahmadi via sr-users <sr-users(a)lists.kamailio.org> Sent: Montag, 13. November 2023 13:14 To: sr-users(a)lists.kamailio.org Cc: Mohammad Hossein Ahmadi <m.ahmadi(a)sinacomsys.com> Subject: [SR-Users] Re: Inconsistent behavior between reg_fetch_contacts (registrar module) and reginfo_handle_notify (pua_reginfo module)?
(sending again since I noticed my previous reply might not have been sent properly)
Hi Henning,
The script already does that. As seen at lines 380-382 here: https://github.com/kamailio/kamailio/blob/master/src/modules/smsops/exa mples/kamailio.cfg
... $var(uri) = "sip:"+$avp(to)+"@"+DOMAIN; if (reg_fetch_contacts("location", "$var(uri)", "caller")) { ...
I even printed the value of $var(uri) to the log to make sure it was correct, and it was! ("sip:bob@ims.mnc001.mcc001.3gppnetwork.org")*
I'm still perplexed.
Any idea which would help resolve the problem would be greatly appreciated.
Regards, Mohammad
*actually I have changed the mnc and mcc numbers here
Henning Westerholt wrote: Hello,
I think you could just give the proper URI with domain part in the variable, according to the documentation: https://kamailio.org/docs/modules/5.5.x/modules/ims_registrar_scscf.ht ml#id…
Cheers,
Henning
-----Original Message----- From: Mohammad Hossein Ahmadi via sr-users <sr-users(a)lists.kamailio.org> Sent: Mittwoch, 8. November 2023 14:03 To: sr-users(a)lists.kamailio.org Cc: Mohammad Hossein Ahmadi <m.ahmadi(a)sinacomsys.com> Subject: [SR-Users] Inconsistent behavior between reg_fetch_contacts (registrar module) and reginfo_handle_notify
(pua_reginfo module)?
Hello everyone,
I have previously set up Kamailio 5.7.2 IMS configuration (including P-CSCF, S- CSCF and I-CSCF) and successfully made voice calls. Now I'm trying to set up an IP-SM-GW AS using the example here
(with some tweaks):
https://github.com/kamailio/kamailio/blob/master/src/modules/smsops/ exa mples/kamailio.cfg Currently I'm trying to send the SMS using a SIP software client (MicroSIP).
The problem is, while the SMS is received at the AS and stored in the database, it does not send it to the callee.
While troubleshooting the problem, I've found that reg_fetch_contacts("location", "$var(uri)", "caller")
in
route[SEND_SMS] cannot find the contact which was added by reginfo_handle_notify("location") in route[NOTIFY] in the usrloc database. By tracing the problem more, I've found that reginfo_handle_notify (when handling reg event NOTIFY) adds the complete AoR in the "username" field in the location table, e.g. as "bob(a)ims.mnc001.mcc001.3gppnetwork.org".org". But reg_fetch_contacts (when trying to send the SMS) looks up the table using only the user part in the "username" field, e.g. "bob".
So it
cannot find the callee contact and the configuration assumes the callee is still not registered; so it tries to send out a SUBSCRIBE every time it tries to send an SMS to the callee, instead of actually sending
the SMS.
Does anybody have any idea on what could have caused this inconsistent behavior between reginfo_handle_notify and
reg_fetch_contacts?
Hello,
I just realized that I quoted the wrong registrar module link (for the IMS) earlier.
Yes, to enable use_domain would be also my next guess. Strange that it does not seems to work, but the reg_fectch_contacts probably just uses the given string. It probably needs further digging in the code.
Cheers,
Henning
-----Original Message----- From: Mohammad Hossein Ahmadi via sr-users sr-users@lists.kamailio.org Sent: Montag, 13. November 2023 14:24 To: sr-users@lists.kamailio.org Cc: Mohammad Hossein Ahmadi m.ahmadi@sinacomsys.com Subject: [SR-Users] Re: Inconsistent behavior between reg_fetch_contacts (registrar module) and reginfo_handle_notify (pua_reginfo module)?
Hi,
Yes, I learned about the inconsistent behavior between reginfo_handle_notify and reg_fetch_contacts by going through the debug log and seeing the DB queries.
I even tried to avoid the problem by changing the Kamailio C code (extract_aor function in registrar/common.c) and recompiling it, but that doesn't seem right to me. Both registrar and pua_reginfo appear to be central and widely used modules, and unlikely to have such a bug. So it has to be a problem with my config, but I can't seem to spot it. (I have already played with "use_domain" parameter in usrloc)
Thanks, Mohammad
Henning Westerholt wrote:
Hello,
strange. You probably did already that, but if you activate debug log level you should be able to also see the database queries that are executed, just to double check. If might be just a bug in the cfg or possible
also in the code.
Cheers,
Henning
-----Original Message----- From: Mohammad Hossein Ahmadi via sr-users <sr-users(a)lists.kamailio.org> Sent: Montag, 13. November 2023 13:14 To: sr-users(a)lists.kamailio.org Cc: Mohammad Hossein Ahmadi <m.ahmadi(a)sinacomsys.com> Subject: [SR-Users] Re: Inconsistent behavior between reg_fetch_contacts (registrar module) and reginfo_handle_notify
(pua_reginfo module)?
(sending again since I noticed my previous reply might not have been sent properly)
Hi Henning,
The script already does that. As seen at lines 380-382 here:
https://github.com/kamailio/kamailio/blob/master/src/modules/smsops/ exa mples/kamailio.cfg
... $var(uri) = "sip:"+$avp(to)+"@"+DOMAIN; if (reg_fetch_contacts("location", "$var(uri)", "caller")) { ...
I even printed the value of $var(uri) to the log to make sure it was correct, and it was! ("sip:bob@ims.mnc001.mcc001.3gppnetwork.org")*
I'm still perplexed.
Any idea which would help resolve the problem would be greatly
appreciated.
Regards, Mohammad
*actually I have changed the mnc and mcc numbers here
Henning Westerholt wrote: Hello,
I think you could just give the proper URI with domain part in the variable, according to the documentation:
https://kamailio.org/docs/modules/5.5.x/modules/ims_registrar_scscf. ht ml#id…
Cheers,
Henning
-----Original Message----- From: Mohammad Hossein Ahmadi via sr-users >
<sr-users(a)lists.kamailio.org>
Sent: Mittwoch, 8. November 2023 14:03 > To:
sr-users(a)lists.kamailio.org > Cc: Mohammad Hossein Ahmadi <m.ahmadi(a)sinacomsys.com> > Subject: [SR-Users] Inconsistent behavior between > reg_fetch_contacts (registrar module) and reginfo_handle_notify (pua_reginfo module)?
Hello everyone,
I have previously set up Kamailio 5.7.2 IMS configuration >
(including P-CSCF, S- CSCF and I-CSCF) and successfully made voice
calls. Now I'm trying to set up an IP-SM-GW AS using the example here
(with some tweaks):
https://github.com/kamailio/kamailio/blob/master/src/modules/smsops/
exa mples/kamailio.cfg Currently I'm trying to send the SMS using a SIP software client
(MicroSIP).
The problem is, while the SMS is received at the AS and stored
in > the database, it does not send it to the callee.
While troubleshooting the problem, I've found that >
reg_fetch_contacts("location", "$var(uri)", "caller") in > route[SEND_SMS] cannot find the contact which was added by > reginfo_handle_notify("location") in route[NOTIFY] in the usrloc > database. By tracing the problem more, I've found that > reginfo_handle_notify (when handling reg event NOTIFY) adds the > complete AoR in the "username" field in the location table, e.g. as
"bob(a)ims.mnc001.mcc001.3gppnetwork.org".org". But >
reg_fetch_contacts (when trying to send the SMS) looks up the table
using only the user part in the "username" field, e.g. "bob".
So it
cannot find the callee contact and the configuration assumes the callee is still not registered; so it tries to send out a
SUBSCRIBE > every time it tries to send an SMS to the callee, instead of
actually sending
the SMS.
Does anybody have any idea on what could have caused this >
inconsistent behavior between reginfo_handle_notify and reg_fetch_contacts?
Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: