[OpenSIPS-Users] opensips udp workers lock up with sched_yield
In a SIP video environment we have a pair of opensips servers load balancing traffic to freeswitch. The call volume is modest among the two proxies, about 400 concurrent calls at peak times. We are occasionally seeing opensips lock up and stop responding to SIP traffic. There is no error in the syslog and no indication of resource exhaustion on the VM (it is a 4-core VMware instance with 4GB of RAM). Once opensips locks up, CPU soon reaches 100%, but before that, it was not using even 50% of the CPU. Get_statistics shows that neither the shared memory nor pkg memory are heavily used. They are set at 64M / 4M opensipsctl trace shows this on the udp worker threads (children=8 in config – it was previously set to children=4 and showed the same behavior) [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x7f5b14028bb7 in sched_yield () at ../sysdeps/unix/syscall-template.S:81 #0 0x7f5b14028bb7 in sched_yield () at ../sysdeps/unix/syscall-template.S:81 No locals. #1 0x005323a5 in ?? () No symbol table info available. #2 0x7f5b0ec6c48f in send_pr_buffer () from /usr/lib/x86_64-linux-gnu/opensips/modules/tm.so No symbol table info available. #3 0x7f5b0ec9eb9b in t_forward_nonack () from /usr/lib/x86_64-linux-gnu/opensips/modules/tm.so No symbol table info available. #4 0x7f5b0ec6defe in t_relay_to () from /usr/lib/x86_64-linux-gnu/opensips/modules/tm.so No symbol table info available. #5 0x7f5b0ec815ee in ?? () from /usr/lib/x86_64-linux-gnu/opensips/modules/tm.so No symbol table info available. #6 0x0042b20a in do_action () No symbol table info available. #7 0x00430590 in run_action_list () No symbol table info available. #8 0x0046d3bc in ?? () No symbol table info available. #9 0x0046cc1d in eval_expr () No symbol table info available. #10 0x0046cc39 in eval_expr () No symbol table info available. #11 0x0046cc09 in eval_expr () No symbol table info available. #12 0x0042b19a in do_action () No symbol table info available. #13 0x00430590 in run_action_list () No symbol table info available. #14 0x004306ba in ?? () No symbol table info available. #15 0x0042da9a in do_action () No symbol table info available. #16 0x00430590 in run_action_list () No symbol table info available. #17 0x0042e62e in do_action () No symbol table info available. #18 0x00430590 in run_action_list () No symbol table info available. #19 0x0042e62e in do_action () No symbol table info available. #20 0x00430590 in run_action_list () No symbol table info available. #21 0x004308d0 in run_top_route () No symbol table info available. #22 0x00436ef3 in receive_msg () No symbol table info available. #23 0x0052d5c5 in ?? () No symbol table info available. #24 0x0051536d in ?? () No symbol table info available. #25 0x0051837a in udp_rcv_loop () No symbol table info available. #26 0x00519c38 in udp_start_processes () No symbol table info available. #27 0x0041c38a in main () No symbol table info available. ---end 82753 --- We also find no evidence in network captures of any network problem or anomalous SIP packet that could be causing a problem. How can we troubleshoot this? The only way to recover the service is to restart opensips. “The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer.” ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] is there native odbc module?
> > I am new to opensips. Right now I am using exec to interface with my > database via php-odbc. Is there a native odbc module that would have less > overhed than my current approach? Also, how do I get a record of the call written to a database or a file? basic information, caller ID, number, duration, and date Philip Orleand > > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] OpenSIPS as Teams SBC
Hi all I was asked today about the possibility of using OpenSIPS as an SBC for Teams/Direct Routing. I've seen the how to: https://blog.opensips.org/2019/09/16/opensips-as-ms-teams-sbc/ I am just wondering if anyone on this list does this in production? If so what is your approach to support given that OpenSIPS is not approved by Microsoft? Best regards Mark. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Question about qrouting module
On 27.02.2020 17:26, Abdoul Osséni wrote: I want to test qrouting module. Do you have some qrouting configs examples? Regards Hey, Abdoul! It's quite an "out-of-the-box" solution, you'd be surprised. Here are some provisioning tips: * provision any qrouting profiles you want to play with in the "qr_profiles" table [1] * in dr_rules, make sure to set the "sort_alg" column to 'Q' in order to enable qrouting for each rule * in dr_rules, for each 'Q'-enabled rule, set the "sort_profile" to your desired profile "id" taken from the "qr_profiles" table From here on, it's just a matter of loading up the modules and setting up the "db_url" modparams. The modules will complain if something is missing and tell you what to load anyway! :) Regarding the script: nothing changes. Just call do_routing() [2] as usual, and it will both collect stats and sort the destinations based on quality. If you want to integrate with custom stats, check out the module docs [3], there is plenty of help. Below is the module configuration -- everything else is just drouting! Best regards, [1]: https://github.com/OpenSIPS/opensips/blob/master/scripts/mysql/qrouting-create.sql [2]: https://opensips.org/docs/modules/3.1.x/drouting.html#func_do_routing [3]: https://opensips.org/docs/modules/3.1.x/qrouting.html --- qrouting.cfg loadmodule "db_mysql.so" loadmodule "drouting.so" modparam("drouting", "use_partitions", 1) modparam("drouting", "rule_id_avp", "$avp(ruleid)") modparam("drouting", "gw_id_avp", "$avp(gwid)") modparam("drouting", "db_partitions_url", "mysql://root:xx@10.0.0.10/opensips") loadmodule "qrouting.so" modparam("qrouting", "algorithm", "dynamic-weights") modparam("qrouting", "history_span", 30) modparam("qrouting", "extra_stats", "+mos/1; +r_factor/1") # for fast testing modparam("qrouting", "min_samples_asr", 0) modparam("qrouting", "min_samples_ccr", 0) modparam("qrouting", "min_samples_pdd", 0) modparam("qrouting", "min_samples_ast", 0) modparam("qrouting", "min_samples_acd", 0) modparam("qrouting", "decimal_digits", 3) modparam("qrouting", "db_url", "mysql://root:xx@10.0.0.10/opensips") -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com OpenSIPS Summit, Amsterdam, May 2020 www.opensips.org/events OpenSIPS Bootcamp, Miami, March 2020 www.opensips.org/training ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] do_routing() Question
Thanks for the clarification Liviu. Mark. On Thu, 27 Feb 2020 at 14:20, Liviu Chircu wrote: > On 27.02.2020 16:17, Mark Farmer wrote: > > If I use do_routing() in an if statement like this: > > > > if (is_from_gw("2") && do_routing("3")) { > > set flag(EXT_TPTY); > > ... > > } > > > > Do I need to call do_routing() again before actually routing the call? > > Hi, Mark! > > Unless you specify the "C" flag, do_routing() will overwrite your R-URI > by default. So you can t_relay() right after the 1st call! > > Regards, > > -- > Liviu Chircu > www.twitter.com/liviuchircu | www.opensips-solutions.com > > OpenSIPS Summit, Amsterdam, May 2020 >www.opensips.org/events > OpenSIPS Bootcamp, Miami, March 2020 >www.opensips.org/training > > -- Mark Farmer farm...@gmail.com ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Call MI functions from script
On 27.02.2020 17:17, Schneur Rosenberg wrote: I don't know if you can, but I assume you can always write a external script with xmlrpc and use the exec in a timer route to execute the script. Or simply send yourself an MI datagram [1] command via UDP, from an external script (bash, Python, etc.) which you'd invoke from opensips.cfg using exec() [2], possibly even async(exec()) to make it snappier. Somewhat of a hermaphroditic behavior, but gets the job well done! [1]: https://opensips.org/docs/modules/3.1.x/mi_datagram.html [2]: https://opensips.org/docs/modules/3.1.x/exec.html#func_exec -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com OpenSIPS Summit, Amsterdam, May 2020 www.opensips.org/events OpenSIPS Bootcamp, Miami, March 2020 www.opensips.org/training ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Question about qrouting module
Hello, I want to test qrouting module. Do you have some qrouting configs examples? Regards Abdoul OSSENI https://www.africallshop.com/ Le jeu. 13 févr. 2020 à 15:15, Liviu Chircu a écrit : > On 13.02.2020 16:02, Abdoul Osséni wrote: > > Congratulations for the work done. In my opinion, it is a big feature. > Thank you! Over the years, there were lots of discussions on this > topic. To quote Linus > Torvalds: "Talk is cheap. Show me the code." -- that'spretty much what > we finally decided to do. > > > I have a question about replication of qmodule data (signaling > > statistics) in a Opensips cluster. > > If I have 2 active nodes in the cluster. Is the both nodes will share > > qmodule data? > > Is it done automatically or I need to make something ? > > The qrouting module is currently not cluster aware, so no qrouting > statistics will be shared > between your nodes. The gatewaydisabling logic [1] is not even restart > persistent, so there are > plentyof work and ideas to put into the module! > > [1]: > https://opensips.org/docs/modules/3.1.x/qrouting.html#func_qr_disable_dst > > -- > Liviu Chircu > www.twitter.com/liviuchircu | www.opensips-solutions.com > > OpenSIPS Summit, Amsterdam, May 2020 >www.opensips.org/events > OpenSIPS Bootcamp, Miami, March 2020 >www.opensips.org/training > > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Call MI functions from script
I don't know if you can, but I assume you can always write a external script with xmlrpc and use the exec in a timer route to execute the script. On Tue, Feb 25, 2020, 9:40 PM Grant Bagdasarian wrote: > Hello, > > Is it possible to call MI functions from within the OpenSips script? > For instance, call the domain_reload function inside a timer_route to > refresh the domains every N seconds? I know this may be a bad example, > since the domain module supports caching and realtime mode, but I hope > you get the idea. > > I've been going through the documentation (mainly modules), but > couldn't find anything that allows me to perform these tasks. > > Regards, > > Grant > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] do_routing() Question
On 27.02.2020 16:17, Mark Farmer wrote: If I use do_routing() in an if statement like this: if (is_from_gw("2") && do_routing("3")) { set flag(EXT_TPTY); ... } Do I need to call do_routing() again before actually routing the call? Hi, Mark! Unless you specify the "C" flag, do_routing() will overwrite your R-URI by default. So you can t_relay() right after the 1st call! Regards, -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com OpenSIPS Summit, Amsterdam, May 2020 www.opensips.org/events OpenSIPS Bootcamp, Miami, March 2020 www.opensips.org/training ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] do_routing() Question
Hi everyone If I use do_routing() in an if statement like this: if (is_from_gw("2") && do_routing("3")) { set flag(EXT_TPTY); ... } Do I need to call do_routing() again before actually routing the call? Many thanks Mark. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Content-Type: text/plain; charset="utf-8"
Hello kamlesh! I met a similar problem when removing ISUP body and also wrote about this problem in this newsletter. No one answered, I had to think for myself. Before uninstalling, do this «hack» replace_all("Content-Length", "X-"); And then delete remove_body_part("application/vnd.etsi.pstn+xml") >Среда, 26 февраля 2020, 12:30 +03:00 от users-requ...@lists.opensips.org: > >Send Users mailing list submissions to >users@lists.opensips.org > >To subscribe or unsubscribe via the World Wide Web, visit >http://lists.opensips.org/cgi-bin/mailman/listinfo/users >or, via email, send a message with subject or body 'help' to >users-requ...@lists.opensips.org > >You can reach the person managing the list at >users-ow...@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. Re: help with error messages (David Villasmil) > 2. incorrect content length in body part (Kamlesh .) > > >-- > >Message: 1 >Date: Wed, 26 Feb 2020 08:27:33 + >From: David Villasmil < david.villasmil.w...@gmail.com > >To: OpenSIPS users mailling list < users@lists.opensips.org > >Subject: Re: [OpenSIPS-Users] help with error messages >Message-ID: >< CAFGRPVqybEYJrA1+=ecuhnimgcs8yfjoiwtnnfjw2pz9ulv...@mail.gmail.com > >Content-Type: text/plain; charset="utf-8" > >Did you set the new IPs, etc? > >On Wed, 26 Feb 2020 at 06:24, Saint Michael < vene...@gmail.com > wrote: > >> I moved a VM from one network to another, started opensips and I get >> these errors. Could somebody shed light? >> Feb 26 06:19:20 opensips systemd[1]: Started OpenSIPS is a very fast and >> flexible SIP (RFC3261) server. >> Feb 26 06:19:21 opensips opensips[4663]: Feb 26 06:19:21 [4744] >> ERROR:core:pv_set_ruri_host: bad parameters >> Feb 26 06:19:21 opensips opensips[4663]: Feb 26 06:19:21 [4744] >> ERROR:core:do_assign: setting PV failed >> Feb 26 06:19:21 opensips opensips[4663]: Feb 26 06:19:21 [4744] >> ERROR:core:do_assign: error at /etc/opensips/opensips.cfg:169 >> Feb 26 06:19:22 opensips opensips[4663]: Feb 26 06:19:22 [4744] >> ERROR:core:pv_set_ruri_host: bad parameters >> Feb 26 06:19:22 opensips opensips[4663]: Feb 26 06:19:22 [4744] >> ERROR:core:do_assign: setting PV failed >> Feb 26 06:19:22 opensips opensips[4663]: Feb 26 06:19:22 [4744] >> ERROR:core:do_assign: error at /etc/opensips/opensips.cfg:169 >> Feb 26 06:19:28 opensips opensips[4663]: Feb 26 06:19:28 [4744] >> ERROR:core:pv_set_ruri_host: bad parameters >> Feb 26 06:19:28 opensips opensips[4663]: Feb 26 06:19:28 [4744] >> ERROR:core:do_assign: setting PV failed >> Feb 26 06:19:28 opensips opensips[4663]: Feb 26 06:19:28 [4744] >> ERROR:core:do_assign: error at /etc/opensips/opensips.cfg:169 >> Feb 26 06:19:32 opensips opensips[4663]: Feb 26 06:19:32 [4744] >> ERROR:core:pv_set_ruri_host: bad parameters >> Feb 26 06:19:32 opensips opensips[4663]: Feb 26 06:19:32 [4744] >> ERROR:core:do_assign: setting PV failed >> Feb 26 06:19:32 opensips opensips[4663]: Feb 26 06:19:32 [4744] >> ERROR:core:do_assign: error at /etc/opensips/opensips.cfg:169 >> Feb 26 06:19:34 opensips opensips[4663]: Feb 26 06:19:34 [4744] >> ERROR:core:pv_set_ruri_host: bad parameters >> Feb 26 06:19:34 opensips opensips[4663]: Feb 26 06:19:34 [4744] >> ERROR:core:do_assign: setting PV failed >> Feb 26 06:19:34 opensips opensips[4663]: Feb 26 06:19:34 [4744] >> ERROR:core:do_assign: error at /etc/opensips/opensips.cfg:169 >> >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >-- >Regards, > >David Villasmil >email: david.villasmil.w...@gmail.com >phone: +34669448337 >-- next part -- >An HTML attachment was scrubbed... >URL: < >http://lists.opensips.org/pipermail/users/attachments/20200226/f39f54cf/attachment-0001.html > > > >-- > >Message: 2 >Date: Wed, 26 Feb 2020 14:58:38 +0530 >From: "Kamlesh ." < kaml...@worldphone.in > >To: users@lists.opensips.org >Subject: [OpenSIPS-Users] incorrect content length in body part >Message-ID: >< caeif1ffzo7gu+mzwu7yubw4u1fbzasgkg+nwvahdnfa8fpc...@mail.gmail.com > >Content-Type: text/plain; charset="utf-8" > >Hello, > >version: opensips 2.4.6 (x86_64/linux) > >flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_MALLOC, >FAST_LOCK-ADAPTIVE_WAIT > >ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, >MAX_URI_SIZE 1024, BUF_SIZE 65535 > >poll method support: poll, epoll, sigio_rt, select. > >git revision: edef893c5 > >main.c compiled on 23:26:34 Dec 14 2019 with gcc 4.8.5 > >We want to remove the body part in this packet so that we used >remove_body_part("application/vnd.etsi.pstn+xml") exported functions. It >was removed successfully but the Content-Length was added. You can check we >have two
[OpenSIPS-Users] WARNING:core:timer_ticker: timer task
Hello! I use opensips as a proxy. Its task is to convert SIP to SIP-I and vice versa. During busy hours, the number of active dialogs reaches 200 per second and everything worked perfectly I had an accident. Moreover, at the time of occurrence there was no particular load. opensips stopped processing the load. And in the logs I saw these messages Feb 26 22:03:58 xx-spx-2 /usr/sbin/opensips[8379]: WARNING:core:timer_ticker: timer task already scheduled for 88872160 ms (now 88902760 ms), it may overlap.. Feb 26 22:03:59 xx-spx-2 /usr/sbin/opensips[8379]: WARNING:core:timer_ticker: timer task already scheduled for 88872160 ms (now 88903750 ms), it may overlap.. Feb 26 22:04:00 xx-spx-2 /usr/sbin/opensips[8379]: WARNING:core:timer_ticker: timer task already scheduled for 88872160 ms (now 88904740 ms), it may overlap.. Feb 26 22:04:01 xx-spx-2 /usr/sbin/opensips[8379]: WARNING:core:timer_ticker: timer task already scheduled for 88872160 ms (now 88905720 ms), it may overlap.. Feb 26 22:04:02 xx-spx-2 /usr/sbin/opensips[8379]: WARNING:core:timer_ticker: timer task already scheduled for 88872160 ms (now 88906710 ms), it may overlap.. Feb 26 22:04:03 xx-spx-2 /usr/sbin/opensips[8379]: WARNING:core:timer_ticker: timer task already scheduled for 88872160 ms (now 88907700 ms), it may overlap.. if it helps, I use 64 mb for shared memory, 4 mb for pkg memory , and 4 children -- Oleg Podguyko___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users