[SR-Users] Re: RADIUS ACC - Interim Updates
Thanks for the help. I've ended up creating a route invoked by rtimer module where i check all active dialogs and for each of them sent a radius accounting update. Cheers, Duarte __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] RADIUS ACC - Interim Updates
Hello all, I can't seem to find a way to make interim accounting requests for RADIUS. Can you help me with this? I can't find any native way for doing this. I've thought of getting a custom timer for each dialog and run a event route similar do dialog:start or dialog:end. Is that possible? Cheers, Duarte Rocha __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] dialog:event unknown and kemi callback error
Hello all, I'm currently developing some kamailio scripts with app_jsdt by migrating a proxy of mine from Kamailio routing script to Js. I've migrated some parts of my request_route and everything seems to be working fine. I am now trying to migrate my event routes to JS and I started with dialog. dialog parameters : modparam("dialog", "event_callback", "dialogEvent") Code : function dialogEvent(event) { KSR.info("Dialog event " + event + " in JS") } After this i try to make a call and in my logs i have : "Dialog event unknown in JS" "Dialog event dialog:start in JS" Is this normal behaviour that I should ignore and only try to process "start,end,failure" or is this a signal of something wrong in my code? I also have this error in my code : "sr_kemi_cbname_lookup_idx(): index 1 is out of range". Does that mean that i have a JS function that calls a missing function in kamailio script or the opposite? How can I identify the root cause? Thanks in advance, Cheers __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] Re: RADIUS - Can't use extra attributes
Hello Daniel, Thanks for the reply. The extra dictionary is already included otherwise an error is thrown and Kamailio doesn't start. However, i realized my mistake now and you were right. I was checking for the extra attributes in a tcpdump and on radius server and i didn't had the dictionary configured on both of them. The extra attributes are in the packet but weren't being listed. One more question. Kamailio doesn't have a way to do a totally custom RADIUS access-request packet right? (Sorry if this opens another thread. I usually just hit reply on the mailing list and let Outlook create the e-mail, but it usually creates another thread and i'm not sure why). Thanks again. Cheers, Duarte __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] Re: RADIUS - Can't use extra attributes
Hello Daniel, Thanks for the reply. The extra dictionary is already included otherwise an error is thrown and Kamailio doesn't start. However, i realized my mistake now and you were right. I was checking for the extra attributes in a tcpdump and on radius server and i didn't had the dictionary configured on both of them. The extra attributes are in the packet but weren't being listed. One more question. Kamailio doesn't have a way to do a totally custom RADIUS access-request packet right? (Sorry if this opens another thread. I usually just hit reply on the mailing list and let Outlook create the e-mail, but it usually creates another thread and i'm not sure why). Thanks again. Cheers, Duarte __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] RADIUS - Can't use extra attributes
Hello all, I'm currently implementing a Kamailio with RADIUS. I want to send an Access-Request to my RADIUS server and in order to do that i'm using misc_radius module and radius_does_uri_exist() function without any arguments : "if (radius_does_uri_exist()) {" For my module configuration I have the following configurations : "modparam("misc_radius", "radius_config", "/etc/radcli/radiusclient.conf") modparam("misc_radius", "uri_extra", "Sip-Method=$rm")" >From what i understand, with this config my access-request should contain the >default attributes and Sip-Method Attribute but that is not happening. Only >defaults attributes are included. I've tried to run Kamailio with "-ddd" flag for better debug and i only get this error : "1(176) DEBUG: misc_radius [functions.c:615]: radius_does_uri_user_host_exist(): failure". Is there any other configuration that i must do? Thanks for the help. Cheers, Duarte __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] Re: Choose RTP port in routing script
Thanks for the reply. I want to be able to get different port ranges for some costumers since some of them can only their firewall to a small destination port range . __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] Choose RTP port in routing script
Hello all, I have my rtpengine configured to use ports 2 - 5 for RTP in rtpengine.conf. Now i want to able to select the port or the port range in a call by call basis. Is that possible? I've tried to use "media-address" flag on rtpengine_manage but i wasn't successful. Thanks in advance, Cheers, Duarte Rocha __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] Re: uac_replace_to() without RR params
I made some more testing and found that calling dlg_manage() before uac_replace() and setting restore_dlg param with value “1” solves my issue and doesn’t add params to Record-Route. In the event of a restart to Kamailio i would like to keep the state of the call and not lose the values on the dialog vars where original To and From headers are stored. In order to do that i thought of saving the original values on a data structure and assigning its value to the lost dialog vars. In order to that i need to be able to access those dialog variables. Is that possible? What is their name? Cheers __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] uac_replace_to() without RR params
Hello all, I'm currently working on a proxy where I need to change To and From headers in order to normalize the numbers to +E164. I would like to be able to restore using and $avp() or $dlg_var() and without writing parameters on the Record-Route headers. I've tried to use restore_mode in auto mode and restore_dlg parameter with value 1 but still got the parameters on the inserted Record-Route. I've tried manual mode and using the configured $avp() to restore, but the parameters still got written on the Request-URI. I thought of using restore_mode with value "none" saving original values in an $avvp() and doing the replace, however, uac_replace() on Request Route or branch routes. That way i can't replace the values of To and From in the replies. That being said, my questions are : - Is there a way to use manual or auto mode without writing info on the Record-Route and only using $avp() ? - Is there a way to make changes on the To and From header on replies? Thanks in advance, Best Regards, Duarte Rocha __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] Re: RTPENGINE - RTP Proxy
Hello Alex, Thank you for your answer, I still don't have sound but the behaviour is now different. Is it possible to configure this behaviour on a call by call basis with flags on the rtpengine_manage() function? Or in alternative having it consume the "direction=" attribute on the SDP? Cheers __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] Re: RTPENGINE - RTP Proxy
Hello Alex, Thank you for your answer, I still don't have sound but the behaviour is now different. Is it possible to configure this behaviour on a call by call basis with flags on the rtpengine_manage() function? Or in alternative having it consume the "direction=" attribute on the SDP? Cheers __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] RTPENGINE - RTP Proxy
Hello all, I'm currently doing some experiments with RTPENGINE and I need some help configuring it. First scenario i'm under NAT and Kamailio receives an INVITE with a private address, rewrites (c) line on SDP with it's own IP address and relays the message to the destination endpoint. After that the originator receives the 183 Session Progress with kamailio's IP as (c) parameter. After receiving the first RTP packet from the originator the media streams flow normally and I have sound on both sides including ringing. Second scenario I use different equipment that is not under NAT, but the remaining scenario is the same, except the originator doesn't send an RTP packet after the 183 Session Progress. However, in this case, no RTP stream is relayed to the originator and as a consequence it doesn't hear a ring or voice when the call is answered. As i see it, it looks like Kamailio is on passive mode to the A-Leg of the call and waits for a RTP packet to establish its stream. Is this correct? If so, how do i change this behaviour? Cheers __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] uac_replace() and uac_restore debug help
Hello, I'm currently experiencing some odd behaviours when using these functions and I need some help debugging to find the root of the issue. I receive a call from a client and do some changes to the To and From header using auto mode with password. Encrypted info goes on the Record-Route header parameters (vsf\vst) normally. 1 - On subsequent requests sent by the originating client, domains on To and From header are different from the ones sent in the first INVITE. In this scenario, somehow the automatic modifying has errors on the end result. Can the different domains affect the end result of the automatic modifying or only the vsf\vst parameters and password are needed to the auto replace\restore? 2 - How can I decrypt the info on vsf and vst parameters in order to verify the info sent and the encryption? Cheers, Duarte Rocha __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] Re: uac_restore behaviour question
Hello, Please ignore my last question. I found my answer in the documentation : "If you set restore_mode to AUTO, the URI will be modified automatically in all subsequent requests and replies in that dialog." Duarte Rocha escreveu no dia quinta, 22/06/2023 à(s) 13:17: > Hello, > > I have some questions regarding uac_replace methods. > > When I receive the first INVITE from someone I change To and From using > uac_replace_to() and uac_replace_from(). I do this only on first INVITES. > > In order to restore them I use the "auto" so the changes are restored > automatically in replies or requests sent to the call originator.. > > In the case of subsequent requests from the originator kamailio still > changes To and From without me using uac_replace functions. Is this caused > by the auto restore? Does it work for both sides and is this is the > intended behaviour? > > Cheers > __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] uac_restore behaviour question
Hello, I have some questions regarding uac_replace methods. When I receive the first INVITE from someone I change To and From using uac_replace_to() and uac_replace_from(). I do this only on first INVITES. In order to restore them I use the "auto" so the changes are restored automatically in replies or requests sent to the call originator.. In the case of subsequent requests from the originator kamailio still changes To and From without me using uac_replace functions. Is this caused by the auto restore? Does it work for both sides and is this is the intended behaviour? Cheers __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] Re: Repository for modules
Thanks for the quick answer. How can I see info regarding which modules are in the combined packages? One of the modules i'm looking into is the crypto module for example. Otherwise, where can I get a list of modules not included in Debian packages? Cheers, Duarte Henning Westerholt escreveu no dia quinta, 6/04/2023 à(s) 13:17: > Hello, > > > > the majority of modules should be packaged for Debian. What modules are > missing for you? Keep in mind that some modules are combined in some > packages. > > > > Some modules can not properly packaged due to missing dependencies, this > needs to be installed from source, right. > > > > Cheers, > > > > Henning > > > > *From:* Duarte Rocha > *Sent:* Donnerstag, 6. April 2023 13:55 > *To:* Kamailio (SER) - Users Mailing List > *Subject:* [SR-Users] Repository for modules > > > > Hello, > > > > I'm currently testing Kamailio on a Debian 11 machine. In order to install > it I used apt with repositories from Kamailio (https://deb.kamailio.org/). > > > > Now I'm trying to add modules and I'm wondering the best way to do it. > Using apt install i don't have access to all the modules. Is there another > repository for this? Is my only solution downloading and compiling the > modules? > > > > Cheers > __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] Repository for modules
Hello, I'm currently testing Kamailio on a Debian 11 machine. In order to install it I used apt with repositories from Kamailio (https://deb.kamailio.org/). Now I'm trying to add modules and I'm wondering the best way to do it. Using apt install i don't have access to all the modules. Is there another repository for this? Is my only solution downloading and compiling the modules? Cheers __ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
[SR-Users] Pipelimit needs restart to reload values
Greetings, I've been using the pipelimit module and the pl_check function to control users rates in my proxy. if (!pl_check("$var(UserID)", "TAILDROP", "$var(UserRate)")) { pl_drop(); exit; } In this case $var(UserID) is the pipe and $var(UserRate) is the maximum rate. The value of the rate is retrieved on every call via query to a DB. If I change the UserRate value to 0 CPS on the DB calls are not rejected unless they go over 1 CPS. However, if I restart Kamailio all calls are correctly rejected. Why does this happen? Can I change this behaviour? Cheers, Duarte __ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Body formats for filter_body()
Hello all, A couple years ago the function filter_body() from textops would only work with "application/sdp" if the string on the body was "Content-Type: application/sdp\r\n". It would fail if there wasn't a space after ":" and it would fail if there was present "\r\n\r\n" instead of "\r\n". Is this the actual behaviour of the function or has it been changed to also identify SDP in the formats mentioned above? Best Regards, __ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] To-Tag on Register Refresh method
Hello all, I'm using Kamailio as a registrar and i have an endpoint that sometimes sends a REGISTER method with a To-Tag when refreshing its regist. My code on this proxy shares many similarities with the default kamailio.cfg configuration file. On that occasion Kamailio answers with a 404 - Not Here since it treats it as a in-dialog request which fails the loose_route check. Why would a CPE send a REGISTER with a To-Tag? Why is a REGISTER with a To-Tag rejected by Kamailio when it could otherwise be a successful REGISTER? Is this behaviour noncompliant with the SIP protocol? I thought about making an exception in the code and having this register following the same path as a register without to-tag, but i don't know if that is unsafe and/or noncompliant with the protocol. Best Regards, __ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Parse multiple URI
Greetings, I have a Kamailio proxy where i'm doing some operations over multiple History-Infos and they come in two forms : Scenario 1 -> History-Info : URI1 History Info : URI2 Scenario 2 -> History-Info : URI1 , URI2. On scenario 1 i iterate between headers using $(hdr(name)[N]). However, i can't seem to find a similar tool to apply on scenario 2. In the case Kamailio doesn't have it, what would be the best way to iterate the URIS? I was thinking of parsing them using the comma ",", is that safe? Best Regards, ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Best SIP reply for service activation
Hello, I'm currently developing a service on Kamailio where it's possible to configure redirections for a subscriber using a code. In order to implement that client should send an INVITE with a specific code on the Request URI and the redirection is configured. What should be the best way to answer this INVITE? A 200 OK will make the call answered and doesn't seem the best way. A negative reply (4/5/6xx) would work, but it seems strange to have the operation concluded with success and answering with a negative reply. I found "199 - Early Dialog Terminated" to be suitable, but the documentation suggests it should be used upstream. Thanks in advance for any suggestion. Cheers ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Lost MySQL connections - Error 500
Thanks for the help. I'm using db_mode 1 - Write-Through scheme. As far as i understand it uses database and cache correct? Is that the difference from mode 3? I'll do some testing with the usrloc's behaviour and i'll let you know. Cheers Daniel-Constantin Mierla escreveu no dia sexta, 8/01/2021 à(s) 17:47: > Hello, > > if there is no external application that accesses the location table and > you have many records, try to tune the behaviour of usrloc module, by > setting timer procs and interval to different values. Also, if you use > database-only mode with a lot of active users, you can also consider > partitioning users on different tables, so you can have rules like users > with id starting a-m go to location1 and n-z go to location2. > > Cheers, > Daniel > On 08.01.21 18:29, Duarte Rocha wrote: > > Hello Daniel, > > I have Kamailio on an HA setup. One machine has the active Kamailio and if > something happens, the IP jumps to the another machine where there is a > Kamailio running. Both Kamailio's share the same remote database. Could the > reason be both Kamailio's trying to remove expired contacts from the > location table at the same time? > > Cheers, > Duarte > > Daniel-Constantin Mierla escreveu no dia quinta, > 7/01/2021 à(s) 19:28: > >> Hello, >> >> is there any other application that accesses the location table? >> >> That error message usually appears when the update of the record cannot >> be made because it is locked for long time by something else. >> >> Cheers, >> Daniel >> On 07.01.21 18:23, Duarte Rocha wrote: >> >> Hi all, >> >> I've made a post last month regarding losing MySQL connections - >> https://lists.kamailio.org/pipermail/sr-users/2020-December/111389.html >> >> At the time I thought connections were dying as a consequence of low >> activity and traffic on the proxy. Meanwhile, I've migrated a great number >> of equipments to the proxy with Registers being refreshed every 10minutes >> and the problem still persists. >> >> In order to try to fix this i've added timeout_interval and ping_interval >> from the db_mysql module. My SQL client on the Kamailio machine is >> mysql-community-client 5.6.50-2.el7. It writes and reads in a remote >> InnoDB database. >> >> This are the logs i get from Kamailio when the problem appears : >> >> Jan 7 09:43:27 sbc_bbt01_active >> /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER >> e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} db_mysql [km_dbase.c:123]: >> db_mysql_submit_query(): driver error on query: Lock wait timeout exceeded; >> try restarting transaction (1205) >> Jan 7 09:43:27 sbc_bbt01_active >> /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER >> e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} [db_query.c:348]: >> db_do_update(): error while submitting query >> Jan 7 09:43:27 sbc_bbt01_active >> /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER >> e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} usrloc [ucontact.c:1147]: >> db_update_ucontact_ruid(): updating database failed >> Jan 7 09:43:27 sbc_bbt01_active >> /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER >> e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} usrloc [ucontact.c:1663]: >> update_contact_db(): failed to update database >> Jan 7 09:43:27 sbc_bbt01_active >> /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER >> e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} registrar [save.c:784]: >> update_contacts(): failed to update contact >> Jan 7 09:43:27 sbc_bbt01_active >> /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER >> e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} sl [sl_funcs.c:414]: >> sl_reply_error(): stateless error reply used: I'm terribly sorry, server >> error occurred (1/SL) >> >> >> Originally I had usrloc db_mode on mode 3 - DB-Only Scheme. In order to >> try to mitigate the issue I changed it to mode 1 - Write-Through scheme but >> even then I get the same log errors and an "500" error is still sent to the >> client. I chose this mode since, as far as I can understand it applies >> changes directly to DB but also uses cache. Please correct me if i'm wrong >> on that. >> >> Has this issue happened with anyone before? Is there a way to mitigate >> this issue? My only constraint is that I need the database to be always >> updated since I have an HA setup, and as such, I can't use cache only >> methods. >> >> Best Regards, >> >> >> _
Re: [SR-Users] Lost MySQL connections - Error 500
Hello Daniel, I have Kamailio on an HA setup. One machine has the active Kamailio and if something happens, the IP jumps to the another machine where there is a Kamailio running. Both Kamailio's share the same remote database. Could the reason be both Kamailio's trying to remove expired contacts from the location table at the same time? Cheers, Duarte Daniel-Constantin Mierla escreveu no dia quinta, 7/01/2021 à(s) 19:28: > Hello, > > is there any other application that accesses the location table? > > That error message usually appears when the update of the record cannot be > made because it is locked for long time by something else. > > Cheers, > Daniel > On 07.01.21 18:23, Duarte Rocha wrote: > > Hi all, > > I've made a post last month regarding losing MySQL connections - > https://lists.kamailio.org/pipermail/sr-users/2020-December/111389.html > > At the time I thought connections were dying as a consequence of low > activity and traffic on the proxy. Meanwhile, I've migrated a great number > of equipments to the proxy with Registers being refreshed every 10minutes > and the problem still persists. > > In order to try to fix this i've added timeout_interval and ping_interval > from the db_mysql module. My SQL client on the Kamailio machine is > mysql-community-client 5.6.50-2.el7. It writes and reads in a remote > InnoDB database. > > This are the logs i get from Kamailio when the problem appears : > > Jan 7 09:43:27 sbc_bbt01_active > /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER > e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} db_mysql [km_dbase.c:123]: > db_mysql_submit_query(): driver error on query: Lock wait timeout exceeded; > try restarting transaction (1205) > Jan 7 09:43:27 sbc_bbt01_active > /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER > e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} [db_query.c:348]: > db_do_update(): error while submitting query > Jan 7 09:43:27 sbc_bbt01_active > /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER > e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} usrloc [ucontact.c:1147]: > db_update_ucontact_ruid(): updating database failed > Jan 7 09:43:27 sbc_bbt01_active > /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER > e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} usrloc [ucontact.c:1663]: > update_contact_db(): failed to update database > Jan 7 09:43:27 sbc_bbt01_active > /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER > e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} registrar [save.c:784]: > update_contacts(): failed to update contact > Jan 7 09:43:27 sbc_bbt01_active > /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER > e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} sl [sl_funcs.c:414]: > sl_reply_error(): stateless error reply used: I'm terribly sorry, server > error occurred (1/SL) > > > Originally I had usrloc db_mode on mode 3 - DB-Only Scheme. In order to > try to mitigate the issue I changed it to mode 1 - Write-Through scheme but > even then I get the same log errors and an "500" error is still sent to the > client. I chose this mode since, as far as I can understand it applies > changes directly to DB but also uses cache. Please correct me if i'm wrong > on that. > > Has this issue happened with anyone before? Is there a way to mitigate > this issue? My only constraint is that I need the database to be always > updated since I have an HA setup, and as such, I can't use cache only > methods. > > Best Regards, > > > ___ > Kamailio (SER) - Users Mailing > Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > -- > Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- > www.linkedin.com/in/miconda > Funding: https://www.paypal.me/dcmierla > > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Lost MySQL connections - Error 500
Hi all, I've made a post last month regarding losing MySQL connections - https://lists.kamailio.org/pipermail/sr-users/2020-December/111389.html At the time I thought connections were dying as a consequence of low activity and traffic on the proxy. Meanwhile, I've migrated a great number of equipments to the proxy with Registers being refreshed every 10minutes and the problem still persists. In order to try to fix this i've added timeout_interval and ping_interval from the db_mysql module. My SQL client on the Kamailio machine is mysql-community-client 5.6.50-2.el7. It writes and reads in a remote InnoDB database. This are the logs i get from Kamailio when the problem appears : Jan 7 09:43:27 sbc_bbt01_active /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} db_mysql [km_dbase.c:123]: db_mysql_submit_query(): driver error on query: Lock wait timeout exceeded; try restarting transaction (1205) Jan 7 09:43:27 sbc_bbt01_active /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} [db_query.c:348]: db_do_update(): error while submitting query Jan 7 09:43:27 sbc_bbt01_active /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} usrloc [ucontact.c:1147]: db_update_ucontact_ruid(): updating database failed Jan 7 09:43:27 sbc_bbt01_active /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} usrloc [ucontact.c:1663]: update_contact_db(): failed to update database Jan 7 09:43:27 sbc_bbt01_active /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} registrar [save.c:784]: update_contacts(): failed to update contact Jan 7 09:43:27 sbc_bbt01_active /usr/local/kamailio-5.4/sbin/kamailio[21735]: ERROR: {1 27880 REGISTER e5f8f7bc-cbb2-40b3-9037-edacd6276a2b} sl [sl_funcs.c:414]: sl_reply_error(): stateless error reply used: I'm terribly sorry, server error occurred (1/SL) Originally I had usrloc db_mode on mode 3 - DB-Only Scheme. In order to try to mitigate the issue I changed it to mode 1 - Write-Through scheme but even then I get the same log errors and an "500" error is still sent to the client. I chose this mode since, as far as I can understand it applies changes directly to DB but also uses cache. Please correct me if i'm wrong on that. Has this issue happened with anyone before? Is there a way to mitigate this issue? My only constraint is that I need the database to be always updated since I have an HA setup, and as such, I can't use cache only methods. Best Regards, ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] loose_route() - Local Proxy
Hi, Thank you for your answers. The domain parameter "register_myself" solved this issue immediately. Cheers Duarte Rocha escreveu no dia segunda, 4/01/2021 à(s) 14:46: > Greetings, > > I'm using loose_route() from the RR module and i'm having troubles making > it use the following exception from the code : "There is only one > exception: If the request is out-of-dialog (no to-tag) and there is only > one Route: header indicating the local proxy, then the Route: header is > removed and the function returns FALSE." > > My example is a REGISTER without To-TAG which has a Route header with > kamailio address. If i use proxy IP on Route header , loose_route() returns > false as it should. However, if i use an hostname belonging to the proxy > in the route, loose_route() returns true. > > I have hostnames and local ips defined in the "DOMAIN" table but it > doesn't seem to be working. Which other places can local hostnames and ips > be configured in order to be seen as local to loose_route() ? > > Best Regards > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Pre-loaded routes verification
Greetings, I'm doing a migration from a opensips system to kamailio one and i'm trying to replicate its functionalities. The system is a Registrar with a pstn gateway. I noticed that on the opensips version, loose_route() is called on initial requests and it seems to be used to protect against preloaded routes. However, on the default Kamailio configuration file loose_route() is only called on requests in-dialog and the verification mentioned above is not used. Why doesn't Kamailio includes this verification? Is there are any security concerns not using it? Best Regards, ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] loose_route() - Local Proxy
Greetings, I'm using loose_route() from the RR module and i'm having troubles making it use the following exception from the code : "There is only one exception: If the request is out-of-dialog (no to-tag) and there is only one Route: header indicating the local proxy, then the Route: header is removed and the function returns FALSE." My example is a REGISTER without To-TAG which has a Route header with kamailio address. If i use proxy IP on Route header , loose_route() returns false as it should. However, if i use an hostname belonging to the proxy in the route, loose_route() returns true. I have hostnames and local ips defined in the "DOMAIN" table but it doesn't seem to be working. Which other places can local hostnames and ips be configured in order to be seen as local to loose_route() ? Best Regards ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Losing MySQL connections
Greetings all, I'm having some dropped MySQL connections in my Kamailio in times of low or no activity in the proxy. These are the errors i'm getting : db_mysql [km_dbase.c:123]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013) [db_query.c:348]: db_do_update(): error while submitting query usrloc [ucontact.c:1147]: db_update_ucontact_ruid(): updating database failed usrloc [ucontact.c:1663]: update_contact_db(): failed to update database registrar [save.c:784]: update_contacts(): failed to update contact sl [sl_funcs.c:414]: sl_reply_error(): stateless error reply used: I'm terribly sorry, server error occurred (1/SL) In order to try to fix this i've added timeout_interval and ping_interval from the db_mysql module. Is this the best approach? I've restarted my Kamailio but i don't see any ping going to my BD. Is there any other config that I need to add so that the pings are sent? Is it possible to do a ping to verify connection and reconnect mannualy on the config file? Best Regards, ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Fix Sdp Error
Hello, I noticed that when i do calls behind NAT i'm getting this error when i call fix_nated_sdp() : "nathelper [nathelper.c:1659]: replace_sdp_ip(): can't extract 'a=rtcp' IP from the SDP" As far as i can see, all the ips on SDP are correctly replaced to a public IP, so i don't understand the origin of this error. This is the SDP received by Kamailio : Session Description Protocol Session Description Protocol Version (v): 0 Owner/Creator, Session Id (o): - 3421914885 1 IN IP4 192.168.24.89 Session Name (s): SIPPER for PhonerLite Connection Information (c): IN IP4 192.168.24.89 Time Description, active time (t): 0 0 Media Description, name and address (m): audio 5062 RTP/AVP 107 8 0 2 3 97 110 111 9 18 11 118 101 Media Attribute (a): rtpmap:107 opus/48000/2 Media Attribute (a): rtpmap:8 PCMA/8000 Media Attribute (a): rtpmap:0 PCMU/8000 Media Attribute (a): rtpmap:2 G726-32/8000 Media Attribute (a): rtpmap:3 GSM/8000 Media Attribute (a): rtpmap:97 iLBC/8000 Media Attribute (a): rtpmap:110 speex/8000 Media Attribute (a): rtpmap:111 speex/16000 Media Attribute (a): rtpmap:9 G722/8000 Media Attribute (a): rtpmap:18 G729/8000 Media Attribute (a): fmtp:18 annexb=yes Media Attribute (a): rtpmap:11 L16/44100 Media Attribute (a): rtpmap:118 L16/16000 Media Attribute (a): rtpmap:101 telephone-event/8000 Media Attribute (a): fmtp:101 0-16 Media Attribute (a): ssrc:2716178988 Media Attribute (a): sendrecv And this is the SDP sent by Kamailio after NAT being treated : Session Description Protocol Session Description Protocol Version (v): 0 Owner/Creator, Session Id (o): - 3421914885 1 IN IP4 1.1.1.1 (Public IP) Session Name (s): SIPPER for PhonerLite Connection Information (c): IN IP4 1.1.1.1 (Public IP) Time Description, active time (t): 0 0 Media Description, name and address (m): audio 5062 RTP/AVP 107 8 0 2 3 97 110 111 9 18 11 118 101 Media Attribute (a): rtpmap:107 opus/48000/2 Media Attribute (a): rtpmap:8 PCMA/8000 Media Attribute (a): rtpmap:0 PCMU/8000 Media Attribute (a): rtpmap:2 G726-32/8000 Media Attribute (a): rtpmap:3 GSM/8000 Media Attribute (a): rtpmap:97 iLBC/8000 Media Attribute (a): rtpmap:110 speex/8000 Media Attribute (a): rtpmap:111 speex/16000 Media Attribute (a): rtpmap:9 G722/8000 Media Attribute (a): rtpmap:18 G729/8000 Media Attribute (a): fmtp:18 annexb=yes Media Attribute (a): rtpmap:11 L16/44100 Media Attribute (a): rtpmap:118 L16/16000 Media Attribute (a): rtpmap:101 telephone-event/8000 Media Attribute (a): fmtp:101 0-16 Media Attribute (a): ssrc:2716178988 Media Attribute (a): sendrecv Media Attribute (a): oldmediaip:192.168.24.89 Media Attribute (a): oldmediaip:192.168.24.89 Is there something failing in the SDP fix? Best Regards, ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Load balance on HA scenario
Hi Yufei, I've tried to do that but unfortunately i'm facing a weird issue. I have nodes on probing mode, but dispatcher only sends probing via one of the sockets and then, in some cases, wrongfully updates the status of the elements of the pair. I've even tried to manually disable one of the Dipsatcher destinations, first the one with the VIP and then the other, and Kamailio still sends requests via one of the sockets, usually the second in the list. This only happens if i have two destinations with same IP but different sockets. In scenarios with different IP and different sockets it all works correctly. I'm currently on Kamailio v5.4.1. What version are you on? Any special parameter to make that work? Best Regards, A segunda, 12/10/2020, 15:34, Duarte Rocha escreveu: > Greetings, > > I have two machines with Kamailio in a HA setup with replicated DB. For > simplicity let's say each machine has one HA IP and that IP can jump to the > other machine in case something happens (kamailio stopping, etc). > > I'm using Dispatcher with load balance configuration. I have Dispatcher > configured so that each peer has one instance for socket with HA IP 1 and > HA IP 2. > > In order for this to work correctly on the load balance scenario I must > disable via RPC command the peer which has the socket that doesn't belong > to the machine. I also must do it every time the IP jumps back and forth, > which adds complexety to my system. > > Does Dispatcher has any sort of help on this? It could not include peers > with sockets IPs that don't belong to the machine in the destination set, > for example. Is this possible? > > I could also work with failover support but i would rather avoid having so > many failovers. > > Best Regards,A > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Load balance on HA scenario
Hi, I'll try to better clarify my scenario. I can't use probing in this situation, as my peer won't allow it. This is my scenario : SET: { ID: 102 TARGETS: { DEST: { URI: sip:Peer_IP:5060 FLAGS: AX PRIORITY: 0 ATTRS: { BODY: duid=Peer_01;socket=HA_IP_1:5060 DUID: Peer_01 MAXLOAD: 0 WEIGHT: 0 RWEIGHT: 0 SOCKET: HA_IP_1:5060 SOCKNAME: OBPROXY: } RUNTIME: { DLGLOAD: 0 } } DEST: { URI: sip:Peer_IP:5060 FLAGS: AX PRIORITY: 0 ATTRS: { BODY: duid=Peer_02;socket=HA_IP_2:5060 DUID: Peer_02 MAXLOAD: 0 WEIGHT: 0 RWEIGHT: 0 SOCKET: HA_IP_2:5060 SOCKNAME: OBPROXY: } } In this case, HA_IP_1 is on this machine and HA_IP_2 is on another machine. When dispatcher with loadbalance is called on this scenario, it fails when choosing Peer_02 as destination. What i propose is Dispatcher removing Peer_02 from the destination list as long as HA_IP_2 isn't present on that machine. Is this possible? A segunda, 12/10/2020, 15:34, Duarte Rocha escreveu: > Greetings, > > I have two machines with Kamailio in a HA setup with replicated DB. For > simplicity let's say each machine has one HA IP and that IP can jump to the > other machine in case something happens (kamailio stopping, etc). > > I'm using Dispatcher with load balance configuration. I have Dispatcher > configured so that each peer has one instance for socket with HA IP 1 and > HA IP 2. > > In order for this to work correctly on the load balance scenario I must > disable via RPC command the peer which has the socket that doesn't belong > to the machine. I also must do it every time the IP jumps back and forth, > which adds complexety to my system. > > Does Dispatcher has any sort of help on this? It could not include peers > with sockets IPs that don't belong to the machine in the destination set, > for example. Is this possible? > > I could also work with failover support but i would rather avoid having so > many failovers. > > Best Regards,A > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Load balance on HA scenario
Hey. I'm already using ip_free_bind, but that is not my problem. I cannot use probing on those peers and I need to know if Dispatcher can be able to not include those peers in the destination list since their socket doesn't belong to the machine and include the peers in the destination list in case the IP jumps to that machine. Cheer A segunda, 12/10/2020, 15:34, Duarte Rocha escreveu: > Greetings, > > I have two machines with Kamailio in a HA setup with replicated DB. For > simplicity let's say each machine has one HA IP and that IP can jump to the > other machine in case something happens (kamailio stopping, etc). > > I'm using Dispatcher with load balance configuration. I have Dispatcher > configured so that each peer has one instance for socket with HA IP 1 and > HA IP 2. > > In order for this to work correctly on the load balance scenario I must > disable via RPC command the peer which has the socket that doesn't belong > to the machine. I also must do it every time the IP jumps back and forth, > which adds complexety to my system. > > Does Dispatcher has any sort of help on this? It could not include peers > with sockets IPs that don't belong to the machine in the destination set, > for example. Is this possible? > > I could also work with failover support but i would rather avoid having so > many failovers. > > Best Regards,A > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Load balance on HA scenario
Greetings, I have two machines with Kamailio in a HA setup with replicated DB. For simplicity let's say each machine has one HA IP and that IP can jump to the other machine in case something happens (kamailio stopping, etc). I'm using Dispatcher with load balance configuration. I have Dispatcher configured so that each peer has one instance for socket with HA IP 1 and HA IP 2. In order for this to work correctly on the load balance scenario I must disable via RPC command the peer which has the socket that doesn't belong to the machine. I also must do it every time the IP jumps back and forth, which adds complexety to my system. Does Dispatcher has any sort of help on this? It could not include peers with sockets IPs that don't belong to the machine in the destination set, for example. Is this possible? I could also work with failover support but i would rather avoid having so many failovers. Best Regards,A ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Result limitation on sqlops
Hey, I just upgrade to Kamailio 5.4 and i see that now sqlops has a limitation of 32 results containers which is not enough for my proxy. Is it possible that this limitation can be configured via module parameters? In the meanwhile i've changed the value in sql_api.c but i would like to have my source code as close as the original as possible. Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Received parameter on Via
Thank you for your answers. I have a old SBC with opensips and it always adds received to Via. However, in my Kamailio it only adds in NAT scenarios. I would like to understand why that happens. A segunda, 28/09/2020, 17:35, Duarte Rocha escreveu: > Greetings, > > When NAT is detected in my Kamailio, the proxy add the parameter > "received" to the Via header which includes the source IP. > > What is the mechanic or function responsible for this behaviour? Does it > come from the NATHELPER module? > > Best Regards, > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Received parameter on Via
Greetings, When NAT is detected in my Kamailio, the proxy add the parameter "received" to the Via header which includes the source IP. What is the mechanic or function responsible for this behaviour? Does it come from the NATHELPER module? Best Regards, ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Force registrations on Kamailio save()
Greetings, I'm currently creating a Kamailio with registrations and i'm unsure how to use the save() function. I want to limit the number of contacts for the AOR to 2. I also want to force the registration of new contacts even if the maximum number is reached, removing the older ones. I saw that on opensips i could use the flags "fc2" for this but they aren't available on Kamailio's save(). I'm using the max_contacts parameter but in the docs it states the once the limit is reached, it will reject new Registers. How can i implement the force registration behaviour here? Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] PHONENUM Module on Centos7
Greetings, I've trying to use the module PHONENUM on my Kamailio on CentOS 7. However, getting the required libphonenumber library hasn't been possible. Is there any CentOs7 repository for this ? What's the best way to work with this module on CentOS ? Best Regards, ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Sql_result_free() not cleaning properly
Greetings, I'm trying to clean a SQL result using "sql_result_free()" but i'm not having success. Can you please verify if i'm doing anything wrong here? This is my code : xerr("Pre clean [0] = Iterator 0 = $xavp(Cli_PICKER_Default_Search_Result[0]=>Code)"); sql_result_free("Cli_PICKER_Default_Search_Result"); xerr("Pos clean [0] = Iterator 0 = $xavp(Cli_PICKER_Default_Search_Result[0]=>Code)"); The result is the following : ERROR:
Re: [SR-Users] Solution for Invite retransmission
Hello Alex and Daniel, Thank you for your answers. This happened when a client had some network problems and couldn't received my packets. The problem is that after some time and the transaction is dead,since Kamailio does a new dispatcher, my accounting system counts this as two calls and that's the behaviour i want to avoid. Since in this case the client has network issues and won't probably get the SIP replies, i don't think raising the timers will be very helpfull. Also, i already use Dialog module for other functionalities so i don't think there's a need to go to hash tables. Thanks for the help. A terça, 12/05/2020, 17:15, Duarte Rocha escreveu: > Greetings, > > I have an issue where a client doesn't get the responses to the INVITE > sent and as such keeps sending me retransmissions of the INVITE. > > While the transaction is still up, Kamailio does its job. However, when > the transaction is closed Kamailio processes the request again as a first > request (Doing Routing and Dispatcher operations again). > > In order to avoid the issue i've made the following code : > > // If it's the first INVITE > if( is_method("INVITE") && !has_totag() ) > { > if(t_check_trans()) { > xnotice("TRANS - INVITE Retransmission"); > } > else if ( is_known_dlg()) { > xerr("KamTAG: INVITE in dialog without To Tag "); > exit; > } > } > > Is this a good solution and still compliant with the SIP rules? > > Best Regards > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Solution for Invite retransmission
Greetings, I have an issue where a client doesn't get the responses to the INVITE sent and as such keeps sending me retransmissions of the INVITE. While the transaction is still up, Kamailio does its job. However, when the transaction is closed Kamailio processes the request again as a first request (Doing Routing and Dispatcher operations again). In order to avoid the issue i've made the following code : // If it's the first INVITE if( is_method("INVITE") && !has_totag() ) { if(t_check_trans()) { xnotice("TRANS - INVITE Retransmission"); } else if ( is_known_dlg()) { xerr("KamTAG: INVITE in dialog without To Tag "); exit; } } Is this a good solution and still compliant with the SIP rules? Best Regards ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Map Diversion to History-Info
Greetings, Does Kamailio have any method to transform an History-Info with redirecting info into a Diversion or the other way around? Best Regards ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Lifetime of Invite with no Ack
Last email diagram got kinda deformatted. In case you need me to clarify the scenario, client sends the INVITE, receives the 200 OK and never send the ACK. After more than 5seconds the client retransmits the first INVITE again and Kamailio sends it to the second destination of the Dispatcher group. A segunda, 13/04/2020, 13:31, Daniel-Constantin Mierla escreveu: > By default the transaction that gets a final reply is kept for another > 5sec or so in memory to deal with retranmissions, etc ... There is a > wait_timer parameter in tm module. > > The ACK after 200ok is separate transaction and has no influence on INVITE > transaction. For the ACK after 300+ reply, there should be some > retransmissons of the reply in the INVITE transaction. > > The dialog module is influenced by the missing ACK after 200ok. > > Cheers, > Daniel > On 13.04.20 13:18, Duarte Rocha wrote: > > Sorry i didn't specify. > > It is after the 200 Ok. Will it be different in a reply greater than 300? > > Best regards > > A segunda, 13/04/2020, 12:16, Daniel-Constantin Mierla > escreveu: > >> Hello, >> >> is it about ACK after 200ok or the ACK after 300 or greater reply? >> >> Cheers, >> Daniel >> On 13.04.20 13:04, Duarte Rocha wrote: >> >> Greetings, >> >> How much time will Kamailio keep a transaction active if the ACK to a >> INVITE is never received by Kamailio? >> >> Best Regards, >> >> ___ >> Kamailio (SER) - Users Mailing >> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >> >> -- >> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- >> www.linkedin.com/in/miconda >> >> -- > Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- > www.linkedin.com/in/miconda > > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Lifetime of Invite with no Ack
Thanks for the reply. Here is my scenario : ClientKamailio__Destination_1Destination_2 |_INV___|___|___| |-->|__INV__|___| |___|-->|___| |___|___|___| |___|200_OK_|___| |___|<---|___| |200_OK_|___|___| |<---|___|___| |___|___|___| |___INV(Retr)|___|___| |-->|__INV__|___| |___|>| |___|___|___| As you can see, the client never sends the ACK to Kamailio and retransmits the first INVITE (No To-TAG) again after more than 5s. After this Kamailio uses Dispatcher to send to a destination from a group and chooses Destination_2. Since the INVITE is sent to Destination_2, my system treats this as a second call being created. Should this scenario happen under the SIP stack rules? Shouldn't Kamailio send a "491 - Request Pending" on this scenario? If not, how i can configure Kamailio to behave like that? In my code i have the following conditions for a Request to able to be sent by DISPATCHER : - if( is_method("INVITE") && !has_totag() ) - if(!t_check_trans()) What other conditions can i setup in order for this INVITE to be treated like a retransmission or being rejected? Best Regards, A segunda, 13/04/2020, 13:31, Daniel-Constantin Mierla escreveu: > By default the transaction that gets a final reply is kept for another > 5sec or so in memory to deal with retranmissions, etc ... There is a > wait_timer parameter in tm module. > > The ACK after 200ok is separate transaction and has no influence on INVITE > transaction. For the ACK after 300+ reply, there should be some > retransmissons of the reply in the INVITE transaction. > > The dialog module is influenced by the missing ACK after 200ok. > > Cheers, > Daniel > On 13.04.20 13:18, Duarte Rocha wrote: > > Sorry i didn't specify. > > It is after the 200 Ok. Will it be different in a reply greater than 300? > > Best regards > > A segunda, 13/04/2020, 12:16, Daniel-Constantin Mierla > escreveu: > >> Hello, >> >> is it about ACK after 200ok or the ACK after 300 or greater reply? >> >> Cheers, >> Daniel >> On 13.04.20 13:04, Duarte Rocha wrote: >> >> Greetings, >> >> How much time will Kamailio keep a transaction active if the ACK to a >> INVITE is never received by Kamailio? >> >> Best Regards, >> >> ___ >> Kamailio (SER) - Users Mailing >> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >> >> -- >> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- >> www.linkedin.com/in/miconda >> >> -- > Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- > www.linkedin.com/in/miconda > > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Lifetime of Invite with no Ack
Sorry i didn't specify. It is after the 200 Ok. Will it be different in a reply greater than 300? Best regards A segunda, 13/04/2020, 12:16, Daniel-Constantin Mierla escreveu: > Hello, > > is it about ACK after 200ok or the ACK after 300 or greater reply? > > Cheers, > Daniel > On 13.04.20 13:04, Duarte Rocha wrote: > > Greetings, > > How much time will Kamailio keep a transaction active if the ACK to a > INVITE is never received by Kamailio? > > Best Regards, > > ___ > Kamailio (SER) - Users Mailing > Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > -- > Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- > www.linkedin.com/in/miconda > > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Lifetime of Invite with no Ack
Greetings, How much time will Kamailio keep a transaction active if the ACK to a INVITE is never received by Kamailio? Best Regards, ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Invite transaction lifetime
Greetings, I have a strange call with a client in which he sends me an INVITE and i do the usual "100", "183" and "200 - OK" but the client never gets my provisional or final responses and, as such keeps retransmitting the first INVITE. For the first retransmissions Kamailio doesn't relay the INVITE which i think is the correct behaviour. However, after around 30s, a retransmission is processed and is relayed to a different destination, using "ds_select_dst()" from the DISPATCH module. For this to happen it had to fail the "t_check_trans()" function from TM module which tells me that the transaction from the first INVITE was gone. I went to search timers and lifetime definitions on TM module and found one "max_inv_lifetime" which tells me that "An INVITE transaction will be kept in memory for maximum: max_inv_lifetime+fr_timer(from the ACK to the final reply wait)+wt_timer". In this case : max_inv_lifetime is 180 seconds, fr_timer is 30 seconds and wt_timer is 5 seconds. It's sum is 215seconds and from what i can see, my transaction only had a lifetime of 30s. fr_timer is configured with 30s but it's definition is "Timer which hits if no final reply for a request or ACK for a negative INVITE reply arrives (in milliseconds)." and it mentions ACK, but in my case it's an ACK for a final reply that is missing and not an ACK for a negative reply. What other reasons might have caused this transaction to be terminated ? Best Regards ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Strange behaviour on $tu
Hello, It's not enclosed in angled brackets. I can test it with angle brackets if you want :) A segunda, 2/03/2020, 13:32, Daniel-Constantin Mierla escreveu: > Hello, > > is the uri enclosed in angle brackets? Or is just plain value that you > pasted below? > > Cheers, > Daniel > > > On 02.03.20 14:24, Duarte Rocha wrote: > > Greetings, > > I have a cenario with the following header To = > "sip:111234567890;npdi@111.222.333.444" > > If i print $tu I got "sip:111234567890". If i print $hdr(To) I get > "sip:111234567890;npdi@111.222.333.444". > > If i don't include the "npdi" or any other user parameters, it works fine > > Is this the intended behaviour? Am i doing something wrong here? > > Best Regards, > > ___ > Kamailio (SER) - Users Mailing > Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > -- > Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- > www.linkedin.com/in/miconda > Kamailio Advanced Training - March 9-11, 2020, Berlin - www.asipto.com > Kamailio World Conference - April 27-29, 2020, in Berlin -- > www.kamailioworld.com > > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Strange behaviour on $tu
Greetings, I have a cenario with the following header To = "sip:111234567890;npdi@111.222.333.444" If i print $tu I got "sip:111234567890". If i print $hdr(To) I get "sip:111234567890;npdi@111.222.333.444". If i don't include the "npdi" or any other user parameters, it works fine Is this the intended behaviour? Am i doing something wrong here? Best Regards, ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] How to make a distinction between sip and tel uri
Greetings, I have a client that sends me two P-Asserted-Identity headers, one with SIP URI and one with tel URI. The pseudo variable $ai returns the topmost P-Asserted-Identity header and I only need the one with the SIP URI. How should i proceed ? Is there a way to delete the one with tel URI? the header removal functions i find only work with header name. I could also work with something different than $ai for this scenario. Best Regards, ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Param.valueat not returning special chars
Hello, I've run into a problem while using parameters parsing tools from Kamailio. When i request the value of a parameter it discards some characters like "" for example. Here is an example : $var(Parameters) = "kamailio=\"version5\";sip=hey"; xerr("String Parameter = $var(Parameters)"); xerr("Parameter on position 1 = $(var(Parameters){param.name,0}) and has value = $(var(Parameters){param.valueat,0})"); This code returns : ERROR:
Re: [SR-Users] Parsing exception when "user=phone" is present
Yes, thanks Phone2tel seems to do what i need A quarta, 8/01/2020, 15:52, Duarte Rocha escreveu: > Greetings, > > I'm testing some portability scenarios with carriers and i've ran into > some issues. > > Take this example URI from ETSI TR 184 003 ( > https://www.etsi.org/deliver/etsi_tr/184000_184099/184003/03.01.01_60/tr_184003v030101p.pdf > ) > - Sip:+49234598765;npdi;rn=+49-d...@provider5.net;user=phone > > In this case i need to parse user, user's parameters, domain and uri > parameters. > > In order to that i'm using uri's transformations like {uri.user}, > {uri.domain}, etc. > > However, when "user=phone" is present, Kamailio's parser works differently. > > Without "user=phone" -> {uri.user} is equal to > "+49234598765;npdi;rn=+49-D123" > With "user=phone" -> {uri.user} is equal to "+49234598765" . > > I really need to access "rn" and "npdi" parameters in those cases. How can > i do it when "user=phone" is present? > Is there a way to disable the "user=phone" exception for parsing? > > Best Regards, > > Duarte Rocha > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Parsing exception when "user=phone" is present
Greetings, I'm testing some portability scenarios with carriers and i've ran into some issues. Take this example URI from ETSI TR 184 003 ( https://www.etsi.org/deliver/etsi_tr/184000_184099/184003/03.01.01_60/tr_184003v030101p.pdf ) - Sip:+49234598765;npdi;rn=+49-d...@provider5.net;user=phone In this case i need to parse user, user's parameters, domain and uri parameters. In order to that i'm using uri's transformations like {uri.user}, {uri.domain}, etc. However, when "user=phone" is present, Kamailio's parser works differently. Without "user=phone" -> {uri.user} is equal to "+49234598765;npdi;rn=+49-D123" With "user=phone" -> {uri.user} is equal to "+49234598765" . I really need to access "rn" and "npdi" parameters in those cases. How can i do it when "user=phone" is present? Is there a way to disable the "user=phone" exception for parsing? Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Calculate call duration
Greetings, How sould a call duration be calculated? Let's say the call creation on Kamailio as a proxy has those steps : 1 - Invite is received 2 - Provisional responses 3 - 200 OK is received 4 - ACK to 200 OK is received 5 - BYE is received 6 - 200 OK to BYE is received Should the duration begin to count on step 3 (200-Ok Received) or 4 (ACK received) ? Should it end on the step 5 or 6? ACC module tells me that start time for CDR can either be on dialog creation or confirmation - https://www.kamailio.org/docs/modules/5.2.x/modules/acc.html#acc.p.cdr_start_on_confirmed - What is the dialog creation ? Is it when the INVITE is received ? - According to DIALOG module, a confirmed dialog can be "Waiting for ACK" or "Active Call". Which one is used by acc module? Best Regards, ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] How to access different uris in a header
Greetings, In order to identify Redirecting Number and Original Called Number on a given request i look for the top( Redirecting Number) and bottom (Original Called) Diversion headers using hdr(Diversion)[0] and hdr(Diversion)[-1]. However, i have a client that sends me all the Diversions URIS in the same header. Does kamailio has a similar tool for accessing the different URIS in the header? Best Regards, ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Problem with URI transformations
As far as i know, the URI transformations only provide the "user" parameter, not the user part parameters. What i'm trying to do i build an object for Diversion and Contact. To do that i'm trying to parse the header and URI into it's elements. URI Example : Elements : User : 123456 User Parameters : parameter=hello;parameter2=hey Domain : 1.1.1.1 URI Parameters = kamailio=teste To achieve this i'm using uri.user , uri.domain , uri.port and uri.params. uri.user will normally return "123456;parameter=hello;parameter2=hey" and after that i mannually split the user and teh user params. However, in the event of a TEL_URI with user=phone on uri.params, "parameter=hello;parameter2=hey" won't be present in the uri.user. It seems like i should be doing a special case for when user=phone is present. What do you think ? A segunda, 18/11/2019, 12:29, Daniel-Constantin Mierla escreveu: > Hello, > > check the URI transformation docs, iirc there is an option to get user > parameters. > > If not, can you give an example of what params you want to work with, > likely you can get it with other transformations... > > Cheers, > Daniel > On 18.11.19 13:13, Duarte Rocha wrote: > > Greetings, > > My issue was related to user part parameters being lost. I didn't know > that the parse would work differently when user=phone was present. Thank > you for pointing that out. > > That being said, how should i proceed if i want to check user part > parameters in this scenario? Like phone-context for example. > > Best Regards > > A sexta, 15/11/2019, 20:38, Daniel-Constantin Mierla > escreveu: > >> Hello, >> >> what did you expect to be? To be able to comment on the exact topic. >> >> user=phone changes the structure of the URI in something similar to tel >> URI. >> >> Cheers, >> Daniel >> On 15.11.19 17:51, Duarte Rocha wrote: >> >> Greetings, >> >> I'm trying to parse some URI info on Kamailio but i'm having some >> troubles the URI transformations. >> >> Here i have two examples of URIS from which i'm trying to extract >> username(with user parameters included) and URI Parameters : >> - sip:123456789;test=param@1.1.1.1 >> - sip:123456789;test=param@1.1.1.1;user=phone >> In order to test this i made the following code : >> >> $var(URI) = "sip:123456789;test=param@1.1.1.1"; >> xerr("DEBUG 1 : URI $var(URI)"); >> $var(User) = $(var(URI){uri.user}); >> $var(Parameters) = $(var(URI){uri.params}); >> xerr("DEBUG 1 : User = $var(User)"); >> xerr("DEBUG 1 : Parameters = $var(Parameters)"); >> $var(URI) = "sip:123456789;test=param@1.1.1.1;user=phone"; >> xerr("DEBUG 2 : URI $var(URI)"); ; >> $var(User) = $(var(URI){uri.user}); >> $var(Parameters) = $(var(URI){uri.params}); >> xerr("DEBUG 2 : User = $var(User)"); >> xerr("DEBUG 2 : Parameters = $var(Parameters)"); >> The result is the following : >> DEBUG 1 : URI sip:123456789;test=param@1.1.1.1 >> DEBUG 1 : User = 123456789;test=param >> DEBUG 1 : Parameters = >> >> DEBUG 2 : URI sip:123456789;test=param@1.1.1.1;user=phone >> DEBUG 2 : User = 123456789 >> DEBUG 2 : Parameters = user=phone >> If the URI has parameters, the User parameters won't be included in the >> User part. >> >> Is this a bug or is it working as intended? I'm running Kamailio 5.2.0 . >> >> Thank you for your time. >> >> Best Regards, >> >> Duarte Rocha >> >> ___ >> Kamailio (SER) - Users Mailing >> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >> >> -- >> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- >> www.linkedin.com/in/miconda >> Kamailio World Conference - April 27-29, 2020, in Berlin -- >> www.kamailioworld.com >> >> -- > Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- > www.linkedin.com/in/miconda > Kamailio World Conference - April 27-29, 2020, in Berlin -- > www.kamailioworld.com > > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Problem with URI transformations
Greetings, My issue was related to user part parameters being lost. I didn't know that the parse would work differently when user=phone was present. Thank you for pointing that out. That being said, how should i proceed if i want to check user part parameters in this scenario? Like phone-context for example. Best Regards A sexta, 15/11/2019, 20:38, Daniel-Constantin Mierla escreveu: > Hello, > > what did you expect to be? To be able to comment on the exact topic. > > user=phone changes the structure of the URI in something similar to tel > URI. > > Cheers, > Daniel > On 15.11.19 17:51, Duarte Rocha wrote: > > Greetings, > > I'm trying to parse some URI info on Kamailio but i'm having some troubles > the URI transformations. > > Here i have two examples of URIS from which i'm trying to extract > username(with user parameters included) and URI Parameters : > - sip:123456789;test=param@1.1.1.1 > - sip:123456789;test=param@1.1.1.1;user=phone > In order to test this i made the following code : > > $var(URI) = "sip:123456789;test=param@1.1.1.1"; > xerr("DEBUG 1 : URI $var(URI)"); > $var(User) = $(var(URI){uri.user}); > $var(Parameters) = $(var(URI){uri.params}); > xerr("DEBUG 1 : User = $var(User)"); > xerr("DEBUG 1 : Parameters = $var(Parameters)"); > $var(URI) = "sip:123456789;test=param@1.1.1.1;user=phone"; > xerr("DEBUG 2 : URI $var(URI)"); ; > $var(User) = $(var(URI){uri.user}); > $var(Parameters) = $(var(URI){uri.params}); > xerr("DEBUG 2 : User = $var(User)"); > xerr("DEBUG 2 : Parameters = $var(Parameters)"); > The result is the following : > DEBUG 1 : URI sip:123456789;test=param@1.1.1.1 > DEBUG 1 : User = 123456789;test=param > DEBUG 1 : Parameters = > > DEBUG 2 : URI sip:123456789;test=param@1.1.1.1;user=phone > DEBUG 2 : User = 123456789 > DEBUG 2 : Parameters = user=phone > If the URI has parameters, the User parameters won't be included in the > User part. > > Is this a bug or is it working as intended? I'm running Kamailio 5.2.0 . > > Thank you for your time. > > Best Regards, > > Duarte Rocha > > ___ > Kamailio (SER) - Users Mailing > Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > -- > Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- > www.linkedin.com/in/miconda > Kamailio World Conference - April 27-29, 2020, in Berlin -- > www.kamailioworld.com > > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Problem with URI transformations
Greetings, I'm trying to parse some URI info on Kamailio but i'm having some troubles the URI transformations. Here i have two examples of URIS from which i'm trying to extract username(with user parameters included) and URI Parameters : - sip:123456789;test=param@1.1.1.1 - sip:123456789;test=param@1.1.1.1;user=phone In order to test this i made the following code : $var(URI) = "sip:123456789;test=param@1.1.1.1"; xerr("DEBUG 1 : URI $var(URI)"); $var(User) = $(var(URI){uri.user}); $var(Parameters) = $(var(URI){uri.params}); xerr("DEBUG 1 : User = $var(User)"); xerr("DEBUG 1 : Parameters = $var(Parameters)"); $var(URI) = "sip:123456789;test=param@1.1.1.1;user=phone"; xerr("DEBUG 2 : URI $var(URI)"); ; $var(User) = $(var(URI){uri.user}); $var(Parameters) = $(var(URI){uri.params}); xerr("DEBUG 2 : User = $var(User)"); xerr("DEBUG 2 : Parameters = $var(Parameters)"); The result is the following : DEBUG 1 : URI sip:123456789;test=param@1.1.1.1 DEBUG 1 : User = 123456789;test=param DEBUG 1 : Parameters = DEBUG 2 : URI sip:123456789;test=param@1.1.1.1;user=phone DEBUG 2 : User = 123456789 DEBUG 2 : Parameters = user=phone If the URI has parameters, the User parameters won't be included in the User part. Is this a bug or is it working as intended? I'm running Kamailio 5.2.0 . Thank you for your time. Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Error parsing parameter value
Yes, i think both ways are correct The only problem is that i want to have the real value using {uri.param} which would be "". However it only returns , without the quotes. A terça, 8/10/2019, 15:54, Daniel-Constantin Mierla escreveu: > The example you gave with the value of +sip.instance between double quotes > is valid, I have seen it many times like this. > > On the other hand, other parameters of Contact header can usually be > without quoted value, like: > > Contact:;reg-id=1 > > Both types can be in the header at the same time. > > Is the value with double quotes making troubles somewhere? > > Cheers, > Daniel > On 08.10.19 16:38, Duarte Rocha wrote: > > Thank you for your answer. > The green example was just for testing. My real example is similar to > yellow on a header parameter since i have a client sending me the value of > sip.instance between quotes and i can't identify the value when it is > quoted. > > Example : Contact: > ;+sip.instance="" > > It seems to me be a valid sip parameter, but if it's not i'll warn the > client > > A terça, 8/10/2019, 15:29, Daniel-Constantin Mierla > escreveu: > >> Hello, >> >> the values of parameters can be quoted or unquoted, depending on the >> format (e.g., URI parameters have to be unquoted). If they start with a >> quote, then it has to be terminated with the same quote and then the value >> is in between the quotes. The {param} transformation is using the same >> parser as for parameters in SIP message. >> >> Now, I am not sure if quote is allowed in an unquoted parameters like >> green, the grammar in SIP specs has to be checked... >> >> Cheers, >> Daniel >> On 08.10.19 16:09, Duarte Rocha wrote: >> >> Hi David. >> >> I want to ble able to print : yellow = "twelve". >> In the green example the "" are printed, but on the yellow example it is >> not. >> >> Cheers >> >> A terça, 8/10/2019, 12:36, Duarte Rocha >> escreveu: >> >>> Greetings, >>> >>> >>> >>> I'm testing some parameters actions and i found a weird behaviour >>> >>> >>> >>> This is my code for the test : >>> >>> >>> >>> $var(Parameter_List) = "blue=twelve;green=twe\"lve\";yellow=\"twelve\""; >>> >>> xerr("Parameter List = $var(Parameter_List)"); >>> >>> xerr("Value of Parameter blue = >>> $(var(Parameter_List){param.value,blue})"); >>> >>> xerr("Value of Parameter green = >>> $(var(Parameter_List){param.value,green})"); >>> >>> xerr("Value of Parameter yellow = >>> $(var(Parameter_List){param.value,yellow})"); >>> >>> >>> >>> >>> >>> The printed logs are the following : >>> >>> ERROR:
Re: [SR-Users] Error parsing parameter value
Thank you for your answer. The green example was just for testing. My real example is similar to yellow on a header parameter since i have a client sending me the value of sip.instance between quotes and i can't identify the value when it is quoted. Example : Contact:;+sip.instance="" It seems to me be a valid sip parameter, but if it's not i'll warn the client A terça, 8/10/2019, 15:29, Daniel-Constantin Mierla escreveu: > Hello, > > the values of parameters can be quoted or unquoted, depending on the > format (e.g., URI parameters have to be unquoted). If they start with a > quote, then it has to be terminated with the same quote and then the value > is in between the quotes. The {param} transformation is using the same > parser as for parameters in SIP message. > > Now, I am not sure if quote is allowed in an unquoted parameters like > green, the grammar in SIP specs has to be checked... > > Cheers, > Daniel > On 08.10.19 16:09, Duarte Rocha wrote: > > Hi David. > > I want to ble able to print : yellow = "twelve". > In the green example the "" are printed, but on the yellow example it is > not. > > Cheers > > A terça, 8/10/2019, 12:36, Duarte Rocha > escreveu: > >> Greetings, >> >> >> >> I'm testing some parameters actions and i found a weird behaviour >> >> >> >> This is my code for the test : >> >> >> >> $var(Parameter_List) = "blue=twelve;green=twe\"lve\";yellow=\"twelve\""; >> >> xerr("Parameter List = $var(Parameter_List)"); >> >> xerr("Value of Parameter blue = >> $(var(Parameter_List){param.value,blue})"); >> >> xerr("Value of Parameter green = >> $(var(Parameter_List){param.value,green})"); >> >> xerr("Value of Parameter yellow = >> $(var(Parameter_List){param.value,yellow})"); >> >> >> >> >> >> The printed logs are the following : >> >> ERROR:
Re: [SR-Users] Error parsing parameter value
Hi David. I want to ble able to print : yellow = "twelve". In the green example the "" are printed, but on the yellow example it is not. Cheers A terça, 8/10/2019, 12:36, Duarte Rocha escreveu: > Greetings, > > > > I'm testing some parameters actions and i found a weird behaviour > > > > This is my code for the test : > > > > $var(Parameter_List) = "blue=twelve;green=twe\"lve\";yellow=\"twelve\""; > > xerr("Parameter List = $var(Parameter_List)"); > > xerr("Value of Parameter blue = $(var(Parameter_List){param.value,blue})"); > > xerr("Value of Parameter green = > $(var(Parameter_List){param.value,green})"); > > xerr("Value of Parameter yellow = > $(var(Parameter_List){param.value,yellow})"); > > > > > > The printed logs are the following : > > ERROR:
[SR-Users] Error parsing parameter value
Greetings, I'm testing some parameters actions and i found a weird behaviour This is my code for the test : $var(Parameter_List) = "blue=twelve;green=twe\"lve\";yellow=\"twelve\""; xerr("Parameter List = $var(Parameter_List)"); xerr("Value of Parameter blue = $(var(Parameter_List){param.value,blue})"); xerr("Value of Parameter green = $(var(Parameter_List){param.value,green})"); xerr("Value of Parameter yellow = $(var(Parameter_List){param.value,yellow})"); The printed logs are the following : ERROR:
[SR-Users] Bad BYE request
Greetings, This is a repeated problem, but i have more info now. Please help understand if there is a problem on my code or if there is any kind of Kamailio bug. On the first INVITE of every call i apply uac_replace_from() and uac_replace_to() in order to normalize numeration. I have the restore_mode set as "auto". The original numeration is : To : 35125000 From : 351211455000 The INVITE is sent to the client with To and From like this and with the Record-Route headers (Kamailio has 2 Ips and inserts 2 Record-Routes) containing vsf and vst parameters to help the future restores : To: From: ;tag=BD583030373631320511EAE6 Record-Route: Record-Route: My client, upon receiving the INVITE, also does some changes in the numeration and sends a 183 reply with the following headers : Record-Route: Record-Route: From: "+351211455000" ;tag=BD583030373631320511EAE6 To: ;tag=as3e46f684 After Kamailio processes the reply, To and >From are restored to it's original values and the reply is relayed : From: ;tag=BD583030373631320511EAE6 To: ;tag=as3e46f684 Here, the restore works perfectly. By the end of the call the client sends me a BYE request with Route, From and To like this : Route: , From: ;tag=as3e46f684 To: "+351211455000" ;tag=BD583030373631320511EAE6 Here, the difference between 183 and BYE seems to be only in the Route\Record-Route are built (2 Headers or one header with 2 uri). Now, there are a couple of problems relaying the BYE that seem to me to be related to auto replace. This BYE message isn't logged on the onsend-route and it logs a couple of errors : ERROR: [core/parser/msg_parser.c:164]: get_hdr_field(): bad to header ERROR: [core/parser/msg_parser.c:337]: parse_headers(): bad header field [To: "+351211455000" ;tag=3DC130303736313205201F18#015#012Call-ID: 020FAAC7] ERROR: dialog [dlg_handlers.c:666]: pre_match_parse(): bad request or missing CALLID/TO hdr :-/ ERROR: [core/parser/parse_addr_spec.c:719]: parse_addr_spec(): unexpected char [<] in status 6: ["+351211455000" ;tag=as3e46f684 To: "+351211455000" ;tag=BD583030373631320511EAE6 This, naturally, generates a "400 Bad Request" reply from the next equipment. I've also logged the $tU values along the code for BYE requests and it always logs the "I2116446I_500", so i don't know if my code can be the cause of this. A couple of questions and comments - What can i do to better debug this issue? I want to be sure if the problem comes from my code of if it is a Kamailio issue. Right now i'm not sure where to look. - Can a request be sent without passing on onsend_route ? I have used this code to "catch" the BYE, which works for other BYEs - if( $rm == "BYE") {xerr("On send : To User = $tU");} ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Record-Route management
I was using "enable_double_rr" with value 2. With value 1 it works as i want. Perfect. Is there something similar for the via header? A quinta, 3/10/2019, 16:41, Duarte Rocha escreveu: > Greetings, > > I have multiple IPs in my Kamailio. In some scenarios, the caller and the > called connect to different IPs and in others, they use the same IP. > > Currently i'm running with the RR's module "enable_double_rr" parameter > set so i can have one Record-Route for each IP used on the call. > However, in the scenario that both caller and called have the same IP, i > would like to only have on Record-Route in order to save on the pactet's > size. > > Is this possible to have those two scenarios on the same Kamailio ? > > Best Regards > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Record-Route management
Greetings, I have multiple IPs in my Kamailio. In some scenarios, the caller and the called connect to different IPs and in others, they use the same IP. Currently i'm running with the RR's module "enable_double_rr" parameter set so i can have one Record-Route for each IP used on the call. However, in the scenario that both caller and called have the same IP, i would like to only have on Record-Route in order to save on the pactet's size. Is this possible to have those two scenarios on the same Kamailio ? Best Regards ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Problem restoring To and From (uac_replace)
Greetings, I'm getting some errors with the auto restore of From and To from UAC Module. After the restore, the URI has lots garbage and it's not like the original. I think the problem lies on the way the client sends the Route Header to me, but i'm not sure. When Kamailio sends the INVITE Record-Route are like this : Record-Route: Record-Route: However, when my client sends a BYE to finish the call, the Route are on this mode : Route: , The module's documentation says this : "One uses the rr module and appends to the Record-Route header a parameter containing some strings from which the original and new URI can be computed. The problem with this mode is that it relies on the fact the parties will send the Route exactly as it was received. In case there is a change, the resulting URIs will not be correct." Can this change by the client be the cause of this issue? Is there anything i can do to avoid this? Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Disable GW's on runtime
> Why not just calling dispatcher.set_state directly to the kamailio? That would only set the state in memory. Unless you do a reload. Set_state works with gw uri and group as argument. In this scenario both gws have the same uri and group and i only want to disable the one that has a socket that doesn't exist in the machine A quarta, 28/08/2019, 11:32, Duarte Rocha escreveu: > Greetings, > > I have two Kamailio's working on a HA scenario. Both Kamailio's have DB > replication and each machine has one HA IP. In order to set this up, i have > every GW on the DB duplicated, one with Socket IPA and another with socket > IPB. > > I have both GWs in a active state configurated in the replicated DB. They > also both have the same URI and the same group id > > Example : > GW1 : Socket = IPA ; GroupID = 1 ; Uri = sip:1.1.1.1:5060 > GW2 : Socket = IPB ; GroupID = 1 ; Uri = sip:1.1.1.1:5060 > > In order to avoid errors, i want to disable on runtime the GWs that have a > socket that doesn't belong, at the moment, to that machine (GW with Socket > IPB on machine with IPA). To do that i would use the dispatcher.set_state, > however it works with group id and address, which in this case it is the > same. > > Is there other method to disable the GWs on runtime using other arguments > like duid or socket ? > > I thought about using probing for this, since it will disable > automatically the GWs with non-existent socket, but not all my clients > support probing, so it isn't feasible. > > Thanks in advance > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Disable GW's on runtime
Yes, i only want to disable it on one Kamailio. A quarta, 28/08/2019, 11:32, Duarte Rocha escreveu: > Greetings, > > I have two Kamailio's working on a HA scenario. Both Kamailio's have DB > replication and each machine has one HA IP. In order to set this up, i have > every GW on the DB duplicated, one with Socket IPA and another with socket > IPB. > > I have both GWs in a active state configurated in the replicated DB. They > also both have the same URI and the same group id > > Example : > GW1 : Socket = IPA ; GroupID = 1 ; Uri = sip:1.1.1.1:5060 > GW2 : Socket = IPB ; GroupID = 1 ; Uri = sip:1.1.1.1:5060 > > In order to avoid errors, i want to disable on runtime the GWs that have a > socket that doesn't belong, at the moment, to that machine (GW with Socket > IPB on machine with IPA). To do that i would use the dispatcher.set_state, > however it works with group id and address, which in this case it is the > same. > > Is there other method to disable the GWs on runtime using other arguments > like duid or socket ? > > I thought about using probing for this, since it will disable > automatically the GWs with non-existent socket, but not all my clients > support probing, so it isn't feasible. > > Thanks in advance > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Disable GW's on runtime
Greetings, I have two Kamailio's working on a HA scenario. Both Kamailio's have DB replication and each machine has one HA IP. In order to set this up, i have every GW on the DB duplicated, one with Socket IPA and another with socket IPB. I have both GWs in a active state configurated in the replicated DB. They also both have the same URI and the same group id Example : GW1 : Socket = IPA ; GroupID = 1 ; Uri = sip:1.1.1.1:5060 GW2 : Socket = IPB ; GroupID = 1 ; Uri = sip:1.1.1.1:5060 In order to avoid errors, i want to disable on runtime the GWs that have a socket that doesn't belong, at the moment, to that machine (GW with Socket IPB on machine with IPA). To do that i would use the dispatcher.set_state, however it works with group id and address, which in this case it is the same. Is there other method to disable the GWs on runtime using other arguments like duid or socket ? I thought about using probing for this, since it will disable automatically the GWs with non-existent socket, but not all my clients support probing, so it isn't feasible. Thanks in advance ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] [tm-local-request] usage
Greetings, I did some testing and onsend route is not executed on local generated requests. I asked if they work the same way because for relayed requests, the on send is the last route before sending the packet. I'm asking this because I'm trying to debug an issue with my probings via dispatcher, where some OPTIONS requests are not being sent to its destination. I got a log on local-request and all OPTIONS are logging there correctly. However, if i do a pcap capture on the kamailio machine, not all options are there. That being said, i want to make sure that the problem is not in my Kamailio configuration and it is sending the correct number of packets. Best regards A terça, 27/08/2019, 08:24, Daniel-Constantin Mierla escreveu: > Hello, > On 26.08.19 18:26, Duarte Rocha wrote: > > Greetings, > > Does "event_route[tm:local-request]" works like onsend route ? > > no, event_route[tm:local-request] is for requests initiated by Kamailio > via tm module (but other modules can be the source of the requests, as they > use internally tm module, like msilo, uac, ...). > > > I'm having some problems and i'm using local-request to debug and i found > this on the documentation : "Executed after the tm module has sent a local > generated, transaction stateful request." > > > That was misleading indeed and wrong, because it is executed before > sending out the request. The content of the request can still be changed > there. > > > I'm logging all the requests that go through this route. Is this really > the last place before kamailio send the request? > > > I am not sure if the onsend_route is executed for local generated requests > -- it was desinged initially to be executed for requests that are received > and forwarded by kamailio. So you may need both > event_route[tm:local-request] and onsend_route to catch all outgoing > requests. In other words, the onsend_route is the last one executed before > sending out, where the content of what is going to be sent cannot be > changed, but you can still drop the request. If you don't see there the > local generated requests, then you have to use also > event_route[tm:local-request]. > > If the request is logged here, is there anything more in kamailio that can > stop the request (pipelimit, etc) ? > > > Stopping the request in event_route[tm:local-request] and onsend_route can > be done by using 'drop'. When you do it, being it based on pipelimit, > userblacklist, etc ..., it is up to you. > > > If a packet gets logged on this route does that mean that it was already > sent? > > No. Afaik, there is no event_route executed after the request was already > sent. Although it might be useful for doing some ops that should not add > delay to routing the request... > > Cheers, > Daniel > > > Best Regards, > > Duarte Rocha > > ___ > Kamailio (SER) - Users Mailing > Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > -- > Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- > www.linkedin.com/in/miconda > > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] [tm-local-request] usage
Greetings, Does "event_route[tm:local-request]" works like onsend route ? I'm having some problems and i'm using local-request to debug and i found this on the documentation : "Executed after the tm module has sent a local generated, transaction stateful request." I'm logging all the requests that go through this route. Is this really the last place before kamailio send the request? If the request is logged here, is there anything more in kamailio that can stop the request (pipelimit, etc) ? If a packet gets logged on this route does that mean that it was already sent? Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Uac_replace for header's parameters
Greetings, I'm using uac_replace_to() and uac_replace_from() to do some number manipulations. It allows me to modify and automatically restore Display Number and URI. This works nicely, however it only allows to manipulate URI's parameter. Is there any method to the same and include the Header's parameters too? Best regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Sipt redirection number retrieves old values
Sure, here it is : xerr("VMD2 : Reply Code : $rs ; Sipt Redir = $sipt(redirection_number) and Call ID = $ci and Cseq = $cs"); A quarta, 7/08/2019, 17:02, Duarte Rocha escreveu: > Greetings, > > I'm doing VoiceMail detection using $sipt(redirection_number) from SIPT > module and i've been having some false positives on the detection. > > I inspected further and noticed that in some cases > $sipt(redirection_number) returns old values from previous messages, which > makes me think that it's value is not being correctly refreshed. I'm using > this variable on a on_reply_route. > > As far as i know, $sipt(redirection_number) is read only and can't be > refreshed by me in the code. > > Here is an example : > > Aug 7 16:51:49 dev_sbc_a_vts01 > /usr/local/kamailio-5.2/sbin/kamailio[4746]: ERROR:
[SR-Users] Sipt redirection number retrieves old values
Greetings, I'm doing VoiceMail detection using $sipt(redirection_number) from SIPT module and i've been having some false positives on the detection. I inspected further and noticed that in some cases $sipt(redirection_number) returns old values from previous messages, which makes me think that it's value is not being correctly refreshed. I'm using this variable on a on_reply_route. As far as i know, $sipt(redirection_number) is read only and can't be refreshed by me in the code. Here is an example : Aug 7 16:51:49 dev_sbc_a_vts01 /usr/local/kamailio-5.2/sbin/kamailio[4746]: ERROR:
[SR-Users] Malformed Route Header
Greetings, When a in-dialog request has Route headers, Kamailio will remove the Route Header with it's address when routing the packet. This works perfectly for me in every situation. However, in one of the calls I found a weird behaviour in the removal. So, this is the scenario : Kamailio has two IP's 1.1.1.209 and 1.1.1.205. This is BYE request received in the on 1.1.1.209 The header Route looks like this when it arrives at 1.1.1.209 : Route : , It reaches 1.1.1.205 like this : Route : As you can see, the header is empty and it should contain the 1.1.1.205 URI. Is the header Router malformatted and creating this error ? Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Two GWs with the same IP
Greetings, I'm building some testing procedures for my Kamailio proxy. In order to do that i have a SipTester (Acting as Calling Number) from where i want to originate calls to Kamailio. After Kamailio processes the call, i want it to route it to SipTester again so it can act as Called Number. This should work with only one SipTester in one machine, so i created two SipTester GW's on Kamailio, belonging to different users and GW groups. Also, the two GWs use different Kamailio addresses to communicate with the proxy. However, in this combination, when routing i get this error " ERROR: dialog [dlg_handlers.c:666]: pre_match_parse(): bad request or missing CALLID/TO hdr :-/". If i change the destination or the origin of the INVITE the calls work without a problem. Does this happen because both GW's have the same address? Best Regards ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Statistics for locally generated replies
Greetings, Does the statistics command "kamcmd tm.stats" has an argument or a way to only list locally generated replies? As far as i know, sl.stats only lists local generated replies. Can tm work the same way? Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Dispatcher's probing malfunction
Greetings, I have some questions about dispatcher's probing mechanics : 1 - In my SBC i have 26 gateways being probed. However, if i do a SIP capture no more than 16 gateways are probed each minute. Some gateways are always probed, others only once in a while. 2 - I have two SBC working in a pair with DB being replicated and with HA IPs. That being said i configure one NAP twice, each configuration with one HA socket. Is this configuration supported? I get very weird behaviours when i configure it like this. Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Relay NAP Probing
Greetings, I have a Kamailio as Sip Proxy between my clients and my Media gateway. I have NAPs (One per client) for clients and NAPs for the MediaGateway (One for each client). The MediaGateway probes Kamailio in order to see if it's alive and Kamailio probes clients. However, i would like for the MediaGateway to be aware of the client status. I thought of a few solutions : - When Kamailio probes a client and it fails, both NAPs (Client Side and MG side) could be set as inactive. - Automatically relay the MG probe to the client - Some scripting that reads the result of dispatcher.list and if it finds an inactive NAP, set the MG NAP as inactive too. Is there a better/simpler way to do this? I'd rather have everything on Kamailio configuration files instead of doing exatra scripting. Any opinions ? How can i achieve this? Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Statistics help
Greetings, I'm doing some monitoring of my Kamailio in order to quickly identify system failures and overloads. In order to do that i have scripts that read the output of "kamcmd sl.stats" and identify the rising of "500_replies", "5xx_replies" and "6xx_replies". However, i have rate limiting on my Kamailio, which generates "503" replies when limit is reached, which generates an unnecessary alarm. Is there a way to get more specific stats about the repleis generated by Kamailio? If that isn't possible, will i be safe only monitoring "500" and "6xx" replies? In my experience, when the server has reached a processing or memory limit, the reply is always 500, but i'm not really sure about this. Thank you for your help. Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Npdi question
Greetings, Regarding portability issues, is there a difference between "npdi" and "npdi=yes" ? Are there any more possible values besides "yes" and no value? Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Help identifying mem leaks
Greetings, Recently one of my Kamailio's started started answering with a lot of 500 replies to requests because of insufficient private memory. The service Kamailio had been running for 6 months now. In order to solve this i increased the private memory settings and restarted the Kamailio. Before that, when searching a bit about the issue i found an old thread where Daniel suggested using " kamcmd corex.pkg_summary idx 1" to check for pkg leaks in the sip worker process. I ran this before doing the restart in order to identify leaks and found the summary in the logs. However, i am having a hard time interpreting this summary and being able to know if i have or not a mem leak. What should i be looking for? This is the beggining of the summary : qm_status: (0x7ff3c8cef010): qm_status: heap size= 8388608 qm_status: used= 928576, used+overhead=1464080, free=6924528 qm_status: max used (+overhead)= 1488472 qm_status: dumping all alloc'ed. fragments: qm_status: 0. N address=0x7ff3c8d286d8 frag=0x7ff3c8d286a0 size=1024 used=1 qm_status: alloc'd from core: core/str_hash.h: str_hash_alloc(59) qm_status: start check=f0f0f0f0, end check= c0c0c0c0, abcdefed qm_status: 1. N address=0x7ff3c8d28b40 frag=0x7ff3c8d28b08 size=256 used=1 qm_status: alloc'd from core: core/str_hash.h: str_hash_alloc(59) qm_status: start check=f0f0f0f0, end check= c0c0c0c0, abcdefed qm_status: 2. N address=0x7ff3c8d28ca8 frag=0x7ff3c8d28c70 size=184 used=1 qm_status: alloc'd from core: core/counters.c: cnt_hash_add(332) qm_status: start check=f0f0f0f0, end check= c0c0c0c0, abcdefed Any help? Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Udp errors on High Availability Setup
Hello Arnd, Thank you for answering me That would be a solution but i can't use it since i need to be able to specify sockets on a per Nap basis. My listen config has more addresses than those mentioned by me and the sockets are part of the NAP identification. The best way to solve this would be something to suppress the error i think. A quarta, 8/05/2019, 13:04, Duarte Rocha escreveu: > Greetings, > > I have two Machines with Kamailio in a High Availability (HA) > configuration. Both machines are active and processing calls and both have > one HA IP that can jump to the other machine in case of failure. > > I also have probing for NAPs configured with each IP as the socket. > > So, in each machine i have this configuration : > > listen=udp:HA_Address1 > listen=udp:HA_Address2 > > NAP 1 being probed from socket HA_Address1 > NAP 1 being probed from socket HA_Address2 > > I also have /proc/sys/net/ipv4/ip_nonlocal_bind with value 1. > > Everything works correctly with this configuration. However when the > probing is sent for the NAP' my logs get filled with the same error > messages. > > udp_send(): sendto(sock, buf: 0x7f2d4c91fa18, len: 340, 0, dst: > (xxx.xxx.xxx.xxx:xxx), tolen: 16) - err: Invalid argument (22) > CRITICAL: [core/udp_server.c:602]: udp_send(): invalid > sendtoparameters#012one possible reason is the server is bound to localhost > and#012attempts to send to the net > ERROR: tm [../../core/forward.h:219]: msg_send_buffer(): udp_send failed > > > The error happens because it is trying to probe a NAP using a socket that > isn't active at the moment in the machine. > > Is there a way for this error not to be logged or be disabled without > reducing Log Level to suppress CRITICAL errors? > I think this is a standard High Availability configuration. Is there some > setting that can disable this kind of errors? > > Best Regards, > > Duarte Rocha > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Udp errors on High Availability Setup
Thank you for your answer. I forgot to mention, the Probing is being done by the dispatcher module and this is a Kamailio that works without registration A quarta, 8/05/2019, 13:04, Duarte Rocha escreveu: > Greetings, > > I have two Machines with Kamailio in a High Availability (HA) > configuration. Both machines are active and processing calls and both have > one HA IP that can jump to the other machine in case of failure. > > I also have probing for NAPs configured with each IP as the socket. > > So, in each machine i have this configuration : > > listen=udp:HA_Address1 > listen=udp:HA_Address2 > > NAP 1 being probed from socket HA_Address1 > NAP 1 being probed from socket HA_Address2 > > I also have /proc/sys/net/ipv4/ip_nonlocal_bind with value 1. > > Everything works correctly with this configuration. However when the > probing is sent for the NAP' my logs get filled with the same error > messages. > > udp_send(): sendto(sock, buf: 0x7f2d4c91fa18, len: 340, 0, dst: > (xxx.xxx.xxx.xxx:xxx), tolen: 16) - err: Invalid argument (22) > CRITICAL: [core/udp_server.c:602]: udp_send(): invalid > sendtoparameters#012one possible reason is the server is bound to localhost > and#012attempts to send to the net > ERROR: tm [../../core/forward.h:219]: msg_send_buffer(): udp_send failed > > > The error happens because it is trying to probe a NAP using a socket that > isn't active at the moment in the machine. > > Is there a way for this error not to be logged or be disabled without > reducing Log Level to suppress CRITICAL errors? > I think this is a standard High Availability configuration. Is there some > setting that can disable this kind of errors? > > Best Regards, > > Duarte Rocha > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Udp errors on High Availability Setup
Greetings, I have two Machines with Kamailio in a High Availability (HA) configuration. Both machines are active and processing calls and both have one HA IP that can jump to the other machine in case of failure. I also have probing for NAPs configured with each IP as the socket. So, in each machine i have this configuration : listen=udp:HA_Address1 listen=udp:HA_Address2 NAP 1 being probed from socket HA_Address1 NAP 1 being probed from socket HA_Address2 I also have /proc/sys/net/ipv4/ip_nonlocal_bind with value 1. Everything works correctly with this configuration. However when the probing is sent for the NAP' my logs get filled with the same error messages. udp_send(): sendto(sock, buf: 0x7f2d4c91fa18, len: 340, 0, dst: (xxx.xxx.xxx.xxx:xxx), tolen: 16) - err: Invalid argument (22) CRITICAL: [core/udp_server.c:602]: udp_send(): invalid sendtoparameters#012one possible reason is the server is bound to localhost and#012attempts to send to the net ERROR: tm [../../core/forward.h:219]: msg_send_buffer(): udp_send failed The error happens because it is trying to probe a NAP using a socket that isn't active at the moment in the machine. Is there a way for this error not to be logged or be disabled without reducing Log Level to suppress CRITICAL errors? I think this is a standard High Availability configuration. Is there some setting that can disable this kind of errors? Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Direction of replies
Greetings, Is there a way to know in reply_route if a reply has direction downstream or upstream regarding the first INVITE? I know there are vars and methods for finding this out on requests, but i can't find anything for replies. Thanks in advance, Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Route header
Greetings, Is there a difference for Kamailio between these 2 situations. 1 - Method with 2 Route Headers, each one with one address and one uri 2 - Method with 1 Route Header that includes 2 Route URI Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Statistics of received replies
Greetings, Does Kamailio have statistics like the sl.stats but for received replies instead of locally generated ones? I want to be able to look at how many "491" replies i'm receiving, for example. Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Uri's user part parameters
Greetings, Does Kamailio have a way of identifying the user-part parameters of an URI? I have situations where i have sip:user;parameter=yes@host. Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Extract URI from Headers
Greetings Daniel, Thank you for your answer. I've tried and everything works fine, except for the tobody.params transformation that fails to retrieve the parameters. Thank you for your help, this saved me a lot of work :) Cheers A segunda, 25/03/2019, 19:47, Daniel-Constantin Mierla escreveu: > Hello, > > you just need to use tobody transformations: > > * > https://www.kamailio.org/wiki/cookbooks/5.2.x/transformations#to-body_transformations > > Cheers, > Daniel > On 25.03.19 19:13, Duarte Rocha wrote: > > Greetings, > > In my SBC i usually have to do operations on P-Asserted-Identity and > Contact header. > > For those operations i usually have to get the user part, domain, etc. For > that i'm using the URI Transformations provided by Kamailio. > However, in order to do this i have to trim the header value by hand in > order to remove brackets, display infos, etc. > > Does Kamailio have a method for extracting the URI from those kinds of > headers? > > Best Regards, > > Duarte Rocha > > ___ > Kamailio (SER) - Users Mailing > Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > -- > Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- > www.linkedin.com/in/miconda > Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com > Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- > www.asipto.com > > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Extract URI from Headers
Greetings, In my SBC i usually have to do operations on P-Asserted-Identity and Contact header. For those operations i usually have to get the user part, domain, etc. For that i'm using the URI Transformations provided by Kamailio. However, in order to do this i have to trim the header value by hand in order to remove brackets, display infos, etc. Does Kamailio have a method for extracting the URI from those kinds of headers? Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] User part on contact header
Greetings, On an INVITE the user part in the Contact header mandatory? Can't seem to find info on this. Best regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Add default ports to URIs
Greetings Alex, I know about the RFC and i don't think the issue here is with about the Uri Comparison. The reason here is that a client is requiring this feature even though the RFC doesn't requires it. Best regards A terça, 12/03/2019, 19:15, Duarte Rocha escreveu: > Greetings, > > When i receive a message in Kamailio i want to add "5060" to the URI's > port info when it's value is not specified. > > I can do it with pseudovariables but i was wondering if there's any config > or setting that would do this automatically? > > Best Regards, > > Duarte Rocha > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] SQlite in memory
I use database for lots of configs. On any given first request i do around 10 queries. A while ago i measured the processing time (using bm_timer) when i was still using MySql and got times of around 6ms per first Invite and around 2ms for other in-dialog requests. While i think those are big processing times, i don't think they should be the problem at a rate as low as 20CPS. Thank you for your help :) A quarta, 27/02/2019, 18:35, Duarte Rocha escreveu: > Ok, i reduced the number of processes and tried a few different values, > but the performance hasn't changed a lot. > > How can i debug this and find the bottleneck in my system? > > A quarta, 27/02/2019, 17:56, Duarte Rocha > escreveu: > >> Greetings Alex, >> >> At the moment i'm trying to debug some issues with the server and try >> some solutions to see the impact. >> With little load i'm getting some percentage of "503 Server Unavaliable" >> errors from Kamailio. I made some testing without using database for >> anything but Dispatcher and Accounting and the performance got way better. >> >> Right now, on this server, under as little as 20CPS Kamailio is returning >> "503" on 1-2% of all calls. However, my CPU and Memory look like this: >> >> %Cpu(s): 20.3 us, 6.1 sy, 0.0 ni, 73.3 id, 0.0 wa, 0.0 hi, 0.2 si, 0.2 st >> >> >> Memory : >> >> total used free shared buff/cache available >> Mem: 1830 1172 382 109 274 375 >> Swap: 819 49 770 >> >> I have around 100 processes for Kamailio. >> >> Cheers >> > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] SQlite in memory
Ok, i reduced the number of processes and tried a few different values, but the performance hasn't changed a lot. How can i debug this and find the bottleneck in my system? A quarta, 27/02/2019, 17:56, Duarte Rocha escreveu: > Greetings Alex, > > At the moment i'm trying to debug some issues with the server and try some > solutions to see the impact. > With little load i'm getting some percentage of "503 Server Unavaliable" > errors from Kamailio. I made some testing without using database for > anything but Dispatcher and Accounting and the performance got way better. > > Right now, on this server, under as little as 20CPS Kamailio is returning > "503" on 1-2% of all calls. However, my CPU and Memory look like this: > > %Cpu(s): 20.3 us, 6.1 sy, 0.0 ni, 73.3 id, 0.0 wa, 0.0 hi, 0.2 si, 0.2 st > > > Memory : > > total used free shared buff/cache available > Mem: 1830 1172 382 109 274 375 > Swap: 819 49 770 > > I have around 100 processes for Kamailio. > > Cheers > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] SQlite in memory
Greetings Alex, At the moment i'm trying to debug some issues with the server and try some solutions to see the impact. With little load i'm getting some percentage of "503 Server Unavaliable" errors from Kamailio. I made some testing without using database for anything but Dispatcher and Accounting and the performance got way better. Right now, on this server, under as little as 20CPS Kamailio is returning "503" on 1-2% of all calls. However, my CPU and Memory look like this: %Cpu(s): 20.3 us, 6.1 sy, 0.0 ni, 73.3 id, 0.0 wa, 0.0 hi, 0.2 si, 0.2 st Memory : total used free shared buff/cache available Mem: 1830 1172 382 109 274 375 Swap: 819 49 770 I have around 100 processes for Kamailio. Cheers ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] SQlite in memory
Greetings, I'm trying to use SQlite as my engine in order to improve performance. I would like to have my Database stored in memory for faster access. I see that Kamailio can open the SQlite database as Read-Only, but i can't find a way to open it in memory. Is this possible using Kamailio? What's the best way to do this? Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Rows return in sql_xquery()
Greetings, If I do a query using sql_query() method I can see the number of rows returned with $dbr(ra=>rows). Is there a return with this info using sql_xquery ? Best Regards, Duarte Rocha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users