From faheem2084 at gmail.com Tue Jan 2 11:24:45 2024 From: faheem2084 at gmail.com (Faheem Muhammad) Date: Tue, 2 Jan 2024 15:24:45 +0400 Subject: [OpenSIPS-Users] regular expression matching question Message-ID: Hi everyone, Firstly, I wish you all a Happy New Year with the best wishes for each community member and the OpenSIPS project. I have a question related to regular expressions matching in an IF condition. There are two identical regular expressions. One RE is matching and one RE is not matching the pattern. *Sample $fU Range: *+966123456700 to +96612345650 # RE1 - Matching Regular expression if($fU =~"\+9661234567[0-4][0-9]|\+966123456750"){ xlog("re matched\n") } # RE2 - Non matching Regular expression if($fU ~="\+9661234567([0-4]\d|50)"){ } # RE not matched Can anyone please suggest what I'm doing wrong? *OpenSIPS version*: 3.2.3 OS: *Debian 12* Best regards, M. Faheem -------------- next part -------------- An HTML attachment was scrubbed... URL: From regardt at rain.co.za Tue Jan 2 13:27:00 2024 From: regardt at rain.co.za (Regardt van de Vyver) Date: Tue, 2 Jan 2024 13:27:00 +0000 Subject: [OpenSIPS-Users] Users Digest, Vol 186, Issue 1 In-Reply-To: References: Message-ID: Unsubscribe Get Outlook for iOS ________________________________ From: Users on behalf of users-request at lists.opensips.org Sent: Tuesday, January 2, 2024 2:00:01 PM To: users at lists.opensips.org Subject: Users Digest, Vol 186, Issue 1 CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Send Users mailing list submissions to users at lists.opensips.org To subscribe or unsubscribe via the World Wide Web, visit https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers&data=05%7C02%7Cregardt%40rain.co.za%7Ce223cfc6eba34f93127008dc0b8a6e95%7C5b67f9a1ea53476ba4ed075b7bab99f8%7C0%7C0%7C638397936424461632%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C7000%7C%7C%7C&sdata=ryaCNX5um0S8iT3lPhJIgI2ORiRNfrCbqwmhvGOhoRw%3D&reserved=0 or, via email, send a message with subject or body 'help' to users-request at lists.opensips.org You can reach the person managing the list at users-owner at lists.opensips.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Users digest..." Today's Topics: 1. regular expression matching question (Faheem Muhammad) ---------------------------------------------------------------------- Message: 1 Date: Tue, 2 Jan 2024 15:24:45 +0400 From: Faheem Muhammad To: OpenSIPS users mailling list Subject: [OpenSIPS-Users] regular expression matching question Message-ID: Content-Type: text/plain; charset="utf-8" Hi everyone, Firstly, I wish you all a Happy New Year with the best wishes for each community member and the OpenSIPS project. I have a question related to regular expressions matching in an IF condition. There are two identical regular expressions. One RE is matching and one RE is not matching the pattern. *Sample $fU Range: *+966123456700 to +96612345650 # RE1 - Matching Regular expression if($fU =~"\+9661234567[0-4][0-9]|\+966123456750"){ xlog("re matched\n") } # RE2 - Non matching Regular expression if($fU ~="\+9661234567([0-4]\d|50)"){ } # RE not matched Can anyone please suggest what I'm doing wrong? *OpenSIPS version*: 3.2.3 OS: *Debian 12* Best regards, M. Faheem -------------- next part -------------- An HTML attachment was scrubbed... URL: > ------------------------------ Subject: Digest Footer _______________________________________________ Users mailing list Users at lists.opensips.org https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers&data=05%7C02%7Cregardt%40rain.co.za%7Ce223cfc6eba34f93127008dc0b8a6e95%7C5b67f9a1ea53476ba4ed075b7bab99f8%7C0%7C0%7C638397936424461632%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C7000%7C%7C%7C&sdata=ryaCNX5um0S8iT3lPhJIgI2ORiRNfrCbqwmhvGOhoRw%3D&reserved=0 ------------------------------ End of Users Digest, Vol 186, Issue 1 ************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From callum.guy at x-on.co.uk Tue Jan 2 16:27:43 2024 From: callum.guy at x-on.co.uk (Callum Guy) Date: Tue, 2 Jan 2024 16:27:43 +0000 Subject: [OpenSIPS-Users] regular expression matching question In-Reply-To: References: Message-ID: Hi Faheem, This is a simple case of regex support - I believe OpenSIPs uses Extended Regular Expressions and not Perl Compatible Regular Expressions. Swap out \d with the longer [0-9] format and your expression should match. Happy new year, Callum On Tue, 2 Jan 2024 at 11:27, Faheem Muhammad wrote: > Hi everyone, > > Firstly, I wish you all a Happy New Year with the best wishes for each > community member and the OpenSIPS project. > > I have a question related to regular expressions matching in an IF > condition. > There are two identical regular expressions. One RE is matching and one RE > is not matching the pattern. > > *Sample $fU Range: *+966123456700 to +96612345650 > > # RE1 - Matching Regular expression > if($fU =~"\+9661234567[0-4][0-9]|\+966123456750"){ > xlog("re matched\n") > } > > # RE2 - Non matching Regular expression > if($fU ~="\+9661234567([0-4]\d|50)"){ > } # RE not matched > > Can anyone please suggest what I'm doing wrong? > > *OpenSIPS version*: 3.2.3 > OS: *Debian 12* > > > Best regards, > M. Faheem > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Take the survey *0333 332 0000  |  x-on.co.uk   |   **      **  |  **Practice Index Reviews * *Our new office address: 22 Riduna Park, Melton IP12 1QT.* X-on is a trading name of X-on Health Ltd a limited company registered in England and Wales. Registered Office : Glebe Farm, Down Street, Dummer, Basingstoke, Hampshire, England RG25 2AD. Company Registration No. 2578478. The information in this e-mail is confidential and for use by the addressee(s) only. If you are not the intended recipient, please notify X-on immediately on +44(0)333 332 0000 and delete the message from your computer. If you are not a named addressee you must not use, disclose, disseminate, distribute, copy, print or reply to this email. Views or opinions expressed by an individual within this email may not necessarily reflect the views of X-on or its associated companies. Although X-on routinely screens for viruses, addressees should scan this email and any attachments for viruses. X-on makes no representation or warranty as to the absence of viruses in this email or any attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcrans at gmail.com Wed Jan 3 14:33:16 2024 From: mcrans at gmail.com (Michel crans) Date: Wed, 3 Jan 2024 15:33:16 +0100 Subject: [OpenSIPS-Users] regular expression matching question In-Reply-To: References: Message-ID: The reason why your second regular expression is not matching the pattern is because of a typo in the syntax. You have used the ~= operator instead of the =~ operator, which is the correct way to test if a string matches a regular expression in PCRE. Op di 2 jan 2024 om 12:28 schreef Faheem Muhammad : > Hi everyone, > > Firstly, I wish you all a Happy New Year with the best wishes for each > community member and the OpenSIPS project. > > I have a question related to regular expressions matching in an IF > condition. > There are two identical regular expressions. One RE is matching and one RE > is not matching the pattern. > > *Sample $fU Range: *+966123456700 to +96612345650 > > # RE1 - Matching Regular expression > if($fU =~"\+9661234567[0-4][0-9]|\+966123456750"){ > xlog("re matched\n") > } > > # RE2 - Non matching Regular expression > if($fU ~="\+9661234567([0-4]\d|50)"){ > } # RE not matched > > Can anyone please suggest what I'm doing wrong? > > *OpenSIPS version*: 3.2.3 > OS: *Debian 12* > > > Best regards, > M. Faheem > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Fri Jan 5 10:55:26 2024 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Fri, 5 Jan 2024 12:55:26 +0200 Subject: [OpenSIPS-Users] uac_replace_from in CANCEL In-Reply-To: References: <7a5cd98b-4123-40d2-8dd2-32b23131d7bd@opensips.org> Message-ID: <40f20910-463c-4b7d-9bc5-7aa045b02d75@opensips.org> Hi Jason, For changing the FROM hdr (at INVITE time), better use the uac_replace_from() function [1] - by doing this, the TM will become aware of the change and reflect it into CANCEL too. [1] https://opensips.org/html/docs/modules/3.4.x/uac.html#func_uac_replace_from Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com https://www.siphub.com On 24.12.2023 13:33, nz deals wrote: > Hi Bogdan, > Agreed that the RFC3261 CANCEL is truly built using INVITE. In my > case, somehow CANCEL is not the same as the initial INVITE. Due to the > complexity of my case I have hard times to fix the issue. Let me > explain a bit. > On the INVITE i change the From Header, which i can see has also been > changed during Authorization. > If i CANCEL then the From header is different (it's the same as i have > before making my change). > > I am also using topology_hiding(). > > > under the main route i change the From header for INVITE > >         set_advertised_address("104.13.xx.xx "); # same as i have used > in the advertised_address >         # this is my cancel processing >         if (is_method("CANCEL")) { >                 if (t_check_trans()) >                         t_relay(8); >                 exit; >         } >         if (has_totag()) { >             if(topology_hiding_match())  { >                                    # remove and add a custom one >                                    remove_hf("From"); >                                    append_hf("From: > \"$fU\";tag=$ft\r\n"); >  force_send_socket("tls:192.xx.xx.xx:5061"); >              } >         } > My opensips version is 3.4.2 > My listening socket is socket=tls:ens192:5061 tag ens192  (its the > same 192.xx.xx.xx IP that you see in the force_send_socket) > I am also using public ip as follows > advertised_address=104.13.xx.xx > alias=104.13.xx.xx > > Regards, > Jason > > On Thu, 21 Dec 2023 at 02:31, Bogdan-Andrei Iancu > wrote: > > Hi Jason, > > In transactional stateful SIP, the CANCEL requests are hop by hop > - each hop in the path is generating its own CANCEL requests to > the next hop, which consumes it; there is no actual relaying of > the CANCELs. So, the replacing (which works in relaying mode only) > doesn't fit here. > > Even more, the RFC3261 gives a rigorous way for building the > CANCEL requests, they are to be built 100% based on the INVITE > request only (nothing more). OpenSIPS internally builds the CANCEL > in accordance to the corresponding INVITE, so you should not need > any such changes. > > May you detail why you think you need this FROM replacement? > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > https://www.siphub.com > > On 20.12.2023 12:38, nz deals wrote: >> Hi, >> I've been attempting to modify the From header in the CANCEL, but >> it seems the changes aren't taking effect. I've also experimented >> with remove_hf and append_hf, but unfortunately, these methods >> didn't work either. Could someone kindly offer suggestions if I >> might be overlooking something? >> >> This is in the main request route >> >>         if (is_method("CANCEL")) { >>                 uac_replace_from("","sip:test at test.com >> "); >>                 if (t_check_trans()) >>                         t_relay(8); >>                 exit; >>         } >> >> >> >> Regards, >> Jason >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From faheem2084 at gmail.com Fri Jan 5 11:56:11 2024 From: faheem2084 at gmail.com (Faheem Muhammad) Date: Fri, 5 Jan 2024 15:56:11 +0400 Subject: [OpenSIPS-Users] regular expression matching question In-Reply-To: References: Message-ID: Hi Machel, Appreciate the correction; it was a typo when I posted the question. However, as Callum mentioned earlier, the "IF" condition with the "=~" operator doesn't fully support PCRE. It seems that any regular expression with parentheses isn't matched using the "=~" operator. Using "pcre_match" or an alternative regular expression would be more suitable in this case. Thank you M. Faheem On Wed, Jan 3, 2024 at 6:37 PM Michel crans wrote: > > The reason why your second regular expression is not matching the pattern > is because of a typo in the syntax. You have used the ~= operator instead > of the =~ operator, which is the correct way to test if a string matches > a regular expression in PCRE. > > Op di 2 jan 2024 om 12:28 schreef Faheem Muhammad : > >> Hi everyone, >> >> Firstly, I wish you all a Happy New Year with the best wishes for each >> community member and the OpenSIPS project. >> >> I have a question related to regular expressions matching in an IF >> condition. >> There are two identical regular expressions. One RE is matching and one >> RE is not matching the pattern. >> >> *Sample $fU Range: *+966123456700 to +96612345650 >> >> # RE1 - Matching Regular expression >> if($fU =~"\+9661234567[0-4][0-9]|\+966123456750"){ >> xlog("re matched\n") >> } >> >> # RE2 - Non matching Regular expression >> if($fU ~="\+9661234567([0-4]\d|50)"){ >> } # RE not matched >> >> Can anyone please suggest what I'm doing wrong? >> >> *OpenSIPS version*: 3.2.3 >> OS: *Debian 12* >> >> >> Best regards, >> M. Faheem >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From liviu at opensips.org Mon Jan 8 09:40:13 2024 From: liviu at opensips.org (Liviu Chircu) Date: Mon, 8 Jan 2024 11:40:13 +0200 Subject: [OpenSIPS-Users] mid_register and its possible bad actions with De-REGISTER In-Reply-To: <716391af-fb1a-01a9-e440-34a6e31ec45d@gmail.com> References: <716391af-fb1a-01a9-e440-34a6e31ec45d@gmail.com> Message-ID: On 27.12.2023 11:38, Dmitry Ponomaryov wrote: > > All this to say, it might make sense to add the ability to disable > this De-REGISTER, because with a new registration, we will still send > it a registration with an updated contact before the main registrar > times out, and there will be no problems, that is, for example, the > following settings: > > modparam("mid_registrar", "outgoing_expires", 600) > modparam("mid_registrar", "default_expires", 300) Hello Dmitry, From your scenario, it sounds like maybe you should enable AoR throttling, not just Ct throttling? Because in Ct throttling, each outgoing contact has a unique "ctid=" parameter, so it must be de-registered from the main registrar on each contact replace, since the replacement Contact has a new "ctid=", making it an entirely different SIP URI. On the other hand, AoR throttling goes beyond this and just makes sure there is always 1 AoR registered downstream.  So on a "contact replace" operation,  no SIP signaling should reach the Asterisk in that case. Best regards, -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com OpenSIPS Summit 2024 Valencia, May 14-17 | www.opensips.org/events From liviu at opensips.org Mon Jan 8 10:11:10 2024 From: liviu at opensips.org (Liviu Chircu) Date: Mon, 8 Jan 2024 12:11:10 +0200 Subject: [OpenSIPS-Users] replicate to HEP using the advertised address - OPENSIPS 3.3.9 In-Reply-To: References: Message-ID: <54be016c-9ee6-44b7-a6c9-3599e9538c04@opensips.org> On 26.12.2023 22:54, James Seer wrote: > Aaaa the good old days before commit 4bd50335a (2023-12-12 by Vlad > Paiu), life was simpler when my vip network interface and VIP itself > were just one happy entity in HOMER's eyes :P > > This recent commit with its replication to HEP using the advertised > address has complicated things in homer heplify by treating them as > two different entities in the sip sequence (precisely during ACKs > CANCEL and BYEs). Any chance we could make this an optional feature? Hi James, First of all, VIP issue aside, there seems to be a bug in that patch where the /sourceIP/ and /sourcePort/ are changed to /destinationIP /and /destinationPort/ without a good reason (currently started a discussion with Vlad - we'll get to the bottom of it).  Maybe if this were tweaked, your SIP flows would return back to looking normal?! Nonetheless, if you have a 3.3 source tree to work with, try the following patch onto your root sources directory and see if the behavior improves by just fixing the bug instead of reverting the patch: git apply <(base64 -d < From sj6502621 at gmail.com Mon Jan 8 10:50:32 2024 From: sj6502621 at gmail.com (James Seer) Date: Mon, 8 Jan 2024 11:50:32 +0100 Subject: [OpenSIPS-Users] replicate to HEP using the advertised address - OPENSIPS 3.3.9 In-Reply-To: <54be016c-9ee6-44b7-a6c9-3599e9538c04@opensips.org> References: <54be016c-9ee6-44b7-a6c9-3599e9538c04@opensips.org> Message-ID: Hi Liviu, Thanks for the patch. However I can't apply it as my OpenSIPS is installed as a binary package and not compiled from source. I've also created an issue on GitHub to track this. https://github.com/OpenSIPS/opensips/issues/3276 Le lun. 8 janv. 2024 à 11:13, Liviu Chircu a écrit : > On 26.12.2023 22:54, James Seer wrote: > > Aaaa the good old days before commit 4bd50335a (2023-12-12 by Vlad Paiu), > life was simpler when my vip network interface and VIP itself were just one > happy entity in HOMER's eyes :P > > This recent commit with its replication to HEP using the advertised > address has complicated things in homer heplify by treating them as two > different entities in the sip sequence (precisely during ACKs CANCEL and > BYEs). Any chance we could make this an optional feature? > > Hi James, > > First of all, VIP issue aside, there seems to be a bug in that patch where > the *sourceIP* and *sourcePort* are changed to *destinationIP *and > *destinationPort* without a good reason (currently started a discussion > with Vlad - we'll get to the bottom of it). Maybe if this were tweaked, > your SIP flows would return back to looking normal?! > > Nonetheless, if you have a 3.3 source tree to work with, try the following > patch onto your root sources directory and see if the behavior improves by > just fixing the bug instead of reverting the patch: > > git apply <(base64 -d < > H4sIAAAAAAAAA91Ry26DMBA8w1fsqUoCJpCSZ9U0HxD11lMUWcYPZBUwsk3US/+9hiQNOQT13Is9 > > Hs/ujsdMCgEI5dICmZaKNQU3U6sJ5fqyRRSyRze+rBj/goTN6ex5nq2iKF2ss3XGkiUkcbxIUx8h > > 9LizHwTBQPfdDtAsSVdhEkNwBY40llhJQVYWjKxxpx8Zqxt6JkqTw8QtIXRXWFZC4RraLeyqCp5j > > UZB87IP37YNbDbfYKPqJqSqasjIjYBk+kcIc0mP4i+c9vHBYaFW6eVkjROgjz3Mz0VbTU5S5YDBh > > THNj0Jaw07m58xgVvHq7mnW1rQgm46eB0sthc9MwY7GsQ4C/DhzQ1UrbzV3nlglvrWutrBq/+IHn > > 3RwYTTsHd8SDwuF8l71MVz28dtiqfrpD7x/2/a//pY33GloSHyMHIitL3jLwCi0cvX/s9530B7QY > 9NXwAwAA > EOF > ) > > Best regards, > > -- > Liviu Chircuwww.twitter.com/liviuchircu | www.opensips-solutions.com > OpenSIPS Summit 2024 Valencia, May 14-17 | www.opensips.org/events > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From liviu at opensips.org Mon Jan 8 14:32:13 2024 From: liviu at opensips.org (Liviu Chircu) Date: Mon, 8 Jan 2024 16:32:13 +0200 Subject: [OpenSIPS-Users] uac_auth DB support In-Reply-To: References: Message-ID: <7338ea31-9828-4d42-b7c0-cda5c0791c2c@opensips.org> On 06.12.2023 16:18, S.Rosenberg wrote: > > I would like to know if OpenSIPS has a way to pull the registrant info > via code without manually doing a DB query? Hi Sebastian, A bit late to the party here, but try giving the sql_cacher a spin.  It also works on top of cachedb_local (or any other NoSQL, for that matter...), however it will help you: - cut down on the amount of LoC in your script (just configure the cached table properties in the "modparam" section and you're good to go) - solve the problem of reloading the data (you can configure it with on_demand=300, for example, in order to cache a given row for a maximum of 5 minutes) Best regards, -- Liviu Chircu www.twitter.com/liviuchircu |www.opensips-solutions.com OpenSIPS Summit 2024 Valencia, May 14-17 |www.opensips.org/events -------------- next part -------------- An HTML attachment was scrubbed... URL: From rosenberg11219 at gmail.com Mon Jan 8 18:42:29 2024 From: rosenberg11219 at gmail.com (Schneur Rosenberg) Date: Mon, 8 Jan 2024 13:42:29 -0500 Subject: [OpenSIPS-Users] uac_auth DB support In-Reply-To: <7338ea31-9828-4d42-b7c0-cda5c0791c2c@opensips.org> References: <7338ea31-9828-4d42-b7c0-cda5c0791c2c@opensips.org> Message-ID: Thanks Liviu, BTW it's not Sebastian. it's Schneur AKA Scott :-) On Mon, Jan 8, 2024 at 9:34 AM Liviu Chircu wrote: > > On 06.12.2023 16:18, S.Rosenberg wrote: > > > I would like to know if OpenSIPS has a way to pull the registrant info via code without manually doing a DB query? > > Hi Sebastian, > > A bit late to the party here, but try giving the sql_cacher a spin. It also works on top of cachedb_local (or any other NoSQL, for that matter...), however it will help you: > > - cut down on the amount of LoC in your script (just configure the cached table properties in the "modparam" section and you're good to go) > > - solve the problem of reloading the data (you can configure it with on_demand=300, for example, in order to cache a given row for a maximum of 5 minutes) > > Best regards, > > -- > Liviu Chircu > www.twitter.com/liviuchircu | www.opensips-solutions.com > OpenSIPS Summit 2024 Valencia, May 14-17 | www.opensips.org/events > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From iamhalje at gmail.com Tue Jan 9 05:15:04 2024 From: iamhalje at gmail.com (Dmitry Ponomaryov) Date: Tue, 9 Jan 2024 10:15:04 +0500 Subject: [OpenSIPS-Users] mid_register and its possible bad actions with De-REGISTER In-Reply-To: References: <716391af-fb1a-01a9-e440-34a6e31ec45d@gmail.com> Message-ID: <1ca1f2c0-1e80-bd67-a11c-b1bffb95a70b@gmail.com> Hello Liviu, In my case, AoR throttling was used, before issue (1), do you also think that this is how it should work? (looks like a CRITICAL) > On the other hand, AoR throttling goes beyond this and just makes sure there is always 1 AoR registered downstream. So on a "contact replace" operation, no SIP signaling should reach the Asterisk in that case. the point is that if different devices are registered under the same AoR, one such De-REGISTER, on the final Asterisk completely deletes the peer, although in some of the locations there is still data and if not for the De-REGISTER, Asterisk would have sent its INVITE, we would go through lookup and call all the devices we need from location via some route, this is the problem that we don’t always need De-REGISTER if there is more than one device under the same AoR(when we don't just reduce REGISTER to the main registrar, but use them as REGISTER from diff devices), which breaks peers on Asterisk with De-REGISTER. but in total, it might be worth making such modparam module mid_registrar to disable De-REGISTER from the OpenSIPS itself, let the registrations themselves expire on the main registrar, and if there is a new registration with a new ctid with ct-throttling schema, then we will simply update peer again... or if someone needs this feature, then let it be possible to choose an interface and not just, for example: socket=1.1.1.1:5060 socket=2.2.2.2:5060 in this case De-REGISTER will go with 1.1.1.1:5060 on main registrar, because it is simply the first one listed socket in cfg. off course, your opinion is needed here, you are developer of this module since 2016 ;) Best regards! (1): https://github.com/OpenSIPS/opensips/issues/3193 On 1/8/24 14:40, Liviu Chircu wrote: > On 27.12.2023 11:38, Dmitry Ponomaryov wrote: >> >> All this to say, it might make sense to add the ability to disable >> this De-REGISTER, because with a new registration, we will still send >> it a registration with an updated contact before the main registrar >> times out, and there will be no problems, that is, for example, the >> following settings: >> >> modparam("mid_registrar", "outgoing_expires", 600) >> modparam("mid_registrar", "default_expires", 300) > > Hello Dmitry, > > From your scenario, it sounds like maybe you should enable AoR > throttling, not just Ct throttling? Because in Ct throttling, each > outgoing contact has a unique "ctid=" parameter, so it must be > de-registered from the main registrar on each contact replace, since > the replacement Contact has a new "ctid=", making it an entirely > different SIP URI. > > On the other hand, AoR throttling goes beyond this and just makes sure > there is always 1 AoR registered downstream.  So on a "contact > replace" operation,  no SIP signaling should reach the Asterisk in > that case. > > Best regards. From guillaume.desgeorge at orange.com Tue Jan 9 09:32:25 2024 From: guillaume.desgeorge at orange.com (guillaume.desgeorge at orange.com) Date: Tue, 9 Jan 2024 09:32:25 +0000 Subject: [OpenSIPS-Users] DNS could not resolve hostname in dispatcher Message-ID: Hi everyone, We are facing a problem with Opensips 3.3 (but I've done tests on opensips 2.4 and it was the same). In the dispatcher, if we have a name instead of an IP address in "destination", and that the DNS falls down, we have an error "could not resolve hostname" in the log. Then, Opensips can't resolve the name, there is no more OPTIONS message sent to the destination but the state stays as 0 and if a call arrives, Opensips still route the INVITE to the last known IP address. I find that's strange : * Either Opensips consider that the DNS is down but the destination may be still up with the last IP address he knows and he could still send OPTIONS messages to the last known IP address * Either Opensips consider that the DNS is down and doesn't send OPTIONS message but in that case he should not send INVITE to the old IP address. I work with a product that has his own DNS and removes the name of the server in the DNS when the machine is down. So everytime the server is down, Opensips can't resolve the name and still send calls to that server... Is there any parameters I can use to change that way of working ? Regards, Guillaume Orange Restricted ____________________________________________________________________________________________________________ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alain.bieuzent at free.fr Tue Jan 9 09:53:37 2024 From: alain.bieuzent at free.fr (Alain Bieuzent) Date: Tue, 09 Jan 2024 10:53:37 +0100 Subject: [OpenSIPS-Users] DNS could not resolve hostname in dispatcher Message-ID: Hi Guillaume, have you tried to cache your DNS queries with the dns_cache module (https://opensips.org/html/docs/modules/3.3.x/dns_cache) ? Regards De : Users au nom de Répondre à : OpenSIPS users mailling list Date : mardi 9 janvier 2024 à 10:35 À : OpenSIPS users mailling list Objet : [OpenSIPS-Users] DNS could not resolve hostname in dispatcher Hi everyone, We are facing a problem with Opensips 3.3 (but I’ve done tests on opensips 2.4 and it was the same). In the dispatcher, if we have a name instead of an IP address in “destination”, and that the DNS falls down, we have an error “could not resolve hostname” in the log. Then, Opensips can’t resolve the name, there is no more OPTIONS message sent to the destination but the state stays as 0 and if a call arrives, Opensips still route the INVITE to the last known IP address. I find that’s strange : Either Opensips consider that the DNS is down but the destination may be still up with the last IP address he knows and he could still send OPTIONS messages to the last known IP address Either Opensips consider that the DNS is down and doesn’t send OPTIONS message but in that case he should not send INVITE to the old IP address. I work with a product that has his own DNS and removes the name of the server in the DNS when the machine is down. So everytime the server is down, Opensips can’t resolve the name and still send calls to that server… Is there any parameters I can use to change that way of working ? Regards, Guillaume Orange Restricted ____________________________________________________________________________________________________________ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you. _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bullehs at gmail.com Tue Jan 9 14:40:55 2024 From: bullehs at gmail.com (HS) Date: Tue, 9 Jan 2024 19:40:55 +0500 Subject: [OpenSIPS-Users] Adding PSTN Gateway in Opensips 3.0 Message-ID: Dear all. Greetings and a Happy New Year. I want to add a PSTN gateway and the carrier expects something like: [PREFIX]PHONENUMBER at SBC.ANVEO.COM. I think I have figured out the [PREFIX] part, but can't seem to add "@sbc.anveo.com" via the dialplan module. There seems to be a validation error on the Opensips CP. According to some old documentation it used to be possible to add something like: sip:\\1 at sbc.anveo.com - but not any more. I have searched about Opensips/Kamailio, read Flavio's book. Is it possible to append the correct domain/URI/@sbc.whatever.com to a phone number dependant on the gateway used? Would this happen in the config? Dialplan? Dynamic Routing? Dispatcher module? I am sure this is really basic - references to any tutorials would be helpful. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rvg at rvgeerligs.nl Tue Jan 9 18:30:26 2024 From: rvg at rvgeerligs.nl (rvg at rvgeerligs.nl) Date: Tue, 09 Jan 2024 18:30:26 +0000 Subject: [OpenSIPS-Users] Adding PSTN Gateway in Opensips 3.0 In-Reply-To: References: Message-ID: <1ab6b1b32f2f650ea584f7d68fed5834535d8737@rvgeerligs.nl> Hi, Shouldn't this be done in dynamic routing > Gateway | Carriers? Regards, Ronald Geerligs PS I registered at anveo for an account too. January 9, 2024 at 11:40 AM, "HS" wrote: > > Dear all. > > Greetings and a Happy New Year. I want to add a PSTN gateway and the carrier expects something like: [PREFIX]PHONENUMBER at SBC.ANVEO.COM. I think I have figured out the [PREFIX] part, but can't seem to add "@sbc.anveo.com http://sbc.anveo.com/ " via the dialplan module. There seems to be a validation error on the Opensips CP. According to some old documentation it used to be possible to add something like: sip:\\1 at sbc.anveo.com - but not any more. I have searched about Opensips/Kamailio, read Flavio's book. > > Is it possible to append the correct domain/URI/@sbc.whatever.com http://sbc.whatever.com/ to a phone number dependant on the gateway used? Would this happen in the config? Dialplan? Dynamic Routing? Dispatcher module? > > I am sure this is really basic - references to any tutorials would be helpful. > > Thanks. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yonge.liu at moz.com Wed Jan 10 15:46:34 2024 From: yonge.liu at moz.com (Yonge Liu) Date: Wed, 10 Jan 2024 10:46:34 -0500 Subject: [OpenSIPS-Users] SIPssert test tool tryout Message-ID: Hi All, I am trying to experiment with SIPssert test tool. By following the guide here: https://github.com/OpenSIPS/SIPssert, I am having issue to run the tool: ubuntu:~$ *sipssert /home/ubuntu/tests/opensips/* Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 700, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 395, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/lib/python3.10/http/client.py", line 1283, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1329, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output self.send(msg) File "/usr/lib/python3.10/http/client.py", line 976, in send self.connect() File "/usr/lib/python3/dist-packages/docker/transport/unixconn.py", line 30, in connect sock.connect(self.unix_socket) FileNotFoundError: [Errno 2] No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 756, in urlopen retries = retries.increment( File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 532, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/lib/python3/dist-packages/six.py", line 718, in reraise raise value.with_traceback(tb) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 700, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 395, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/lib/python3.10/http/client.py", line 1283, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1329, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output self.send(msg) File "/usr/lib/python3.10/http/client.py", line 976, in send self.connect() File "/usr/lib/python3/dist-packages/docker/transport/unixconn.py", line 30, in connect sock.connect(self.unix_socket) urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/docker/api/client.py", line 214, in _retrieve_server_version return self.version(api_version=False)["ApiVersion"] File "/usr/lib/python3/dist-packages/docker/api/daemon.py", line 181, in version return self._result(self._get(url), json=True) File "/usr/lib/python3/dist-packages/docker/utils/decorators.py", line 46, in inner return f(self, *args, **kwargs) File "/usr/lib/python3/dist-packages/docker/api/client.py", line 237, in _get return self.get(url, **self._set_request_timeout(kwargs)) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 557, in get return self.request('GET', url, **kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 544, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 657, in send r = adapter.send(request, **kwargs) File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/bin/sipssert", line 4, in __import__('pkg_resources').run_script('sipssert==0.1.0', 'sipssert') File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 656, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1453, in run_script exec(code, namespace, namespace) File "/usr/local/lib/python3.10/dist-packages/sipssert-0.1.0-py3.10.egg/EGG-INFO/scripts/sipssert", line 9, in run_test_sipssert() File "/usr/local/lib/python3.10/dist-packages/sipssert-0.1.0-py3.10.egg/EGG-INFO/scripts/sipssert", line 6, in run_test_sipssert main.main() File "/usr/local/lib/python3.10/dist-packages/sipssert-0.1.0-py3.10.egg/sipssert/main.py", line 77, in main ctrl = controller.Controller(args) File "/usr/local/lib/python3.10/dist-packages/sipssert-0.1.0-py3.10.egg/sipssert/controller.py", line 56, in __init__ self.docker = docker.from_env() File "/usr/lib/python3/dist-packages/docker/client.py", line 96, in from_env return cls( File "/usr/lib/python3/dist-packages/docker/client.py", line 45, in __init__ self.api = APIClient(*args, **kwargs) File "/usr/lib/python3/dist-packages/docker/api/client.py", line 197, in __init__ self._version = self._retrieve_server_version() File "/usr/lib/python3/dist-packages/docker/api/client.py", line 221, in _retrieve_server_version raise DockerException( docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) Attachments are the files in /home/ubuntu/tests/opensips/. Not sure what I am missing. Appreciate any guide to make this tool work. Thank you very much, Yonge -- This email, its contents and attachments contain information from Ziff Davis, Inc. and/or its affiliates which may be privileged, confidential or otherwise protected from disclosure. The information is intended to be for the addressee(s) only. If you are not an addressee, any disclosure, copy, distribution or use of the contents of this message is prohibited. If you have received this email in error, please notify the sender by reply email and delete the original message and any copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: scenario.yml Type: application/octet-stream Size: 75 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: config.yml Type: application/octet-stream Size: 58 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: global.yml Type: application/octet-stream Size: 87 bytes Desc: not available URL: From alain.bieuzent at free.fr Wed Jan 10 15:55:30 2024 From: alain.bieuzent at free.fr (Alain Bieuzent) Date: Wed, 10 Jan 2024 16:55:30 +0100 Subject: [OpenSIPS-Users] dispatcher ds_list "full" parameter Message-ID: <49AC253F-BB9C-4034-B201-187EAD9D14BC@free.fr> Hi All, On dispatcher module, exported mi function ds_list can have 2 optional parameters (full and partition) When I tried to use these parameters with opensips-cli, it returns an error message : root at lbsip-test:~# opensips-cli -x mi ds_list full ERROR: command 'ds_list' returned: -32602: Invalid params (Ambiguous call, use named parameters instead) I didn't understand the documentation or is there a bug? PS : I’m using opensips 3.3.6 Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Wed Jan 10 16:05:52 2024 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Wed, 10 Jan 2024 18:05:52 +0200 Subject: [OpenSIPS-Users] dispatcher ds_list "full" parameter In-Reply-To: <49AC253F-BB9C-4034-B201-187EAD9D14BC@free.fr> References: <49AC253F-BB9C-4034-B201-187EAD9D14BC@free.fr> Message-ID: <368a2391-aa39-43fe-8841-aae757ff5f31@opensips.org> Hi Alain, As both parameters (partition and full) are optional, you need to pass the name and value of the param (if only one param is passed), otherwise OpenSIPS will have no idea if the value belongs to partition or full Try `opensips-cli -x mi ds_list full=1` , where "full" is the name of the param and "1" is its value. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com https://www.siphub.com On 10.01.2024 17:55, Alain Bieuzent wrote: > > Hi All, > > On dispatcher module, exported mi function ds_list can have 2 optional > parameters (full and partition) > > When I tried to use these parameters with opensips-cli, it returns an > error message : > > root at lbsip-test:~# opensips-cli -x mi ds_list full > > ERROR: command 'ds_list' returned: -32602: Invalid params (Ambiguous > call, use named parameters instead) > > I didn't understand the documentation or is there a bug? > > PS : I’m using opensips 3.3.6 > > Regards > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Wed Jan 10 16:09:42 2024 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Wed, 10 Jan 2024 18:09:42 +0200 Subject: [OpenSIPS-Users] Adding PSTN Gateway in Opensips 3.0 In-Reply-To: References: Message-ID: Hi and A Happy New Year too, IF you use the drouting module for routing to GWs, the module will automatically replace the host part of the RURI with the address of the GW you configured in the Drouting module. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com https://www.siphub.com On 09.01.2024 16:40, HS wrote: > Dear all. > > Greetings and a Happy New Year. I want to add a PSTN gateway and the > carrier expects something like: [PREFIX]PHONENUMBER at SBC.ANVEO.COM. I > think I have figured out the [PREFIX] part, but can't seem to add > "@sbc.anveo.com " via the dialplan module. There > seems to be a validation error on the Opensips CP. According to some > old documentation it used to be possible to add something like: > sip:\\1 at sbc.anveo.com - but not any more. I have searched about > Opensips/Kamailio, read Flavio's book. > > Is it possible to append the correct domain/URI/@sbc.whatever.com > to a phone number dependant on the gateway > used? Would this happen in the config? Dialplan? Dynamic Routing? > Dispatcher module? > > I am sure this is really basic - references to any tutorials would be > helpful. > > Thanks. > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From alain.bieuzent at free.fr Wed Jan 10 16:16:19 2024 From: alain.bieuzent at free.fr (Alain Bieuzent) Date: Wed, 10 Jan 2024 17:16:19 +0100 Subject: [OpenSIPS-Users] dispatcher ds_list "full" parameter In-Reply-To: <368a2391-aa39-43fe-8841-aae757ff5f31@opensips.org> References: <49AC253F-BB9C-4034-B201-187EAD9D14BC@free.fr> <368a2391-aa39-43fe-8841-aae757ff5f31@opensips.org> Message-ID: Thanks bogdan De : Bogdan-Andrei Iancu Date : mercredi 10 janvier 2024 à 17:06 À : OpenSIPS users mailling list , Alain Bieuzent Objet : Re: [OpenSIPS-Users] dispatcher ds_list "full" parameter Hi Alain, As both parameters (partition and full) are optional, you need to pass the name and value of the param (if only one param is passed), otherwise OpenSIPS will have no idea if the value belongs to partition or full Try `opensips-cli -x mi ds_list full=1` , where "full" is the name of the param and "1" is its value. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer   https://www.opensips-solutions.com   https://www.siphub.com On 10.01.2024 17:55, Alain Bieuzent wrote: Hi All, On dispatcher module, exported mi function ds_list can have 2 optional parameters (full and partition) When I tried to use these parameters with opensips-cli, it returns an error message : root at lbsip-test:~# opensips-cli -x mi ds_list full ERROR: command 'ds_list' returned: -32602: Invalid params (Ambiguous call, use named parameters instead) I didn't understand the documentation or is there a bug? PS : I’m using opensips 3.3.6 Regards _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Wed Jan 10 16:27:36 2024 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Wed, 10 Jan 2024 18:27:36 +0200 Subject: [OpenSIPS-Users] DNS could not resolve hostname in dispatcher In-Reply-To: References: Message-ID: <50525c12-d3f9-4f3a-98d6-c8478248dd7b@opensips.org> Hi Guillaume, Indeed, a weird one, not marking the destination as failed upon failure to ping it. I checked the drouting module and it is doing such disable, so it might be a overlook in the dispatcher module. Please open a bug report on the github tracker, so we can address this issue. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com https://www.siphub.com On 09.01.2024 11:32, guillaume.desgeorge at orange.com wrote: > > Hi everyone, > > We are facing a problem with Opensips 3.3 (but I’ve done tests on > opensips 2.4 and it was the same). > > In the dispatcher, if we have a name instead of an IP address in > “destination”, and that the DNS falls down, we have an error “could > not resolve hostname” in the log. Then, Opensips can’t resolve the > name, there is no more OPTIONS message sent to the destination but the > state stays as 0 and if a call arrives, Opensips still route the > INVITE to the last known IP address. > > I find that’s strange : > > * Either Opensips consider that the DNS is down but the destination > may be still up with the last IP address he knows and he could > still send OPTIONS messages to the last known IP address > * Either Opensips consider that the DNS is down and doesn’t send > OPTIONS message but in that case he should not send INVITE to the > old IP address. > > I work with a product that has his own DNS and removes the name of the > server in the DNS when the machine is down. So everytime the server is > down, Opensips can’t resolve the name and still send calls to that server… > > Is there any parameters I can use to change that way of working ? > > Regards, > >     Guillaume > > Orange Restricted > > ____________________________________________________________________________________________________________ > Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc > pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler > a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, > Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. > > This message and its attachments may contain confidential or privileged information that may be protected by law; > they should not be distributed, used or copied without authorisation. > If you have received this email in error, please notify the sender and delete this message and its attachments. > As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. > Thank you. > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From trevor at webon.co.za Thu Jan 11 13:55:06 2024 From: trevor at webon.co.za (trevor at webon.co.za) Date: Thu, 11 Jan 2024 15:55:06 +0200 Subject: [OpenSIPS-Users] $DLG_lifetime but in ms Message-ID: <44c6cdf3c71f1bf340508ee940a81938f976ed9b.camel@webon.co.za> Hi All,  I have a simple issue I need to solve but cant seem to fine a elegant way of resolving. I am using acc module + rate_cacher to do some simple billing. I use $DLG_lifetime but this value seems to be a rounded to the nearest second what I need is to round up to the nearest second similar to how ACC module calculates duration Here is an example CDR *************************** 1. row *************************** duration: 35 ms_duration: 34168 billed_duration: 34 As you can see duration is rounded up and billed_duration is rounded down. Is there any way to get access to the ms of the dialogue from any module, I could resort to initializing my own timers but there is already a timer running in the acc module and would be more efficient to just use it. Here is how I am creating billed_duration if (has_totag()) { .... .... .... if (is_method("BYE")) { if ($DLG_lifetime == 0) { $acc_extra(billed_duration) = 1; }else{ $acc_extra(billed_duration) = $DLG_lifetime; } } route(RELAY); exit; } Thanks Trevor Steyn From bullehs at gmail.com Fri Jan 12 09:37:16 2024 From: bullehs at gmail.com (HS) Date: Fri, 12 Jan 2024 14:37:16 +0500 Subject: [OpenSIPS-Users] Adding PSTN Gateway in Opensips 3.0 Message-ID: Hi all. Thanks a lot @Bogdan-Andrei Iancu , once you confirmed that it appends the correct domain, I had to play around with the dialplan and config and made it work. @Ronald - thanks. Hope it works for you too. Best. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.desgeorge at orange.com Fri Jan 12 09:56:15 2024 From: guillaume.desgeorge at orange.com (guillaume.desgeorge at orange.com) Date: Fri, 12 Jan 2024 09:56:15 +0000 Subject: [OpenSIPS-Users] DNS could not resolve hostname in dispatcher In-Reply-To: References: Message-ID: Hi Alain, Thank you for your help and your suggestion. We are trying to implement DNS_CACHE module with a record "oms" in etc/hosts (same in dispatcher) and Opensips doesn't resolve the name when DNS_CACHE is activated. Here are our declarations in opensips.cfg file : ### DNS CACHE MODULE ###loadmodule "cachedb_local.so" loadmodule "cachedb_sql.so" loadmodule "dns_cache.so" modparam("cachedb_sql", "cachedb_url", "sql:mysql://opensips:opensipsrw at ossdb/opensips") modparam("cachedb_sql", "db_table","cachedb") modparam("dns_cache", "cachedb_url", "sql:mysql://opensips:opensipsrw at ossdb/opensips") Here are the logs : CRITICAL:core:mk_proxy: could not resolve hostname: "oms" Jan 12 10:47:52 [37] ERROR:dispatcher:add_dest2list: could not resolve oms, skipping it Jan 12 10:47:52 [37] WARNING:dispatcher:ds_load_data: failed to add destination sip:oms:5060 in group 100 Jan 12 10:47:52 [37] WARNING:dispatcher:ds_load_data: No record loaded from db, running on empty sets There is another name ("rtpe") declared in etc/hosts is also used in opensips.cfg and there is no problem to resolve it. The problem seams to be only in dispatcher. Are we missing something in our way of using it ? Regards, Guillaume De : Users De la part de Alain Bieuzent Envoyé : mardi 9 janvier 2024 10:54 À : OpenSIPS users mailling list Objet : Re: [OpenSIPS-Users] DNS could not resolve hostname in dispatcher Hi Guillaume, have you tried to cache your DNS queries with the dns_cache module (https://opensips.org/html/docs/modules/3.3.x/dns_cache) ? Regards De : Users > au nom de > Répondre à : OpenSIPS users mailling list > Date : mardi 9 janvier 2024 à 10:35 À : OpenSIPS users mailling list > Objet : [OpenSIPS-Users] DNS could not resolve hostname in dispatcher Hi everyone, We are facing a problem with Opensips 3.3 (but I've done tests on opensips 2.4 and it was the same). In the dispatcher, if we have a name instead of an IP address in "destination", and that the DNS falls down, we have an error "could not resolve hostname" in the log. Then, Opensips can't resolve the name, there is no more OPTIONS message sent to the destination but the state stays as 0 and if a call arrives, Opensips still route the INVITE to the last known IP address. I find that's strange : * Either Opensips consider that the DNS is down but the destination may be still up with the last IP address he knows and he could still send OPTIONS messages to the last known IP address * Either Opensips consider that the DNS is down and doesn't send OPTIONS message but in that case he should not send INVITE to the old IP address. I work with a product that has his own DNS and removes the name of the server in the DNS when the machine is down. So everytime the server is down, Opensips can't resolve the name and still send calls to that server... Is there any parameters I can use to change that way of working ? Regards, Guillaume Orange Restricted ____________________________________________________________________________________________________________ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you. _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ____________________________________________________________________________________________________________ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rvg at rvgeerligs.nl Sat Jan 13 00:56:42 2024 From: rvg at rvgeerligs.nl (rvg at rvgeerligs.nl) Date: Sat, 13 Jan 2024 00:56:42 +0000 Subject: [OpenSIPS-Users] Adding PSTN Gateway in Opensips 3.0 In-Reply-To: References: Message-ID: <9b78647377ddaae3d4850afc3e8e9218e339d07a@rvgeerligs.nl> Thx, But I have it working allready and I have a choise of PSTN gateways too. Regards January 12, 2024 at 6:37 AM, "HS" wrote: > > Hi all. > > Thanks a lot @Bogdan-Andrei Iancu, once you confirmed that it appends the correct domain, I had to play around with the dialplan and config and made it work. > > @Ronald - thanks. Hope it works for you too. > > Best. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rvg at rvgeerligs.nl Sat Jan 13 20:37:52 2024 From: rvg at rvgeerligs.nl (rvg at rvgeerligs.nl) Date: Sat, 13 Jan 2024 20:37:52 +0000 Subject: [OpenSIPS-Users] pn push notifications Message-ID: Hi All, I am trying to implement an opensips server 3.4 with pn support. Primarily apple push notifications. Later I will try google. Does any one have this implemented yet? Where can I find an example cfg for opensips? Any help is appreciated. Regards, Ronald Geerligs -------------- next part -------------- An HTML attachment was scrubbed... URL: From igorolhovskiy at gmail.com Sun Jan 14 17:00:31 2024 From: igorolhovskiy at gmail.com (Ihor Olkhovskyi) Date: Sun, 14 Jan 2024 18:00:31 +0100 Subject: [OpenSIPS-Users] Removing header by contents Message-ID: <90b1cb29-f628-4480-b789-155897126d0c@gmail.com> Hello! Is there any easy possibility to remove header not by name, but name and contents or just header number? I have several Route headers and want to remove the first one only. For the moment I'm thinking to remove all headers and add all but the first in the loop, but maybe it's an overkill? P.S.: Why I'm doing this - trying to implement own loose_route for some experiments Thanks in advance, Ihor From ag at ag-projects.com Sun Jan 14 18:13:47 2024 From: ag at ag-projects.com (Adrian Georgescu) Date: Sun, 14 Jan 2024 15:13:47 -0300 Subject: [OpenSIPS-Users] pn push notifications In-Reply-To: References: Message-ID: <2FE28EAA-BFF2-4913-A19B-BED2789B79FF@ag-projects.com> There are many ways of implementing push notifications with OpenSIPS. This is how we implemented it. https://github.com/AGProjects/sylk-pushserver/blob/master/config/opensips.cfg — Adrian > On 13 Jan 2024, at 17:37, rvg at rvgeerligs.nl wrote: > > Hi All, > > > I am trying to implement an opensips server 3.4 with pn support. Primarily apple push notifications. Later I will try google. > > Does any one have this implemented yet? > > Where can I find an example cfg for opensips? > > Any help is appreciated. > > > Regards, > > > Ronald Geerligs > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From rvg at rvgeerligs.nl Sun Jan 14 23:33:32 2024 From: rvg at rvgeerligs.nl (rvg at rvgeerligs.nl) Date: Sun, 14 Jan 2024 23:33:32 +0000 Subject: [OpenSIPS-Users] pn push notifications In-Reply-To: <2FE28EAA-BFF2-4913-A19B-BED2789B79FF@ag-projects.com> References: <2FE28EAA-BFF2-4913-A19B-BED2789B79FF@ag-projects.com> Message-ID: <53b34a75725ab74eede1afe8b4996afa940729c7@rvgeerligs.nl> Thank you very much, Adrian, I noticed it allready. It seems this is a dedicated push server. Does it handle the normal SIP traffic as well? Regards, Ronald January 14, 2024 at 3:13 PM, "Adrian Georgescu" wrote: > > There are many ways of implementing push notifications with OpenSIPS. This is how we implemented it. > > https://github.com/AGProjects/sylk-pushserver/blob/master/config/opensips.cfg > > — > Adrian > > > > > On 13 Jan 2024, at 17:37, rvg at rvgeerligs.nl wrote: > > > > Hi All, > > > > > > I am trying to implement an opensips server 3.4 with pn support. Primarily apple push notifications. Later I will try google. > > > > Does any one have this implemented yet? > > > > Where can I find an example cfg for opensips? > > > > Any help is appreciated. > > > > > > Regards, > > > > > > Ronald Geerligs > > _______________________________________________ > > Users mailing list > > Users at lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.desgeorge at orange.com Mon Jan 15 08:19:34 2024 From: guillaume.desgeorge at orange.com (guillaume.desgeorge at orange.com) Date: Mon, 15 Jan 2024 08:19:34 +0000 Subject: [OpenSIPS-Users] DNS could not resolve hostname in dispatcher In-Reply-To: <50525c12-d3f9-4f3a-98d6-c8478248dd7b@opensips.org> References: <50525c12-d3f9-4f3a-98d6-c8478248dd7b@opensips.org> Message-ID: Hi Bogdan, Thanks for your answer. Issue opened : #3285 Regards, Guillaume Desgeorge De : Bogdan-Andrei Iancu Envoyé : mercredi 10 janvier 2024 17:28 À : OpenSIPS users mailling list ; DESGEORGE Guillaume INNOV/IT-S Objet : Re: [OpenSIPS-Users] DNS could not resolve hostname in dispatcher Hi Guillaume, Indeed, a weird one, not marking the destination as failed upon failure to ping it. I checked the drouting module and it is doing such disable, so it might be a overlook in the dispatcher module. Please open a bug report on the github tracker, so we can address this issue. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com https://www.siphub.com On 09.01.2024 11:32, guillaume.desgeorge at orange.com wrote: Hi everyone, We are facing a problem with Opensips 3.3 (but I've done tests on opensips 2.4 and it was the same). In the dispatcher, if we have a name instead of an IP address in "destination", and that the DNS falls down, we have an error "could not resolve hostname" in the log. Then, Opensips can't resolve the name, there is no more OPTIONS message sent to the destination but the state stays as 0 and if a call arrives, Opensips still route the INVITE to the last known IP address. I find that's strange : 1. Either Opensips consider that the DNS is down but the destination may be still up with the last IP address he knows and he could still send OPTIONS messages to the last known IP address 2. Either Opensips consider that the DNS is down and doesn't send OPTIONS message but in that case he should not send INVITE to the old IP address. I work with a product that has his own DNS and removes the name of the server in the DNS when the machine is down. So everytime the server is down, Opensips can't resolve the name and still send calls to that server... Is there any parameters I can use to change that way of working ? Regards, Guillaume Orange Restricted ____________________________________________________________________________________________________________ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you. _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ____________________________________________________________________________________________________________ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ag at ag-projects.com Mon Jan 15 11:59:55 2024 From: ag at ag-projects.com (Adrian Georgescu) Date: Mon, 15 Jan 2024 08:59:55 -0300 Subject: [OpenSIPS-Users] pn push notifications In-Reply-To: <53b34a75725ab74eede1afe8b4996afa940729c7@rvgeerligs.nl> References: <2FE28EAA-BFF2-4913-A19B-BED2789B79FF@ag-projects.com> <53b34a75725ab74eede1afe8b4996afa940729c7@rvgeerligs.nl> Message-ID: <6C0F9AFC-196F-40B9-9E30-3ECB53DB65FF@ag-projects.com> OpenSIPS handles the SIP traffic, of course. The push server just handles multiple combinations of apps/ push services in an easier way. You could do a lot or all that its needed just from within OpenSIPS but as the number of combinations of apps and services grow another layer of abstraction make it easier to manage, plus you eliminate another possible blocking item from your routes as the works are down asynchronously outside OpenSIPS. — Adrian > On 14 Jan 2024, at 20:33, rvg at rvgeerligs.nl wrote: > > Thank you very much, Adrian, > > I noticed it allready. It seems this is a dedicated push server. > Does it handle the normal SIP traffic as well? > > Regards, > > Ronald > January 14, 2024 at 3:13 PM, "Adrian Georgescu" > wrote: > > There are many ways of implementing push notifications with OpenSIPS. This is how we implemented it. > > https://github.com/AGProjects/sylk-pushserver/blob/master/config/opensips.cfg > > — > Adrian > > > > > On 13 Jan 2024, at 17:37, rvg at rvgeerligs.nl wrote: > Hi All, > I am trying to implement an opensips server 3.4 with pn support. Primarily apple push notifications. Later I will try google. > Does any one have this implemented yet? > Where can I find an example cfg for opensips? > Any help is appreciated. > Regards, > Ronald Geerligs > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From slackway2me at gmail.com Mon Jan 15 13:57:29 2024 From: slackway2me at gmail.com (Alexey) Date: Mon, 15 Jan 2024 18:57:29 +0500 Subject: [OpenSIPS-Users] pn push notifications Message-ID: Hello, there are two tutorials in the official blog: part I : https://blog.opensips.org/2020/05/07/sip-push-notification-with-opensips-3-1-lts-rfc-8599-supportpart-i/ part II : https://blog.opensips.org/2020/06/03/sip-push-notification-with-opensips-3-1-lts-rfc-8599-supportpart-ii/ -- best regards, Alexey https://alexeyka.zantsev.com/ From slackway2me at gmail.com Mon Jan 15 14:03:23 2024 From: slackway2me at gmail.com (Alexey) Date: Mon, 15 Jan 2024 19:03:23 +0500 Subject: [OpenSIPS-Users] Removing header by contents Message-ID: Hello Igor, these functions - isn't it what you need? remove_hf_re(hname_expr) [1] remove_hf_glob(hname_pattern) [2] 1. https://opensips.org/docs/modules/3.4.x/sipmsgops.html#func_remove_hf_re 2. https://opensips.org/docs/modules/3.4.x/sipmsgops.html#func_remove_hf_glob -- best regards, Alexey https://alexeyka.zantsev.com/ From rvg at rvgeerligs.nl Mon Jan 15 16:21:28 2024 From: rvg at rvgeerligs.nl (rvg at rvgeerligs.nl) Date: Mon, 15 Jan 2024 16:21:28 +0000 Subject: [OpenSIPS-Users] pn push notifications In-Reply-To: References: Message-ID: <4e85380126b03fe7be85b4027f7342d3ded9e0e9@rvgeerligs.nl> Hi Alexey, I noticed those too, but I do not understand the following code: event_route [E_UL_CONTACT_REFRESH] { route(PN_SEND, $(param(uri){param.value,pn-provider}), $(param(uri){param.value,pn-prid}), $(param(uri){param.value,pn-param})); } # $param(1) - PN provider # $param(2) - PN PRID # $param(3) - PN param What is this doing? Is the contents of this part lacking? Is it the normal routing code, but the actual pn send is lacking? How do i write exec(what client) or rest_client? route [PN_SEND] { # send a PN using, for example, **exec** or **rest_client** } # how do we actually send the PN? Regards, Ronald January 15, 2024 at 10:57 AM, "Alexey" wrote: > > Hello, > > there are two tutorials in the official blog: > > part I : https://blog.opensips.org/2020/05/07/sip-push-notification-with-opensips-3-1-lts-rfc-8599-supportpart-i/ > > part II : https://blog.opensips.org/2020/06/03/sip-push-notification-with-opensips-3-1-lts-rfc-8599-supportpart-ii/ > > -- > best regards, Alexey > https://alexeyka.zantsev.com/ > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rvg at rvgeerligs.nl Mon Jan 15 16:24:38 2024 From: rvg at rvgeerligs.nl (rvg at rvgeerligs.nl) Date: Mon, 15 Jan 2024 16:24:38 +0000 Subject: [OpenSIPS-Users] pn push notifications In-Reply-To: <6C0F9AFC-196F-40B9-9E30-3ECB53DB65FF@ag-projects.com> References: <6C0F9AFC-196F-40B9-9E30-3ECB53DB65FF@ag-projects.com> <2FE28EAA-BFF2-4913-A19B-BED2789B79FF@ag-projects.com> <53b34a75725ab74eede1afe8b4996afa940729c7@rvgeerligs.nl> Message-ID: Adrian, thank you for the explanation. It is clear to me now. I will firstly go with a solution completely within openSIPS. Regards, Ronald January 15, 2024 at 8:59 AM, "Adrian Georgescu" wrote: > > OpenSIPS handles the SIP traffic, of course. The push server just handles multiple combinations of apps/ push services in an easier way. You could do a lot or all that its needed just from within OpenSIPS but as the number of combinations of apps and services grow another layer of abstraction make it easier to manage, plus you eliminate another possible blocking item from your routes as the works are down asynchronously outside OpenSIPS. >   > > — > Adrian > > > > > On 14 Jan 2024, at 20:33, rvg at rvgeerligs.nl wrote: > > > > Thank you very much, Adrian, > > > > I noticed it allready. It seems this is a dedicated push server. > > Does it handle the normal SIP traffic as well? > > > > Regards, > > > > Ronald > > > > January 14, 2024 at 3:13 PM, "Adrian Georgescu" wrote: > > > > > > > > There are many ways of implementing push notifications with OpenSIPS. This is how we implemented it. > > > > > > https://github.com/AGProjects/sylk-pushserver/blob/master/config/opensips.cfg > > > > > > — > > > Adrian > > > > > > > > > > > On 13 Jan 2024, at 17:37, rvg at rvgeerligs.nl wrote: > > > > > > > > Hi All, > > > > > > > > > > > > I am trying to implement an opensips server 3.4 with pn support. Primarily apple push notifications. Later I will try google. > > > > > > > > Does any one have this implemented yet? > > > > > > > > Where can I find an example cfg for opensips? > > > > > > > > Any help is appreciated. > > > > > > > > > > > > Regards, > > > > > > > > > > > > Ronald Geerligs > > > > _______________________________________________ > > > > Users mailing list > > > > Users at lists.opensips.org > > > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > > > > > > _______________________________________________ > > > Users mailing list > > > Users at lists.opensips.org > > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > > > _______________________________________________ > > Users mailing list > > Users at lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rvg at rvgeerligs.nl Mon Jan 15 18:28:50 2024 From: rvg at rvgeerligs.nl (rvg at rvgeerligs.nl) Date: Mon, 15 Jan 2024 18:28:50 +0000 Subject: [OpenSIPS-Users] pn push notifications In-Reply-To: References: Message-ID: hi all, for your information: **Sending a push notification to an iOS device using a Bash script** https://medium.com/@egzon.arifi/sending-a-push-notification-to-an-ios-device-using-a-bash-script-96c056c1544c I hope the pn in opensips only requires the route to the apn: https://api.development.push.apple.com/. dev https://api.push.apple.com/ opp but I fear it does not. Regards, Ronald January 15, 2024 at 10:57 AM, "Alexey" wrote: > > Hello, > > there are two tutorials in the official blog: > > part I : https://blog.opensips.org/2020/05/07/sip-push-notification-with-opensips-3-1-lts-rfc-8599-supportpart-i/ > > part II : https://blog.opensips.org/2020/06/03/sip-push-notification-with-opensips-3-1-lts-rfc-8599-supportpart-ii/ > > -- > best regards, Alexey > https://alexeyka.zantsev.com/ > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nzdealshelp at gmail.com Mon Jan 15 19:07:08 2024 From: nzdealshelp at gmail.com (nz deals) Date: Tue, 16 Jan 2024 08:07:08 +1300 Subject: [OpenSIPS-Users] uac_replace_from in CANCEL In-Reply-To: <40f20910-463c-4b7d-9bc5-7aa045b02d75@opensips.org> References: <7a5cd98b-4123-40d2-8dd2-32b23131d7bd@opensips.org> <40f20910-463c-4b7d-9bc5-7aa045b02d75@opensips.org> Message-ID: Thank you Bogdan, It seems that replacing remove_hf with uac_replace_from has resolved the issue. Just a quick question: if I use remove_hf("Contact") during INVITE, will TM become aware of this change? Regards, Jason On Fri, 5 Jan 2024 at 23:55, Bogdan-Andrei Iancu wrote: > Hi Jason, > > For changing the FROM hdr (at INVITE time), better use the > uac_replace_from() function [1] - by doing this, the TM will become aware > of the change and reflect it into CANCEL too. > > > [1] > https://opensips.org/html/docs/modules/3.4.x/uac.html#func_uac_replace_from > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > https://www.siphub.com > > On 24.12.2023 13:33, nz deals wrote: > > Hi Bogdan, > Agreed that the RFC3261 CANCEL is truly built using INVITE. In my case, > somehow CANCEL is not the same as the initial INVITE. Due to the complexity > of my case I have hard times to fix the issue. Let me explain a bit. > On the INVITE i change the From Header, which i can see has also been > changed during Authorization. > If i CANCEL then the From header is different (it's the same as i have > before making my change). > > I am also using topology_hiding(). > > > > under the main route i change the From header for INVITE > > set_advertised_address("104.13.xx.xx "); # same as i have used in > the advertised_address > # this is my cancel processing > if (is_method("CANCEL")) { > if (t_check_trans()) > t_relay(8); > exit; > } > if (has_totag()) { > if(topology_hiding_match()) { > # remove and add a custom one > remove_hf("From"); > append_hf("From: \"$fU\" > ;tag=$ft\r\n"); > > force_send_socket("tls:192.xx.xx.xx:5061"); > } > } > > My opensips version is 3.4.2 > My listening socket is socket=tls:ens192:5061 tag ens192 (its the same > 192.xx.xx.xx IP that you see in the force_send_socket) > I am also using public ip as follows > advertised_address=104.13.xx.xx > alias=104.13.xx.xx > > > Regards, > Jason > > On Thu, 21 Dec 2023 at 02:31, Bogdan-Andrei Iancu > wrote: > >> Hi Jason, >> >> In transactional stateful SIP, the CANCEL requests are hop by hop - each >> hop in the path is generating its own CANCEL requests to the next hop, >> which consumes it; there is no actual relaying of the CANCELs. So, the >> replacing (which works in relaying mode only) doesn't fit here. >> >> Even more, the RFC3261 gives a rigorous way for building the CANCEL >> requests, they are to be built 100% based on the INVITE request only >> (nothing more). OpenSIPS internally builds the CANCEL in accordance to the >> corresponding INVITE, so you should not need any such changes. >> >> May you detail why you think you need this FROM replacement? >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> https://www.siphub.com >> >> On 20.12.2023 12:38, nz deals wrote: >> >> Hi, >> I've been attempting to modify the From header in the CANCEL, but it >> seems the changes aren't taking effect. I've also experimented with >> remove_hf and append_hf, but unfortunately, these methods didn't work >> either. Could someone kindly offer suggestions if I might be overlooking >> something? >> >> This is in the main request route >> >> if (is_method("CANCEL")) { >> uac_replace_from("","sip:test at test.com"); >> if (t_check_trans()) >> t_relay(8); >> exit; >> } >> >> >> >> >> Regards, >> Jason >> >> _______________________________________________ >> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From igorolhovskiy at gmail.com Mon Jan 15 19:08:27 2024 From: igorolhovskiy at gmail.com (Ihor Olkhovskyi) Date: Mon, 15 Jan 2024 20:08:27 +0100 Subject: [OpenSIPS-Users] Removing header by contents In-Reply-To: References: Message-ID: Thanks, I've tried to use them, but seems they are taking for both expressions, regex and glob not looking in Header values, but names only When looking at the code, my suspicion getting stronger https://github.com/OpenSIPS/opensips/blob/224a3236cbeaeb06a897cb3beab8c3a0c3d5903f/modules/sipmsgops/sipmsgops.c#L425 Le 15/01/2024 à 15:03, Alexey a écrit : > Hello Igor, > > these functions - isn't it what you need? > > remove_hf_re(hname_expr) [1] > remove_hf_glob(hname_pattern) [2] > > 1. https://opensips.org/docs/modules/3.4.x/sipmsgops.html#func_remove_hf_re > 2. https://opensips.org/docs/modules/3.4.x/sipmsgops.html#func_remove_hf_glob > > From rvg at rvgeerligs.nl Mon Jan 15 21:12:30 2024 From: rvg at rvgeerligs.nl (rvg at rvgeerligs.nl) Date: Mon, 15 Jan 2024 21:12:30 +0000 Subject: [OpenSIPS-Users] opensips 3.4 documentation event_routing example 1.6.1 - push notification Message-ID: Hi openSIPS team, I do not understand the documentaion (opensips version 3.4 manual) on the event_routing module. The example given 1.6.1 push notification does not seem to do just that. It says: " 1.6.1. Push Notification We use*notify_on_event*to capture the events on new contact registrations for callee. Once the call is sent to callee, based on the notification (for new contacts) we inject the newly registered contacts as new branches in the ongoing transaction. Schematics : when we send a call to a user, we subscribe to see any new contacts being registered by the user. On such a notification, we add the new contact as a new branch to the ongoing transaction (ringing) to user. " It seems this has to do with notify_on_event. It may be that the new branches are be added with device information for the push notification, but I do not see that in the example given. Please advise, Regards, Ronald Geerligs -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Tue Jan 16 07:35:46 2024 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Tue, 16 Jan 2024 09:35:46 +0200 Subject: [OpenSIPS-Users] uac_replace_from in CANCEL In-Reply-To: References: <7a5cd98b-4123-40d2-8dd2-32b23131d7bd@opensips.org> <40f20910-463c-4b7d-9bc5-7aa045b02d75@opensips.org> Message-ID: The Contact hdr is not relevant for TM, still it is if you are using nathelper (for pinging) or dialog support with topo hiding (where the Ct must be retained). Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com https://www.siphub.com On 15.01.2024 21:07, nz deals wrote: > Thank you Bogdan, > > It seems that replacing remove_hf with uac_replace_from has resolved > the issue. > Just a quick question: if I use remove_hf("Contact") during INVITE, > will TM become aware of this change? > > > > Regards, > Jason > > On Fri, 5 Jan 2024 at 23:55, Bogdan-Andrei Iancu > wrote: > > Hi Jason, > > For changing the FROM hdr (at INVITE time), better use the > uac_replace_from() function [1] - by doing this, the TM will > become aware of the change and reflect it into CANCEL too. > > > [1] > https://opensips.org/html/docs/modules/3.4.x/uac.html#func_uac_replace_from > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > https://www.siphub.com > > On 24.12.2023 13:33, nz deals wrote: >> Hi Bogdan, >> Agreed that the RFC3261 CANCEL is truly built using INVITE. In my >> case, somehow CANCEL is not the same as the initial INVITE. Due >> to the complexity of my case I have hard times to fix the issue. >> Let me explain a bit. >> On the INVITE i change the From Header, which i can see has also >> been changed during Authorization. >> If i CANCEL then the From header is different (it's the same as i >> have before making my change). >> >> I am also using topology_hiding(). >> >> >> under the main route i change the From header for INVITE >> >>         set_advertised_address("104.13.xx.xx "); # same as i have >> used in the advertised_address >>         # this is my cancel processing >>         if (is_method("CANCEL")) { >>                 if (t_check_trans()) >>                         t_relay(8); >>                 exit; >>         } >>         if (has_totag()) { >>             if(topology_hiding_match())  { >>                                    # remove and add a custom one >>  remove_hf("From"); >>                                    append_hf("From: >> \"$fU\";tag=$ft\r\n"); >>  force_send_socket("tls:192.xx.xx.xx:5061"); >>              } >>         } >> My opensips version is 3.4.2 >> My listening socket is socket=tls:ens192:5061 tag ens192     (its >> the same 192.xx.xx.xx IP that you see in the force_send_socket) >> I am also using public ip as follows >> advertised_address=104.13.xx.xx >> alias=104.13.xx.xx >> >> Regards, >> Jason >> >> On Thu, 21 Dec 2023 at 02:31, Bogdan-Andrei Iancu >> wrote: >> >> Hi Jason, >> >> In transactional stateful SIP, the CANCEL requests are hop by >> hop - each hop in the path is generating its own CANCEL >> requests to the next hop, which consumes it; there is no >> actual relaying of the CANCELs. So, the replacing (which >> works in relaying mode only) doesn't fit here. >> >> Even more, the RFC3261 gives a rigorous way for building the >> CANCEL requests, they are to be built 100% based on the >> INVITE request only (nothing more). OpenSIPS internally >> builds the CANCEL in accordance to the corresponding INVITE, >> so you should not need any such changes. >> >> May you detail why you think you need this FROM replacement? >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> https://www.siphub.com >> >> On 20.12.2023 12:38, nz deals wrote: >>> Hi, >>> I've been attempting to modify the From header in the >>> CANCEL, but it seems the changes aren't taking effect. I've >>> also experimented with remove_hf and append_hf, but >>> unfortunately, these methods didn't work either. Could >>> someone kindly offer suggestions if I might be overlooking >>> something? >>> >>> This is in the main request route >>> >>>         if (is_method("CANCEL")) { >>>                 uac_replace_from("","sip:test at test.com >>> "); >>>                 if (t_check_trans()) >>>                         t_relay(8); >>>                 exit; >>>         } >>> >>> >>> >>> Regards, >>> Jason >>> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 342899761 at qq.com Wed Jan 17 03:05:04 2024 From: 342899761 at qq.com (=?ISO-8859-1?B?bm9uYW1l?=) Date: Wed, 17 Jan 2024 11:05:04 +0800 Subject: [OpenSIPS-Users] parameters missing with event_datagram.so Message-ID: Hi, OpenSIPS experts: OpenSIPS3.2.16 CentOS7.9 start `nc -u -l 1234` start `opensips` ``` {"jsonrpc":"2.0","method":"E_MY_EVENT"} ``` parameters missing. opensips.cfg: ``` log_level=3 xlog_level=3 log_stderror=yes   socket=udp:127.0.0.1:5060 mpath="/usr/lib64/opensips/modules"   loadmodule "signaling.so" loadmodule "sl.so"   loadmodule "tm.so" modparam("tm", "fr_timeout", 5) modparam("tm", "fr_inv_timeout", 30) modparam("tm", "restart_fr_on_each_reply", 0) modparam("tm", "onreply_avp_mode", 1)   loadmodule "event_datagram.so" loadmodule "proto_udp.so"   route{ send_reply(200,"OK"); exit; }   startup_route{ subscribe_event("E_MY_EVENT", "udp:127.0.0.1:1234"); route(FIRE_TEST); }   route[FIRE_TEST]{ $avp(attr) = 3; $avp(attr) = 5; raise_event("E_MY_EVENT", $avp(attr)); } ``` -------------- next part -------------- An HTML attachment was scrubbed... URL: From igorolhovskiy at gmail.com Wed Jan 17 09:53:59 2024 From: igorolhovskiy at gmail.com (Ihor Olkhovskyi) Date: Wed, 17 Jan 2024 10:53:59 +0100 Subject: [OpenSIPS-Users] opensips 3.4 documentation event_routing example 1.6.1 - push notification In-Reply-To: References: Message-ID: Ronald, Have you checked https://www.youtube.com/watch?v=Bx0_l0ONa0g ? Le lun. 15 janv. 2024 à 22:14, a écrit : > Hi openSIPS team, > > I do not understand the documentaion (opensips version 3.4 manual) on the > event_routing module. > > The example given 1.6.1 push notification does not seem to do just that. > > It says: > " > 1.6.1. Push Notification > > We use*notify_on_event*to capture the events on new contact registrations > for callee. Once the call is sent to callee, based on the notification (for > new contacts) we inject the newly registered contacts as new branches in > the ongoing transaction. > > Schematics : when we send a call to a user, we subscribe to see any new > contacts being registered by the user. On such a notification, we add the > new contact as a new branch to the ongoing transaction (ringing) to user. > " > It seems this has to do with notify_on_event. > It may be that the new branches are be added with device information for > the push notification, but I do not see that in the example given. > > Please advise, > > Regards, > > Ronald Geerligs > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Best regards, Ihor (Igor) -------------- next part -------------- An HTML attachment was scrubbed... URL: From razvan at opensips.org Thu Jan 18 10:27:37 2024 From: razvan at opensips.org (=?UTF-8?Q?R=C4=83zvan_Crainea?=) Date: Thu, 18 Jan 2024 12:27:37 +0200 Subject: [OpenSIPS-Users] $DLG_lifetime but in ms In-Reply-To: <44c6cdf3c71f1bf340508ee940a81938f976ed9b.camel@webon.co.za> References: <44c6cdf3c71f1bf340508ee940a81938f976ed9b.camel@webon.co.za> Message-ID: <319ad443-c099-421c-a901-e20db26d9890@opensips.org> HI, Trevor! Unfortunately there is currently no way to round up the value, but what is unclear is why you need the extra billed_duration, and not simply using the duration field. Best regards, Răzvan Crainea OpenSIPS Core Developer / SIPhub CTO http://www.opensips-solutions.com / https://www.siphub.com On 1/11/24 15:55, trevor at webon.co.za wrote: > Hi All, > > I have a simple issue I need to solve but cant seem to fine a elegant > way of resolving. > > I am using acc module + rate_cacher to do some simple billing. > > I use $DLG_lifetime but this value seems to be a rounded to the nearest > second what I need is to round up to the nearest second similar to how > ACC module calculates duration > > Here is an example CDR > > > *************************** 1. row *************************** > duration: 35 > ms_duration: 34168 > billed_duration: 34 > > As you can see duration is rounded up and billed_duration is rounded > down. > > Is there any way to get access to the ms of the dialogue from any > module, I could resort to initializing my own timers but there is > already a timer running in the acc module and would be more efficient > to just use it. > > > Here is how I am creating billed_duration > > if (has_totag()) { > .... > .... > .... > if (is_method("BYE")) { > if ($DLG_lifetime == 0) { > $acc_extra(billed_duration) = 1; > }else{ > $acc_extra(billed_duration) = $DLG_lifetime; > } > } > > route(RELAY); > exit; > } > > > Thanks > Trevor Steyn > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From razvan at opensips.org Thu Jan 18 10:32:39 2024 From: razvan at opensips.org (=?UTF-8?Q?R=C4=83zvan_Crainea?=) Date: Thu, 18 Jan 2024 12:32:39 +0200 Subject: [OpenSIPS-Users] Removing header by contents In-Reply-To: <90b1cb29-f628-4480-b789-155897126d0c@gmail.com> References: <90b1cb29-f628-4480-b789-155897126d0c@gmail.com> Message-ID: <6d257cab-c798-4372-abe7-6f0590e4968d@opensips.org> Unfortunately there is no support for this in OpenSIPS - you can only remove a header by its name, and that would remove all occurrences. I guess your only solution is what you already did: remove all and add back only what you want. Best regards, Răzvan Crainea OpenSIPS Core Developer / SIPhub CTO http://www.opensips-solutions.com / https://www.siphub.com On 1/14/24 19:00, Ihor Olkhovskyi wrote: > Hello! > > Is there any easy possibility to remove header not by name, but name and > contents or just header number? > > I have several Route headers and want to remove the first one only. > > For the moment I'm thinking to remove all headers and add all but the > first in the loop, but maybe it's an overkill? > > P.S.: Why I'm doing this - trying to implement own loose_route for some > experiments > > Thanks in advance, > Ihor > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From akogan at 5gfuture.com Thu Jan 18 10:51:40 2024 From: akogan at 5gfuture.com (Alexander Kogan) Date: Thu, 18 Jan 2024 14:51:40 +0400 Subject: [OpenSIPS-Users] Error in re.subst transformation Message-ID: <7d4914e4-0de5-41c8-9a01-d61c61a96d7f@5gfuture.com> Hi, There's an error in re.subst transformation, it's not whitespace-safe. Is this patch OK? Index: transformations.c =================================================================== --- transformations.c   (revision 13886) +++ transformations.c   (working copy) @@ -3630,7 +3630,7 @@                 }                 p++;                 LM_DBG("preparing to parse param\n"); -               if (tr_parse_sparam(p, in, &tp, 0) == NULL) +               if (tr_parse_sparam(p, in, &tp, 1) == NULL)                         goto error;                 t->params = tp;                 tp = 0; -- Best regards, Alexander Kogan, Director of R&D 5g Future http://5gfuture.com From liviu at opensips.org Thu Jan 18 12:48:38 2024 From: liviu at opensips.org (Liviu Chircu) Date: Thu, 18 Jan 2024 14:48:38 +0200 Subject: [OpenSIPS-Users] Error in re.subst transformation In-Reply-To: <7d4914e4-0de5-41c8-9a01-d61c61a96d7f@5gfuture.com> References: <7d4914e4-0de5-41c8-9a01-d61c61a96d7f@5gfuture.com> Message-ID: <47a59614-e9e0-1044-8406-803141a10dad@opensips.org> On 18.01.2024 12:51, Alexander Kogan wrote: > Hi, > > There's an error in re.subst transformation, it's not whitespace-safe. > Is this patch OK? > > Index: transformations.c > =================================================================== > --- transformations.c   (revision 13886) > +++ transformations.c   (working copy) > @@ -3630,7 +3630,7 @@ >                 } >                 p++; >                 LM_DBG("preparing to parse param\n"); > -               if (tr_parse_sparam(p, in, &tp, 0) == NULL) > +               if (tr_parse_sparam(p, in, &tp, 1) == NULL) >                         goto error; >                 t->params = tp; >                 tp = 0; > Hi Alexander, Looks OK to me, for example this quick test seems to PASS after your patch without any side-effects on other tests:     $var(in) = "+443 493 2212";     assert($(var(in){re.subst, /([0-9]) ([0-9])/\1.\2/g}) == "+443.493.2212", "test-subst-2"); If you do a Pull Request on `master`, it will most likely get merged.  For the stable branches, this limitation can be bypassed by assigning the regex to a variable:     $var(in) = "+443 493 2212";     $var(re) = "/([0-9]) ([0-9])/\1.\2/g";     assert($(var(in){re.subst, $var(re)}) == "+443.493.2212", "test-subst-2"); Best regards, -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com OpenSIPS Summit 2024 May 14-17 Valencia | www.opensips.org/events From iamhalje at gmail.com Fri Jan 19 18:01:24 2024 From: iamhalje at gmail.com (Dmitry Ponomaryov) Date: Fri, 19 Jan 2024 23:01:24 +0500 Subject: [OpenSIPS-Users] mid_register and its possible bad actions with De-REGISTER In-Reply-To: <1ca1f2c0-1e80-bd67-a11c-b1bffb95a70b@gmail.com> References: <716391af-fb1a-01a9-e440-34a6e31ec45d@gmail.com> <1ca1f2c0-1e80-bd67-a11c-b1bffb95a70b@gmail.com> Message-ID: <8fc0bb96-d372-4c07-a5df-a45d168c9fd9@gmail.com> Hi OpenSIPS Community, I would like to try to summarize this post as I have often been helped by posts in this maillists, maybe mine will help someone else too... Problem: Was that everything was built on the fact that the backend(main registrar) as Asterisk on chan_sip, was accepting registrations via mid_registrar with one SIP-number from the same client but from different devices, and in this case when the client has a landline and a mobile phone for example, mobile phone as it was said in the problem can very often re-register with what actually and fights OpenSIPS, when send the function callback to usrloc, from which comes the very de-register, so this de-register breaks in chan_sip peer, when under one SIP-number registered several devices. Here, of course, we can approach with different workarounds, such as transferring registrations to OpenSIPS, switching from chan_sip to res_pjsip... and other types of solutions that will lead you to solving new problems, but how could you do without it )) I've looked at quite a few PN question, video/forums/maillists, and in total I've managed for Linphone via usrloc/registrar/mid_registrar to send push notification, at least for now, on Android, via gorush/Firebase, and in total I thought my messages about disabling in modparam some callback functions are not important enough, which are probably available to OpenSIPS developers, that is, the problem can really be tried to solve in another way, well, or make changes in the issue at once in the code, which will be checked like code review from project developers : ) Cheers. P.S thanks Johan for a short but revealing answer about PN. > or you don't support push notifications. On 1/9/2024 10:15 AM, Dmitry Ponomaryov wrote: > Hello Liviu, In my case, AoR throttling was used, before issue (1), do > you also think that this is how it should work? (looks like a > CRITICAL) > On the other hand, AoR throttling goes beyond this and > just makes sure there is always 1 AoR registered downstream. So on a > "contact replace" operation, no SIP signaling should reach the > Asterisk in that case. the point is that if different devices are > registered under the same AoR, one such De-REGISTER, on the final > Asterisk completely deletes the peer, although in some of the > locations there is still data and if not for the De-REGISTER, Asterisk > would have sent its INVITE, we would go through lookup and call all > the devices we need from location via some route, this is the problem > that we don’t always need De-REGISTER if there is more than one device > under the same AoR(when we don't just reduce REGISTER to the main > registrar, but use them as REGISTER from diff devices), which breaks > peers on Asterisk with De-REGISTER. > > but in total, it might be worth making such modparam module > mid_registrar to disable De-REGISTER from the OpenSIPS itself, let the > registrations themselves expire on the main registrar, and if there is > a new registration with a new ctid with ct-throttling schema, then we > will simply update peer again... or if someone needs this feature, > then let it be possible to choose an interface and not just, for > example: socket=1.1.1.1:5060 socket=2.2.2.2:5060 in this case > De-REGISTER will go with 1.1.1.1:5060 on main registrar, because it is > simply the first one listed socket in cfg. off course, your opinion is > needed here, you are developer of this module since 2016 ;) Best regards! > > (1): https://github.com/OpenSIPS/opensips/issues/3193 > > On 1/8/24 14:40, Liviu Chircu wrote: >> On 27.12.2023 11:38, Dmitry Ponomaryov wrote: >>> >>> All this to say, it might make sense to add the ability to disable >>> this De-REGISTER, because with a new registration, we will still >>> send it a registration with an updated contact before the main >>> registrar times out, and there will be no problems, that is, for >>> example, the following settings: >>> >>> modparam("mid_registrar", "outgoing_expires", 600) >>> modparam("mid_registrar", "default_expires", 300) >> >> Hello Dmitry, >> >> From your scenario, it sounds like maybe you should enable AoR >> throttling, not just Ct throttling? Because in Ct throttling, each >> outgoing contact has a unique "ctid=" parameter, so it must be >> de-registered from the main registrar on each contact replace, since >> the replacement Contact has a new "ctid=", making it an entirely >> different SIP URI. >> >> On the other hand, AoR throttling goes beyond this and just makes >> sure there is always 1 AoR registered downstream.  So on a "contact >> replace" operation,  no SIP signaling should reach the Asterisk in >> that case. >> >> Best regards. From rob.dyck at telus.net Sun Jan 21 17:41:54 2024 From: rob.dyck at telus.net (Robert Dyck) Date: Sun, 21 Jan 2024 09:41:54 -0800 Subject: [OpenSIPS-Users] Question about rls_presentity table Message-ID: <3306174.44csPzL39Z@leno.mylan> Currently using opensips-3.4.3. I am experimenting with using resource lists for presence. I have a question about table rls_presentity. When a UA subscribes to a presentity using an entry in a resource list an entry is created in the DB table rls_presentity. When the presentity sends publish its state is added to the entry in rls_presentity. What I find peculiar, there seems to be no way for opensips to delete the entry. If both the watcher/subscriber and the presentity are offline the entry in the table remains. Only the state is removed. Is this intended behaviout? From rob.dyck at telus.net Sun Jan 21 18:44:52 2024 From: rob.dyck at telus.net (Robert Dyck) Date: Sun, 21 Jan 2024 10:44:52 -0800 Subject: [OpenSIPS-Users] Question about rls_presentity table Message-ID: <2282451.iZASKD2KPV@leno.mylan> I was too hasty. The subscriber has a long expiry on it's subscribe ( 1 hr ) and it is not configurable. The entry was eventually deleted. Currently using opensips-3.4.3. I am experimenting with using resource lists for presence. I have a question about table rls_presentity. When a UA subscribes to a presentity using an entry in a resource list an entry is created in the DB table rls_presentity. When the presentity sends publish its state is added to the entry in rls_presentity. What I find peculiar, there seems to be no way for opensips to delete the entry. If both the watcher/subscriber and the presentity are offline the entry in the table remains. Only the state is removed. Is this intended behaviout? From bogdan at opensips.org Mon Jan 22 09:25:37 2024 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 22 Jan 2024 11:25:37 +0200 Subject: [OpenSIPS-Users] DNS could not resolve hostname in dispatcher In-Reply-To: References: <50525c12-d3f9-4f3a-98d6-c8478248dd7b@opensips.org> Message-ID: <576fc0af-615f-48a6-b1af-9baaf706cea4@opensips.org> Thanks, I will check and follow on github! Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com https://www.siphub.com On 15.01.2024 10:19, guillaume.desgeorge at orange.com wrote: > > Hi Bogdan, > > Thanks for your answer. > > Issue opened : #3285 > > Regards, > > Guillaume Desgeorge > > *De :*Bogdan-Andrei Iancu > *Envoyé :* mercredi 10 janvier 2024 17:28 > *À :* OpenSIPS users mailling list ; > DESGEORGE Guillaume INNOV/IT-S > *Objet :* Re: [OpenSIPS-Users] DNS could not resolve hostname in > dispatcher > > Hi Guillaume, > > Indeed, a weird one, not marking the destination as failed upon > failure to ping it. I checked the drouting module and it is doing such > disable, so it might be a overlook in the dispatcher module. Please > open a bug report on the github tracker, so we can address this issue. > > Regards, > > Bogdan-Andrei Iancu > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > https://www.siphub.com > > On 09.01.2024 11:32, guillaume.desgeorge at orange.com wrote: > > Hi everyone, > > We are facing a problem with Opensips 3.3 (but I’ve done tests on > opensips 2.4 and it was the same). > > In the dispatcher, if we have a name instead of an IP address in > “destination”, and that the DNS falls down, we have an error > “could not resolve hostname” in the log. Then, Opensips can’t > resolve the name, there is no more OPTIONS message sent to the > destination but the state stays as 0 and if a call arrives, > Opensips still route the INVITE to the last known IP address. > > I find that’s strange : > > 1. Either Opensips consider that the DNS is down but the > destination may be still up with the last IP address he knows > and he could still send OPTIONS messages to the last known IP > address > 2. Either Opensips consider that the DNS is down and doesn’t send > OPTIONS message but in that case he should not send INVITE to > the old IP address. > > I work with a product that has his own DNS and removes the name of > the server in the DNS when the machine is down. So everytime the > server is down, Opensips can’t resolve the name and still send > calls to that server… > > Is there any parameters I can use to change that way of working ? > > Regards, > >     Guillaume > > Orange Restricted > > ____________________________________________________________________________________________________________ > > Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc > > pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler > > a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, > > Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. > > This message and its attachments may contain confidential or privileged information that may be protected by law; > > they should not be distributed, used or copied without authorisation. > > If you have received this email in error, please notify the sender and delete this message and its attachments. > > As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. > > Thank you. > > > > _______________________________________________ > > Users mailing list > > Users at lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > ____________________________________________________________________________________________________________ > Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc > pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler > a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, > Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. > > This message and its attachments may contain confidential or privileged information that may be protected by law; > they should not be distributed, used or copied without authorisation. > If you have received this email in error, please notify the sender and delete this message and its attachments. > As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. > Thank you. > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Jan 22 11:17:27 2024 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 22 Jan 2024 13:17:27 +0200 Subject: [OpenSIPS-Users] Removing header by contents In-Reply-To: References: Message-ID: Indeed, as per docs, the RE is applied only to the hdr name, not to its body. Of course, you can iterate thru the Contact hdrs using the $(hdr(Contact)[idx]) and check its value in script, but afterall there is no mechanism to delete that particular instance of CT hdr.... Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com https://www.siphub.com On 15.01.2024 21:08, Ihor Olkhovskyi wrote: > Thanks, > > I've tried to use them, but seems they are taking for both > expressions, regex and glob not looking in Header values, but names only > > When looking at the code, my suspicion getting stronger > > https://github.com/OpenSIPS/opensips/blob/224a3236cbeaeb06a897cb3beab8c3a0c3d5903f/modules/sipmsgops/sipmsgops.c#L425 > > > Le 15/01/2024 à 15:03, Alexey a écrit : >> Hello Igor, >> >> these functions - isn't it what you need? >> >> remove_hf_re(hname_expr) [1] >> remove_hf_glob(hname_pattern) [2] >> >> 1. >> https://opensips.org/docs/modules/3.4.x/sipmsgops.html#func_remove_hf_re >> 2. >> https://opensips.org/docs/modules/3.4.x/sipmsgops.html#func_remove_hf_glob >> >> > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From bogdan at opensips.org Mon Jan 22 11:21:43 2024 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 22 Jan 2024 13:21:43 +0200 Subject: [OpenSIPS-Users] parameters missing with event_datagram.so In-Reply-To: References: Message-ID: Hi, Please carefully read the doc: https://www.opensips.org/Documentation/Script-CoreFunctions-3-4#raise_event /vals/ (var, optional) - AVP containing values attached to the event; if this parameter is missing, the raised event will not have any attributes, even if the /attrs/ parameter is provided. ^^^ this is your case, passing only "attrs", no "vals" Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com https://www.siphub.com On 17.01.2024 05:05, noname via Users wrote: > Hi, OpenSIPS experts: > > OpenSIPS3.2.16 > CentOS7.9 > > start `nc -u -l 1234` > start `opensips` > > ``` > {"jsonrpc":"2.0","method":"E_MY_EVENT"} > ``` > parameters missing. > > opensips.cfg: > > ``` > log_level=3 > xlog_level=3 > log_stderror=yes > socket=udp:127.0.0.1:5060 > mpath="/usr/lib64/opensips/modules" > loadmodule "signaling.so" > loadmodule "sl.so" > loadmodule "tm.so" > modparam("tm", "fr_timeout", 5) > modparam("tm", "fr_inv_timeout", 30) > modparam("tm", "restart_fr_on_each_reply", 0) > modparam("tm", "onreply_avp_mode", 1) > loadmodule "event_datagram.so" > loadmodule "proto_udp.so" > route{ > send_reply(200,"OK"); > exit; > } > startup_route{ > subscribe_event("E_MY_EVENT", "udp:127.0.0.1:1234"); > route(FIRE_TEST); > } > route[FIRE_TEST]{ > $avp(attr) = 3; > $avp(attr) = 5; > raise_event("E_MY_EVENT", $avp(attr)); > } > ``` > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Jan 22 11:28:43 2024 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 22 Jan 2024 13:28:43 +0200 Subject: [OpenSIPS-Users] opensips 3.4 documentation event_routing example 1.6.1 - push notification In-Reply-To: References: Message-ID: Hi Ronald, Thanks to the "notify_on_event", whenever there is a new registration (see E_UL_CONTACT_INSERT) for that user (see the $avp(filter)), the "fork_call" route will be execute and a new branch (for that call) will be create toward the new registration - see the t_inject_branches() docs. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com https://www.siphub.com On 15.01.2024 23:12, rvg at rvgeerligs.nl wrote: > Hi openSIPS team, > > I do not understand the documentaion (opensips version 3.4 manual) on > the event_routing module. > > The example given 1.6.1 push notification does not seem to do just that. > > It says: > " > 1.6.1. |Push Notification| > > We use/notify_on_event/to capture the events on new contact > registrations for callee. Once the call is sent to callee, based on > the notification (for new contacts) we inject the newly registered > contacts as new branches in the ongoing transaction. > > Schematics : when we send a call to a user, we subscribe to see any > new contacts being registered by the user. On such a notification, we > add the new contact as a new branch to the ongoing transaction > (ringing) to user. > > " > It seems this has to do with notify_on_event. > It may be that the new branches are be added with device information > for the push notification, but I do not see that in the example given. > > Please advise, > > Regards, > > Ronald Geerligs > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From liviu at opensips.org Mon Jan 22 12:29:50 2024 From: liviu at opensips.org (Liviu Chircu) Date: Mon, 22 Jan 2024 14:29:50 +0200 Subject: [OpenSIPS-Users] pn push notifications In-Reply-To: References: Message-ID: On 15.01.2024 20:28, rvg at rvgeerligs.nl wrote: > for your information: > *Sending a push notification to an iOS device using a Bash script* > https://medium.com/@egzon.arifi/sending-a-push-notification-to-an-ios-device-using-a-bash-script-96c056c1544c > > I hope the pn in opensips only requires the route to the apn: > https://api.development.push.apple.com/. dev > https://api.push.apple.com/ opp Hello Ronald, Indeed, the /PN_SEND /route will most likely invoke a shell script (Bash, Go, Python, etc.) which triggers the notification for that /specific /SIP device via APNS, using your app developer API credentials.  As this logic is not only specific to the mobile developer's platform (APNS or Firebase?), but it's also subject to change and often depends on the OS as well (Android 11 or 14 API?  iOS 14 or 16? etc.), we decided to not officially maintain such scripts and leave this part to the VoIP platform developer. Best regards, -- Liviu Chircu www.twitter.com/liviuchircu |www.opensips-solutions.com OpenSIPS Summit 2024 Valencia, May 14-17 |www.opensips.org/events -------------- next part -------------- An HTML attachment was scrubbed... URL: From razvan at opensips.org Mon Jan 22 15:05:55 2024 From: razvan at opensips.org (=?UTF-8?Q?R=C4=83zvan_Crainea?=) Date: Mon, 22 Jan 2024 17:05:55 +0200 Subject: [OpenSIPS-Users] OpenSIPS IMS at Fosdem'24 Message-ID: Hi, Everyone! This year history repeats itself, thus myself (Răzvan Crainea) and Liviu Chircu will be representing OpenSIPS at the Fosdem'24 conference, where will be talking about how you can Provide VoLTE and/or VoNR for IMS using OpenSIPS 3.5. This talk will present the way OpenSIPS is tackling its IMS implementation, and will contain a lot of the topics that we developed within the OpenSIPS IMS Working Group[1] - so if you are interested in the topic, make sure you subscribe (if you haven't already) to the group and bring your valuable contribution the the IMS topic. Our presentation starts on Saturday, 17:50[1] in room H.1302, Real Time Communications (RTC) devroom[2]. We hope to see as many of you as possible! [1] http://lists.opensips.org/cgi-bin/mailman/listinfo/wg-ims [2] https://fosdem.org/2024/schedule/event/fosdem-2024-3614-provide-volte-vonr-using-opensips-3-5/ Happy hacking, -- Răzvan Crainea OpenSIPS Core Developer / SIPhub CTO http://www.opensips-solutions.com / https://www.siphub.com From gmaruzz at gmail.com Mon Jan 22 15:14:36 2024 From: gmaruzz at gmail.com (Giovanni Maruzzelli) Date: Mon, 22 Jan 2024 16:14:36 +0100 Subject: [OpenSIPS-Users] [WG-IMS] OpenSIPS IMS at Fosdem'24 In-Reply-To: References: Message-ID: yeeeeeeeeeeeeee!!!!!! -giovanni On Mon, Jan 22, 2024 at 4:06 PM Răzvan Crainea wrote: > Hi, Everyone! > > This year history repeats itself, thus myself (Răzvan Crainea) and Liviu > Chircu will be representing OpenSIPS at the Fosdem'24 conference, where > will be talking about how you can Provide VoLTE and/or VoNR for IMS > using OpenSIPS 3.5. > This talk will present the way OpenSIPS is tackling its IMS > implementation, and will contain a lot of the topics that we developed > within the OpenSIPS IMS Working Group[1] - so if you are interested in > the topic, make sure you subscribe (if you haven't already) to the group > and bring your valuable contribution the the IMS topic. > Our presentation starts on Saturday, 17:50[1] in room H.1302, Real Time > Communications (RTC) devroom[2]. We hope to see as many of you as possible! > > [1] http://lists.opensips.org/cgi-bin/mailman/listinfo/wg-ims > [2] > > https://fosdem.org/2024/schedule/event/fosdem-2024-3614-provide-volte-vonr-using-opensips-3-5/ > > Happy hacking, > -- > Răzvan Crainea > OpenSIPS Core Developer / SIPhub CTO > http://www.opensips-solutions.com / https://www.siphub.com > > _______________________________________________ > Wg-ims mailing list > Wg-ims at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/wg-ims > -- Sincerely, Giovanni Maruzzelli OpenTelecom.IT cell: +39 347 266 56 18 -------------- next part -------------- An HTML attachment was scrubbed... URL: From trevor at webon.co.za Tue Jan 23 07:12:06 2024 From: trevor at webon.co.za (trevor at webon.co.za) Date: Tue, 23 Jan 2024 09:12:06 +0200 Subject: [OpenSIPS-Users] $DLG_lifetime but in ms In-Reply-To: <319ad443-c099-421c-a901-e20db26d9890@opensips.org> References: <44c6cdf3c71f1bf340508ee940a81938f976ed9b.camel@webon.co.za> <319ad443-c099-421c-a901-e20db26d9890@opensips.org> Message-ID: On Thu, 2024-01-18 at 12:27 +0200, Răzvan Crainea wrote: > HI, Trevor! > > Unfortunately there is currently no way to round up the value, but > what > is unclear is why you need the extra billed_duration, and not simply > using the duration field. > > Best regards, > > Răzvan Crainea > OpenSIPS Core Developer / SIPhub CTO > http://www.opensips-solutions.com / https://www.siphub.com > > On 1/11/24 15:55, trevor at webon.co.za wrote: > > Hi Răzvan I am using rate cacher and want to calculate billing in script and am unable to use duration field as this is only inserted into DB and not available as a variable unless I missed something in the document :) Regards Trevor Steyn From bogdan at opensips.org Tue Jan 23 10:35:03 2024 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Tue, 23 Jan 2024 12:35:03 +0200 Subject: [OpenSIPS-Users] regular expression matching question In-Reply-To: References: Message-ID: Hi, check this https://opensips.org/html/docs/modules/3.4.x/regex.html Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com https://www.siphub.com On 05.01.2024 13:56, Faheem Muhammad wrote: > Hi Machel, > > Appreciate the correction; it was a typo when I posted the question. > However, as Callum mentioned earlier, the "IF" condition with the "=~" > operator doesn't fully support PCRE. It seems that any regular > expression with parentheses isn't matched using the "=~" operator. > Using "pcre_match" or an alternative regular expression would be more > suitable in this case. > > Thank you > M. Faheem > > On Wed, Jan 3, 2024 at 6:37 PM Michel crans wrote: > > > The reason why your second regular expression is not matching the > pattern is because of a typo in the syntax. You have used the > |~=| operator instead of the |=~| operator, which is the correct > way to test if a string matches a regular expression in PCRE. > > > Op di 2 jan 2024 om 12:28 schreef Faheem Muhammad > : > > Hi everyone, > > Firstly, I wish you all a Happy New Year with the best wishes > for each community member and the OpenSIPS project. > > > I have a question related to regular expressions matching in > an IF condition. > There are two identical regular expressions. One RE is > matching and one RE is not matching the pattern. > > *Sample $fU Range: *+966123456700 to +96612345650 > > # RE1 - Matching Regular expression > if($fU =~"\+9661234567[0-4][0-9]|\+966123456750"){ > xlog("re matched\n") > } > > # RE2  - Non matching Regular expression > if($fU ~="\+9661234567([0-4]\d|50)"){ > } # RE not matched > > Can anyone please suggest what I'm doing wrong? > > *OpenSIPS version*:     3.2.3 > OS: *Debian 12* > > > Best regards, > M. Faheem > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcin at voipplus.net Tue Jan 23 11:44:07 2024 From: marcin at voipplus.net (Marcin Groszek) Date: Tue, 23 Jan 2024 05:44:07 -0600 Subject: [OpenSIPS-Users] $DLG_lifetime but in ms In-Reply-To: References: <44c6cdf3c71f1bf340508ee940a81938f976ed9b.camel@webon.co.za> <319ad443-c099-421c-a901-e20db26d9890@opensips.org> Message-ID: <2ad5a9a0-4104-e4a1-8168-8e3269632f54@voipplus.net> $avp(dlg_lifetime) is a read/ write variable and you can change its value before acc is written. To round up the duration using minimum billing block and increments you need to save them first in to a dialog. this is the logic I use (opensips 3.1)                                         if ($(DLG_lifetime{s.int}) > $(dlg_val(minimum){s.int})) { math_eval("$DLG_lifetime / $dlg_val(increment)", $avp(lifetime)); math_ceil("$avp(lifetime)", $avp(dlg_total_increment)); math_eval("$avp(dlg_total_increment) * $dlg_val(increment)", $avp(dlg_lifetime)); math_ceil("$avp(dlg_lifetime)",$avp(dlg_lifetime));                                         }                                         else {                                                 $avp(dlg_lifetime) = $dlg_val(minimum);                                         } On 1/23/2024 1:12 AM, trevor at webon.co.za wrote: > On Thu, 2024-01-18 at 12:27 +0200, Răzvan Crainea wrote: >> HI, Trevor! >> >> Unfortunately there is currently no way to round up the value, but >> what >> is unclear is why you need the extra billed_duration, and not simply >> using the duration field. >> >> Best regards, >> >> Răzvan Crainea >> OpenSIPS Core Developer / SIPhub CTO >> http://www.opensips-solutions.com / https://www.siphub.com >> >> On 1/11/24 15:55, trevor at webon.co.za wrote: > Hi Răzvan > > I am using rate cacher and want to calculate billing in script and am > unable to use duration field as this is only inserted into DB and not > available as a variable unless I missed something in the document :) > > Regards > Trevor Steyn > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Best Regards: Marcin Groszek Business Phone Service https://www.voipplus.net From trevor at webon.co.za Tue Jan 23 14:29:17 2024 From: trevor at webon.co.za (trevor at webon.co.za) Date: Tue, 23 Jan 2024 16:29:17 +0200 Subject: [OpenSIPS-Users] $DLG_lifetime but in ms In-Reply-To: <2ad5a9a0-4104-e4a1-8168-8e3269632f54@voipplus.net> References: <44c6cdf3c71f1bf340508ee940a81938f976ed9b.camel@webon.co.za> <319ad443-c099-421c-a901-e20db26d9890@opensips.org> <2ad5a9a0-4104-e4a1-8168-8e3269632f54@voipplus.net> Message-ID: On Tue, 2024-01-23 at 05:44 -0600, Marcin Groszek wrote: > $avp(dlg_lifetime) is a read/ write variable and you can change its > value before acc is written. > > To round up the duration using minimum billing block and increments > you > need to save them first in to a dialog. > > this is the logic I use (opensips 3.1) > >                                          if ($(DLG_lifetime{s.int}) > > $(dlg_val(minimum){s.int})) { > math_eval("$DLG_lifetime / $dlg_val(increment)", $avp(lifetime)); > math_ceil("$avp(lifetime)", $avp(dlg_total_increment)); > math_eval("$avp(dlg_total_increment) * $dlg_val(increment)", > $avp(dlg_lifetime)); > math_ceil("$avp(dlg_lifetime)",$avp(dlg_lifetime)); >                                          } >                                          else { >                                                  $avp(dlg_lifetime) = > $dlg_val(minimum); >                                          } > > Hi Marcin, This only works for billing increments bigger than "1" I am implementing per second billing and $DLG_lifetime is a rounded to the nearest second, if a call duration is at 1001ms $DLG_Lifetime will return 1 I need to round up I need to bill anything past 1000ms to 2 seconds. Regards Trevor Steyn From marcin at voipplus.net Tue Jan 23 15:01:22 2024 From: marcin at voipplus.net (Marcin Groszek) Date: Tue, 23 Jan 2024 09:01:22 -0600 Subject: [OpenSIPS-Users] $DLG_lifetime but in ms In-Reply-To: References: <44c6cdf3c71f1bf340508ee940a81938f976ed9b.camel@webon.co.za> <319ad443-c099-421c-a901-e20db26d9890@opensips.org> <2ad5a9a0-4104-e4a1-8168-8e3269632f54@voipplus.net> Message-ID: <67bce38d-58ea-1ab0-08c9-5ab02ca009f4@voipplus.net> use math_ceil 1.4.5.  math_ceil(number, result_var) Truncates a number, always towards +infinity. This means that ceil(3.2) = 4.0 and ceil(-2.9) = -2.0 1.10.3. $DLG_lifetime Returns the duration (in seconds)... On 1/23/2024 8:29 AM, trevor at webon.co.za wrote: > On Tue, 2024-01-23 at 05:44 -0600, Marcin Groszek wrote: >> $avp(dlg_lifetime) is a read/ write variable and you can change its >> value before acc is written. >> >> To round up the duration using minimum billing block and increments >> you >> need to save them first in to a dialog. >> >> this is the logic I use (opensips 3.1) >> >>                                          if ($(DLG_lifetime{s.int}) > >> $(dlg_val(minimum){s.int})) { >> math_eval("$DLG_lifetime / $dlg_val(increment)", $avp(lifetime)); >> math_ceil("$avp(lifetime)", $avp(dlg_total_increment)); >> math_eval("$avp(dlg_total_increment) * $dlg_val(increment)", >> $avp(dlg_lifetime)); >> math_ceil("$avp(dlg_lifetime)",$avp(dlg_lifetime)); >>                                          } >>                                          else { >>                                                  $avp(dlg_lifetime) = >> $dlg_val(minimum); >>                                          } >> >> > Hi Marcin, > > This only works for billing increments bigger than "1" I am > implementing per second billing and $DLG_lifetime is a rounded to the > nearest second, if a call duration is at 1001ms $DLG_Lifetime will > return 1 I need to round up I need to bill anything past 1000ms to 2 > seconds. > > Regards > Trevor Steyn > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Best Regards: Marcin Groszek Business Phone Service https://www.voipplus.net From marcin at voipplus.net Tue Jan 23 15:25:27 2024 From: marcin at voipplus.net (Marcin Groszek) Date: Tue, 23 Jan 2024 09:25:27 -0600 Subject: [OpenSIPS-Users] $DLG_lifetime but in ms In-Reply-To: <67bce38d-58ea-1ab0-08c9-5ab02ca009f4@voipplus.net> References: <44c6cdf3c71f1bf340508ee940a81938f976ed9b.camel@webon.co.za> <319ad443-c099-421c-a901-e20db26d9890@opensips.org> <2ad5a9a0-4104-e4a1-8168-8e3269632f54@voipplus.net> <67bce38d-58ea-1ab0-08c9-5ab02ca009f4@voipplus.net> Message-ID: <95c37c0a-7fa8-c57b-fd34-9edd618ff6ed@voipplus.net> If you are not calculating the cost of the call in the script it self you may create external script to go over your acc table and use "ms_duration" to adjust "duration" or use *$Ts**$Tsm *at the beginning of the call, save it to a dialog and compare it with same value at the end of the call, then round up and write to acc table and/or calculate cost of the call. ** On 1/23/2024 9:01 AM, Marcin Groszek wrote: > use math_ceil > > 1.4.5.  math_ceil(number, result_var) > > Truncates a number, always towards +infinity. This means that > ceil(3.2) = 4.0 and ceil(-2.9) = -2.0 > > > 1.10.3. $DLG_lifetime > > Returns the duration (in seconds)... > > > > On 1/23/2024 8:29 AM, trevor at webon.co.za wrote: >> On Tue, 2024-01-23 at 05:44 -0600, Marcin Groszek wrote: >>> $avp(dlg_lifetime) is a read/ write variable and you can change its >>> value before acc is written. >>> >>> To round up the duration using minimum billing block and increments >>> you >>> need to save them first in to a dialog. >>> >>> this is the logic I use (opensips 3.1) >>> >>>                                           if ($(DLG_lifetime{s.int}) > >>> $(dlg_val(minimum){s.int})) { >>> math_eval("$DLG_lifetime / $dlg_val(increment)", $avp(lifetime)); >>> math_ceil("$avp(lifetime)", $avp(dlg_total_increment)); >>> math_eval("$avp(dlg_total_increment) * $dlg_val(increment)", >>> $avp(dlg_lifetime)); >>> math_ceil("$avp(dlg_lifetime)",$avp(dlg_lifetime)); >>>                                           } >>>                                           else { >>> $avp(dlg_lifetime) = >>> $dlg_val(minimum); >>>                                           } >>> >>> >> Hi Marcin, >> >> This only works for billing increments bigger than "1" I am >> implementing per second billing and $DLG_lifetime is a rounded to the >> nearest second, if a call duration is at 1001ms $DLG_Lifetime will >> return 1 I need to round up I need to bill anything past 1000ms to 2 >> seconds. >> >> Regards >> Trevor Steyn >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> -- Best Regards: Marcin Groszek Business Phone Service https://www.voipplus.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From trevor at webon.co.za Tue Jan 23 19:41:10 2024 From: trevor at webon.co.za (trevor at webon.co.za) Date: Tue, 23 Jan 2024 21:41:10 +0200 Subject: [OpenSIPS-Users] $DLG_lifetime but in ms In-Reply-To: <95c37c0a-7fa8-c57b-fd34-9edd618ff6ed@voipplus.net> References: <44c6cdf3c71f1bf340508ee940a81938f976ed9b.camel@webon.co.za> <319ad443-c099-421c-a901-e20db26d9890@opensips.org> <2ad5a9a0-4104-e4a1-8168-8e3269632f54@voipplus.net> <67bce38d-58ea-1ab0-08c9-5ab02ca009f4@voipplus.net> <95c37c0a-7fa8-c57b-fd34-9edd618ff6ed@voipplus.net> Message-ID: <0c4653c43cdbdebfff348673503cdd872162d5e4.camel@webon.co.za> On Tue, 2024-01-23 at 09:25 -0600, Marcin Groszek wrote: >   > If you are not calculating the cost of the call in the script it self > you may create external script to go over your acc table and use > "ms_duration" to adjust "duration" >   > or use $Ts$Tsm  at the beginning of the call, save it to a dialog and > compare it with same value at the end of the call, then round up and > write to acc table and/or calculate cost of the call. >   > >   >   > On 1/23/2024 9:01 AM, Marcin Groszek wrote: >   >   > > use math_ceil > >   > >  1.4.5.  math_ceil(number, result_var) > >   > >  Truncates a number, always towards +infinity. This means that > > ceil(3.2) = 4.0 and ceil(-2.9) = -2.0 > >   > >   > >  1.10.3. $DLG_lifetime > >   > >  Returns the duration (in seconds)... Hi Marcin, Using math_ceil on $DLG_lifetime wont work as it returns seconds not ms. As for your other suggestion I am doing something similar just not sure its the most efficient I am using get_accurate_time would $ts$Tsm be a better approach, at 200OK in onreply route if ($rs == 200) { get_accurate_time($var(now_s), $var(now_us)); $dlg_val(start_s) = $var(now_s); $dlg_val(start_us) = $var(now_us); } then on BYE if (is_method("BYE")) { get_accurate_time($var(end_s), $var(end_us)); ts_usec_delta($(dlg_val(start_s){s.int}), $(dlg_val(start_us){s.int}), $var(end_s), $var(end_us) , $var(billed_duration)); $var(end_us) , $acc_extra(billed_duration)\n"); math_eval("$var(billed_duration) / 1000000", $var(billed_duration)); math_ceil($var(billed_duration),$var(billed_duration)); $acc_extra(billed_duration) = $var(billed_duration); ## Rate the call math_eval("$acc_extra(c_price) / 60 * $acc_extra(billed_duration)", $var(c_cost)); math_eval("$acc_extra(v_price) / 60 * $acc_extra(billed_duration)", $var(v_cost)); $acc_extra(cost) = $var(c_cost); $acc_extra(v_cost) = $var(v_cost); } Thanks. From Ben.Newlin at genesys.com Tue Jan 23 19:59:57 2024 From: Ben.Newlin at genesys.com (Ben Newlin) Date: Tue, 23 Jan 2024 19:59:57 +0000 Subject: [OpenSIPS-Users] $DLG_lifetime but in ms In-Reply-To: <0c4653c43cdbdebfff348673503cdd872162d5e4.camel@webon.co.za> References: <44c6cdf3c71f1bf340508ee940a81938f976ed9b.camel@webon.co.za> <319ad443-c099-421c-a901-e20db26d9890@opensips.org> <2ad5a9a0-4104-e4a1-8168-8e3269632f54@voipplus.net> <67bce38d-58ea-1ab0-08c9-5ab02ca009f4@voipplus.net> <95c37c0a-7fa8-c57b-fd34-9edd618ff6ed@voipplus.net> <0c4653c43cdbdebfff348673503cdd872162d5e4.camel@webon.co.za> Message-ID: A few people have mentioned this but I haven’t seen a response. Why do you have to do this conversion in the script? The call duration in ms is already included by default in every CDR. We are only talking about rounding here, why wouldn’t your rating application do that for you? That’s much less complex than adding an entirely new field just so OpenSIPS can do the rounding. Ben Newlin From: Users on behalf of trevor at webon.co.za Date: Tuesday, January 23, 2024 at 2:42 PM To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] $DLG_lifetime but in ms EXTERNAL EMAIL - Please use caution with links and attachments On Tue, 2024-01-23 at 09:25 -0600, Marcin Groszek wrote: > > If you are not calculating the cost of the call in the script it self > you may create external script to go over your acc table and use > "ms_duration" to adjust "duration" > > or use $Ts$Tsm at the beginning of the call, save it to a dialog and > compare it with same value at the end of the call, then round up and > write to acc table and/or calculate cost of the call. > > > > > On 1/23/2024 9:01 AM, Marcin Groszek wrote: > > > > use math_ceil > > > > 1.4.5. math_ceil(number, result_var) > > > > Truncates a number, always towards +infinity. This means that > > ceil(3.2) = 4.0 and ceil(-2.9) = -2.0 > > > > > > 1.10.3. $DLG_lifetime > > > > Returns the duration (in seconds)... Hi Marcin, Using math_ceil on $DLG_lifetime wont work as it returns seconds not ms. As for your other suggestion I am doing something similar just not sure its the most efficient I am using get_accurate_time would $ts$Tsm be a better approach, at 200OK in onreply route if ($rs == 200) { get_accurate_time($var(now_s), $var(now_us)); $dlg_val(start_s) = $var(now_s); $dlg_val(start_us) = $var(now_us); } then on BYE if (is_method("BYE")) { get_accurate_time($var(end_s), $var(end_us)); ts_usec_delta($(dlg_val(start_s){s.int}), $(dlg_val(start_us){s.int}), $var(end_s), $var(end_us) , $var(billed_duration)); $var(end_us) , $acc_extra(billed_duration)\n"); math_eval("$var(billed_duration) / 1000000", $var(billed_duration)); math_ceil($var(billed_duration),$var(billed_duration)); $acc_extra(billed_duration) = $var(billed_duration); ## Rate the call math_eval("$acc_extra(c_price) / 60 * $acc_extra(billed_duration)", $var(c_cost)); math_eval("$acc_extra(v_price) / 60 * $acc_extra(billed_duration)", $var(v_cost)); $acc_extra(cost) = $var(c_cost); $acc_extra(v_cost) = $var(v_cost); } Thanks. _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcin at voipplus.net Tue Jan 23 20:09:13 2024 From: marcin at voipplus.net (Marcin Groszek) Date: Tue, 23 Jan 2024 14:09:13 -0600 Subject: [OpenSIPS-Users] $DLG_lifetime but in ms In-Reply-To: <0c4653c43cdbdebfff348673503cdd872162d5e4.camel@webon.co.za> References: <44c6cdf3c71f1bf340508ee940a81938f976ed9b.camel@webon.co.za> <319ad443-c099-421c-a901-e20db26d9890@opensips.org> <2ad5a9a0-4104-e4a1-8168-8e3269632f54@voipplus.net> <67bce38d-58ea-1ab0-08c9-5ab02ca009f4@voipplus.net> <95c37c0a-7fa8-c57b-fd34-9edd618ff6ed@voipplus.net> <0c4653c43cdbdebfff348673503cdd872162d5e4.camel@webon.co.za> Message-ID: <8bbe9847-b153-90d3-c165-95a1a2526f0a@voipplus.net> I am not sure what would be less resource hungry;  $Ts$Tsm v get_accurate_time. get_accurate_time is a function v 2 core variables. I guess a config can be created to run 100 million of both operation and measuring resources used, cpu, ram and time to complete. This only makes sense only if you are calculating cost of the each call in the script. If not then just use external script to round/modifyduration based on ms_duration in acc table after the fact. On 1/23/2024 1:41 PM, trevor at webon.co.za wrote: > On Tue, 2024-01-23 at 09:25 -0600, Marcin Groszek wrote: >> >> If you are not calculating the cost of the call in the script it self >> you may create external script to go over your acc table and use >> "ms_duration" to adjust "duration" >> >> or use $Ts$Tsm  at the beginning of the call, save it to a dialog and >> compare it with same value at the end of the call, then round up and >> write to acc table and/or calculate cost of the call. >> >> >> >> >> On 1/23/2024 9:01 AM, Marcin Groszek wrote: >> >> >>> use math_ceil >>> >>>  1.4.5.  math_ceil(number, result_var) >>> >>>  Truncates a number, always towards +infinity. This means that >>> ceil(3.2) = 4.0 and ceil(-2.9) = -2.0 >>> >>> >>>  1.10.3. $DLG_lifetime >>> >>>  Returns the duration (in seconds)... > Hi Marcin, > > Using math_ceil on $DLG_lifetime wont work as it returns seconds not > ms. > > As for your other suggestion I am doing something similar just not sure > its the most efficient I am using get_accurate_time would $ts$Tsm be a > better approach, > > > at 200OK in onreply route > > if ($rs == 200) { > get_accurate_time($var(now_s), $var(now_us)); > $dlg_val(start_s) = $var(now_s); > $dlg_val(start_us) = $var(now_us); > } > > then on BYE > > if (is_method("BYE")) { > get_accurate_time($var(end_s), $var(end_us)); > ts_usec_delta($(dlg_val(start_s){s.int}), > $(dlg_val(start_us){s.int}), $var(end_s), $var(end_us) , > $var(billed_duration)); > $var(end_us) , $acc_extra(billed_duration)\n"); > math_eval("$var(billed_duration) / 1000000", > $var(billed_duration)); > math_ceil($var(billed_duration),$var(billed_duration)); > $acc_extra(billed_duration) = $var(billed_duration); > > ## Rate the call > > math_eval("$acc_extra(c_price) / 60 * $acc_extra(billed_duration)", > $var(c_cost)); > math_eval("$acc_extra(v_price) / 60 * $acc_extra(billed_duration)", > $var(v_cost)); > $acc_extra(cost) = $var(c_cost); > $acc_extra(v_cost) = $var(v_cost); > } > > Thanks. > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Best Regards: Marcin Groszek Business Phone Service https://www.voipplus.net From trevor at webon.co.za Tue Jan 23 21:01:38 2024 From: trevor at webon.co.za (trevor at webon.co.za) Date: Tue, 23 Jan 2024 23:01:38 +0200 Subject: [OpenSIPS-Users] $DLG_lifetime but in ms In-Reply-To: References: <44c6cdf3c71f1bf340508ee940a81938f976ed9b.camel@webon.co.za> <319ad443-c099-421c-a901-e20db26d9890@opensips.org> <2ad5a9a0-4104-e4a1-8168-8e3269632f54@voipplus.net> <67bce38d-58ea-1ab0-08c9-5ab02ca009f4@voipplus.net> <95c37c0a-7fa8-c57b-fd34-9edd618ff6ed@voipplus.net> <0c4653c43cdbdebfff348673503cdd872162d5e4.camel@webon.co.za> Message-ID: On Tue, 2024-01-23 at 19:59 +0000, Ben Newlin wrote: > > > A few people have mentioned this but I haven’t seen a response. Why > do you have to do this conversion in the script? The call duration in > ms is already included by default in every CDR. We are only talking > about rounding here, why wouldn’t your rating application do that for > you? That’s much less complex than adding an entirely new field just > so OpenSIPS can do the rounding. >   > > Ben Newlin >   Hi Benlin, Yes if you are rating out of opensips the ms_duration field and duration is already rounded for my liking, But I am not wanting to build an external billing engine, I want to use Rate cacher (meant to do simple billing inside opensips) thus need access to accurate time of dialogue. Regards Trevor Steyn From trevor at webon.co.za Tue Jan 23 21:03:52 2024 From: trevor at webon.co.za (trevor at webon.co.za) Date: Tue, 23 Jan 2024 23:03:52 +0200 Subject: [OpenSIPS-Users] $DLG_lifetime but in ms In-Reply-To: <8bbe9847-b153-90d3-c165-95a1a2526f0a@voipplus.net> References: <44c6cdf3c71f1bf340508ee940a81938f976ed9b.camel@webon.co.za> <319ad443-c099-421c-a901-e20db26d9890@opensips.org> <2ad5a9a0-4104-e4a1-8168-8e3269632f54@voipplus.net> <67bce38d-58ea-1ab0-08c9-5ab02ca009f4@voipplus.net> <95c37c0a-7fa8-c57b-fd34-9edd618ff6ed@voipplus.net> <0c4653c43cdbdebfff348673503cdd872162d5e4.camel@webon.co.za> <8bbe9847-b153-90d3-c165-95a1a2526f0a@voipplus.net> Message-ID: On Tue, 2024-01-23 at 14:09 -0600, Marcin Groszek wrote: > I am not sure what would be less resource hungry;  $Ts$Tsm v > get_accurate_time. > > get_accurate_time is a function v 2 core variables. > I guess a config can be created to run 100 million of both operation > and measuring resources used, cpu, ram and time to complete. > > This only makes sense only if you are calculating cost of the each > call in the script. > If not then just use external script to round/modifyduration based on > ms_duration in acc table after the fact. > Thanks Marcin, yes I think I may benchmark the 2 to see which is more efficeint, yes I am trying to bill inside of opensips using ratecacher module for this purpose. Regards Trevor Steyn From spanda at 3clogic.com Wed Jan 24 10:04:12 2024 From: spanda at 3clogic.com (Sasmita Panda) Date: Wed, 24 Jan 2024 15:34:12 +0530 Subject: [OpenSIPS-Users] Need some help around script transfermation in opensips 3.2 . Message-ID: Hi All , I am using opensips 3.2 script transformation parameters to find the existence of a parameter in ; separated list of parameters . In INVITE I have a custom header X-tag which contains a value as below . X-Tag : Laptop Agents used to get registered with X-Tag with some values and I used to put them in the attr column of the location table . Agent X-Tag : Laptop=1;Laptop laptop=1 While processing the call , I am matching if the X-Tag in Invite exists in the Agent tag . If the exact parameter exists then give a call to that contact else not . For that I using below transformation *{param.exist,Laptop}* Somehow this is not working . It's giving an error . As for my expectation it should match with the first parameter and as that's an exact match agent must get the call . But its not happening and breaking with error . *ERROR:core:parse_params: invalid character, ; expected, found l* *while checking the existence of parameters, is that only checking a single word without any space ?Also special characters are allowed in between or not ? * *Thanks & Regards* *Sasmita Panda* *Senior Network Testing and Software Engineer* *3CLogic , ph:07827611765* -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Wed Jan 24 12:42:37 2024 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Wed, 24 Jan 2024 14:42:37 +0200 Subject: [OpenSIPS-Users] Need some help around script transfermation in opensips 3.2 . In-Reply-To: References: Message-ID: <287cb3ce-eac2-4d57-a8fb-f7ec181a051e@opensips.org> Hi, What is the exact string you are using when getting that err? I'm asking as the `Laptop=1;Laptop laptop=1` is invalid due to the space char there (a param list does allow such spaces) Regards Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com https://www.siphub.com On 24.01.2024 12:04, Sasmita Panda wrote: > Hi All , > I am using opensips 3.2 script transformation parameters to find the > existence of a  parameter in  ; separated list of parameters . > > In INVITE I have a custom header X-tag which contains a value as below . > X-Tag : Laptop > > Agents used to get registered with X-Tag with some values and I used > to put them in the attr column of the location table . > Agent X-Tag : Laptop=1;Laptop laptop=1 > > While processing the call , I am matching if the X-Tag in Invite > exists in the Agent tag . If the exact parameter exists  then give a > call to that contact else not . For that I using below transformation > > *{param.exist,Laptop}* > > Somehow this is not working . It's giving an error . As for my > expectation it should match with the first parameter and as that's an > exact match agent must get the call . But its not happening and > breaking with error . > > *ERROR:core:parse_params: invalid character, ; expected, found l* > * > * > *while checking the existence of parameters, is that only checking a > single word without any space ?Also special characters are allowed in > between or not  ? * > > */Thanks & Regards/* > /Sasmita Panda/ > /Senior Network Testing and Software Engineer/ > /3CLogic , ph:07827611765/ > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From spanda at 3clogic.com Wed Jan 24 12:53:40 2024 From: spanda at 3clogic.com (Sasmita Panda) Date: Wed, 24 Jan 2024 18:23:40 +0530 Subject: [OpenSIPS-Users] Need some help around script transfermation in opensips 3.2 . In-Reply-To: <287cb3ce-eac2-4d57-a8fb-f7ec181a051e@opensips.org> References: <287cb3ce-eac2-4d57-a8fb-f7ec181a051e@opensips.org> Message-ID: param list allows special characters like " - or _ "? *Thanks & Regards* *Sasmita Panda* *Senior Network Testing and Software Engineer* *3CLogic , ph:07827611765* On Wed, Jan 24, 2024 at 6:12 PM Bogdan-Andrei Iancu wrote: > Hi, > > What is the exact string you are using when getting that err? I'm asking > as the `Laptop=1;Laptop laptop=1` is invalid due to the space char there (a > param list does allow such spaces) > > Regards > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > https://www.siphub.com > > On 24.01.2024 12:04, Sasmita Panda wrote: > > Hi All , > I am using opensips 3.2 script transformation parameters to find the > existence of a parameter in ; separated list of parameters . > > In INVITE I have a custom header X-tag which contains a value as below . > X-Tag : Laptop > > Agents used to get registered with X-Tag with some values and I used to > put them in the attr column of the location table . > Agent X-Tag : Laptop=1;Laptop laptop=1 > > While processing the call , I am matching if the X-Tag in Invite exists in > the Agent tag . If the exact parameter exists then give a call to that > contact else not . For that I using below transformation > > *{param.exist,Laptop}* > > > Somehow this is not working . It's giving an error . As for my expectation > it should match with the first parameter and as that's an exact match agent > must get the call . But its not happening and breaking with error . > > *ERROR:core:parse_params: invalid character, ; expected, found l* > > *while checking the existence of parameters, is that only checking a > single word without any space ?Also special characters are allowed in > between or not ? * > > *Thanks & Regards* > *Sasmita Panda* > *Senior Network Testing and Software Engineer* > *3CLogic , ph:07827611765* > > _______________________________________________ > Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Wed Jan 24 12:57:37 2024 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Wed, 24 Jan 2024 14:57:37 +0200 Subject: [OpenSIPS-Users] Need some help around script transfermation in opensips 3.2 . In-Reply-To: References: <287cb3ce-eac2-4d57-a8fb-f7ec181a051e@opensips.org> Message-ID: <57d7a129-9723-4abf-806c-d2487b22627f@opensips.org> check the grammar as per RFC3261 https://www.ietf.org/rfc/rfc3261.html#section-25.1 Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com https://www.siphub.com On 24.01.2024 14:53, Sasmita Panda wrote: > param list allows special characters like " - or _ "? > > > */Thanks & Regards/* > /Sasmita Panda/ > /Senior Network Testing and Software Engineer/ > /3CLogic , ph:07827611765/ > > > On Wed, Jan 24, 2024 at 6:12 PM Bogdan-Andrei Iancu > wrote: > > Hi, > > What is the exact string you are using when getting that err? I'm > asking as the `Laptop=1;Laptop laptop=1` is invalid due to the > space char there (a param list does allow such spaces) > > Regards > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > https://www.siphub.com > > On 24.01.2024 12:04, Sasmita Panda wrote: >> Hi All , >> I am using opensips 3.2 script transformation parameters to find >> the existence of a parameter in  ; separated list of parameters . >> >> In INVITE I have a custom header X-tag which contains a value as >> below . >> X-Tag : Laptop >> >> Agents used to get registered with X-Tag with some values and I >> used to put them in the attr column of the location table . >> Agent X-Tag : Laptop=1;Laptop laptop=1 >> >> While processing the call , I am matching if the X-Tag in Invite >> exists in the Agent tag . If the exact parameter exists  then >> give a call to that contact else not . For that I using below >> transformation >> >> *{param.exist,Laptop}* >> >> Somehow this is not working . It's giving an error . As for my >> expectation it should match with the first parameter and as >> that's an exact match agent must get the call . But its not >> happening and breaking with error . >> >> *ERROR:core:parse_params: invalid character, ; expected, found l* >> * >> * >> *while checking the existence of parameters, is that only >> checking a single word without any space ?Also special characters >> are allowed in between or not  ? * >> >> */Thanks & Regards/* >> /Sasmita Panda/ >> /Senior Network Testing and Software Engineer/ >> /3CLogic , ph:07827611765/ >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Wed Jan 24 13:10:00 2024 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Wed, 24 Jan 2024 15:10:00 +0200 Subject: [OpenSIPS-Users] [RFC] HTTP/2 server support for IMS/5G Message-ID: <73caf9ee-55c9-4cb0-b23c-2685cba68836@opensips.org> Hi all, In the IMS world there is a strong need for OpenSIPS to act as server for some non-SIP protocols like DIAMETER - this is already on the roadmap, part of tech requirements from the IMS Working Group within OpenSIPS project. BTW, Liviu will update on this topic within the next days. Now, in the 5G standard, HTTP/2 is defined as replacement (want to be) for DIAMETER. If acting as HTTP/2 client from within OpenSIPS is rather trivial (using the rest_client module), the question that arise here is:      Does anyone see the need for *HTTP/2 server support*, similar to the DIAMETER one ?? Is this need more than a theoretical one, with a practical usage for now or near future? if so, is anyone willing to get involved into some testing here ? Best regards, -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com https://www.siphub.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.g at officering.com Wed Jan 24 14:31:30 2024 From: a.g at officering.com (Alex Goulis) Date: Wed, 24 Jan 2024 08:31:30 -0600 Subject: [OpenSIPS-Users] [WG-IMS] [RFC] HTTP/2 server support for IMS/5G In-Reply-To: <73caf9ee-55c9-4cb0-b23c-2685cba68836@opensips.org> References: <73caf9ee-55c9-4cb0-b23c-2685cba68836@opensips.org> Message-ID: Although I don't see a need to actually replace the diameter you might want to consider that this is kind of bleeding edge stuff and the more choices you have for interfacing the better. The development and maturity of tools available is very fast and fluid and in the future there might actually be a bona fide need to use the HTTP2 On Wed, Jan 24, 2024, 7:10 AM Bogdan-Andrei Iancu wrote: > Hi all, > > In the IMS world there is a strong need for OpenSIPS to act as server for > some non-SIP protocols like DIAMETER - this is already on the roadmap, part > of tech requirements from the IMS Working Group within OpenSIPS project. > BTW, Liviu will update on this topic within the next days. > > Now, in the 5G standard, HTTP/2 is defined as replacement (want to be) for > DIAMETER. If acting as HTTP/2 client from within OpenSIPS is rather trivial > (using the rest_client module), the question that arise here is: > Does anyone see the need for *HTTP/2 server support*, similar to the > DIAMETER one ?? > > Is this need more than a theoretical one, with a practical usage for now > or near future? if so, is anyone willing to get involved into some testing > here ? > > Best regards, > > -- > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > https://www.siphub.com > > _______________________________________________ > Wg-ims mailing list > Wg-ims at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/wg-ims > -------------- next part -------------- An HTML attachment was scrubbed... URL: From spanda at 3clogic.com Mon Jan 29 08:47:03 2024 From: spanda at 3clogic.com (Sasmita Panda) Date: Mon, 29 Jan 2024 14:17:03 +0530 Subject: [OpenSIPS-Users] Need some help around script transfermation in opensips 3.2 . In-Reply-To: <57d7a129-9723-4abf-806c-d2487b22627f@opensips.org> References: <287cb3ce-eac2-4d57-a8fb-f7ec181a051e@opensips.org> <57d7a129-9723-4abf-806c-d2487b22627f@opensips.org> Message-ID: Hi Bogdan , I just encountered another discrepancy as below . In INVITE I have a custom header X-tag which contains a value as below . X-Tag : *laptop* Agents used to get registered with X-Tag with some values and I used to put them in the attr column of the location table . Agent X-Tag : *Laptop*=1;Product=1 The comparison logic is the same as above *{param.exist,laptop} in Agents attribute . In this case the call is getting processed . I was thinking this should be a case sensitive match . But it's not . * *Is this the correct behaviour ? If I need an exact match with case sensitivity then will that be possible?* *Thanks & Regards* *Sasmita Panda* *Senior Network Testing and Software Engineer* *3CLogic , ph:07827611765* On Wed, Jan 24, 2024 at 6:27 PM Bogdan-Andrei Iancu wrote: > check the grammar as per RFC3261 > https://www.ietf.org/rfc/rfc3261.html#section-25.1 > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > https://www.siphub.com > > On 24.01.2024 14:53, Sasmita Panda wrote: > > param list allows special characters like " - or _ "? > > > *Thanks & Regards* > *Sasmita Panda* > *Senior Network Testing and Software Engineer* > *3CLogic , ph:07827611765* > > > On Wed, Jan 24, 2024 at 6:12 PM Bogdan-Andrei Iancu > wrote: > >> Hi, >> >> What is the exact string you are using when getting that err? I'm asking >> as the `Laptop=1;Laptop laptop=1` is invalid due to the space char there (a >> param list does allow such spaces) >> >> Regards >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> https://www.siphub.com >> >> On 24.01.2024 12:04, Sasmita Panda wrote: >> >> Hi All , >> I am using opensips 3.2 script transformation parameters to find the >> existence of a parameter in ; separated list of parameters . >> >> In INVITE I have a custom header X-tag which contains a value as below . >> X-Tag : Laptop >> >> Agents used to get registered with X-Tag with some values and I used to >> put them in the attr column of the location table . >> Agent X-Tag : Laptop=1;Laptop laptop=1 >> >> While processing the call , I am matching if the X-Tag in Invite exists >> in the Agent tag . If the exact parameter exists then give a call to that >> contact else not . For that I using below transformation >> >> *{param.exist,Laptop}* >> >> >> Somehow this is not working . It's giving an error . As for my >> expectation it should match with the first parameter and as that's an exact >> match agent must get the call . But its not happening and breaking with >> error . >> >> *ERROR:core:parse_params: invalid character, ; expected, found l* >> >> *while checking the existence of parameters, is that only checking a >> single word without any space ?Also special characters are allowed in >> between or not ? * >> >> *Thanks & Regards* >> *Sasmita Panda* >> *Senior Network Testing and Software Engineer* >> *3CLogic , ph:07827611765* >> >> _______________________________________________ >> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From liviu at opensips.org Mon Jan 29 09:12:39 2024 From: liviu at opensips.org (Liviu Chircu) Date: Mon, 29 Jan 2024 11:12:39 +0200 Subject: [OpenSIPS-Users] [Release Freeze] Upcoming OpenSIPS 3.4.4 and 3.2.17 Minor Releases Message-ID: <43793703-664e-4dff-90fb-86a43998ea52@opensips.org> Hi, all! The 3.4.4 and 3.2.17 OpenSIPS minor versions are scheduled for release on *Wednesday, Feb 21st*. In preparation for the releases, starting *Wednesday, Feb 7th*, we will impose the usual *freeze* on any significant fixes (as complexity) on these stable branches, in order to ensure a /two-week safe window/ for testing. So please make sure to ping any outstanding issues on the GitHub issue tracker that may have skipped our attention -- thank you in advance! PS: we are aware of issue #3286 , related to rest_client in async mode, and are working towards a resolution in due time. Best regards, -- Liviu Chircu www.twitter.com/liviuchircu |www.opensips-solutions.com OpenSIPS Summit 2024 Valencia, May 14-17 |www.opensips.org/events -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Tue Jan 30 07:10:51 2024 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Tue, 30 Jan 2024 09:10:51 +0200 Subject: [OpenSIPS-Users] Need some help around script transfermation in opensips 3.2 . In-Reply-To: References: <287cb3ce-eac2-4d57-a8fb-f7ec181a051e@opensips.org> <57d7a129-9723-4abf-806c-d2487b22627f@opensips.org> Message-ID: <25c2251b-569f-4532-950a-05683519e208@opensips.org> Hi, indeed, the checks is case insensitive as the param names in SIP are case insensitive (as per RFC). Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com https://www.siphub.com On 29.01.2024 10:47, Sasmita Panda wrote: > Hi Bogdan , > > I just encountered another discrepancy as below . > > In INVITE I have a custom header X-tag which contains a value as below . > X-Tag : *laptop* > > Agents used to get registered with X-Tag with some values and I used > to put them in the attr column of the location table . > Agent X-Tag : *Laptop*=1;Product=1 > > > The comparison logic is the same as above *{param.exist,laptop} in > Agents attribute . In this case the call is getting processed . I was > thinking this should be a case sensitive match . But it's not . * > * > * > *Is this the correct behaviour ? If I need an exact match with case > sensitivity then will that be possible?* > > */Thanks & Regards/* > /Sasmita Panda/ > /Senior Network Testing and Software Engineer/ > /3CLogic , ph:07827611765/ > > > On Wed, Jan 24, 2024 at 6:27 PM Bogdan-Andrei Iancu > wrote: > > check the grammar as per RFC3261 > https://www.ietf.org/rfc/rfc3261.html#section-25.1 > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > https://www.siphub.com > > On 24.01.2024 14:53, Sasmita Panda wrote: >> param list allows special characters like " - or _  "? >> >> >> */Thanks & Regards/* >> /Sasmita Panda/ >> /Senior Network Testing and Software Engineer/ >> /3CLogic , ph:07827611765/ >> >> >> On Wed, Jan 24, 2024 at 6:12 PM Bogdan-Andrei Iancu >> wrote: >> >> Hi, >> >> What is the exact string you are using when getting that err? >> I'm asking as the `Laptop=1;Laptop laptop=1` is invalid due >> to the space char there (a param list does allow such spaces) >> >> Regards >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> https://www.siphub.com >> >> On 24.01.2024 12:04, Sasmita Panda wrote: >>> Hi All , >>> I am using opensips 3.2 script transformation parameters to >>> find the existence of a  parameter in  ; separated list of >>> parameters . >>> >>> In INVITE I have a custom header X-tag which contains a >>> value as below . >>> X-Tag : Laptop >>> >>> Agents used to get registered with X-Tag with some values >>> and I used to put them in the attr column of the location >>> table . >>> Agent X-Tag : Laptop=1;Laptop laptop=1 >>> >>> While processing the call , I am matching if the X-Tag in >>> Invite exists in the Agent tag . If the exact parameter >>> exists  then give a call to that contact else not . For that >>> I using below transformation >>> >>> *{param.exist,Laptop}* >>> >>> Somehow this is not working . It's giving an error . As for >>> my expectation it should match with the first parameter and >>> as that's an exact match agent must get the call . But its >>> not happening and breaking with error . >>> >>> *ERROR:core:parse_params: invalid character, ; expected, >>> found l* >>> * >>> * >>> *while checking the existence of parameters, is that only >>> checking a single word without any space ?Also special >>> characters are allowed in between or not  ? * >>> >>> */Thanks & Regards/* >>> /Sasmita Panda/ >>> /Senior Network Testing and Software Engineer/ >>> /3CLogic , ph:07827611765/ >>> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From callum.guy at x-on.co.uk Tue Jan 30 14:27:41 2024 From: callum.guy at x-on.co.uk (Callum Guy) Date: Tue, 30 Jan 2024 14:27:41 +0000 Subject: [OpenSIPS-Users] load_balancer usage counter Message-ID: Hi All, I'm implementing the load_balancer module on a very busy system where thousands of calls may arrive in a matter of seconds. The module is configured to receive heartbeats every 1 second from many freeswitch servers, I have this set as a low value to try and keep OpenSIPs up to date with the real call load, as close to real time as possible. All servers exist in a single group "channels" to keep the initial implementation simple. When I kick off the session I use lb_start(1, "channels", "rs") and if that destination fails I use lb_is_started() and lb_next() to select the next destination. With the high call rate I'm concerned that the load values acquired 1 second ago will be used for the entirety of the following second which would likely lead to a highly imbalanced load. If 1000 calls arrive in that second I need them spread evenly over the freeswitch servers which can only happen if OpenSIPs is counting each call as its allocated. My hope is that the module increments its counters each time a call is allocated to a destination; however I have been unable to isolate the line of code which performs this operation so I'm reaching out for confirmation. I can see the module adding the dialogs to profiles and that a separate lb_count_call() method is provided for counting calls but I'm unclear on the exact usage although it certainly encourages me that this counting is taking place somewhere. Thanks for reading, Callum -- Find out more about the SystmOne upgrade *0333 332 0000  |  x-on.co.uk   | **  |   **Practice Index Reviews * *Our new office address: 22 Riduna Park, Melton IP12 1QT.* X-on is a trading name of X-on Health Ltd a limited company registered in England and Wales. Registered Office : Glebe Farm, Down Street, Dummer, Basingstoke, Hampshire, England RG25 2AD. Company Registration No. 2578478. The information in this e-mail is confidential and for use by the addressee(s) only. If you are not the intended recipient, please notify X-on immediately on +44(0)333 332 0000 and delete the message from your computer. If you are not a named addressee you must not use, disclose, disseminate, distribute, copy, print or reply to this email. Views or opinions expressed by an individual within this email may not necessarily reflect the views of X-on or its associated companies. Although X-on routinely screens for viruses, addressees should scan this email and any attachments for viruses. X-on makes no representation or warranty as to the absence of viruses in this email or any attachments.