From osas at voipembedded.com Sun Nov 1 00:45:26 2020 From: osas at voipembedded.com (Ovidiu Sas) Date: Sat, 31 Oct 2020 20:45:26 -0400 Subject: [OpenSIPS-Users] Question: how to return string from module function to config script? In-Reply-To: References: Message-ID: Hello Elaine, A module function in opensips returns and integer. Based on the return value, you can test if the function was successful or not. More details here: https://www.opensips.org/Documentation/Development-Manual#toc37 Take a look at the big yellow warning at the end of documentation for the module function for how return codes are interpreted. If you want to return a string, here’s an example: https://opensips.org/html/docs/modules/devel/dialplan.html#func_dp_translate See the out_var parameter. Hope this helps, Ovidiu On Sat, Oct 31, 2020 at 18:57 Elaine Huang wrote: > I'm new to opensips and I'm wondering if it's possible for a module > function to return a string instead of integer? > > My wishful thinking is in my config: > > $var(myVar) = myFunc(params...); > # then myVar becomes a string value that I can manipulate, compare, etc > > > If this is not achievable, what's the conventional way to get a string > from a module function? Is it pseudo variable that I should use? > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- VoIP Embedded, Inc. http://www.voipembedded.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From medeanwz at gmail.com Sun Nov 1 23:23:21 2020 From: medeanwz at gmail.com (M S) Date: Mon, 2 Nov 2020 00:23:21 +0100 Subject: [OpenSIPS-Users] multiple sub interfaces - opensips crashes Message-ID: Hi all, I have a machine with 600 subinterfaces. when I start opensips with 2 udp workers per interface, it doesn't start and keeps restarting. First error message was about too many connections to Mysql which I fixed by increasing max_connections, but now I am getting: ERROR:db_mysql:db_mysql_new_connection: initial connect failed ERROR:core:db_do_init: could not add connection to the pool ERROR:sql_cacher:child_init: Cannot connect to SQL DB from child ERROR:core:init_mod_child: failed to initializing module sql_cacher, rank 683 ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe ERROR:core:udp_start_processes: failed to send -1 status code ERROR:db_mysql:db_mysql_connect: driver error(2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11) and: ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe ERROR:core:udp_start_processes: failed to send -1 status code Any ideas how I can fix this? Also, can I just limit number of opensips forked processes, to run just a certain number process instead of x numbers per interface? I tried using auto_scaling but it did not help. in my opensips.conf, I have: socket=udp:*:5060 and adding an autoscaling profile in front of it seems to limit the processes per interface again, not all... Any help is appreciated. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From parkistler at gmail.com Mon Nov 2 01:17:56 2020 From: parkistler at gmail.com (Parkistler _) Date: Mon, 2 Nov 2020 09:17:56 +0800 Subject: [OpenSIPS-Users] =?utf-8?b?6YCA6K6i?= Message-ID: unsubscriber -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Nov 2 08:23:57 2020 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 2 Nov 2020 10:23:57 +0200 Subject: [OpenSIPS-Users] multiple sub interfaces - opensips crashes In-Reply-To: References: Message-ID: <939d4c2b-b4c1-eb85-7476-3225503ec683@opensips.org> Hi OpenSIPer, With 600 interfaces (btw , have actually listed the 600 sockets into the cfg or pointed the socket to the interface?) with 2 workers per socket -> 1200 workers / processes. That means 1200 connections to your DB server, which may be a bottle neck (by default, mysql accepts around 100 simultaneous connections). I suspect your mysql server cannot cope with the 1200 conn, preventing OpenSIPS to properly start. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 2020 online https://opensips.org/training/OpenSIPS_eBootcamp_2020/ On 11/2/20 1:23 AM, M S wrote: > Hi all, > I have a machine with 600 subinterfaces. when I start opensips with 2 > udp workers per interface, it doesn't start and keeps restarting. > First error message was about too many connections to Mysql which I > fixed by increasing max_connections, but now I am getting: > > ERROR:db_mysql:db_mysql_new_connection: initial connect failed > ERROR:core:db_do_init: could not add connection to the pool > ERROR:sql_cacher:child_init: Cannot connect to SQL DB from child > ERROR:core:init_mod_child: failed to initializing module sql_cacher, > rank 683 > ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe > ERROR:core:udp_start_processes: failed to send -1 status code > ERROR:db_mysql:db_mysql_connect: driver error(2002): Can't connect to > local MySQL server through socket '/var/lib/mysql/mysql.sock' (11) > > and: > > ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe > ERROR:core:udp_start_processes: failed to send -1 status code > > Any ideas how I can fix this? > Also, can I just limit number of opensips forked processes, to run > just a certain number process instead of x numbers per interface? I > tried using auto_scaling but it did not help. in my opensips.conf, I > have: > socket=udp:*:5060 > and adding an autoscaling profile in front of it seems to limit the > processes per interface again, not all... > > Any help is appreciated. > > 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 medeanwz at gmail.com Mon Nov 2 11:55:56 2020 From: medeanwz at gmail.com (M S) Date: Mon, 2 Nov 2020 12:55:56 +0100 Subject: [OpenSIPS-Users] multiple sub interfaces - opensips crashes In-Reply-To: <939d4c2b-b4c1-eb85-7476-3225503ec683@opensips.org> References: <939d4c2b-b4c1-eb85-7476-3225503ec683@opensips.org> Message-ID: Thank you Bogdan. I actually use: socket=udp:*:5060 in config file. Is there a way to not open a process per interface, to not have 1200 or 600 workers? as I said in my previous email, I tried auto scaling and it didn't work. Also, I have increased MySQL max connections but it didn't fix the problem - I wonder if anybody has experience with this... Thanks! On Mon, Nov 2, 2020 at 9:24 AM Bogdan-Andrei Iancu wrote: > Hi OpenSIPer, > > With 600 interfaces (btw , have actually listed the 600 sockets into the > cfg or pointed the socket to the interface?) with 2 workers per socket -> > 1200 workers / processes. That means 1200 connections to your DB server, > which may be a bottle neck (by default, mysql accepts around 100 > simultaneous connections). > > I suspect your mysql server cannot cope with the 1200 conn, preventing > OpenSIPS to properly start. > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 2020 online > https://opensips.org/training/OpenSIPS_eBootcamp_2020/ > > On 11/2/20 1:23 AM, M S wrote: > > Hi all, > I have a machine with 600 subinterfaces. when I start opensips with 2 udp > workers per interface, it doesn't start and keeps restarting. > First error message was about too many connections to Mysql which I fixed > by increasing max_connections, but now I am getting: > > ERROR:db_mysql:db_mysql_new_connection: initial connect failed > ERROR:core:db_do_init: could not add connection to the pool > ERROR:sql_cacher:child_init: Cannot connect to SQL DB from child > ERROR:core:init_mod_child: failed to initializing module sql_cacher, rank > 683 > ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe > ERROR:core:udp_start_processes: failed to send -1 status code > ERROR:db_mysql:db_mysql_connect: driver error(2002): Can't connect to > local MySQL server through socket '/var/lib/mysql/mysql.sock' (11) > > and: > > ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe > ERROR:core:udp_start_processes: failed to send -1 status code > > Any ideas how I can fix this? > Also, can I just limit number of opensips forked processes, to run just a > certain number process instead of x numbers per interface? I tried using > auto_scaling but it did not help. in my opensips.conf, I have: > socket=udp:*:5060 > and adding an autoscaling profile in front of it seems to limit the > processes per interface again, not all... > > Any help is appreciated. > > Thanks! > > _______________________________________________ > Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From razvan at opensips.org Tue Nov 3 08:10:32 2020 From: razvan at opensips.org (=?UTF-8?Q?R=c4=83zvan_Crainea?=) Date: Tue, 3 Nov 2020 10:10:32 +0200 Subject: [OpenSIPS-Users] multiple sub interfaces - opensips crashes In-Reply-To: References: <939d4c2b-b4c1-eb85-7476-3225503ec683@opensips.org> Message-ID: Hello! No, there is no way to prevent OpenSIPS from opening connections for each process. Did you try to start opensips with fewer workers, for example just 1, or 3? Does it start properly? Best regards, Răzvan Crainea OpenSIPS Core Developer http://www.opensips-solutions.com On 11/2/20 1:55 PM, M S wrote: > Thank you Bogdan. I actually use: socket=udp:*:5060 in config file. > Is there a way to not open a process per interface, to not have 1200 or > 600 workers? as I said in my previous email, I tried auto scaling and it > didn't work. > Also, I have increased MySQL max connections but it didn't fix > the problem - I wonder if anybody has experience with this... > > Thanks! > > On Mon, Nov 2, 2020 at 9:24 AM Bogdan-Andrei Iancu > wrote: > > Hi OpenSIPer, > > With 600 interfaces (btw , have actually listed the 600 sockets into > the cfg or pointed the socket to the interface?) with 2 workers per > socket -> 1200 workers / processes. That means 1200 connections to > your DB server, which may be a bottle neck (by default, mysql > accepts around 100 simultaneous connections). > > I suspect your mysql server cannot cope with the 1200 conn, > preventing OpenSIPS to properly start. > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 2020 online > https://opensips.org/training/OpenSIPS_eBootcamp_2020/ > > On 11/2/20 1:23 AM, M S wrote: >> Hi all, >> I have a machine with 600 subinterfaces. when I start opensips >> with 2 udp workers per interface, it doesn't start and keeps >> restarting. >> First error message was about too many connections to Mysql which >> I fixed by increasing max_connections, but now I am getting: >> >> ERROR:db_mysql:db_mysql_new_connection: initial connect failed >> ERROR:core:db_do_init: could not add connection to the pool >> ERROR:sql_cacher:child_init: Cannot connect to SQL DB from child >> ERROR:core:init_mod_child: failed to initializing module >> sql_cacher, rank 683 >> ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe >> ERROR:core:udp_start_processes: failed to send -1 status code >> ERROR:db_mysql:db_mysql_connect: driver error(2002): Can't connect >> to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11) >> >> and: >> >> ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe >> ERROR:core:udp_start_processes: failed to send -1 status code >> >> Any ideas how I can fix this? >> Also, can I just limit number of opensips forked processes, to run >> just a certain number process instead of x numbers per interface? >> I tried using auto_scaling but it did not help. in my >> opensips.conf, I have: >> socket=udp:*:5060 >> and adding an autoscaling profile in front of it seems to limit >> the processes per interface again, not all... >> >> Any help is appreciated. >> >> Thanks! >> >> _______________________________________________ >> 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 > From razvan at opensips.org Tue Nov 3 08:17:01 2020 From: razvan at opensips.org (=?UTF-8?Q?R=c4=83zvan_Crainea?=) Date: Tue, 3 Nov 2020 10:17:01 +0200 Subject: [OpenSIPS-Users] Opensips-cp 8.3.0 HTTP/1.1 400 Bad Request.. In-Reply-To: References: Message-ID: I am not sure why you're saying it is not reflecting the real info - I can see the MI returning data for rtpproxy, are you sure that's not correct? And you're probably not having any ongoing calls, that's why dlg_list returns 0. Running MI HTTP is a completely different story, what you're showing us is probably the output of the `which` command, enclosed in HTTP tags; you should try to run the `which` command as well through the CP, to have a comparison ground. But I believe your setup is OK now. Best regards, Răzvan Crainea OpenSIPS Core Developer http://www.opensips-solutions.com On 10/31/20 7:57 PM, Mario San Vicente wrote: > Hello Răzvan , > I was wrong with my diagnosis, cause i stopped receiving the http / 400 > error.  But when trying to monitor calls i see that the portal is not > reflecting the real info, i tested dialogs and rtpproxy. > I do see the json reply on a trace, but it is not updated on the portal: > > T 127.0.0.1:47632 -> 127.0.0.1:8888 > [AP] #137 >   POST /mi HTTP/1.1..Host: 127.0.0.1:8888..Accept: */*..Content-Type: > application/json..Content-Length: > 49....{"jsonrpc":"2.0","id":1,"method":"rtpproxy_ >   show"}"id......._";i#4 > # > T 127.0.0.1:8888 -> 127.0.0.1:47632 > [A] #138 >   ......._..k#)... > # > T 127.0.0.1:8888 -> 127.0.0.1:47632 > [AP] #139 >   HTTP/1.1 200 OK..Content-Length: 136..Content-Type: > application/json..Date: Sat, 31 Oct 2020 17:34:22 > GMT....{"jsonrpc":"2.0","result":[{"Set":0,"Nodes > > ":[{"url":"udp:localhost:2123","index":0,"disabled":0,"weight":1,"recheck_ticks":0}]}],"id":1}.........._..k#4 > -------------------------------- > T 127.0.0.1:47644 -> 127.0.0.1:8888 > [AP] #204 >   POST /mi HTTP/1.1..Host: 127.0.0.1:8888..Accept: */*..Content-Type: > application/json..Content-Length: > 78....{"jsonrpc":"2.0","id":1,"method":"dlg_list" >   ,"params":{"index":0,"counter":20}}............._J. > # > T 127.0.0.1:8888 -> 127.0.0.1:47644 > [A] #205 >   @......_........ > # > T 127.0.0.1:8888 -> 127.0.0.1:47644 > [AP] #206 >   HTTP/1.1 200 OK..Content-Length: 58..Content-Type: > application/json..Date: Sat, 31 Oct 2020 17:42:14 > GMT....{"jsonrpc":"2.0","result":{"count":0,"Dialo >   gs":[]},"id":1}........._4...4. > > Aside notes: > When enabling this line #modparam("mi_http", "root", "opensips_mi") , i > can see the mi portal. http://x.x.x.x:8888/mi , which has lots of > aditional info,  but i have to disable it to get the json response and > just get an http response pointing to the mi interface: > T 127.0.0.1:8888 -> 127.0.0.1:47654 > [AP] #256 >   HTTP/1.1 200 OK..Content-Length: 1886..Content-Type: text/html..Date: > Sat, 31 Oct 2020 17:55:45 GMT....OpenSIPS Management > Interface >   http-equiv="Expires" content="0">   "Pragma" content="no-cache"> href="https://opensips.org/favicon.png">. bgcolor="#ffffff" l >   ink="#000000" text="#000000" vlink="#000000"> cellpadding="5" width="100%%" border="0">
colspan=2 valign >   ="top" align="left" bgcolor="#EFF7FF" width="100%%">

align="center">OpenSIPS MI HTML Interface

OpenSIPS > (3.1.0-dev (x86_6 >   4/linux)) is running since Sat Oct 31 11:55:35 > 2020


.
. cellpadding="3" cellspacing="0">   >.
statistics. href='/mi/core'>core. href='/mi/blacklists'>blacklists.httpd.tm. href='/mi/usrloc'>usrloc. href='/mi/dialog'>dialog.nathelper. href='/mi/rtpproxy'>rtpproxy. href='/mi/db_text'>db_text.drouti >   ng.
..
.
class="foot" style="margin:20px auto"> style='margin-left:5px;'>OpenSIPS web > site
Copyright © 2011-2015 href="http://www.voipembedded.com/">VoIP Embedded, Inc.. All rights res >   erved.
.......!.._X.t.4 > > Thank in advace. > > > On Fri, Oct 30, 2020 at 8:45 PM Mario San Vicente > > wrote: > > Hello Răzvan , > > Thanks alot, that made the trick. > > I will check if something is not matching with the monit page cause > that is not working ,  but that's another story. > > Best regards. > Mario > > > > > On Thu, Oct 29, 2020 at 3:49 AM Răzvan Crainea > wrote: > > As I see in your logs, OpenSIPS CP uses the `json` URL path for > querying > MI, whereas the default root path is `mi`[1]. Either change the > `root` > to `json`, or modify your OpenSIPS CP boxes config to `mi`. > > [1] https://opensips.org/docs/modules/3.1.x/mi_http.html#param_root > > Best regards, > > Răzvan Crainea > OpenSIPS Core Developer > http://www.opensips-solutions.com > > On 10/28/20 11:23 PM, Mario San Vicente wrote: > >    Thanks for the answer Johan, > > > > But i see that; the *mi_json* module has been renamed to > > *mi_http* module.  and so: failed to load module mi_json.so > > https://www.opensips.org/Documentation/Migration-2-4-0-to-3-0-0 > > > > I am using opensips 3.1 > > I have this modules: > > > > loadmodule "httpd.so" > > modparam("httpd", "port", 8888) > > #### MI_HTTP module > > loadmodule "json.so" > > #loadmodule "mi_json.so" > > loadmodule "mi_http.so" > > > > Any other clue? > > > > Thank you > > > > > > _______________________________________________ > > 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 > > > > -- > Mario San Vicente > Cheers! > > > > -- > Mario San Vicente > Cheers! > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > From bogdan at opensips.org Tue Nov 3 12:09:20 2020 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Tue, 3 Nov 2020 14:09:20 +0200 Subject: [OpenSIPS-Users] multiple sub interfaces - opensips crashes In-Reply-To: References: <939d4c2b-b4c1-eb85-7476-3225503ec683@opensips.org> Message-ID: <106156e6-7d47-2950-b530-3a750aaf53ff@opensips.org> Maybe we should consider (as future extension) the possibility to bundle multiple UDP listeners on the same worker.  In this case, we can have a large number of listeners with a relatively small number of workers/ processes. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 2020 online https://opensips.org/training/OpenSIPS_eBootcamp_2020/ On 11/3/20 10:10 AM, Răzvan Crainea wrote: > Hello! > > No, there is no way to prevent OpenSIPS from opening connections for > each process. Did you try to start opensips with fewer workers, for > example just 1, or 3? Does it start properly? > > Best regards, > > Răzvan Crainea > OpenSIPS Core Developer > http://www.opensips-solutions.com > > On 11/2/20 1:55 PM, M S wrote: >> Thank you Bogdan. I actually use: socket=udp:*:5060 in config file. >> Is there a way to not open a process per interface, to not have 1200 >> or 600 workers? as I said in my previous email, I tried auto scaling >> and it didn't work. >> Also, I have increased MySQL max connections but it didn't fix >> the problem - I wonder if anybody has experience with this... >> >> Thanks! >> >> On Mon, Nov 2, 2020 at 9:24 AM Bogdan-Andrei Iancu >> > wrote: >> >>     Hi OpenSIPer, >> >>     With 600 interfaces (btw , have actually listed the 600 sockets into >>     the cfg or pointed the socket to the interface?) with 2 workers per >>     socket -> 1200 workers / processes. That means 1200 connections to >>     your DB server, which may be a bottle neck (by default, mysql >>     accepts around 100 simultaneous connections). >> >>     I suspect your mysql server cannot cope with the 1200 conn, >>     preventing OpenSIPS to properly start. >> >>     Regards, >> >>     Bogdan-Andrei Iancu >> >>     OpenSIPS Founder and Developer >>        https://www.opensips-solutions.com >>     OpenSIPS Bootcamp 2020 online >>        https://opensips.org/training/OpenSIPS_eBootcamp_2020/ >> >>     On 11/2/20 1:23 AM, M S wrote: >>>     Hi all, >>>     I have a machine with 600 subinterfaces. when I start opensips >>>     with 2 udp workers per interface, it doesn't start and keeps >>>     restarting. >>>     First error message was about too many connections to Mysql which >>>     I fixed by increasing max_connections, but now I am getting: >>> >>>     ERROR:db_mysql:db_mysql_new_connection: initial connect failed >>>     ERROR:core:db_do_init: could not add connection to the pool >>>     ERROR:sql_cacher:child_init: Cannot connect to SQL DB from child >>>     ERROR:core:init_mod_child: failed to initializing module >>>     sql_cacher, rank 683 >>>     ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe >>>     ERROR:core:udp_start_processes: failed to send -1 status code >>>     ERROR:db_mysql:db_mysql_connect: driver error(2002): Can't connect >>>     to local MySQL server through socket '/var/lib/mysql/mysql.sock' >>> (11) >>> >>>     and: >>> >>>     ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe >>>     ERROR:core:udp_start_processes: failed to send -1 status code >>> >>>     Any ideas how I can fix this? >>>     Also, can I just limit number of opensips forked processes, to run >>>     just a certain number process instead of x numbers per interface? >>>     I tried using auto_scaling but it did not help. in my >>>     opensips.conf, I have: >>>     socket=udp:*:5060 >>>     and adding an autoscaling profile in front of it seems to limit >>>     the processes per interface again, not all... >>> >>>     Any help is appreciated. >>> >>>     Thanks! >>> >>>     _______________________________________________ >>>     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 From osas at voipembedded.com Tue Nov 3 14:19:44 2020 From: osas at voipembedded.com (Ovidiu Sas) Date: Tue, 3 Nov 2020 09:19:44 -0500 Subject: [OpenSIPS-Users] Opensips-cp 8.3.0 HTTP/1.1 400 Bad Request.. In-Reply-To: References: Message-ID: Hello Mario, It seems that you have both mi_http and mi_html modules loaded. By default, both modules have the root path set to mi and one of the modules is stealing the root path from the other. In your case, when you hit http://x.x.x.x:8888/mi , you are hitting a standalone management interface that is not part of opensips-cp. It's an alternative way to run mi commands through a web interface. If you want to have only opensips-cp, then umload mi_html. If you want to keep mi_html, then set a different root path: #modparam("mi_html", "root", "osips_mi") Hope this helps, Ovidiu On Sat, Oct 31, 2020 at 1:58 PM Mario San Vicente wrote: > > Hello Răzvan , > I was wrong with my diagnosis, cause i stopped receiving the http / 400 error. But when trying to monitor calls i see that the portal is not reflecting the real info, i tested dialogs and rtpproxy. > I do see the json reply on a trace, but it is not updated on the portal: > > T 127.0.0.1:47632 -> 127.0.0.1:8888 [AP] #137 > POST /mi HTTP/1.1..Host: 127.0.0.1:8888..Accept: */*..Content-Type: application/json..Content-Length: 49....{"jsonrpc":"2.0","id":1,"method":"rtpproxy_ > show"}"id......._";i#4 > # > T 127.0.0.1:8888 -> 127.0.0.1:47632 [A] #138 > ......._..k#)... > # > T 127.0.0.1:8888 -> 127.0.0.1:47632 [AP] #139 > HTTP/1.1 200 OK..Content-Length: 136..Content-Type: application/json..Date: Sat, 31 Oct 2020 17:34:22 GMT....{"jsonrpc":"2.0","result":[{"Set":0,"Nodes > ":[{"url":"udp:localhost:2123","index":0,"disabled":0,"weight":1,"recheck_ticks":0}]}],"id":1}.........._..k#4 > -------------------------------- > T 127.0.0.1:47644 -> 127.0.0.1:8888 [AP] #204 > POST /mi HTTP/1.1..Host: 127.0.0.1:8888..Accept: */*..Content-Type: application/json..Content-Length: 78....{"jsonrpc":"2.0","id":1,"method":"dlg_list" > ,"params":{"index":0,"counter":20}}............._J. > # > T 127.0.0.1:8888 -> 127.0.0.1:47644 [A] #205 > @......_........ > # > T 127.0.0.1:8888 -> 127.0.0.1:47644 [AP] #206 > HTTP/1.1 200 OK..Content-Length: 58..Content-Type: application/json..Date: Sat, 31 Oct 2020 17:42:14 GMT....{"jsonrpc":"2.0","result":{"count":0,"Dialo > gs":[]},"id":1}........._4...4. > > Aside notes: > When enabling this line #modparam("mi_http", "root", "opensips_mi") , i can see the mi portal. http://x.x.x.x:8888/mi , which has lots of aditional info, but i have to disable it to get the json response and just get an http response pointing to the mi interface: > T 127.0.0.1:8888 -> 127.0.0.1:47654 [AP] #256 > HTTP/1.1 200 OK..Content-Length: 1886..Content-Type: text/html..Date: Sat, 31 Oct 2020 17:55:45 GMT....OpenSIPS Management Interface > "Pragma" content="no-cache">. ink="#000000" text="#000000" vlink="#000000">
="top" align="left" bgcolor="#EFF7FF" width="100%%">

OpenSIPS MI HTML Interface

OpenSIPS (3.1.0-dev (x86_6 > 4/linux)) is running since Sat Oct 31 11:55:35 2020


.
. >.
statistics.core.blacklists.httpd.tm.usrloc.dialog.nathelper.rtpproxy.db_text.drouti > ng.
..
.
OpenSIPS web site
Copyright © 2011-2015 VoIP Embedded, Inc.. All rights res > erved.
.......!.._X.t.4 > > Thank in advace. > > > On Fri, Oct 30, 2020 at 8:45 PM Mario San Vicente wrote: >> >> Hello Răzvan , >> >> Thanks alot, that made the trick. >> >> I will check if something is not matching with the monit page cause that is not working , but that's another story. >> >> Best regards. >> Mario >> >> >> >> >> >> On Thu, Oct 29, 2020 at 3:49 AM Răzvan Crainea wrote: >>> >>> As I see in your logs, OpenSIPS CP uses the `json` URL path for querying >>> MI, whereas the default root path is `mi`[1]. Either change the `root` >>> to `json`, or modify your OpenSIPS CP boxes config to `mi`. >>> >>> [1] https://opensips.org/docs/modules/3.1.x/mi_http.html#param_root >>> >>> Best regards, >>> >>> Răzvan Crainea >>> OpenSIPS Core Developer >>> http://www.opensips-solutions.com >>> >>> On 10/28/20 11:23 PM, Mario San Vicente wrote: >>> > Thanks for the answer Johan, >>> > >>> > But i see that; the *mi_json* module has been renamed to >>> > *mi_http* module. and so: failed to load module mi_json.so >>> > https://www.opensips.org/Documentation/Migration-2-4-0-to-3-0-0 >>> > >>> > I am using opensips 3.1 >>> > I have this modules: >>> > >>> > loadmodule "httpd.so" >>> > modparam("httpd", "port", 8888) >>> > #### MI_HTTP module >>> > loadmodule "json.so" >>> > #loadmodule "mi_json.so" >>> > loadmodule "mi_http.so" >>> > >>> > Any other clue? >>> > >>> > Thank you >>> > >>> > >>> > _______________________________________________ >>> > 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 >> >> >> >> -- >> Mario San Vicente >> Cheers! > > > > -- > Mario San Vicente > Cheers! > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- VoIP Embedded, Inc. http://www.voipembedded.com From fedorna at anura.com.ar Tue Nov 3 14:39:40 2020 From: fedorna at anura.com.ar (Federico Edorna) Date: Tue, 3 Nov 2020 11:39:40 -0300 Subject: [OpenSIPS-Users] multiple sub interfaces - opensips crashes In-Reply-To: <106156e6-7d47-2950-b530-3a750aaf53ff@opensips.org> References: <939d4c2b-b4c1-eb85-7476-3225503ec683@opensips.org> <106156e6-7d47-2950-b530-3a750aaf53ff@opensips.org> Message-ID: If it helps, we are using pgbouncer to avoid opening a lot of connections to db. Pgbouncer acts as a db server for opensips with full workers connections and opens just a few (on demand) to real db server. It helps a lot when you have backup/standby opensips, not increasing those db connections. On Tue, Nov 3, 2020 at 9:13 AM Bogdan-Andrei Iancu wrote: > Maybe we should consider (as future extension) the possibility to bundle > multiple UDP listeners on the same worker. In this case, we can have a > large number of listeners with a relatively small number of workers/ > processes. > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 2020 online > https://opensips.org/training/OpenSIPS_eBootcamp_2020/ > > On 11/3/20 10:10 AM, Răzvan Crainea wrote: > > Hello! > > > > No, there is no way to prevent OpenSIPS from opening connections for > > each process. Did you try to start opensips with fewer workers, for > > example just 1, or 3? Does it start properly? > > > > Best regards, > > > > Răzvan Crainea > > OpenSIPS Core Developer > > http://www.opensips-solutions.com > > > > On 11/2/20 1:55 PM, M S wrote: > >> Thank you Bogdan. I actually use: socket=udp:*:5060 in config file. > >> Is there a way to not open a process per interface, to not have 1200 > >> or 600 workers? as I said in my previous email, I tried auto scaling > >> and it didn't work. > >> Also, I have increased MySQL max connections but it didn't fix > >> the problem - I wonder if anybody has experience with this... > >> > >> Thanks! > >> > >> On Mon, Nov 2, 2020 at 9:24 AM Bogdan-Andrei Iancu > >> > wrote: > >> > >> Hi OpenSIPer, > >> > >> With 600 interfaces (btw , have actually listed the 600 sockets into > >> the cfg or pointed the socket to the interface?) with 2 workers per > >> socket -> 1200 workers / processes. That means 1200 connections to > >> your DB server, which may be a bottle neck (by default, mysql > >> accepts around 100 simultaneous connections). > >> > >> I suspect your mysql server cannot cope with the 1200 conn, > >> preventing OpenSIPS to properly start. > >> > >> Regards, > >> > >> Bogdan-Andrei Iancu > >> > >> OpenSIPS Founder and Developer > >> https://www.opensips-solutions.com > >> OpenSIPS Bootcamp 2020 online > >> https://opensips.org/training/OpenSIPS_eBootcamp_2020/ > >> > >> On 11/2/20 1:23 AM, M S wrote: > >>> Hi all, > >>> I have a machine with 600 subinterfaces. when I start opensips > >>> with 2 udp workers per interface, it doesn't start and keeps > >>> restarting. > >>> First error message was about too many connections to Mysql which > >>> I fixed by increasing max_connections, but now I am getting: > >>> > >>> ERROR:db_mysql:db_mysql_new_connection: initial connect failed > >>> ERROR:core:db_do_init: could not add connection to the pool > >>> ERROR:sql_cacher:child_init: Cannot connect to SQL DB from child > >>> ERROR:core:init_mod_child: failed to initializing module > >>> sql_cacher, rank 683 > >>> ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe > >>> ERROR:core:udp_start_processes: failed to send -1 status code > >>> ERROR:db_mysql:db_mysql_connect: driver error(2002): Can't connect > >>> to local MySQL server through socket '/var/lib/mysql/mysql.sock' > >>> (11) > >>> > >>> and: > >>> > >>> ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe > >>> ERROR:core:udp_start_processes: failed to send -1 status code > >>> > >>> Any ideas how I can fix this? > >>> Also, can I just limit number of opensips forked processes, to run > >>> just a certain number process instead of x numbers per interface? > >>> I tried using auto_scaling but it did not help. in my > >>> opensips.conf, I have: > >>> socket=udp:*:5060 > >>> and adding an autoscaling profile in front of it seems to limit > >>> the processes per interface again, not all... > >>> > >>> Any help is appreciated. > >>> > >>> Thanks! > >>> > >>> _______________________________________________ > >>> 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 > > > _______________________________________________ > 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 Tue Nov 3 15:04:42 2020 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Tue, 3 Nov 2020 17:04:42 +0200 Subject: [OpenSIPS-Users] multiple sub interfaces - opensips crashes In-Reply-To: References: <939d4c2b-b4c1-eb85-7476-3225503ec683@opensips.org> <106156e6-7d47-2950-b530-3a750aaf53ff@opensips.org> Message-ID: <592778c5-fd08-9b49-228a-946f1c17eb7e@opensips.org> Hi Federico, Thanks for the info, good contribution. Unfortunately the DB conns are not the only issue here. When talking about 1200 processes, the overall memory, file descriptors and other may become a bottleneck too Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 2020 online https://opensips.org/training/OpenSIPS_eBootcamp_2020/ On 11/3/20 4:39 PM, Federico Edorna wrote: > If it helps, we are using pgbouncer  to > avoid opening a lot of connections to db. Pgbouncer acts as a db > server for opensips with full workers connections and opens just a few > (on demand) to real db server. It helps a lot when you have > backup/standby opensips, not increasing those db connections. > > > On Tue, Nov 3, 2020 at 9:13 AM Bogdan-Andrei Iancu > > wrote: > > Maybe we should consider (as future extension) the possibility to > bundle > multiple UDP listeners on the same worker.  In this case, we can > have a > large number of listeners with a relatively small number of workers/ > processes. > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 2020 online > https://opensips.org/training/OpenSIPS_eBootcamp_2020/ > > On 11/3/20 10:10 AM, Răzvan Crainea wrote: > > Hello! > > > > No, there is no way to prevent OpenSIPS from opening connections > for > > each process. Did you try to start opensips with fewer workers, for > > example just 1, or 3? Does it start properly? > > > > Best regards, > > > > Răzvan Crainea > > OpenSIPS Core Developer > > http://www.opensips-solutions.com > > > > On 11/2/20 1:55 PM, M S wrote: > >> Thank you Bogdan. I actually use: socket=udp:*:5060 in config file. > >> Is there a way to not open a process per interface, to not have > 1200 > >> or 600 workers? as I said in my previous email, I tried auto > scaling > >> and it didn't work. > >> Also, I have increased MySQL max connections but it didn't fix > >> the problem - I wonder if anybody has experience with this... > >> > >> Thanks! > >> > >> On Mon, Nov 2, 2020 at 9:24 AM Bogdan-Andrei Iancu > >> > >> wrote: > >> > >>     Hi OpenSIPer, > >> > >>     With 600 interfaces (btw , have actually listed the 600 > sockets into > >>     the cfg or pointed the socket to the interface?) with 2 > workers per > >>     socket -> 1200 workers / processes. That means 1200 > connections to > >>     your DB server, which may be a bottle neck (by default, mysql > >>     accepts around 100 simultaneous connections). > >> > >>     I suspect your mysql server cannot cope with the 1200 conn, > >>     preventing OpenSIPS to properly start. > >> > >>     Regards, > >> > >>     Bogdan-Andrei Iancu > >> > >>     OpenSIPS Founder and Developer > >> https://www.opensips-solutions.com > >>     OpenSIPS Bootcamp 2020 online > >> https://opensips.org/training/OpenSIPS_eBootcamp_2020/ > >> > >>     On 11/2/20 1:23 AM, M S wrote: > >>>     Hi all, > >>>     I have a machine with 600 subinterfaces. when I start opensips > >>>     with 2 udp workers per interface, it doesn't start and keeps > >>>     restarting. > >>>     First error message was about too many connections to > Mysql which > >>>     I fixed by increasing max_connections, but now I am getting: > >>> > >>>     ERROR:db_mysql:db_mysql_new_connection: initial connect failed > >>>     ERROR:core:db_do_init: could not add connection to the pool > >>>     ERROR:sql_cacher:child_init: Cannot connect to SQL DB from > child > >>>     ERROR:core:init_mod_child: failed to initializing module > >>>     sql_cacher, rank 683 > >>>     ERROR:core:send_status_code: write(-1) failed (-1): 32, > Broken pipe > >>>     ERROR:core:udp_start_processes: failed to send -1 status code > >>>     ERROR:db_mysql:db_mysql_connect: driver error(2002): Can't > connect > >>>     to local MySQL server through socket > '/var/lib/mysql/mysql.sock' > >>> (11) > >>> > >>>     and: > >>> > >>>     ERROR:core:send_status_code: write(-1) failed (-1): 32, > Broken pipe > >>>     ERROR:core:udp_start_processes: failed to send -1 status code > >>> > >>>     Any ideas how I can fix this? > >>>     Also, can I just limit number of opensips forked > processes, to run > >>>     just a certain number process instead of x numbers per > interface? > >>>     I tried using auto_scaling but it did not help. in my > >>>     opensips.conf, I have: > >>>     socket=udp:*:5060 > >>>     and adding an autoscaling profile in front of it seems to > limit > >>>     the processes per interface again, not all... > >>> > >>>     Any help is appreciated. > >>> > >>>     Thanks! > >>> > >>> _______________________________________________ > >>>     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 > > > _______________________________________________ > 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 medeanwz at gmail.com Tue Nov 3 18:40:57 2020 From: medeanwz at gmail.com (M S) Date: Tue, 3 Nov 2020 19:40:57 +0100 Subject: [OpenSIPS-Users] multiple sub interfaces - opensips crashes In-Reply-To: References: <939d4c2b-b4c1-eb85-7476-3225503ec683@opensips.org> Message-ID: Hi Razvan, I tried, but it didn't start properly. I guess it is Mysql that returns an error, but usually Opensips just prints a warning and continues running if it cannot connect to database, right? I'm using Mysql for sql_cacher. Is it possible that Opensips is running out of some other resources? I sent the error messages I received in the original email... Thanks! On Tue, Nov 3, 2020 at 9:13 AM Răzvan Crainea wrote: > Hello! > > No, there is no way to prevent OpenSIPS from opening connections for > each process. Did you try to start opensips with fewer workers, for > example just 1, or 3? Does it start properly? > > Best regards, > > Răzvan Crainea > OpenSIPS Core Developer > http://www.opensips-solutions.com > > On 11/2/20 1:55 PM, M S wrote: > > Thank you Bogdan. I actually use: socket=udp:*:5060 in config file. > > Is there a way to not open a process per interface, to not have 1200 or > > 600 workers? as I said in my previous email, I tried auto scaling and it > > didn't work. > > Also, I have increased MySQL max connections but it didn't fix > > the problem - I wonder if anybody has experience with this... > > > > Thanks! > > > > On Mon, Nov 2, 2020 at 9:24 AM Bogdan-Andrei Iancu > > wrote: > > > > Hi OpenSIPer, > > > > With 600 interfaces (btw , have actually listed the 600 sockets into > > the cfg or pointed the socket to the interface?) with 2 workers per > > socket -> 1200 workers / processes. That means 1200 connections to > > your DB server, which may be a bottle neck (by default, mysql > > accepts around 100 simultaneous connections). > > > > I suspect your mysql server cannot cope with the 1200 conn, > > preventing OpenSIPS to properly start. > > > > Regards, > > > > Bogdan-Andrei Iancu > > > > OpenSIPS Founder and Developer > > https://www.opensips-solutions.com > > OpenSIPS Bootcamp 2020 online > > https://opensips.org/training/OpenSIPS_eBootcamp_2020/ > > > > On 11/2/20 1:23 AM, M S wrote: > >> Hi all, > >> I have a machine with 600 subinterfaces. when I start opensips > >> with 2 udp workers per interface, it doesn't start and keeps > >> restarting. > >> First error message was about too many connections to Mysql which > >> I fixed by increasing max_connections, but now I am getting: > >> > >> ERROR:db_mysql:db_mysql_new_connection: initial connect failed > >> ERROR:core:db_do_init: could not add connection to the pool > >> ERROR:sql_cacher:child_init: Cannot connect to SQL DB from child > >> ERROR:core:init_mod_child: failed to initializing module > >> sql_cacher, rank 683 > >> ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe > >> ERROR:core:udp_start_processes: failed to send -1 status code > >> ERROR:db_mysql:db_mysql_connect: driver error(2002): Can't connect > >> to local MySQL server through socket '/var/lib/mysql/mysql.sock' > (11) > >> > >> and: > >> > >> ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe > >> ERROR:core:udp_start_processes: failed to send -1 status code > >> > >> Any ideas how I can fix this? > >> Also, can I just limit number of opensips forked processes, to run > >> just a certain number process instead of x numbers per interface? > >> I tried using auto_scaling but it did not help. in my > >> opensips.conf, I have: > >> socket=udp:*:5060 > >> and adding an autoscaling profile in front of it seems to limit > >> the processes per interface again, not all... > >> > >> Any help is appreciated. > >> > >> Thanks! > >> > >> _______________________________________________ > >> 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 medeanwz at gmail.com Tue Nov 3 18:42:13 2020 From: medeanwz at gmail.com (M S) Date: Tue, 3 Nov 2020 19:42:13 +0100 Subject: [OpenSIPS-Users] multiple sub interfaces - opensips crashes In-Reply-To: <106156e6-7d47-2950-b530-3a750aaf53ff@opensips.org> References: <939d4c2b-b4c1-eb85-7476-3225503ec683@opensips.org> <106156e6-7d47-2950-b530-3a750aaf53ff@opensips.org> Message-ID: That would be great if possible. or if you can expand auto_scaling to the whole socket=udp:* group, not per IP... On Tue, Nov 3, 2020 at 1:11 PM Bogdan-Andrei Iancu wrote: > Maybe we should consider (as future extension) the possibility to bundle > multiple UDP listeners on the same worker. In this case, we can have a > large number of listeners with a relatively small number of workers/ > processes. > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 2020 online > https://opensips.org/training/OpenSIPS_eBootcamp_2020/ > > On 11/3/20 10:10 AM, Răzvan Crainea wrote: > > Hello! > > > > No, there is no way to prevent OpenSIPS from opening connections for > > each process. Did you try to start opensips with fewer workers, for > > example just 1, or 3? Does it start properly? > > > > Best regards, > > > > Răzvan Crainea > > OpenSIPS Core Developer > > http://www.opensips-solutions.com > > > > On 11/2/20 1:55 PM, M S wrote: > >> Thank you Bogdan. I actually use: socket=udp:*:5060 in config file. > >> Is there a way to not open a process per interface, to not have 1200 > >> or 600 workers? as I said in my previous email, I tried auto scaling > >> and it didn't work. > >> Also, I have increased MySQL max connections but it didn't fix > >> the problem - I wonder if anybody has experience with this... > >> > >> Thanks! > >> > >> On Mon, Nov 2, 2020 at 9:24 AM Bogdan-Andrei Iancu > >> > wrote: > >> > >> Hi OpenSIPer, > >> > >> With 600 interfaces (btw , have actually listed the 600 sockets into > >> the cfg or pointed the socket to the interface?) with 2 workers per > >> socket -> 1200 workers / processes. That means 1200 connections to > >> your DB server, which may be a bottle neck (by default, mysql > >> accepts around 100 simultaneous connections). > >> > >> I suspect your mysql server cannot cope with the 1200 conn, > >> preventing OpenSIPS to properly start. > >> > >> Regards, > >> > >> Bogdan-Andrei Iancu > >> > >> OpenSIPS Founder and Developer > >> https://www.opensips-solutions.com > >> OpenSIPS Bootcamp 2020 online > >> https://opensips.org/training/OpenSIPS_eBootcamp_2020/ > >> > >> On 11/2/20 1:23 AM, M S wrote: > >>> Hi all, > >>> I have a machine with 600 subinterfaces. when I start opensips > >>> with 2 udp workers per interface, it doesn't start and keeps > >>> restarting. > >>> First error message was about too many connections to Mysql which > >>> I fixed by increasing max_connections, but now I am getting: > >>> > >>> ERROR:db_mysql:db_mysql_new_connection: initial connect failed > >>> ERROR:core:db_do_init: could not add connection to the pool > >>> ERROR:sql_cacher:child_init: Cannot connect to SQL DB from child > >>> ERROR:core:init_mod_child: failed to initializing module > >>> sql_cacher, rank 683 > >>> ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe > >>> ERROR:core:udp_start_processes: failed to send -1 status code > >>> ERROR:db_mysql:db_mysql_connect: driver error(2002): Can't connect > >>> to local MySQL server through socket '/var/lib/mysql/mysql.sock' > >>> (11) > >>> > >>> and: > >>> > >>> ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken pipe > >>> ERROR:core:udp_start_processes: failed to send -1 status code > >>> > >>> Any ideas how I can fix this? > >>> Also, can I just limit number of opensips forked processes, to run > >>> just a certain number process instead of x numbers per interface? > >>> I tried using auto_scaling but it did not help. in my > >>> opensips.conf, I have: > >>> socket=udp:*:5060 > >>> and adding an autoscaling profile in front of it seems to limit > >>> the processes per interface again, not all... > >>> > >>> Any help is appreciated. > >>> > >>> Thanks! > >>> > >>> _______________________________________________ > >>> 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 > > > _______________________________________________ > 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 medeanwz at gmail.com Tue Nov 3 18:42:51 2020 From: medeanwz at gmail.com (M S) Date: Tue, 3 Nov 2020 19:42:51 +0100 Subject: [OpenSIPS-Users] multiple sub interfaces - opensips crashes In-Reply-To: References: <939d4c2b-b4c1-eb85-7476-3225503ec683@opensips.org> <106156e6-7d47-2950-b530-3a750aaf53ff@opensips.org> Message-ID: Thanks for the suggestion Federico. I'm using Myql, is there an equivalent? On Tue, Nov 3, 2020 at 3:42 PM Federico Edorna wrote: > If it helps, we are using pgbouncer to avoid > opening a lot of connections to db. Pgbouncer acts as a db server for > opensips with full workers connections and opens just a few (on demand) to > real db server. It helps a lot when you have backup/standby opensips, not > increasing those db connections. > > > On Tue, Nov 3, 2020 at 9:13 AM Bogdan-Andrei Iancu > wrote: > >> Maybe we should consider (as future extension) the possibility to bundle >> multiple UDP listeners on the same worker. In this case, we can have a >> large number of listeners with a relatively small number of workers/ >> processes. >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Bootcamp 2020 online >> https://opensips.org/training/OpenSIPS_eBootcamp_2020/ >> >> On 11/3/20 10:10 AM, Răzvan Crainea wrote: >> > Hello! >> > >> > No, there is no way to prevent OpenSIPS from opening connections for >> > each process. Did you try to start opensips with fewer workers, for >> > example just 1, or 3? Does it start properly? >> > >> > Best regards, >> > >> > Răzvan Crainea >> > OpenSIPS Core Developer >> > http://www.opensips-solutions.com >> > >> > On 11/2/20 1:55 PM, M S wrote: >> >> Thank you Bogdan. I actually use: socket=udp:*:5060 in config file. >> >> Is there a way to not open a process per interface, to not have 1200 >> >> or 600 workers? as I said in my previous email, I tried auto scaling >> >> and it didn't work. >> >> Also, I have increased MySQL max connections but it didn't fix >> >> the problem - I wonder if anybody has experience with this... >> >> >> >> Thanks! >> >> >> >> On Mon, Nov 2, 2020 at 9:24 AM Bogdan-Andrei Iancu >> >> > wrote: >> >> >> >> Hi OpenSIPer, >> >> >> >> With 600 interfaces (btw , have actually listed the 600 sockets >> into >> >> the cfg or pointed the socket to the interface?) with 2 workers per >> >> socket -> 1200 workers / processes. That means 1200 connections to >> >> your DB server, which may be a bottle neck (by default, mysql >> >> accepts around 100 simultaneous connections). >> >> >> >> I suspect your mysql server cannot cope with the 1200 conn, >> >> preventing OpenSIPS to properly start. >> >> >> >> Regards, >> >> >> >> Bogdan-Andrei Iancu >> >> >> >> OpenSIPS Founder and Developer >> >> https://www.opensips-solutions.com >> >> OpenSIPS Bootcamp 2020 online >> >> https://opensips.org/training/OpenSIPS_eBootcamp_2020/ >> >> >> >> On 11/2/20 1:23 AM, M S wrote: >> >>> Hi all, >> >>> I have a machine with 600 subinterfaces. when I start opensips >> >>> with 2 udp workers per interface, it doesn't start and keeps >> >>> restarting. >> >>> First error message was about too many connections to Mysql which >> >>> I fixed by increasing max_connections, but now I am getting: >> >>> >> >>> ERROR:db_mysql:db_mysql_new_connection: initial connect failed >> >>> ERROR:core:db_do_init: could not add connection to the pool >> >>> ERROR:sql_cacher:child_init: Cannot connect to SQL DB from child >> >>> ERROR:core:init_mod_child: failed to initializing module >> >>> sql_cacher, rank 683 >> >>> ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken >> pipe >> >>> ERROR:core:udp_start_processes: failed to send -1 status code >> >>> ERROR:db_mysql:db_mysql_connect: driver error(2002): Can't connect >> >>> to local MySQL server through socket '/var/lib/mysql/mysql.sock' >> >>> (11) >> >>> >> >>> and: >> >>> >> >>> ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken >> pipe >> >>> ERROR:core:udp_start_processes: failed to send -1 status code >> >>> >> >>> Any ideas how I can fix this? >> >>> Also, can I just limit number of opensips forked processes, to run >> >>> just a certain number process instead of x numbers per interface? >> >>> I tried using auto_scaling but it did not help. in my >> >>> opensips.conf, I have: >> >>> socket=udp:*:5060 >> >>> and adding an autoscaling profile in front of it seems to limit >> >>> the processes per interface again, not all... >> >>> >> >>> Any help is appreciated. >> >>> >> >>> Thanks! >> >>> >> >>> _______________________________________________ >> >>> 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 >> >> >> _______________________________________________ >> 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 fedorna at anura.com.ar Tue Nov 3 19:12:23 2020 From: fedorna at anura.com.ar (Federico Edorna) Date: Tue, 3 Nov 2020 16:12:23 -0300 Subject: [OpenSIPS-Users] multiple sub interfaces - opensips crashes In-Reply-To: References: <939d4c2b-b4c1-eb85-7476-3225503ec683@opensips.org> <106156e6-7d47-2950-b530-3a750aaf53ff@opensips.org> Message-ID: I didn't read that it was mysql, sorry. I think my suggestion is for another thread :) Anyway, it seems that proxysql can be a choice for mysql... On Tue, Nov 3, 2020 at 3:46 PM M S wrote: > Thanks for the suggestion Federico. I'm using Myql, is there an equivalent? > > On Tue, Nov 3, 2020 at 3:42 PM Federico Edorna > wrote: > >> If it helps, we are using pgbouncer to >> avoid opening a lot of connections to db. Pgbouncer acts as a db server for >> opensips with full workers connections and opens just a few (on demand) to >> real db server. It helps a lot when you have backup/standby opensips, not >> increasing those db connections. >> >> >> On Tue, Nov 3, 2020 at 9:13 AM Bogdan-Andrei Iancu >> wrote: >> >>> Maybe we should consider (as future extension) the possibility to bundle >>> multiple UDP listeners on the same worker. In this case, we can have a >>> large number of listeners with a relatively small number of workers/ >>> processes. >>> >>> Regards, >>> >>> Bogdan-Andrei Iancu >>> >>> OpenSIPS Founder and Developer >>> https://www.opensips-solutions.com >>> OpenSIPS Bootcamp 2020 online >>> https://opensips.org/training/OpenSIPS_eBootcamp_2020/ >>> >>> On 11/3/20 10:10 AM, Răzvan Crainea wrote: >>> > Hello! >>> > >>> > No, there is no way to prevent OpenSIPS from opening connections for >>> > each process. Did you try to start opensips with fewer workers, for >>> > example just 1, or 3? Does it start properly? >>> > >>> > Best regards, >>> > >>> > Răzvan Crainea >>> > OpenSIPS Core Developer >>> > http://www.opensips-solutions.com >>> > >>> > On 11/2/20 1:55 PM, M S wrote: >>> >> Thank you Bogdan. I actually use: socket=udp:*:5060 in config file. >>> >> Is there a way to not open a process per interface, to not have 1200 >>> >> or 600 workers? as I said in my previous email, I tried auto scaling >>> >> and it didn't work. >>> >> Also, I have increased MySQL max connections but it didn't fix >>> >> the problem - I wonder if anybody has experience with this... >>> >> >>> >> Thanks! >>> >> >>> >> On Mon, Nov 2, 2020 at 9:24 AM Bogdan-Andrei Iancu >>> >> > wrote: >>> >> >>> >> Hi OpenSIPer, >>> >> >>> >> With 600 interfaces (btw , have actually listed the 600 sockets >>> into >>> >> the cfg or pointed the socket to the interface?) with 2 workers >>> per >>> >> socket -> 1200 workers / processes. That means 1200 connections to >>> >> your DB server, which may be a bottle neck (by default, mysql >>> >> accepts around 100 simultaneous connections). >>> >> >>> >> I suspect your mysql server cannot cope with the 1200 conn, >>> >> preventing OpenSIPS to properly start. >>> >> >>> >> Regards, >>> >> >>> >> Bogdan-Andrei Iancu >>> >> >>> >> OpenSIPS Founder and Developer >>> >> https://www.opensips-solutions.com >>> >> OpenSIPS Bootcamp 2020 online >>> >> https://opensips.org/training/OpenSIPS_eBootcamp_2020/ >>> >> >>> >> On 11/2/20 1:23 AM, M S wrote: >>> >>> Hi all, >>> >>> I have a machine with 600 subinterfaces. when I start opensips >>> >>> with 2 udp workers per interface, it doesn't start and keeps >>> >>> restarting. >>> >>> First error message was about too many connections to Mysql which >>> >>> I fixed by increasing max_connections, but now I am getting: >>> >>> >>> >>> ERROR:db_mysql:db_mysql_new_connection: initial connect failed >>> >>> ERROR:core:db_do_init: could not add connection to the pool >>> >>> ERROR:sql_cacher:child_init: Cannot connect to SQL DB from child >>> >>> ERROR:core:init_mod_child: failed to initializing module >>> >>> sql_cacher, rank 683 >>> >>> ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken >>> pipe >>> >>> ERROR:core:udp_start_processes: failed to send -1 status code >>> >>> ERROR:db_mysql:db_mysql_connect: driver error(2002): Can't >>> connect >>> >>> to local MySQL server through socket '/var/lib/mysql/mysql.sock' >>> >>> (11) >>> >>> >>> >>> and: >>> >>> >>> >>> ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken >>> pipe >>> >>> ERROR:core:udp_start_processes: failed to send -1 status code >>> >>> >>> >>> Any ideas how I can fix this? >>> >>> Also, can I just limit number of opensips forked processes, to >>> run >>> >>> just a certain number process instead of x numbers per interface? >>> >>> I tried using auto_scaling but it did not help. in my >>> >>> opensips.conf, I have: >>> >>> socket=udp:*:5060 >>> >>> and adding an autoscaling profile in front of it seems to limit >>> >>> the processes per interface again, not all... >>> >>> >>> >>> Any help is appreciated. >>> >>> >>> >>> Thanks! >>> >>> >>> >>> _______________________________________________ >>> >>> 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 >>> >>> >>> _______________________________________________ >>> 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 medeanwz at gmail.com Tue Nov 3 21:41:47 2020 From: medeanwz at gmail.com (M S) Date: Tue, 3 Nov 2020 22:41:47 +0100 Subject: [OpenSIPS-Users] multiple sub interfaces - opensips crashes In-Reply-To: References: <939d4c2b-b4c1-eb85-7476-3225503ec683@opensips.org> <106156e6-7d47-2950-b530-3a750aaf53ff@opensips.org> Message-ID: thank you! On Tue, Nov 3, 2020 at 8:15 PM Federico Edorna wrote: > I didn't read that it was mysql, sorry. I think my suggestion is for > another thread :) > > Anyway, it seems that proxysql can be a choice > for mysql... > > > On Tue, Nov 3, 2020 at 3:46 PM M S wrote: > >> Thanks for the suggestion Federico. I'm using Myql, is there an >> equivalent? >> >> On Tue, Nov 3, 2020 at 3:42 PM Federico Edorna >> wrote: >> >>> If it helps, we are using pgbouncer to >>> avoid opening a lot of connections to db. Pgbouncer acts as a db server for >>> opensips with full workers connections and opens just a few (on demand) to >>> real db server. It helps a lot when you have backup/standby opensips, not >>> increasing those db connections. >>> >>> >>> On Tue, Nov 3, 2020 at 9:13 AM Bogdan-Andrei Iancu >>> wrote: >>> >>>> Maybe we should consider (as future extension) the possibility to >>>> bundle >>>> multiple UDP listeners on the same worker. In this case, we can have a >>>> large number of listeners with a relatively small number of workers/ >>>> processes. >>>> >>>> Regards, >>>> >>>> Bogdan-Andrei Iancu >>>> >>>> OpenSIPS Founder and Developer >>>> https://www.opensips-solutions.com >>>> OpenSIPS Bootcamp 2020 online >>>> https://opensips.org/training/OpenSIPS_eBootcamp_2020/ >>>> >>>> On 11/3/20 10:10 AM, Răzvan Crainea wrote: >>>> > Hello! >>>> > >>>> > No, there is no way to prevent OpenSIPS from opening connections for >>>> > each process. Did you try to start opensips with fewer workers, for >>>> > example just 1, or 3? Does it start properly? >>>> > >>>> > Best regards, >>>> > >>>> > Răzvan Crainea >>>> > OpenSIPS Core Developer >>>> > http://www.opensips-solutions.com >>>> > >>>> > On 11/2/20 1:55 PM, M S wrote: >>>> >> Thank you Bogdan. I actually use: socket=udp:*:5060 in config file. >>>> >> Is there a way to not open a process per interface, to not have 1200 >>>> >> or 600 workers? as I said in my previous email, I tried auto scaling >>>> >> and it didn't work. >>>> >> Also, I have increased MySQL max connections but it didn't fix >>>> >> the problem - I wonder if anybody has experience with this... >>>> >> >>>> >> Thanks! >>>> >> >>>> >> On Mon, Nov 2, 2020 at 9:24 AM Bogdan-Andrei Iancu >>>> >> > wrote: >>>> >> >>>> >> Hi OpenSIPer, >>>> >> >>>> >> With 600 interfaces (btw , have actually listed the 600 sockets >>>> into >>>> >> the cfg or pointed the socket to the interface?) with 2 workers >>>> per >>>> >> socket -> 1200 workers / processes. That means 1200 connections >>>> to >>>> >> your DB server, which may be a bottle neck (by default, mysql >>>> >> accepts around 100 simultaneous connections). >>>> >> >>>> >> I suspect your mysql server cannot cope with the 1200 conn, >>>> >> preventing OpenSIPS to properly start. >>>> >> >>>> >> Regards, >>>> >> >>>> >> Bogdan-Andrei Iancu >>>> >> >>>> >> OpenSIPS Founder and Developer >>>> >> https://www.opensips-solutions.com >>>> >> OpenSIPS Bootcamp 2020 online >>>> >> https://opensips.org/training/OpenSIPS_eBootcamp_2020/ >>>> >> >>>> >> On 11/2/20 1:23 AM, M S wrote: >>>> >>> Hi all, >>>> >>> I have a machine with 600 subinterfaces. when I start opensips >>>> >>> with 2 udp workers per interface, it doesn't start and keeps >>>> >>> restarting. >>>> >>> First error message was about too many connections to Mysql >>>> which >>>> >>> I fixed by increasing max_connections, but now I am getting: >>>> >>> >>>> >>> ERROR:db_mysql:db_mysql_new_connection: initial connect failed >>>> >>> ERROR:core:db_do_init: could not add connection to the pool >>>> >>> ERROR:sql_cacher:child_init: Cannot connect to SQL DB from child >>>> >>> ERROR:core:init_mod_child: failed to initializing module >>>> >>> sql_cacher, rank 683 >>>> >>> ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken >>>> pipe >>>> >>> ERROR:core:udp_start_processes: failed to send -1 status code >>>> >>> ERROR:db_mysql:db_mysql_connect: driver error(2002): Can't >>>> connect >>>> >>> to local MySQL server through socket >>>> '/var/lib/mysql/mysql.sock' >>>> >>> (11) >>>> >>> >>>> >>> and: >>>> >>> >>>> >>> ERROR:core:send_status_code: write(-1) failed (-1): 32, Broken >>>> pipe >>>> >>> ERROR:core:udp_start_processes: failed to send -1 status code >>>> >>> >>>> >>> Any ideas how I can fix this? >>>> >>> Also, can I just limit number of opensips forked processes, to >>>> run >>>> >>> just a certain number process instead of x numbers per >>>> interface? >>>> >>> I tried using auto_scaling but it did not help. in my >>>> >>> opensips.conf, I have: >>>> >>> socket=udp:*:5060 >>>> >>> and adding an autoscaling profile in front of it seems to limit >>>> >>> the processes per interface again, not all... >>>> >>> >>>> >>> Any help is appreciated. >>>> >>> >>>> >>> Thanks! >>>> >>> >>>> >>> _______________________________________________ >>>> >>> 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 >> > _______________________________________________ > 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 mrsanvicente at gmail.com Tue Nov 3 21:58:27 2020 From: mrsanvicente at gmail.com (Mario San Vicente) Date: Tue, 3 Nov 2020 15:58:27 -0600 Subject: [OpenSIPS-Users] Opensips-cp 8.3.0 HTTP/1.1 400 Bad Request.. In-Reply-To: References: Message-ID: Hello Răzvan / Ovidiu, After disabling mi_html, my CP is working fine, i will be enabling more modules on it. Thanks for your help! Ovidiu, It would be good to have both portals running,but i am not getting to work the following comment: "If you want to keep mi_html, then set a different root path: #modparam("mi_html", "root", "osips_mi") ", any other hint? Thank you! On Tue, Nov 3, 2020 at 8:22 AM Ovidiu Sas wrote: > Hello Mario, > > It seems that you have both mi_http and mi_html modules loaded. > By default, both modules have the root path set to mi and one of the > modules is stealing the root path from the other. > In your case, when you hit http://x.x.x.x:8888/mi , you are hitting a > standalone management interface that is not part of opensips-cp. It's > an alternative way to run mi commands through a web interface. > > If you want to have only opensips-cp, then umload mi_html. > If you want to keep mi_html, then set a different root path: > #modparam("mi_html", "root", "osips_mi") > > Hope this helps, > Ovidiu > > On Sat, Oct 31, 2020 at 1:58 PM Mario San Vicente > wrote: > > > > Hello Răzvan , > > I was wrong with my diagnosis, cause i stopped receiving the http / 400 > error. But when trying to monitor calls i see that the portal is not > reflecting the real info, i tested dialogs and rtpproxy. > > I do see the json reply on a trace, but it is not updated on the portal: > > > > T 127.0.0.1:47632 -> 127.0.0.1:8888 [AP] #137 > > POST /mi HTTP/1.1..Host: 127.0.0.1:8888..Accept: */*..Content-Type: > application/json..Content-Length: > 49....{"jsonrpc":"2.0","id":1,"method":"rtpproxy_ > > show"}"id......._";i#4 > > # > > T 127.0.0.1:8888 -> 127.0.0.1:47632 [A] #138 > > ......._..k#)... > > # > > T 127.0.0.1:8888 -> 127.0.0.1:47632 [AP] #139 > > HTTP/1.1 200 OK..Content-Length: 136..Content-Type: > application/json..Date: Sat, 31 Oct 2020 17:34:22 > GMT....{"jsonrpc":"2.0","result":[{"Set":0,"Nodes > > > ":[{"url":"udp:localhost:2123","index":0,"disabled":0,"weight":1,"recheck_ticks":0}]}],"id":1}.........._..k#4 > > -------------------------------- > > T 127.0.0.1:47644 -> 127.0.0.1:8888 [AP] #204 > > POST /mi HTTP/1.1..Host: 127.0.0.1:8888..Accept: */*..Content-Type: > application/json..Content-Length: > 78....{"jsonrpc":"2.0","id":1,"method":"dlg_list" > > ,"params":{"index":0,"counter":20}}............._J. > > # > > T 127.0.0.1:8888 -> 127.0.0.1:47644 [A] #205 > > @......_........ > > # > > T 127.0.0.1:8888 -> 127.0.0.1:47644 [AP] #206 > > HTTP/1.1 200 OK..Content-Length: 58..Content-Type: > application/json..Date: Sat, 31 Oct 2020 17:42:14 > GMT....{"jsonrpc":"2.0","result":{"count":0,"Dialo > > gs":[]},"id":1}........._4...4. > > > > Aside notes: > > When enabling this line #modparam("mi_http", "root", "opensips_mi") , i > can see the mi portal. http://x.x.x.x:8888/mi , which has lots of > aditional info, but i have to disable it to get the json response and just > get an http response pointing to the mi interface: > > T 127.0.0.1:8888 -> 127.0.0.1:47654 [AP] #256 > > HTTP/1.1 200 OK..Content-Length: 1886..Content-Type: text/html..Date: > Sat, 31 Oct 2020 17:55:45 GMT....OpenSIPS Management > Interface > > http-equiv="Expires" content="0"> > "Pragma" content="no-cache">. bgcolor="#ffffff" l > > ink="#000000" text="#000000" vlink="#000000"> cellpadding="5" width="100%%" border="0">
colspan=2 valign > > ="top" align="left" bgcolor="#EFF7FF" width="100%%">

align="center">OpenSIPS MI HTML Interface

OpenSIPS > (3.1.0-dev (x86_6 > > 4/linux)) is running since Sat Oct 31 11:55:35 > 2020


.
. cellpadding="3" cellspacing="0"> > >.
statistics. href='/mi/core'>core. href='/mi/blacklists'>blacklists.httpd.tm. href='/mi/usrloc'>usrloc. href='/mi/dialog'>dialog.nathelper. href='/mi/rtpproxy'>rtpproxy. href='/mi/db_text'>db_text.drouti > > ng.
..
.
class="foot" style="margin:20px auto"> style='margin-left:5px;'>OpenSIPS web site
Copyright © > 2011-2015 VoIP Embedded, Inc.. > All rights res > > erved.
.......!.._X.t.4 > > > > Thank in advace. > > > > > > On Fri, Oct 30, 2020 at 8:45 PM Mario San Vicente < > mrsanvicente at gmail.com> wrote: > >> > >> Hello Răzvan , > >> > >> Thanks alot, that made the trick. > >> > >> I will check if something is not matching with the monit page cause > that is not working , but that's another story. > >> > >> Best regards. > >> Mario > >> > >> > >> > >> > >> > >> On Thu, Oct 29, 2020 at 3:49 AM Răzvan Crainea > wrote: > >>> > >>> As I see in your logs, OpenSIPS CP uses the `json` URL path for > querying > >>> MI, whereas the default root path is `mi`[1]. Either change the `root` > >>> to `json`, or modify your OpenSIPS CP boxes config to `mi`. > >>> > >>> [1] https://opensips.org/docs/modules/3.1.x/mi_http.html#param_root > >>> > >>> Best regards, > >>> > >>> Răzvan Crainea > >>> OpenSIPS Core Developer > >>> http://www.opensips-solutions.com > >>> > >>> On 10/28/20 11:23 PM, Mario San Vicente wrote: > >>> > Thanks for the answer Johan, > >>> > > >>> > But i see that; the *mi_json* module has been renamed to > >>> > *mi_http* module. and so: failed to load module mi_json.so > >>> > https://www.opensips.org/Documentation/Migration-2-4-0-to-3-0-0 > >>> > > >>> > I am using opensips 3.1 > >>> > I have this modules: > >>> > > >>> > loadmodule "httpd.so" > >>> > modparam("httpd", "port", 8888) > >>> > #### MI_HTTP module > >>> > loadmodule "json.so" > >>> > #loadmodule "mi_json.so" > >>> > loadmodule "mi_http.so" > >>> > > >>> > Any other clue? > >>> > > >>> > Thank you > >>> > > >>> > > >>> > _______________________________________________ > >>> > 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 > >> > >> > >> > >> -- > >> Mario San Vicente > >> Cheers! > > > > > > > > -- > > Mario San Vicente > > Cheers! > > _______________________________________________ > > Users mailing list > > Users at lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > -- > VoIP Embedded, Inc. > http://www.voipembedded.com > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Mario San Vicente Cheers! -------------- next part -------------- An HTML attachment was scrubbed... URL: From osas at voipembedded.com Wed Nov 4 04:46:21 2020 From: osas at voipembedded.com (Ovidiu Sas) Date: Tue, 3 Nov 2020 23:46:21 -0500 Subject: [OpenSIPS-Users] Opensips-cp 8.3.0 HTTP/1.1 400 Bad Request.. In-Reply-To: References: Message-ID: Hello Mario, If you have CP working fine, you don't really need mi_html. If you want to have it as an alternative, load the module and set a new root path: modparam("mi_html", "root", "opensips_mi") Then you should be able to access the embedded management interface via http://[OPENSIPS_HTTPD_IP]:[OPENSIPS_HTTPD_PORT]/opensips_mi This interface has nothing to do with CP. It's an alternative to opensipsctl, opensips-cli or CP (for dispatching management commands to opensips). The module was written to provide easy access to mi commands using a web browser (using the embedded web server from opensips - no need to use a dedicated web server). The old name of the module was mi_http and was renamed to mi_html. The old mi_json was renamed to mi_http. No more mi_json, welcome mi_html and mi_http was "rebranded": mi_json [v<=2.4.x] -> mi_http [v>=3.0.x] mi_http [v<=2.4.x] -> mi_html [v>=3.0.x] This created some confusion when migrating from pre 2.4.x to post 3.0.x opensips versions. Clear as mud? :) Hope this helps, Ovidiu On Tue, Nov 3, 2020 at 4:59 PM Mario San Vicente wrote: > > Hello Răzvan / Ovidiu, > > After disabling mi_html, my CP is working fine, i will be enabling more modules on it. Thanks for your help! > > Ovidiu, It would be good to have both portals running,but i am not getting to work the following comment: > "If you want to keep mi_html, then set a different root path: #modparam("mi_html", "root", "osips_mi") ", any other hint? > > Thank you! > > > > > > On Tue, Nov 3, 2020 at 8:22 AM Ovidiu Sas wrote: >> >> Hello Mario, >> >> It seems that you have both mi_http and mi_html modules loaded. >> By default, both modules have the root path set to mi and one of the >> modules is stealing the root path from the other. >> In your case, when you hit http://x.x.x.x:8888/mi , you are hitting a >> standalone management interface that is not part of opensips-cp. It's >> an alternative way to run mi commands through a web interface. >> >> If you want to have only opensips-cp, then umload mi_html. >> If you want to keep mi_html, then set a different root path: >> #modparam("mi_html", "root", "osips_mi") >> >> Hope this helps, >> Ovidiu >> >> On Sat, Oct 31, 2020 at 1:58 PM Mario San Vicente >> wrote: >> > >> > Hello Răzvan , >> > I was wrong with my diagnosis, cause i stopped receiving the http / 400 error. But when trying to monitor calls i see that the portal is not reflecting the real info, i tested dialogs and rtpproxy. >> > I do see the json reply on a trace, but it is not updated on the portal: >> > >> > T 127.0.0.1:47632 -> 127.0.0.1:8888 [AP] #137 >> > POST /mi HTTP/1.1..Host: 127.0.0.1:8888..Accept: */*..Content-Type: application/json..Content-Length: 49....{"jsonrpc":"2.0","id":1,"method":"rtpproxy_ >> > show"}"id......._";i#4 >> > # >> > T 127.0.0.1:8888 -> 127.0.0.1:47632 [A] #138 >> > ......._..k#)... >> > # >> > T 127.0.0.1:8888 -> 127.0.0.1:47632 [AP] #139 >> > HTTP/1.1 200 OK..Content-Length: 136..Content-Type: application/json..Date: Sat, 31 Oct 2020 17:34:22 GMT....{"jsonrpc":"2.0","result":[{"Set":0,"Nodes >> > ":[{"url":"udp:localhost:2123","index":0,"disabled":0,"weight":1,"recheck_ticks":0}]}],"id":1}.........._..k#4 >> > -------------------------------- >> > T 127.0.0.1:47644 -> 127.0.0.1:8888 [AP] #204 >> > POST /mi HTTP/1.1..Host: 127.0.0.1:8888..Accept: */*..Content-Type: application/json..Content-Length: 78....{"jsonrpc":"2.0","id":1,"method":"dlg_list" >> > ,"params":{"index":0,"counter":20}}............._J. >> > # >> > T 127.0.0.1:8888 -> 127.0.0.1:47644 [A] #205 >> > @......_........ >> > # >> > T 127.0.0.1:8888 -> 127.0.0.1:47644 [AP] #206 >> > HTTP/1.1 200 OK..Content-Length: 58..Content-Type: application/json..Date: Sat, 31 Oct 2020 17:42:14 GMT....{"jsonrpc":"2.0","result":{"count":0,"Dialo >> > gs":[]},"id":1}........._4...4. >> > >> > Aside notes: >> > When enabling this line #modparam("mi_http", "root", "opensips_mi") , i can see the mi portal. http://x.x.x.x:8888/mi , which has lots of aditional info, but i have to disable it to get the json response and just get an http response pointing to the mi interface: >> > T 127.0.0.1:8888 -> 127.0.0.1:47654 [AP] #256 >> > HTTP/1.1 200 OK..Content-Length: 1886..Content-Type: text/html..Date: Sat, 31 Oct 2020 17:55:45 GMT....OpenSIPS Management Interface >> > > > "Pragma" content="no-cache">.> > ink="#000000" text="#000000" vlink="#000000">
> > ="top" align="left" bgcolor="#EFF7FF" width="100%%">

OpenSIPS MI HTML Interface

OpenSIPS (3.1.0-dev (x86_6 >> > 4/linux)) is running since Sat Oct 31 11:55:35 2020


.
.> > >.
statistics.core.blacklists.httpd.tm.usrloc.dialog.nathelper.rtpproxy.db_text.drouti >> > ng.
..
.
OpenSIPS web site
Copyright © 2011-2015 VoIP Embedded, Inc.. All rights res >> > erved.
.......!.._X.t.4 >> > >> > Thank in advace. >> > >> > >> > On Fri, Oct 30, 2020 at 8:45 PM Mario San Vicente wrote: >> >> >> >> Hello Răzvan , >> >> >> >> Thanks alot, that made the trick. >> >> >> >> I will check if something is not matching with the monit page cause that is not working , but that's another story. >> >> >> >> Best regards. >> >> Mario >> >> >> >> >> >> >> >> >> >> >> >> On Thu, Oct 29, 2020 at 3:49 AM Răzvan Crainea wrote: >> >>> >> >>> As I see in your logs, OpenSIPS CP uses the `json` URL path for querying >> >>> MI, whereas the default root path is `mi`[1]. Either change the `root` >> >>> to `json`, or modify your OpenSIPS CP boxes config to `mi`. >> >>> >> >>> [1] https://opensips.org/docs/modules/3.1.x/mi_http.html#param_root >> >>> >> >>> Best regards, >> >>> >> >>> Răzvan Crainea >> >>> OpenSIPS Core Developer >> >>> http://www.opensips-solutions.com >> >>> >> >>> On 10/28/20 11:23 PM, Mario San Vicente wrote: >> >>> > Thanks for the answer Johan, >> >>> > >> >>> > But i see that; the *mi_json* module has been renamed to >> >>> > *mi_http* module. and so: failed to load module mi_json.so >> >>> > https://www.opensips.org/Documentation/Migration-2-4-0-to-3-0-0 >> >>> > >> >>> > I am using opensips 3.1 >> >>> > I have this modules: >> >>> > >> >>> > loadmodule "httpd.so" >> >>> > modparam("httpd", "port", 8888) >> >>> > #### MI_HTTP module >> >>> > loadmodule "json.so" >> >>> > #loadmodule "mi_json.so" >> >>> > loadmodule "mi_http.so" >> >>> > >> >>> > Any other clue? >> >>> > >> >>> > Thank you >> >>> > >> >>> > >> >>> > _______________________________________________ >> >>> > 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 >> >> >> >> >> >> >> >> -- >> >> Mario San Vicente >> >> Cheers! >> > >> > >> > >> > -- >> > Mario San Vicente >> > Cheers! >> > _______________________________________________ >> > Users mailing list >> > Users at lists.opensips.org >> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> >> -- >> VoIP Embedded, Inc. >> http://www.voipembedded.com >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > -- > Mario San Vicente > Cheers! > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- VoIP Embedded, Inc. http://www.voipembedded.com From mrsanvicente at gmail.com Wed Nov 4 06:42:35 2020 From: mrsanvicente at gmail.com (mrsanvicente) Date: Wed, 4 Nov 2020 00:42:35 -0600 Subject: [OpenSIPS-Users] Opensips-cp 8.3.0 HTTP/1.1 400 Bad Request.. In-Reply-To: References: Message-ID: <88FCA6F2-F6D1-42C3-B717-D17E70913CB6@gmail.com> Hi Ovidiu, Thanks for taking the time for explaining. I am sure some of us can take advantage of It! Mario San Vicente Best regards > El 3 nov 2020, a la(s) 22:51, Ovidiu Sas escribió: > > Hello Mario, > > If you have CP working fine, you don't really need mi_html. > If you want to have it as an alternative, load the module and set a > new root path: > modparam("mi_html", "root", "opensips_mi") > Then you should be able to access the embedded management interface > via http://[OPENSIPS_HTTPD_IP]:[OPENSIPS_HTTPD_PORT]/opensips_mi > > This interface has nothing to do with CP. It's an alternative to > opensipsctl, opensips-cli or CP (for dispatching management commands > to opensips). The module was written to provide easy access to mi > commands using a web browser (using the embedded web server from > opensips - no need to use a dedicated web server). > > The old name of the module was mi_http and was renamed to mi_html. > The old mi_json was renamed to mi_http. > No more mi_json, welcome mi_html and mi_http was "rebranded": > mi_json [v<=2.4.x] -> mi_http [v>=3.0.x] > mi_http [v<=2.4.x] -> mi_html [v>=3.0.x] > This created some confusion when migrating from pre 2.4.x to post > 3.0.x opensips versions. > Clear as mud? :) > > Hope this helps, > Ovidiu > >> On Tue, Nov 3, 2020 at 4:59 PM Mario San Vicente wrote: >> >> Hello Răzvan / Ovidiu, >> >> After disabling mi_html, my CP is working fine, i will be enabling more modules on it. Thanks for your help! >> >> Ovidiu, It would be good to have both portals running,but i am not getting to work the following comment: >> "If you want to keep mi_html, then set a different root path: #modparam("mi_html", "root", "osips_mi") ", any other hint? >> >> Thank you! >> >> >> >> >> >>> On Tue, Nov 3, 2020 at 8:22 AM Ovidiu Sas wrote: >>> >>> Hello Mario, >>> >>> It seems that you have both mi_http and mi_html modules loaded. >>> By default, both modules have the root path set to mi and one of the >>> modules is stealing the root path from the other. >>> In your case, when you hit http://x.x.x.x:8888/mi , you are hitting a >>> standalone management interface that is not part of opensips-cp. It's >>> an alternative way to run mi commands through a web interface. >>> >>> If you want to have only opensips-cp, then umload mi_html. >>> If you want to keep mi_html, then set a different root path: >>> #modparam("mi_html", "root", "osips_mi") >>> >>> Hope this helps, >>> Ovidiu >>> >>> On Sat, Oct 31, 2020 at 1:58 PM Mario San Vicente >>> wrote: >>>> >>>> Hello Răzvan , >>>> I was wrong with my diagnosis, cause i stopped receiving the http / 400 error. But when trying to monitor calls i see that the portal is not reflecting the real info, i tested dialogs and rtpproxy. >>>> I do see the json reply on a trace, but it is not updated on the portal: >>>> >>>> T 127.0.0.1:47632 -> 127.0.0.1:8888 [AP] #137 >>>> POST /mi HTTP/1.1..Host: 127.0.0.1:8888..Accept: */*..Content-Type: application/json..Content-Length: 49....{"jsonrpc":"2.0","id":1,"method":"rtpproxy_ >>>> show"}"id......._";i#4 >>>> # >>>> T 127.0.0.1:8888 -> 127.0.0.1:47632 [A] #138 >>>> ......._..k#)... >>>> # >>>> T 127.0.0.1:8888 -> 127.0.0.1:47632 [AP] #139 >>>> HTTP/1.1 200 OK..Content-Length: 136..Content-Type: application/json..Date: Sat, 31 Oct 2020 17:34:22 GMT....{"jsonrpc":"2.0","result":[{"Set":0,"Nodes >>>> ":[{"url":"udp:localhost:2123","index":0,"disabled":0,"weight":1,"recheck_ticks":0}]}],"id":1}.........._..k#4 >>>> -------------------------------- >>>> T 127.0.0.1:47644 -> 127.0.0.1:8888 [AP] #204 >>>> POST /mi HTTP/1.1..Host: 127.0.0.1:8888..Accept: */*..Content-Type: application/json..Content-Length: 78....{"jsonrpc":"2.0","id":1,"method":"dlg_list" >>>> ,"params":{"index":0,"counter":20}}............._J. >>>> # >>>> T 127.0.0.1:8888 -> 127.0.0.1:47644 [A] #205 >>>> @......_........ >>>> # >>>> T 127.0.0.1:8888 -> 127.0.0.1:47644 [AP] #206 >>>> HTTP/1.1 200 OK..Content-Length: 58..Content-Type: application/json..Date: Sat, 31 Oct 2020 17:42:14 GMT....{"jsonrpc":"2.0","result":{"count":0,"Dialo >>>> gs":[]},"id":1}........._4...4. >>>> >>>> Aside notes: >>>> When enabling this line #modparam("mi_http", "root", "opensips_mi") , i can see the mi portal. http://x.x.x.x:8888/mi , which has lots of aditional info, but i have to disable it to get the json response and just get an http response pointing to the mi interface: >>>> T 127.0.0.1:8888 -> 127.0.0.1:47654 [AP] #256 >>>> HTTP/1.1 200 OK..Content-Length: 1886..Content-Type: text/html..Date: Sat, 31 Oct 2020 17:55:45 GMT....OpenSIPS Management Interface >>>> >>> "Pragma" content="no-cache">.>>> ink="#000000" text="#000000" vlink="#000000">
>>> ="top" align="left" bgcolor="#EFF7FF" width="100%%">

OpenSIPS MI HTML Interface

OpenSIPS (3.1.0-dev (x86_6 >>>> 4/linux)) is running since Sat Oct 31 11:55:35 2020


.
.>>>> .
statistics.core.blacklists.httpd.tm.usrloc.dialog.nathelper.rtpproxy.db_text.drouti >>>> ng.
..
.
OpenSIPS web site
Copyright © 2011-2015 VoIP Embedded, Inc.. All rights res >>>> erved.
.......!.._X.t.4 >>>> >>>> Thank in advace. >>>> >>>> >>>> On Fri, Oct 30, 2020 at 8:45 PM Mario San Vicente wrote: >>>>> >>>>> Hello Răzvan , >>>>> >>>>> Thanks alot, that made the trick. >>>>> >>>>> I will check if something is not matching with the monit page cause that is not working , but that's another story. >>>>> >>>>> Best regards. >>>>> Mario >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Thu, Oct 29, 2020 at 3:49 AM Răzvan Crainea wrote: >>>>>> >>>>>> As I see in your logs, OpenSIPS CP uses the `json` URL path for querying >>>>>> MI, whereas the default root path is `mi`[1]. Either change the `root` >>>>>> to `json`, or modify your OpenSIPS CP boxes config to `mi`. >>>>>> >>>>>> [1] https://opensips.org/docs/modules/3.1.x/mi_http.html#param_root >>>>>> >>>>>> Best regards, >>>>>> >>>>>> Răzvan Crainea >>>>>> OpenSIPS Core Developer >>>>>> http://www.opensips-solutions.com >>>>>> >>>>>> On 10/28/20 11:23 PM, Mario San Vicente wrote: >>>>>>> Thanks for the answer Johan, >>>>>>> >>>>>>> But i see that; the *mi_json* module has been renamed to >>>>>>> *mi_http* module. and so: failed to load module mi_json.so >>>>>>> https://www.opensips.org/Documentation/Migration-2-4-0-to-3-0-0 >>>>>>> >>>>>>> I am using opensips 3.1 >>>>>>> I have this modules: >>>>>>> >>>>>>> loadmodule "httpd.so" >>>>>>> modparam("httpd", "port", 8888) >>>>>>> #### MI_HTTP module >>>>>>> loadmodule "json.so" >>>>>>> #loadmodule "mi_json.so" >>>>>>> loadmodule "mi_http.so" >>>>>>> >>>>>>> Any other clue? >>>>>>> >>>>>>> Thank you >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 >>>>> >>>>> >>>>> >>>>> -- >>>>> Mario San Vicente >>>>> Cheers! >>>> >>>> >>>> >>>> -- >>>> Mario San Vicente >>>> Cheers! >>>> _______________________________________________ >>>> Users mailing list >>>> Users at lists.opensips.org >>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >>> >>> >>> -- >>> VoIP Embedded, Inc. >>> http://www.voipembedded.com >>> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> >> -- >> Mario San Vicente >> Cheers! >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > -- > VoIP Embedded, Inc. > http://www.voipembedded.com > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From u8k.mel at gmail.com Wed Nov 4 23:38:02 2020 From: u8k.mel at gmail.com (Elaine Huang) Date: Thu, 5 Nov 2020 10:38:02 +1100 Subject: [OpenSIPS-Users] Question: how to return string from module function to config script? In-Reply-To: References: Message-ID: Hello Ovidiu, Thanks for your reply. Reading the linked doc it seemed to me exported functions can only return integers. I don't quite get the dialplan dp_translate function, how do I decide what dialplan id to use, and what's a translation rule? Should I create my own pseudo variable and store the string there for scripting access? Sorry for all the questions. Cheers, Wenshan On Sun., 1 Nov. 2020, 11:47 Ovidiu Sas, wrote: > Hello Elaine, > > A module function in opensips returns and integer. > Based on the return value, you can test if the function was successful or > not. > More details here: > https://www.opensips.org/Documentation/Development-Manual#toc37 > Take a look at the big yellow warning at the end of documentation for the > module function for how return codes are interpreted. > > If you want to return a string, here’s an example: > > https://opensips.org/html/docs/modules/devel/dialplan.html#func_dp_translate > See the out_var parameter. > > Hope this helps, > Ovidiu > > On Sat, Oct 31, 2020 at 18:57 Elaine Huang wrote: > >> I'm new to opensips and I'm wondering if it's possible for a module >> function to return a string instead of integer? >> >> My wishful thinking is in my config: >> >> $var(myVar) = myFunc(params...); >> # then myVar becomes a string value that I can manipulate, compare, etc >> >> >> If this is not achievable, what's the conventional way to get a string >> from a module function? Is it pseudo variable that I should use? >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > -- > VoIP Embedded, Inc. > http://www.voipembedded.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 osas at voipembedded.com Thu Nov 5 02:44:20 2020 From: osas at voipembedded.com (Ovidiu Sas) Date: Wed, 4 Nov 2020 21:44:20 -0500 Subject: [OpenSIPS-Users] Question: how to return string from module function to config script? In-Reply-To: References: Message-ID: Hello Elaine, See inline! On Wed, Nov 4, 2020 at 6:39 PM Elaine Huang wrote: > > Hello Ovidiu, > > Thanks for your reply. Reading the linked doc it seemed to me exported functions can only return integers. That is correct! > I don't quite get the dialplan dp_translate function, how do I decide what dialplan id to use, and what's a translation rule? This was just an example to look at. You can read the documentation of the dialplan module and check the layout of the dialplan table and it will make sense. There are other functions in other modules that are using a pseudo variable to populate then on successful execution. > Should I create my own pseudo variable and store the string there for scripting access? Sorry for all the questions. You don't need to create your own pseudo variable. The pseudo variable will be provided by the script/config file to your function as a parameter and your function will populate it with whatever you want. Then later on, in the script, you can perform whatever operations you like to/with that pseudo variable. > > Cheers, > Wenshan > > On Sun., 1 Nov. 2020, 11:47 Ovidiu Sas, wrote: >> >> Hello Elaine, >> >> A module function in opensips returns and integer. >> Based on the return value, you can test if the function was successful or not. >> More details here: >> https://www.opensips.org/Documentation/Development-Manual#toc37 >> Take a look at the big yellow warning at the end of documentation for the module function for how return codes are interpreted. >> >> If you want to return a string, here’s an example: >> https://opensips.org/html/docs/modules/devel/dialplan.html#func_dp_translate >> See the out_var parameter. >> >> Hope this helps, >> Ovidiu >> >> On Sat, Oct 31, 2020 at 18:57 Elaine Huang wrote: >>> >>> I'm new to opensips and I'm wondering if it's possible for a module function to return a string instead of integer? >>> >>> My wishful thinking is in my config: >>> >>> $var(myVar) = myFunc(params...); >>> # then myVar becomes a string value that I can manipulate, compare, etc >>> >>> >>> If this is not achievable, what's the conventional way to get a string from a module function? Is it pseudo variable that I should use? >>> >>> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> -- >> VoIP Embedded, Inc. >> http://www.voipembedded.com >> _______________________________________________ >> 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 -- VoIP Embedded, Inc. http://www.voipembedded.com From michele.pinassi at unisi.it Thu Nov 5 09:09:45 2020 From: michele.pinassi at unisi.it (Michele Pinassi) Date: Thu, 5 Nov 2020 10:09:45 +0100 Subject: [OpenSIPS-Users] Help with max concurrent call limit Message-ID: Hi all, Opensips 1.11 here. I've tried implementing max concurrent calls limitation for some of our users, inspired by tutorial found at https://www.opensips.org/Documentation/Tutorials-ConcurrentCallsLimitation and using AVP to set per-account calls limit. In table usr_preferences i've a row like: id uuid username domain attribute type value 1298 6911 voip.xxxx.it maxcalls 0 1 and on dialplan i've: ####  AVP module loadmodule "avpops.so" modparam("avpops","db_url","mysql://voip:7PDzZ2ADNxZzmzfA at 192.168.1.1/opensips") modparam("avpops","avp_table","usr_preferences") modparam("avpops","uuid_column", "uuid") modparam("avpops","use_domain",0) modparam("avpops","domain_column","domain") modparam("avpops","attribute_column","attribute") modparam("avpops","value_column","value") modparam("avpops","type_column","type") ... route() { [...]     if (is_method("INVITE")) {         set_dlg_profile("caller", "$ru");         get_profile_size("caller", "$ru", "$var(size)");         ## <-- CONCURRENT CALLS LIMIT BASED ON DESTINATION         if(avp_db_load("$ru/username","$avp(maxcalls)")) {         if($var(size) > $avp(maxcalls)) {             xlog("L_INFO","$ci - User $rU has $var(size) calls (max $avp(maxcalls) calls): BUSY\n");             sl_send_reply("486", "Busy: try later");             exit;         } else {             xlog("L_INFO","$ci - User $rU has $var(size) calls (max $avp(maxcalls) calls): ALLOW\n");         }     } [...] } This way seems to work perfectly except when calls come from our mediagateways, that append port to signals, like (captured with sngrep): INVITE 333xxxx at 172.20.1.4:506 5xxx at voip.xxxx.it:5060 28 172.20.1.4:5060 193.xxxxxxx:5060 REJECTED 28ad94e804782466 0:10 INVITE 5023 at voip.xxxx.it 5050 at voip.xxx.it 20 193.205.4.182:5060 193.xxxxxxx:5060 CANCELLED 455244b218fec81c1f90036f3890af3e at voip.xxx.it 0:05 INVITE 3527 at 172.20.1.4:5060 2282 at voip.xxx.it:5060 20 172.20.1.4:5060 193.xxxxxxx:5060 COMPLETED 7758dace18b36325 I suppose, but maybe i'm wrong, that the problem is the domain part of the RURI that were not correctly matched in dialog profile. Any hint or help kindly appreciated -- Michele Pinassi - Responsabile Cybersecurity Università di Siena Ufficio Esercizio e Tecnologie - CSIRT irt at unisi.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From barnyritchley at hotmail.com Thu Nov 5 10:16:41 2020 From: barnyritchley at hotmail.com (Barnaby Ritchley) Date: Thu, 5 Nov 2020 10:16:41 +0000 Subject: [OpenSIPS-Users] pu_subsribe MI In-Reply-To: References: Message-ID: Hi all, Im encountering an issue when trying to invoke a presence subscription using pua and pua_mi, eg: opensips-cli -x mi pua_subscribe sip:opensips at 192.168.0.1 sip:2000 at 10.10.10.1 presence 3600 Returns: ERROR: command 'pua_subscribe' returned: -32000: Server error Running opensips in debug doesn’t throw anything in the logs, but Ive tried using jsonrpc which gives me a slightly different result: curl -X POST \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ -d '{"jsonrpc": "2.0", "method": "pua_subscribe", "params": {"presentity_uri": "sip:opensips at 192.168.0.1", "watcher_uri": "sip:2000 at 10.10.10.1", "event": "presence", "expires": "3600" }, "id": 10}' http://127.0.0.1:8888/json/pua Returns: {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params"},"id":10} And the console shows: DBG:mi_http:mi_http_run_mi_cmd: got command=pua_subscribe ERROR:core:handle_mi_request: Invalid parameters Any hints or help would be really appreciated as I cant work out what isn’t right Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From sobomax at sippysoft.com Thu Nov 5 19:12:20 2020 From: sobomax at sippysoft.com (Maxim Sobolev) Date: Thu, 5 Nov 2020 11:12:20 -0800 Subject: [OpenSIPS-Users] SIP Chronicles, recap and upcoming episode on Friday @ 7pm UTC In-Reply-To: References: Message-ID: OOPS, typo, the link to Sandro's episode is below: https://youtu.be/6EKVDyAx2Yo -Max On Thu, Nov 5, 2020 at 11:01 AM Maxim Sobolev wrote: > Hey SipTubies, > > Just a quick recap: if you missed any of latest episodes of SIP Chronicles > here we go: > > Very interesting historical-looking firegrill-side chat with Paul Kyzivat > of IETF: https://youtu.be/kvLuJhsnF-c > > Great conversation with Sandro Gauci (SIPVicious, Enable Security) about > recent developments: https://youtu.be/kvLuJhsnF-c > > For #12 I think we'll do something different: turn the lens around and do > a live coding / testing / whatever jam session with Turbomax at controls > doing all 3 of those things at once as well as answering questions from the > audience. The official goal is to benchmark our RFC8760 implementation > under simulated fire and see how it fares to the old-good master branch > with the sub-target to measure a relative drop/increase of peak performance > of processing digest auth. In the process I expect to get OpenSIPS up > flying at x00,000 CPS altitude and land it safely at few improvements. > > Some pics of the workhorse we are going to bench with are attached, this > is a small but mighty 8-core Xeon-D 1541 with 64GB of ECC RAM. We'll see if > simulated fire erupts into a real one. We will go over the process of > setting up OpenSIPS on Ubuntu 20.x and using either > https://github.com/sippy/b2bua or https://github.com/sobomax/microsippy > or combination of both to source incoming traffic and measure latency. > > https://youtu.be/SYzqka4I34M > > Bring your own beer, snacks - it's going to be a long session and see you > tomorrow. :) > > -Max > -------------- next part -------------- An HTML attachment was scrubbed... URL: From razvan at opensips.org Fri Nov 6 10:54:16 2020 From: razvan at opensips.org (=?UTF-8?Q?R=c4=83zvan_Crainea?=) Date: Fri, 6 Nov 2020 12:54:16 +0200 Subject: [OpenSIPS-Users] [RELEASE] OpenSIPS 2.4.9 and 3.0.4 and 3.1.1 minor releases Message-ID: <05befc0b-a503-afe1-90bd-d11f2aec5bc6@opensips.org> Hello, everyone! I am happy to announce you that on Tuesday, 17th of November 2020, we will be releasing three new minor versions, one for each of our supported branches - 2.4, 3.0 and 3.1. All these releases will only contain bug fixes gathered from their previous releases, so no script changes, or migration procedures are required to use them. A simple upgrade will suffice. We will let you know when the releases are completed, so you can start using them. Until then, happy hacking! -- Răzvan Crainea OpenSIPS Core Developer http://www.opensips-solutions.com From medeanwz at gmail.com Sat Nov 7 10:25:34 2020 From: medeanwz at gmail.com (M S) Date: Sat, 7 Nov 2020 11:25:34 +0100 Subject: [OpenSIPS-Users] Crash at dialog.so Message-ID: Hi all, I am using opensips 3.1.0: kernel: traps: opensips[98311] general protection ip:543d22 sp:7ffcb17316e0 error:0 in opensips[400000+34c000] systemd[1]: Started Process Core Dump (PID 100247/UID 0). kernel: opensips[98295]: segfault at 8 ip 00007f697539df40 sp 00007ffcb1731cb0 error 4 in dialog.so[7f6975332000+9b000] kernel: Code: 41 57 41 56 41 55 41 54 55 53 48 81 ec 98 00 00 00 48 89 fb 89 74 24 54 4c 8b 35 d3 fb 22 00 49 8b 06 44 8b 6f 1c 49 c1 e5 05 <4c> 03 68 08 48 8b 48 18 41 8b 55 18 48 8b 71 08 4c 8d 3c 96 bf 01 systemd[1]: Started Process Core Dump (PID 100249/UID 0). systemd[1]: opensips.service: Main process exited, code=dumped, status=11/SEGV systemd[1]: opensips.service: Failed with result 'core-dump'. systemd-coredump[100248]: Process 98311 (opensips) of user 1001 dumped core.#012#012Stack trace of thread 98311:#012#0 0x0000000000543d22 fm_status (opensips)#012#1 0x0000000000502c51 sig_usr (opensips)#012#2 0x00007f69803f8dd0 __restore_rt (libpthread.so.0)#012#3 0x0000000000542cc3 fm_remove_free (opensips)#012#4 0x00007f69753476da build_extra_hdr (dialog.so)#012#5 0x00007f6975341717 dlg_options_routine (dialog.so)#012#6 0x00000000004c4a5d handle_timer_job (opensips)#012#7 0x000000000061124b handle_io (opensips)#012#8 0x0000000000615c61 udp_start_processes (opensips)#012#9 0x000000000041a742 main_loop (opensips)#012#10 0x00007f69800476a3 __libc_start_main (libc.so.6)#012#11 0x000000000041b1ae _start (opensips) systemd-coredump[100250]: Process 98295 (opensips) of user 1001 dumped core.#012#012Stack trace of thread 98295:#012#0 0x00007f697539df40 _unref_dlg (dialog.so)#012#1 0x00007f6975635c69 empty_tmcb_list (tm.so)#012#2 0x00007f69755fb64a free_cell (tm.so)#012#3 0x00007f69755fe42e free_hash_table (tm.so)#012#4 0x00007f69755fab16 tm_shutdown (tm.so)#012#5 0x0000000000507fb2 destroy_modules (opensips)#012#6 0x00000000005033f3 cleanup (opensips)#012#7 0x0000000000503ef1 shutdown_opensips (opensips)#012#8 0x000000000050475d handle_sigs (opensips)#012#9 0x000000000041ab01 main_loop (opensips)#012#10 0x00007f69800476a3 __libc_start_main (libc.so.6)#012#11 0x000000000041b1ae _start (opensips) Any ideas what caused it? Thank you, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From liviu at opensips.org Sat Nov 7 10:37:27 2020 From: liviu at opensips.org (Liviu Chircu) Date: Sat, 7 Nov 2020 12:37:27 +0200 Subject: [OpenSIPS-Users] Crash at dialog.so In-Reply-To: References: Message-ID: On 07.11.2020 12:25, M S wrote: > I am using opensips 3.1.0: > Any ideas what caused it? Hi, Mark! Could you install the "opensips-dbg" package and re-post the backtrace?  Thanks to the debug symbols, the information provided should be much richer. Also, if you're pushing less than 100 calls-per-second through that machine, then I recommend starting OpenSIPS with the "-a Q_MALLOC_DBG" command-line option and post the new backtrace, when the crash re-occurs.  This quality assurance allocator contains extra runtime checks and it may detect the problem in some earlier, more relevant place in the code, as the bug occurs. PS: to obtain a quality backtrace using `gdb` and not that garbled wall of text from systemd, see this tutorial [1] [1]: https://www.opensips.org/Documentation/TroubleShooting-Crash -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com From liviu at opensips.org Sat Nov 7 11:18:50 2020 From: liviu at opensips.org (Liviu Chircu) Date: Sat, 7 Nov 2020 13:18:50 +0200 Subject: [OpenSIPS-Users] Crash at dialog.so In-Reply-To: References: Message-ID: <1c909a19-05f3-3701-72de-f8249b478ae3@opensips.org> Please keep the "users" mailing list CC'ed at all times.  Both the question and discussion are of public interest, after all. On 07.11.2020 13:06, M S wrote: > I'm using CentOS 8 and couldn't find opensips-dbg package for it, > please advise. It's enough, no need for "opensips-dbg" as you seem to have the debug symbols already. Okay, so we're dealing with some kind of memory corruption, and this backtrace only begins to offer hints as to what's wrong, without decisive help.  The next step is to switch to the "-a Q_MALLOC_DBG" command-line option, trigger the crash again and see what that backtrace looks like. -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com From medeanwz at gmail.com Sat Nov 7 11:27:47 2020 From: medeanwz at gmail.com (M S) Date: Sat, 7 Nov 2020 12:27:47 +0100 Subject: [OpenSIPS-Users] Crash at dialog.so In-Reply-To: <1c909a19-05f3-3701-72de-f8249b478ae3@opensips.org> References: <1c909a19-05f3-3701-72de-f8249b478ae3@opensips.org> Message-ID: Will do, I didn't notice that I hit reply instead of reply all. The server has a pretty high load, is Q_MALLOC_DBG safe? also, is that an opensips command-line option? I don't see it in the opensips man page... On Sat, Nov 7, 2020 at 12:18 PM Liviu Chircu wrote: > Please keep the "users" mailing list CC'ed at all times. Both the > question and discussion are of public interest, after all. > > On 07.11.2020 13:06, M S wrote: > > I'm using CentOS 8 and couldn't find opensips-dbg package for it, > > please advise. > > It's enough, no need for "opensips-dbg" as you seem to have the debug > symbols already. > > Okay, so we're dealing with some kind of memory corruption, and this > backtrace only begins to offer hints as to what's wrong, without > decisive help. The next step is to switch to the "-a Q_MALLOC_DBG" > command-line option, trigger the crash again and see what that backtrace > looks like. > > -- > Liviu Chircu > www.twitter.com/liviuchircu | www.opensips-solutions.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cc3283 at att.com Mon Nov 9 19:12:58 2020 From: cc3283 at att.com (CARTWRIGHT, CORY C) Date: Mon, 9 Nov 2020 19:12:58 +0000 Subject: [OpenSIPS-Users] segfault at 7f4c471852 ip 00007f4dc4a0ccc0 sp 00007ffc74776350 error 4 in libc-2.23.so[7f4dc49be000+1c0000] In-Reply-To: <95c2b97d-d5b3-cf5d-082c-7fcc43b7e1f8@opensips.org> References: <2e9332f329064ad5b7a30fc9871a2060@att.com> <59190427a0d44cc2985c63fcccc90306@att.com> <95c2b97d-d5b3-cf5d-082c-7fcc43b7e1f8@opensips.org> Message-ID: Thank you! I will start the upgrade. -----Original Message----- From: Users On Behalf Of Razvan Crainea Sent: Thursday, October 15, 2020 05:51 To: users at lists.opensips.org Subject: Re: [OpenSIPS-Users] segfault at 7f4c471852 ip 00007f4dc4a0ccc0 sp 00007ffc74776350 error 4 in libc-2.23.so[7f4dc49be000+1c0000] Hi, Cory! This issue as been already fixed in OpenSIPS 3.0.3, commit 3a8f6f13. Please upgrade your code to the latest 3.0.x to get the latest fixes. Best regards, Răzvan Crainea OpenSIPS Core Developer https://urldefense.com/v3/__http://www.opensips-solutions.com__;!!BhdT!2Sui2teZQ_0VOciZ71p1Z4XOxthKspnIUzsUo-4PgbKDU2_FUmNyrSRsNEqdfQ$ On 10/2/20 4:03 AM, CARTWRIGHT, CORY C wrote: > Although I have not sparked any interest in this so far, I was able to > get more information with DEBUG turned on. > > This looks like it is an issue connecting to mysql, the mysql logs are > turned on with no additional information shown pertaining to this.  The > query log shows normal dispatcher updates right up to the crash > > Oct  1 20:53:18 [7833] DBG:core:do_workers_auto_scaling: group 1 (with 5 > procs) has average load of 100 > > Oct  1 20:53:18 [7833] NOTICE:core:do_workers_auto_scaling: score 5/5 -> > forking new proc in group 1 (with 5 procs) > > Oct  1 20:53:18 [7833] DBG:core:internal_fork: forking new process "UDP > receiver" on slot 13 > > Oct  1 20:53:18 [8083] DBG:core:io_watch_add: [UDP_worker] io_watch_add > op (5 on 71) (0xa5b9e0, 5, 1, (nil),1), fd_no=0/1024 > > Oct  1 20:53:18 [8083] DBG:core:io_watch_add: [UDP_worker] io_watch_add > op (38 on 71) (0xa5b9e0, 38, 4, (nil),1), fd_no=1/1024 > > Oct  1 20:53:18 [8083] DBG:core:io_watch_add: [UDP_worker] io_watch_add > op (7 on 71) (0xa5b9e0, 7, 4, (nil),1), fd_no=2/1024 > > Oct  1 20:53:18 [8083] DBG:core:io_watch_add: [UDP_worker] io_watch_add > op (68 on 71) (0xa5b9e0, 68, 17, 0x7f1d8c848f78,1), fd_no=3/1024 > > Oct  1 20:53:18 [8083] DBG:core:init_mod_child: type=CHILD, rank=10000, > module=event_jsonrpc > > Oct  1 20:53:18 [8083] DBG:core:init_mod_child: type=CHILD, rank=10000, > module=tm > > Oct  1 20:53:18 [8083] DBG:tm:child_init_callid: callid: > '089b59c7452bb9fd-8083 at xxx.xxx.xxx.xxx’ > > Oct  1 20:53:18 [8083] DBG:core:init_mod_child: type=CHILD, rank=10000, > module=domain > > Oct  1 20:53:18 [8083] DBG:core:init_mod_child: type=CHILD, rank=10000, > module=dispatcher > > Oct  1 20:53:18 [8083] CRITICAL:dispatcher:ds_connect_db: BUG - db > connection found already open > > Oct  1 20:53:18 [8083] ERROR:dispatcher:ds_child_init: failed to do DB > connect > > Oct  1 20:53:18 [8083] ERROR:core:init_mod_child: failed to initializing > module dispatcher, rank 10000 > > Oct  1 20:53:18 [8083] DBG:core:send_status_code: sent code -1 (1 byte) > > Oct  1 20:53:18 [8083] ERROR:core:fork_dynamic_udp_process: Initializing > new process failed, exiting with error > > Oct  1 20:53:18 [7833] DBG:core:wait_status_code: read code -1 (1 byte) > > Oct  1 20:53:18 [7833] ERROR:core:do_workers_auto_scaling: failed to > fork new process for group 1 (current 5 procs) > > Oct  1 20:53:18 [7833] DBG:core:handle_sigs: OpenSIPS exit status = 139 > > Oct  1 20:53:18 [7833] INFO:core:handle_sigs: child process 7847 exited > by a signal 11 > > Oct  1 20:53:18 [7833] INFO:core:handle_sigs: core was generated > > Oct  1 20:53:18 [7833] INFO:core:handle_sigs: terminating due to SIGCHLD > > *From:* Users *On Behalf Of > *CARTWRIGHT, CORY C > *Sent:* Monday, September 21, 2020 10:53 > *To:* users at lists.opensips.org > *Subject:* [OpenSIPS-Users] segfault at 7f4c471852 ip 00007f4dc4a0ccc0 > sp 00007ffc74776350 error 4 in libc-2.23.so[7f4dc49be000+1c0000] > > ****Security Advisory:* This Message Originated Outside of AT&T *** > Reference http://cso.att.com/EmailSecurity/IDSP.html for more information. > > Hello,   Intermittently opensips is crashing  “segfault at 7f4c471852 ip > 00007f4dc4a0ccc0 sp 00007ffc74776350 error 4 in > libc-2.23.so[7f4dc49be000+1c0000]” showing in the syslog.  I have been > unable to duplicate in LAB or determine any reason for the crash. > > Searched the  archives and was unable to find anything related to > libc-2.23.so, google has a many hits but all seem to eventually point > back to the application. > > Any help would be greatly appreciated > > version: opensips 3.0.2 (x86_64/linux) > > flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, > Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_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: 7e8167853 > > main.c compiled on 15:39:14 Jun  2 2020 with gcc 5.4.0 > > # gcc -v > > Using built-in specs. > > COLLECT_GCC=gcc > > COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper > > Target: x86_64-linux-gnu > > Configured with: ../src/configure -v --with-pkgversion='Ubuntu > 5.4.0-6ubuntu1~16.04.12' > --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs > --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ > --prefix=/usr --program-suffix=-5 --enable-shared > --enable-linker-build-id --libexecdir=/usr/lib > --without-included-gettext --enable-threads=posix --libdir=/usr/lib > --enable-nls --with-sysroot=/ --enable-clocale=gnu > --enable-libstdcxx-debug --enable-libstdcxx-time=yes > --with-default-libstdcxx-abi=new --enable-gnu-unique-object > --disable-vtable-verify --enable-libmpx --enable-plugin > --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk > --enable-gtk-cairo > --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre > --enable-java-home > --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 > --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 > --with-arch-directory=amd64 > --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc > --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 > --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic > --enable-checking=release --build=x86_64-linux-gnu > --host=x86_64-linux-gnu --target=x86_64-linux-gnu > > Thread model: posix > > gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12) > > Thanks > > Cory > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > https://urldefense.com/v3/__http://lists.opensips.org/cgi-bin/mailman/listinfo/users__;!!BhdT!2Sui2teZQ_0VOciZ71p1Z4XOxthKspnIUzsUo-4PgbKDU2_FUmNyrSQlMHcULg$ > _______________________________________________ Users mailing list Users at lists.opensips.org https://urldefense.com/v3/__http://lists.opensips.org/cgi-bin/mailman/listinfo/users__;!!BhdT!2Sui2teZQ_0VOciZ71p1Z4XOxthKspnIUzsUo-4PgbKDU2_FUmNyrSQlMHcULg$ From cc3283 at att.com Mon Nov 9 19:53:39 2020 From: cc3283 at att.com (CARTWRIGHT, CORY C) Date: Mon, 9 Nov 2020 19:53:39 +0000 Subject: [OpenSIPS-Users] segfault at 7f4c471852 ip 00007f4dc4a0ccc0 sp 00007ffc74776350 error 4 in libc-2.23.so[7f4dc49be000+1c0000] In-Reply-To: <95c2b97d-d5b3-cf5d-082c-7fcc43b7e1f8@opensips.org> References: <2e9332f329064ad5b7a30fc9871a2060@att.com> <59190427a0d44cc2985c63fcccc90306@att.com> <95c2b97d-d5b3-cf5d-082c-7fcc43b7e1f8@opensips.org> Message-ID: Hello Răzvan, Sorry for the confusion, I opened the bug report on 3.0.3 https://github.com/OpenSIPS/opensips/issues/2294 version: opensips 3.0.3 (x86_64/linux) flags: STATS: On, EXTRA_DEBUG, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_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: cf2c4903f main.c compiled on 08:17:27 Nov 3 2020 with gcc 5.4.0 Some additional information; I seem to be able to reproduce this by causing many retransmits, unanswered requests and responses. After a short time of this, opensips crashes. I had disabled the auto scaling with no change. I'm in the process now of duplicating and creating another CORE, but I expect no change, as my config and version are the same as submitted. Thanks, Cory -----Original Message----- From: Users On Behalf Of Razvan Crainea Sent: Thursday, October 15, 2020 05:51 To: users at lists.opensips.org Subject: Re: [OpenSIPS-Users] segfault at 7f4c471852 ip 00007f4dc4a0ccc0 sp 00007ffc74776350 error 4 in libc-2.23.so[7f4dc49be000+1c0000] Hi, Cory! This issue as been already fixed in OpenSIPS 3.0.3, commit 3a8f6f13. Please upgrade your code to the latest 3.0.x to get the latest fixes. Best regards, Răzvan Crainea OpenSIPS Core Developer https://urldefense.com/v3/__http://www.opensips-solutions.com__;!!BhdT!2Sui2teZQ_0VOciZ71p1Z4XOxthKspnIUzsUo-4PgbKDU2_FUmNyrSRsNEqdfQ$ On 10/2/20 4:03 AM, CARTWRIGHT, CORY C wrote: > Although I have not sparked any interest in this so far, I was able to > get more information with DEBUG turned on. > > This looks like it is an issue connecting to mysql, the mysql logs are > turned on with no additional information shown pertaining to this.  The > query log shows normal dispatcher updates right up to the crash > > Oct  1 20:53:18 [7833] DBG:core:do_workers_auto_scaling: group 1 (with 5 > procs) has average load of 100 > > Oct  1 20:53:18 [7833] NOTICE:core:do_workers_auto_scaling: score 5/5 -> > forking new proc in group 1 (with 5 procs) > > Oct  1 20:53:18 [7833] DBG:core:internal_fork: forking new process "UDP > receiver" on slot 13 > > Oct  1 20:53:18 [8083] DBG:core:io_watch_add: [UDP_worker] io_watch_add > op (5 on 71) (0xa5b9e0, 5, 1, (nil),1), fd_no=0/1024 > > Oct  1 20:53:18 [8083] DBG:core:io_watch_add: [UDP_worker] io_watch_add > op (38 on 71) (0xa5b9e0, 38, 4, (nil),1), fd_no=1/1024 > > Oct  1 20:53:18 [8083] DBG:core:io_watch_add: [UDP_worker] io_watch_add > op (7 on 71) (0xa5b9e0, 7, 4, (nil),1), fd_no=2/1024 > > Oct  1 20:53:18 [8083] DBG:core:io_watch_add: [UDP_worker] io_watch_add > op (68 on 71) (0xa5b9e0, 68, 17, 0x7f1d8c848f78,1), fd_no=3/1024 > > Oct  1 20:53:18 [8083] DBG:core:init_mod_child: type=CHILD, rank=10000, > module=event_jsonrpc > > Oct  1 20:53:18 [8083] DBG:core:init_mod_child: type=CHILD, rank=10000, > module=tm > > Oct  1 20:53:18 [8083] DBG:tm:child_init_callid: callid: > '089b59c7452bb9fd-8083 at xxx.xxx.xxx.xxx’ > > Oct  1 20:53:18 [8083] DBG:core:init_mod_child: type=CHILD, rank=10000, > module=domain > > Oct  1 20:53:18 [8083] DBG:core:init_mod_child: type=CHILD, rank=10000, > module=dispatcher > > Oct  1 20:53:18 [8083] CRITICAL:dispatcher:ds_connect_db: BUG - db > connection found already open > > Oct  1 20:53:18 [8083] ERROR:dispatcher:ds_child_init: failed to do DB > connect > > Oct  1 20:53:18 [8083] ERROR:core:init_mod_child: failed to initializing > module dispatcher, rank 10000 > > Oct  1 20:53:18 [8083] DBG:core:send_status_code: sent code -1 (1 byte) > > Oct  1 20:53:18 [8083] ERROR:core:fork_dynamic_udp_process: Initializing > new process failed, exiting with error > > Oct  1 20:53:18 [7833] DBG:core:wait_status_code: read code -1 (1 byte) > > Oct  1 20:53:18 [7833] ERROR:core:do_workers_auto_scaling: failed to > fork new process for group 1 (current 5 procs) > > Oct  1 20:53:18 [7833] DBG:core:handle_sigs: OpenSIPS exit status = 139 > > Oct  1 20:53:18 [7833] INFO:core:handle_sigs: child process 7847 exited > by a signal 11 > > Oct  1 20:53:18 [7833] INFO:core:handle_sigs: core was generated > > Oct  1 20:53:18 [7833] INFO:core:handle_sigs: terminating due to SIGCHLD > > *From:* Users *On Behalf Of > *CARTWRIGHT, CORY C > *Sent:* Monday, September 21, 2020 10:53 > *To:* users at lists.opensips.org > *Subject:* [OpenSIPS-Users] segfault at 7f4c471852 ip 00007f4dc4a0ccc0 > sp 00007ffc74776350 error 4 in libc-2.23.so[7f4dc49be000+1c0000] > > ****Security Advisory:* This Message Originated Outside of AT&T *** > Reference http://cso.att.com/EmailSecurity/IDSP.html for more information. > > Hello,   Intermittently opensips is crashing  “segfault at 7f4c471852 ip > 00007f4dc4a0ccc0 sp 00007ffc74776350 error 4 in > libc-2.23.so[7f4dc49be000+1c0000]” showing in the syslog.  I have been > unable to duplicate in LAB or determine any reason for the crash. > > Searched the  archives and was unable to find anything related to > libc-2.23.so, google has a many hits but all seem to eventually point > back to the application. > > Any help would be greatly appreciated > > version: opensips 3.0.2 (x86_64/linux) > > flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, > Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_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: 7e8167853 > > main.c compiled on 15:39:14 Jun  2 2020 with gcc 5.4.0 > > # gcc -v > > Using built-in specs. > > COLLECT_GCC=gcc > > COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper > > Target: x86_64-linux-gnu > > Configured with: ../src/configure -v --with-pkgversion='Ubuntu > 5.4.0-6ubuntu1~16.04.12' > --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs > --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ > --prefix=/usr --program-suffix=-5 --enable-shared > --enable-linker-build-id --libexecdir=/usr/lib > --without-included-gettext --enable-threads=posix --libdir=/usr/lib > --enable-nls --with-sysroot=/ --enable-clocale=gnu > --enable-libstdcxx-debug --enable-libstdcxx-time=yes > --with-default-libstdcxx-abi=new --enable-gnu-unique-object > --disable-vtable-verify --enable-libmpx --enable-plugin > --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk > --enable-gtk-cairo > --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre > --enable-java-home > --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 > --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 > --with-arch-directory=amd64 > --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc > --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 > --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic > --enable-checking=release --build=x86_64-linux-gnu > --host=x86_64-linux-gnu --target=x86_64-linux-gnu > > Thread model: posix > > gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12) > > Thanks > > Cory > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > https://urldefense.com/v3/__http://lists.opensips.org/cgi-bin/mailman/listinfo/users__;!!BhdT!2Sui2teZQ_0VOciZ71p1Z4XOxthKspnIUzsUo-4PgbKDU2_FUmNyrSQlMHcULg$ > _______________________________________________ Users mailing list Users at lists.opensips.org https://urldefense.com/v3/__http://lists.opensips.org/cgi-bin/mailman/listinfo/users__;!!BhdT!2Sui2teZQ_0VOciZ71p1Z4XOxthKspnIUzsUo-4PgbKDU2_FUmNyrSQlMHcULg$ From fun_yang at foxmail.com Tue Nov 10 02:26:17 2020 From: fun_yang at foxmail.com (fun_yang at foxmail.com) Date: Tue, 10 Nov 2020 10:26:17 +0800 Subject: [OpenSIPS-Users] Can mid-registrar and nat-traversal model be used in the same Message-ID: Do we have some examples? I did not find any examples of this in google fun_yang at foxmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From igor.pavlov1987 at gmail.com Tue Nov 10 07:12:29 2020 From: igor.pavlov1987 at gmail.com (Igor Pavlov) Date: Tue, 10 Nov 2020 11:12:29 +0400 Subject: [OpenSIPS-Users] Set RTP timeouts from rtpproxy_answer/offer hasn't effect Message-ID: Hi all, I am trying to setup different rtp timeouts for Caller and Callee with rtpproxy. Here is flags from the docs: tNN - can be used to specify a RTP ttl for the caller. The NN represents > the timeout in seconds for that stream. This can be useful in music on hold > scenarios where only one client is sending RTP. > > TNN - Similar to the tNN paramaeter, but used for tuning the calllee's ttl > for RTP. > My code is: loadmodule "rtpproxy.so" modparam("rtpproxy", "rtpproxy_sock", "udp:localhost:6060") modparam("rtpproxy", "rtpp_notify_socket", "tcp:127.0.0.1:6061") if (is_method("INVITE")) { t_on_branch("per_branch_ops"); t_on_reply("global"); t_on_failure("failure"); if (has_body("application/sdp")) { rtpproxy_offer("ocnrT10t10"); } } onreply_route[global] { if (has_body("application/sdp")) { rtpproxy_answer("ocnrT10"); } } rtpproxy started as: /usr/local/bin/rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -s udp:127.0.0.1 6060 -u rtpproxy rtpproxy -n tcp:127.0.0.1:6061 -i -f -L 8192 -l 0.0.0.0 -m 10000 -M 40000 -d DBUG LOG_LOCAL5 So, the default rtpproxy TTL timer is 60 seconds and I'm trying to rewrite it from the opensips. If I drop RTP from one of the sides, then the call is hanged up after 60 seconds, but not 10 seconds. Versions: opensips 3.0.2 (x86_64/linux) rtpproxy v2.1.1 -- Best regards, Igor Pavlov -------------- next part -------------- An HTML attachment was scrubbed... URL: From babak.freeswitch at gmail.com Wed Nov 11 13:08:28 2020 From: babak.freeswitch at gmail.com (Babak Yakhchali) Date: Wed, 11 Nov 2020 16:38:28 +0330 Subject: [OpenSIPS-Users] how to call ul_dump?brief using jsonrpc Message-ID: Hi I'm using opensips 3.1. What json should be sent as body to http mi which results like ul_dump?brief I tried this curl command but it is not working curl --location --request POST 'http://127.0.0.1:8080/opensips_mi' \ --header 'Content-Type: application/json' \ --data-raw '{"jsonrpc":"2.0","method":"ul_dump","id":10,*"params":["brief"]* }' I get {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params"} this works but it is not brief :) curl --location --request POST 'http://127.0.0.1:8080/opensips_mi' --header 'Content-Tya-raw '{"jsonrpc":"2.0","method":"ul_dump","id":10}' thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From vladp at opensips.org Wed Nov 11 13:27:36 2020 From: vladp at opensips.org (Vlad Patrascu) Date: Wed, 11 Nov 2020 15:27:36 +0200 Subject: [OpenSIPS-Users] how to call ul_dump?brief using jsonrpc In-Reply-To: References: Message-ID: <29ab7f8a-3e26-3165-9f60-6ce57ffd715e@opensips.org> Hi Babak, This is a bit of a mistake in the documentation, as the parameter's name is "brief", but as value it actually expects an integer. As such the jsonrpc request should be: '{"jsonrpc":"2.0","method":"ul_dump","params":{"brief":1},"id":10}' or: '{"jsonrpc":"2.0","method":"ul_dump","params":[1],"id":10}' Regards, -- Vlad Patrascu OpenSIPS Developer http://www.opensips-solutions.com On 11.11.2020 15:08, Babak Yakhchali wrote: > Hi > I'm using opensips 3.1. > What json should be sent as body to http mi which results like > ul_dump?brief > I tried this curl command but it is not working > curl --location --request POST 'http://127.0.0.1:8080/opensips_mi' \ > --header 'Content-Type: application/json' \ > --data-raw > '{"jsonrpc":"2.0","method":"ul_dump","id":10,*"params":["brief"]*}' > I get > {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params"} > > this works but it is not brief :) >  curl --location --request POST 'http://127.0.0.1:8080/opensips_mi' > --header 'Content-Tya-raw '{"jsonrpc":"2.0","method":"ul_dump","id":10}' > > 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 liviu at opensips.org Wed Nov 11 14:39:56 2020 From: liviu at opensips.org (Liviu Chircu) Date: Wed, 11 Nov 2020 16:39:56 +0200 Subject: [OpenSIPS-Users] Crash at dialog.so In-Reply-To: References: <1c909a19-05f3-3701-72de-f8249b478ae3@opensips.org> Message-ID: <0e5eb585-9f22-38f7-a48d-6120124c2bbc@opensips.org> On 07.11.2020 13:27, M S wrote: > The server has a pretty high load, is Q_MALLOC_DBG safe? How "pretty" high of a load is that, in terms of "calls-per-second" and "max-concurrent-calls"?  Q_MALLOC_DBG will typically add +30-50% to shared/private memory usage, as well as maybe a 10% increase in CPU usage.  But OpenSIPS uses very few CPU and memory to begin with, so it will be quite safe to do. My advice: unless you're running more than 50 calls-per-second through it, there is no need to even start worrying about Q_MALLOC_DBG altering the system's behavior.  Below the 50 CPS level, the difference is unnoticeable. > also, is that an opensips command-line option? I don't see it in the > opensips man page... Yes, it's a "opensips" binary command-line option.  The man page needs updating, indeed, however you could try "opensips -h" and you'll see that option. -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com From medeanwz at gmail.com Wed Nov 11 15:12:29 2020 From: medeanwz at gmail.com (M S) Date: Wed, 11 Nov 2020 16:12:29 +0100 Subject: [OpenSIPS-Users] Crash at dialog.so In-Reply-To: <0e5eb585-9f22-38f7-a48d-6120124c2bbc@opensips.org> References: <1c909a19-05f3-3701-72de-f8249b478ae3@opensips.org> <0e5eb585-9f22-38f7-a48d-6120124c2bbc@opensips.org> Message-ID: Hi Liviu, I did a quick look myself at dlg_timer.c (around the lines that crash happens) and there is actually a FIXME note there too. it seems to me that this issue happens when using create_dialog("PpB"), if one side is already disconnected and also PpB doesn't receive a ping and decides to disconnect the call, the module crashes. Basically, if the call is already disconnected, we should not try to send BYE to them either. For now, I removed "PpB" from create_dialog and the error has not occurred again. I think that can be the workaround for now. Thanks, Mark On Wed, Nov 11, 2020 at 3:40 PM Liviu Chircu wrote: > On 07.11.2020 13:27, M S wrote: > > The server has a pretty high load, is Q_MALLOC_DBG safe? > > How "pretty" high of a load is that, in terms of "calls-per-second" and > "max-concurrent-calls"? Q_MALLOC_DBG will typically add +30-50% to > shared/private memory usage, as well as maybe a 10% increase in CPU > usage. But OpenSIPS uses very few CPU and memory to begin with, so it > will be quite safe to do. > > My advice: unless you're running more than 50 calls-per-second through > it, there is no need to even start worrying about Q_MALLOC_DBG altering > the system's behavior. Below the 50 CPS level, the difference is > unnoticeable. > > > also, is that an opensips command-line option? I don't see it in the > > opensips man page... > Yes, it's a "opensips" binary command-line option. The man page needs > updating, indeed, however you could try "opensips -h" and you'll see > that option. > > -- > Liviu Chircu > www.twitter.com/liviuchircu | www.opensips-solutions.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmartinez at redvoiss.net Thu Nov 12 15:51:41 2020 From: rmartinez at redvoiss.net (Ricardo Martinez) Date: Thu, 12 Nov 2020 12:51:41 -0300 Subject: [OpenSIPS-Users] How SQL_CACHER module works? Message-ID: Hi. I’m trying to set up an environment where I can fetch data from a local mysql database at startup and have it available for opensips in cached memory. So far I think the SQL_CACHER module can do this operation. But I’m getting a little bit confused in the configuration. So far in the exported parameter “cache_table” I have: - id - db_url - cachedb_url - table - key - columns - on_demand In the DB_URL I have the SQL database where I store the date I want to fetch for later use. But I’m confused with the CACHEDB_URL ? What’s the idea of this DB?. I’m getting the data from the DB_URL, but then I have to store it in this CACHEDB???... If so… can I use another table in the same SQL database?.. or I need to use another method?. Can someone help me understand the whole picture here?. In case I need to set up this “cachedb_url” what is recommended?... and how to set up? Thanks in advance! Best Regards, Ricardo Martinez.- -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ben.Newlin at genesys.com Thu Nov 12 16:03:47 2020 From: Ben.Newlin at genesys.com (Ben Newlin) Date: Thu, 12 Nov 2020 16:03:47 +0000 Subject: [OpenSIPS-Users] How SQL_CACHER module works? In-Reply-To: References: Message-ID: The sql_cacher module doesn’t just read from SQL and store in local memory. It reads from SQL stores into a Cache-style (key-value) datastore. The Cache datastore doesn’t have to be in local memory; it can use any of the cache_db backends supported by OpenSIPS. So you must configure the cache datastore that you want to use. In your case, and I think most use cases for sql_cacher, you want to store in local memory, so you want to use the cachedb_local [1] module. [1] https://opensips.org/docs/modules/3.1.x/cachedb_local.html Ben Newlin From: Users Date: Thursday, November 12, 2020 at 10:53 AM To: users at lists.opensips.org Subject: [OpenSIPS-Users] How SQL_CACHER module works? Hi. I’m trying to set up an environment where I can fetch data from a local mysql database at startup and have it available for opensips in cached memory. So far I think the SQL_CACHER module can do this operation. But I’m getting a little bit confused in the configuration. So far in the exported parameter “cache_table” I have: * id * db_url * cachedb_url * table * key * columns * on_demand In the DB_URL I have the SQL database where I store the date I want to fetch for later use. But I’m confused with the CACHEDB_URL ? What’s the idea of this DB?. I’m getting the data from the DB_URL, but then I have to store it in this CACHEDB???... If so… can I use another table in the same SQL database?.. or I need to use another method?. Can someone help me understand the whole picture here?. In case I need to set up this “cachedb_url” what is recommended?... and how to set up? Thanks in advance! Best Regards, Ricardo Martinez.- -------------- next part -------------- An HTML attachment was scrubbed... URL: From andyvoicetek at gmail.com Fri Nov 13 13:09:11 2020 From: andyvoicetek at gmail.com (Andy Kama) Date: Fri, 13 Nov 2020 13:09:11 +0000 Subject: [OpenSIPS-Users] mid_registrar load balance Message-ID: Hi Guys is it possible to load balance with mid_registrar? perhaps setting multiple $ru in this part if (is_method("REGISTER")) { mid_registrar_save("location"); switch ($retcode) { case 1: xlog("forwarding REGISTER to main registrar ($$ci=$ci)\n"); $ru = "sip:1.2.3.4:5060"; t_relay(); break; case 2: xlog("absorbing REGISTER! ($$ci=$ci)\n"); break; default: xlog("failed to save registration! ($$ci=$ci)\n"); } exit; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From alain.bieuzent at free.fr Fri Nov 13 13:19:30 2020 From: alain.bieuzent at free.fr (Alain Bieuzent) Date: Fri, 13 Nov 2020 14:19:30 +0100 Subject: [OpenSIPS-Users] mid_registrar load balance In-Reply-To: References: Message-ID: Hi Andy, I’m doing it manually :        if (is_method("REGISTER"))         {                 fix_nated_contact();                 mid_registrar_save("location");                 switch ($retcode)                 {                         case 1:                                 if (!cache_fetch("local", "$ci", $avp(IP)))                                 {                                         avp_db_query("SELECT destination FROM lbsip_sbc_did_3_0.dispatcher where setid = 1 and state = 0 ORDER BY RAND() LIMIT 1", "$avp(IP)");                                         if ($rc < 0)                                         {                                                 xlog("L_WARN", "$ci|REGISTER|Mysql query failed or no result, droping call with a 500");                                                 sl_send_reply(500, "internal Server error");                                                 exit;                                         }                                         cache_store("local", "$ci", "$avp(IP)", 3600);                                 }                                 else                                 {                                         $var(IP) = $(avp(IP){uri.host});                                         if (!ds_is_in_list("$var(IP)",5060,1, ,1))                                         {                                                 xlog("L_INFO", "$ci|REGISTER|Destination in cache is unreachable forwarding query to another astsipac)");                                                 avp_db_query("SELECT destination FROM lbsip_sbc_did_3_0.dispatcher where setid = 1 and state = 0 ORDER BY RAND() LIMIT 1", "$avp(IP)");                                                 if ($rc < 0)                                                 {                                                         xlog("L_WARN", "$ci|REGISTER|Mysql query failed or no result, droping call with a 500");                                                         sl_send_reply(500, "internal Server error");                                                         exit;                                                 }                                         cache_store("local", "$ci", "$avp(IP)", 3600);                                         xlog("L_INFO", "$ci|REGISTER|new destination is $avp(IP)");                                         }                                 }                                 $ru = $avp(IP);                                 xlog("L_INFO", "$ci|forwarding REGISTER from: $ct - $tU:$si to: $ru");                                 cache_store("local", "$ci", "$avp(IP)", 3600);                                 t_relay();                                 break;                         case 2:                                 xlog("L_INFO", "absorbing REGISTER for $tU ");                                 break;                         default:                                 xlog("L_INFO", "failed to save registration for $tU");                 } De : Users au nom de Andy Kama Répondre à : OpenSIPS users mailling list Date : vendredi 13 novembre 2020 à 14:12 À : Objet : [OpenSIPS-Users] mid_registrar load balance Hi Guys is it possible to load balance with mid_registrar? perhaps setting multiple $ru in this part if (is_method("REGISTER")) { mid_registrar_save("location"); switch ($retcode) { case 1: xlog("forwarding REGISTER to main registrar ($$ci=$ci)\n"); $ru = "sip:1.2.3.4:5060"; t_relay(); break; case 2: xlog("absorbing REGISTER! ($$ci=$ci)\n"); break; default: xlog("failed to save registration! ($$ci=$ci)\n"); } exit; } _______________________________________________ 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 david.villasmil.work at gmail.com Fri Nov 13 13:52:52 2020 From: david.villasmil.work at gmail.com (David Villasmil) Date: Fri, 13 Nov 2020 13:52:52 +0000 Subject: [OpenSIPS-Users] mid_registrar load balance In-Reply-To: References: Message-ID: You should be able to use the dispatcher module just before relaying. Have you tried that? On Fri, 13 Nov 2020 at 13:09, Andy Kama wrote: > Hi Guys > > is it possible to load balance with mid_registrar? > perhaps setting multiple $ru in this part > > if (is_method("REGISTER")) { > mid_registrar_save("location"); > switch ($retcode) { > case 1: > xlog("forwarding REGISTER to main registrar ($$ci=$ci)\n"); > $ru = "sip:1.2.3.4:5060"; > t_relay(); > break; > case 2: > xlog("absorbing REGISTER! ($$ci=$ci)\n"); > break; > default: > xlog("failed to save registration! ($$ci=$ci)\n"); > } > > exit; > } > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Regards, David Villasmil email: david.villasmil.work at gmail.com phone: +34669448337 -------------- next part -------------- An HTML attachment was scrubbed... URL: From farmorg at gmail.com Fri Nov 13 14:46:28 2020 From: farmorg at gmail.com (Mark Farmer) Date: Fri, 13 Nov 2020 14:46:28 +0000 Subject: [OpenSIPS-Users] Teams TLS Error Message-ID: Hi everyone OpenSIPS 3.1.0 I am following the OpenSIPS as Teams SBC guide and have added the TLS config: modparam("tls_mgm","verify_cert", "1") modparam("tls_mgm","require_cert", "1") modparam("tls_mgm","tls_method", "TLSv1_2") modparam("tls_mgm","certificate", "/usr/local/etc/opensips/tls/myCert.pem") modparam("tls_mgm","private_key", "/usr/local/etc/opensips/tls/myKey.key") modparam("tls_mgm", "ca_dir", "/etc/ssl/certs") But I am seeing a TLS domain error: Nov 13 14:36:50 [175314] ERROR:tls_mgm:split_param_val: No TLS domain name Nov 13 14:36:50 [175314] Traceback (last included file at the bottom): Nov 13 14:36:50 [175314] 0. /usr/local//etc/opensips/opensips.cfg Nov 13 14:36:50 [175314] CRITICAL:core:yyerror: parse error in /usr/local//etc/opensips/opensips.cfg:191:19-20: Parameter not found in module - can't set Nov 13 14:36:50 [175314] #modparam("tls_mgm", "require_cert", "[dom4]1") Nov 13 14:36:50 [175314] Nov 13 14:36:50 [175314] modparam("tls_mgm","verify_cert", "1") Nov 13 14:36:50 [175314] ^~ Nov 13 14:36:50 [175314] modparam("tls_mgm","require_cert", "1") Nov 13 14:36:50 [175314] modparam("tls_mgm","tls_method", "TLSv1_2") Nov 13 14:36:50 [175314] DBG:core:set_mod_param_regex: tls_mgm matches module tls_mgm Nov 13 14:36:50 [175314] DBG:core:set_mod_param_regex: found in module tls_mgm [/usr/local/lib64/opensips/modules/] Nov 13 14:36:50 [175314] ERROR:tls_mgm:split_param_val: No TLS domain name Can anyone tell me what I might be missing please? Many thanks Mark. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at allenclan.co.uk Fri Nov 13 14:48:48 2020 From: mark at allenclan.co.uk (Mark Allen) Date: Fri, 13 Nov 2020 14:48:48 +0000 Subject: [OpenSIPS-Users] Reading contents of a file - OpenSIPS 3.1 Message-ID: Just would like to consult the hive mind. I want to read the contents of a multi-line text file to be used by my OpenSIPS config. Ideally, I'll get a key:value CSV pair from the file and store each pair in memcache - e.g. file contains: a, 113 b, 214 c, 771 read it in line by line and cache_store() with the letter as the attribute and the number as the value. I was thinking that I could use exec() to 'cat' the contents of the file, storing stdout in an AVP, and then work through that array splitting letter and number with a string transformation ready for cache_store(). However, if I do this the full file contents are stored as a single string in the first value with "#012" added in place of the new lines. Obviously, I can use a string transform s.select{} using #012 as a delimiter in an intermediary step, but am I just doing this the hard way? Is there a better way to achieve this? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sobomax at sippysoft.com Fri Nov 13 14:54:07 2020 From: sobomax at sippysoft.com (Maxim Sobolev) Date: Fri, 13 Nov 2020 06:54:07 -0800 Subject: [OpenSIPS-Users] Reading contents of a file - OpenSIPS 3.1 In-Reply-To: References: Message-ID: Use app_python? Parsing is trivial and you can call internal function i.e. cache_store() right from your Python code. -Max On Fri., Nov. 13, 2020, 6:50 a.m. Mark Allen, wrote: > Just would like to consult the hive mind. I want to read the contents of a > multi-line text file to be used by my OpenSIPS config. Ideally, I'll get a > key:value CSV pair from the file and store each pair in memcache - e.g. > > file contains: > > a, 113 > b, 214 > c, 771 > > read it in line by line and cache_store() with the letter as the attribute > and the number as the value. > > I was thinking that I could use exec() to 'cat' the contents of the file, > storing stdout in an AVP, and then work through that array splitting letter > and number with a string transformation ready for cache_store(). However, > if I do this the full file contents are stored as a single string in the > first value with "#012" added in place of the new lines. > > Obviously, I can use a string transform s.select{} using #012 as a > delimiter in an intermediary step, but am I just doing this the hard way? > Is there a better way to achieve this? > _______________________________________________ > 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 osas at voipembedded.com Fri Nov 13 15:06:24 2020 From: osas at voipembedded.com (Ovidiu Sas) Date: Fri, 13 Nov 2020 10:06:24 -0500 Subject: [OpenSIPS-Users] Reading contents of a file - OpenSIPS 3.1 In-Reply-To: References: Message-ID: Take a look at db_text and sql_cacher modules! Regards, Ovidiu Sas On Fri, Nov 13, 2020 at 09:50 Mark Allen wrote: > Just would like to consult the hive mind. I want to read the contents of a > multi-line text file to be used by my OpenSIPS config. Ideally, I'll get a > key:value CSV pair from the file and store each pair in memcache - e.g. > > file contains: > > a, 113 > b, 214 > c, 771 > > read it in line by line and cache_store() with the letter as the attribute > and the number as the value. > > I was thinking that I could use exec() to 'cat' the contents of the file, > storing stdout in an AVP, and then work through that array splitting letter > and number with a string transformation ready for cache_store(). However, > if I do this the full file contents are stored as a single string in the > first value with "#012" added in place of the new lines. > > Obviously, I can use a string transform s.select{} using #012 as a > delimiter in an intermediary step, but am I just doing this the hard way? > Is there a better way to achieve this? > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- VoIP Embedded, Inc. http://www.voipembedded.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at allenclan.co.uk Fri Nov 13 15:09:43 2020 From: mark at allenclan.co.uk (Mark Allen) Date: Fri, 13 Nov 2020 15:09:43 +0000 Subject: [OpenSIPS-Users] Reading contents of a file - OpenSIPS 3.1 In-Reply-To: References: Message-ID: Thanks Max. I've not tried using python, though I have used LUA before which offers similar functionality. However, I would like a solution which can be applied across most routes including startup and timer if possible. On Fri, 13 Nov 2020 at 14:56, Maxim Sobolev wrote: > Use app_python? Parsing is trivial and you can call internal function i.e. cache_store() > right from your Python code. > > -Max > > On Fri., Nov. 13, 2020, 6:50 a.m. Mark Allen, > wrote: > >> Just would like to consult the hive mind. I want to read the contents of >> a multi-line text file to be used by my OpenSIPS config. Ideally, I'll get >> a key:value CSV pair from the file and store each pair in memcache - e.g. >> >> file contains: >> >> a, 113 >> b, 214 >> c, 771 >> >> read it in line by line and cache_store() with the letter as the >> attribute and the number as the value. >> >> I was thinking that I could use exec() to 'cat' the contents of the file, >> storing stdout in an AVP, and then work through that array splitting letter >> and number with a string transformation ready for cache_store(). However, >> if I do this the full file contents are stored as a single string in the >> first value with "#012" added in place of the new lines. >> >> Obviously, I can use a string transform s.select{} using #012 as a >> delimiter in an intermediary step, but am I just doing this the hard way? >> Is there a better way to achieve this? >> _______________________________________________ >> 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 kevin.vines at gmail.com Fri Nov 13 15:09:58 2020 From: kevin.vines at gmail.com (Kevin Vines) Date: Fri, 13 Nov 2020 10:09:58 -0500 Subject: [OpenSIPS-Users] Teams TLS Error In-Reply-To: Message-ID: <74vf6nf8julckn68kfi75ohc.1605280198322@gmail.com> An HTML attachment was scrubbed... URL: From johan at democon.be Fri Nov 13 15:29:54 2020 From: johan at democon.be (johan) Date: Fri, 13 Nov 2020 16:29:54 +0100 Subject: [OpenSIPS-Users] Reading contents of a file - OpenSIPS 3.1 In-Reply-To: References: Message-ID: <0a999662-ce34-a05c-a668-a25417f14779@democon.be> And so is the usefulness of db_text proven :-) On 13/11/2020 16:06, Ovidiu Sas wrote: > Take a look at db_text and sql_cacher modules! > > Regards, > Ovidiu Sas > > On Fri, Nov 13, 2020 at 09:50 Mark Allen > wrote: > > Just would like to consult the hive mind. I want to read the > contents of a multi-line text file to be used by my OpenSIPS > config. Ideally, I'll get a key:value CSV pair from the file and > store each pair in memcache - e.g. > > file contains: > > a, 113 > b, 214 > c, 771 > > read it in line by line and cache_store() with the letter as the > attribute and the number as the value. > > I was thinking that I could use exec() to 'cat' the contents of > the file, storing stdout in an AVP, and then work through that > array splitting letter and number with a string transformation > ready for cache_store(). However, if I do this the full file > contents are stored as a single string in the first value > with "#012" added in place of the new lines. > > Obviously, I can use a string transform s.select{} using #012 as a > delimiter in an intermediary step, but am I just doing this the > hard way? Is there a better way to achieve this? > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -- > VoIP Embedded, Inc. > http://www.voipembedded.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 farmorg at gmail.com Fri Nov 13 15:39:59 2020 From: farmorg at gmail.com (Mark Farmer) Date: Fri, 13 Nov 2020 15:39:59 +0000 Subject: [OpenSIPS-Users] Teams TLS Error In-Reply-To: <74vf6nf8julckn68kfi75ohc.1605280198322@gmail.com> References: <74vf6nf8julckn68kfi75ohc.1605280198322@gmail.com> Message-ID: OK so now I have this: modparam("tls_mgm","certificate", "[my.domain.name ]/usr/local/etc/opensips/tls/myCert.pem") modparam("tls_mgm","private_key", "[my.domain.name ]/usr/local/etc/opensips/tls/myKey.key") modparam("tls_mgm","ca_dir", "/etc/ssl/certs") modparam("tls_mgm","verify_cert", "[my.domain.name]1") modparam("tls_mgm","require_cert", "[my.domain.name]1") modparam("tls_mgm","tls_method", "[my.domain.name]TLSv1_2") modparam("tls_mgm", "match_sip_domain", "my.domain.name") But now it claims that my.domain.name is not defined in myCert.pem I know it is - it is in a SAN within the certificate. Any suggestions? Many thanks Mark. On Fri, 13 Nov 2020 at 15:12, Kevin Vines wrote: > Hi Mark, > > Based on some googling it looks like you need to specify the domain eg: > > modparam("tls_mgm","verify_cert", "[domain.com]1") > > https://fossies.org/linux/opensips/modules/tls_mgm/README > > Kevin > *From:* farmorg at gmail.com > *Sent:* November 13, 2020 9:49 a.m. > *To:* users at lists.opensips.org > *Reply to:* users at lists.opensips.org > *Subject:* [OpenSIPS-Users] Teams TLS Error > > Hi everyone > > OpenSIPS 3.1.0 > > I am following the OpenSIPS as Teams SBC guide and have added the TLS > config: > > modparam("tls_mgm","verify_cert", "1") > modparam("tls_mgm","require_cert", "1") > modparam("tls_mgm","tls_method", "TLSv1_2") > modparam("tls_mgm","certificate", "/usr/local/etc/opensips/tls/myCert.pem > ") > modparam("tls_mgm","private_key", "/usr/local/etc/opensips/tls/myKey.key") > modparam("tls_mgm", "ca_dir", "/etc/ssl/certs") > > But I am seeing a TLS domain error: > > Nov 13 14:36:50 [175314] ERROR:tls_mgm:split_param_val: No TLS domain name > Nov 13 14:36:50 [175314] Traceback (last included file at the bottom): > Nov 13 14:36:50 [175314] 0. /usr/local//etc/opensips/opensips.cfg > Nov 13 14:36:50 [175314] CRITICAL:core:yyerror: parse error in > /usr/local//etc/opensips/opensips.cfg:191:19-20: Parameter > not found in module - can't set > Nov 13 14:36:50 [175314] #modparam("tls_mgm", "require_cert", "[dom4]1") > Nov 13 14:36:50 [175314] > Nov 13 14:36:50 [175314] modparam("tls_mgm","verify_cert", "1") > Nov 13 14:36:50 [175314] ^~ > Nov 13 14:36:50 [175314] modparam("tls_mgm","require_cert", "1") > Nov 13 14:36:50 [175314] modparam("tls_mgm","tls_method", "TLSv1_2") > Nov 13 14:36:50 [175314] DBG:core:set_mod_param_regex: tls_mgm matches > module tls_mgm > Nov 13 14:36:50 [175314] DBG:core:set_mod_param_regex: found > in module tls_mgm [/usr/local/lib64/opensips/modules/] > Nov 13 14:36:50 [175314] ERROR:tls_mgm:split_param_val: No TLS domain name > > Can anyone tell me what I might be missing please? > > Many thanks > Mark. > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Mark Farmer farmorg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From kevin.vines at gmail.com Fri Nov 13 15:57:07 2020 From: kevin.vines at gmail.com (Kevin Vines) Date: Fri, 13 Nov 2020 10:57:07 -0500 Subject: [OpenSIPS-Users] Teams TLS Error In-Reply-To: Message-ID: <8pr2c5nhkfoits34vqk0hh2a.1605283027187@gmail.com> An HTML attachment was scrubbed... URL: From sobomax at sippysoft.com Fri Nov 13 16:36:23 2020 From: sobomax at sippysoft.com (Maxim Sobolev) Date: Fri, 13 Nov 2020 08:36:23 -0800 Subject: [OpenSIPS-Users] Reading contents of a file - OpenSIPS 3.1 In-Reply-To: <0a999662-ce34-a05c-a668-a25417f14779@democon.be> References: <0a999662-ce34-a05c-a668-a25417f14779@democon.be> Message-ID: Who doubted it?! I personally think db_text is absolutely brilliant, cuts devtesting effort 10x easily. -Max On Fri., Nov. 13, 2020, 7:31 a.m. johan, wrote: > And so is the usefulness of db_text proven :-) > On 13/11/2020 16:06, Ovidiu Sas wrote: > > Take a look at db_text and sql_cacher modules! > > Regards, > Ovidiu Sas > > On Fri, Nov 13, 2020 at 09:50 Mark Allen wrote: > >> Just would like to consult the hive mind. I want to read the contents of >> a multi-line text file to be used by my OpenSIPS config. Ideally, I'll get >> a key:value CSV pair from the file and store each pair in memcache - e.g. >> >> file contains: >> >> a, 113 >> b, 214 >> c, 771 >> >> read it in line by line and cache_store() with the letter as the >> attribute and the number as the value. >> >> I was thinking that I could use exec() to 'cat' the contents of the file, >> storing stdout in an AVP, and then work through that array splitting letter >> and number with a string transformation ready for cache_store(). However, >> if I do this the full file contents are stored as a single string in the >> first value with "#012" added in place of the new lines. >> >> Obviously, I can use a string transform s.select{} using #012 as a >> delimiter in an intermediary step, but am I just doing this the hard way? >> Is there a better way to achieve this? >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > -- > VoIP Embedded, Inc. > http://www.voipembedded.com > > _______________________________________________ > Users mailing listUsers at lists.opensips.orghttp://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 mark at allenclan.co.uk Sun Nov 15 14:48:18 2020 From: mark at allenclan.co.uk (Mark Allen) Date: Sun, 15 Nov 2020 14:48:18 +0000 Subject: [OpenSIPS-Users] Reading contents of a file - OpenSIPS 3.1 In-Reply-To: References: <0a999662-ce34-a05c-a668-a25417f14779@democon.be> Message-ID: Being a bit dense here - the documentation says to set modparams like... modparam("usrloc|auth_db", "db_url", "text:///tmp/opensipsdb") ...if I'm using a separate table with our specific info rather than, say, usrloc - what am I putting in as the module name? On Fri, 13 Nov 2020 at 16:39, Maxim Sobolev wrote: > Who doubted it?! I personally think db_text is absolutely brilliant, cuts > devtesting effort 10x easily. > > -Max > > On Fri., Nov. 13, 2020, 7:31 a.m. johan, wrote: > >> And so is the usefulness of db_text proven :-) >> On 13/11/2020 16:06, Ovidiu Sas wrote: >> >> Take a look at db_text and sql_cacher modules! >> >> Regards, >> Ovidiu Sas >> >> On Fri, Nov 13, 2020 at 09:50 Mark Allen wrote: >> >>> Just would like to consult the hive mind. I want to read the contents of >>> a multi-line text file to be used by my OpenSIPS config. Ideally, I'll get >>> a key:value CSV pair from the file and store each pair in memcache - e.g. >>> >>> file contains: >>> >>> a, 113 >>> b, 214 >>> c, 771 >>> >>> read it in line by line and cache_store() with the letter as the >>> attribute and the number as the value. >>> >>> I was thinking that I could use exec() to 'cat' the contents of the >>> file, storing stdout in an AVP, and then work through that array splitting >>> letter and number with a string transformation ready for cache_store(). >>> However, if I do this the full file contents are stored as a single string >>> in the first value with "#012" added in place of the new lines. >>> >>> Obviously, I can use a string transform s.select{} using #012 as a >>> delimiter in an intermediary step, but am I just doing this the hard way? >>> Is there a better way to achieve this? >>> _______________________________________________ >>> Users mailing list >>> Users at lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >> -- >> VoIP Embedded, Inc. >> http://www.voipembedded.com >> >> _______________________________________________ >> Users mailing listUsers at lists.opensips.orghttp://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 farmorg at gmail.com Mon Nov 16 09:04:39 2020 From: farmorg at gmail.com (Mark Farmer) Date: Mon, 16 Nov 2020 09:04:39 +0000 Subject: [OpenSIPS-Users] Teams TLS Error In-Reply-To: <8pr2c5nhkfoits34vqk0hh2a.1605283027187@gmail.com> References: <8pr2c5nhkfoits34vqk0hh2a.1605283027187@gmail.com> Message-ID: Good morning all Can anyone clarify whether the TLS domain in SAN is supported or not please? Many thanks Mark. On Fri, 13 Nov 2020 at 15:59, Kevin Vines wrote: > You got me there... the doc states > > OpenSIPS offers SIP service for multiple 219 domains, e.g. atlanta.com and biloxi.com. Altough both domains 220 will be hosted on a single SIP proxy, the SIP proxy needs 2 221 certificates: One for atlanta.com and one for biloxi.com. For 222 incoming TLS connections > > > If you need one cert per domain, maybe it implies that you need to have the domain as the CN instead of a SAN? > > > Kevin > > *From:* farmorg at gmail.com > *Sent:* November 13, 2020 10:43 a.m. > *To:* users at lists.opensips.org > *Reply to:* users at lists.opensips.org > *Subject:* Re: [OpenSIPS-Users] Teams TLS Error > > OK so now I have this: > > modparam("tls_mgm","certificate", "[my.domain.name > ]/usr/local/etc/opensips/tls/myCert.pem") > modparam("tls_mgm","private_key", "[my.domain.name > ]/usr/local/etc/opensips/tls/myKey.key") > modparam("tls_mgm","ca_dir", "/etc/ssl/certs") > modparam("tls_mgm","verify_cert", "[my.domain.name]1") > modparam("tls_mgm","require_cert", "[my.domain.name]1") > modparam("tls_mgm","tls_method", "[my.domain.name]TLSv1_2") > modparam("tls_mgm", "match_sip_domain", "my.domain.name") > > But now it claims that my.domain.name is not defined in myCert.pem > I know it is - it is in a SAN within the certificate. > > Any suggestions? > Many thanks > Mark. > > > On Fri, 13 Nov 2020 at 15:12, Kevin Vines wrote: > >> Hi Mark, >> >> Based on some googling it looks like you need to specify the domain eg: >> >> modparam("tls_mgm","verify_cert", "[domain.com]1") >> >> https://fossies.org/linux/opensips/modules/tls_mgm/README >> >> Kevin >> *From:* farmorg at gmail.com >> *Sent:* November 13, 2020 9:49 a.m. >> *To:* users at lists.opensips.org >> *Reply to:* users at lists.opensips.org >> *Subject:* [OpenSIPS-Users] Teams TLS Error >> >> Hi everyone >> >> OpenSIPS 3.1.0 >> >> I am following the OpenSIPS as Teams SBC guide and have added the TLS >> config: >> >> modparam("tls_mgm","verify_cert", "1") >> modparam("tls_mgm","require_cert", "1") >> modparam("tls_mgm","tls_method", "TLSv1_2") >> modparam("tls_mgm","certificate", "/usr/local/etc/opensips/tls/myCert.pem >> ") >> modparam("tls_mgm","private_key", "/usr/local/etc/opensips/tls/myKey.key >> ") >> modparam("tls_mgm", "ca_dir", "/etc/ssl/certs") >> >> But I am seeing a TLS domain error: >> >> Nov 13 14:36:50 [175314] ERROR:tls_mgm:split_param_val: No TLS domain name >> Nov 13 14:36:50 [175314] Traceback (last included file at the bottom): >> Nov 13 14:36:50 [175314] 0. /usr/local//etc/opensips/opensips.cfg >> Nov 13 14:36:50 [175314] CRITICAL:core:yyerror: parse error in >> /usr/local//etc/opensips/opensips.cfg:191:19-20: Parameter >> not found in module - can't set >> Nov 13 14:36:50 [175314] #modparam("tls_mgm", "require_cert", "[dom4]1") >> Nov 13 14:36:50 [175314] >> Nov 13 14:36:50 [175314] modparam("tls_mgm","verify_cert", "1") >> Nov 13 14:36:50 [175314] ^~ >> Nov 13 14:36:50 [175314] modparam("tls_mgm","require_cert", "1") >> Nov 13 14:36:50 [175314] modparam("tls_mgm","tls_method", "TLSv1_2") >> Nov 13 14:36:50 [175314] DBG:core:set_mod_param_regex: tls_mgm matches >> module tls_mgm >> Nov 13 14:36:50 [175314] DBG:core:set_mod_param_regex: found >> in module tls_mgm [/usr/local/lib64/opensips/modules/] >> Nov 13 14:36:50 [175314] ERROR:tls_mgm:split_param_val: No TLS domain name >> >> Can anyone tell me what I might be missing please? >> >> Many thanks >> Mark. >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > > > -- > Mark Farmer > farmorg at gmail.com > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Mark Farmer farmorg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From medeanwz at gmail.com Mon Nov 16 13:05:26 2020 From: medeanwz at gmail.com (M S) Date: Mon, 16 Nov 2020 14:05:26 +0100 Subject: [OpenSIPS-Users] dialog module mi dlg_list not working as expected? Message-ID: Hi, I think something is not working as expected with dialog: I check this callid and it exists: [root at sbc2 ~]# opensips-cli -x mi dlg_list | grep 209eaf197691d8a937eb9d514104679c "callid": "209eaf197691d8a937eb9d514104679c at 192.168.20.190:5060 ", Then I try it like https://opensips.org/html/docs/modules/3.1.x/dialog.html#mi_dlg_list : [root at sbc2 ~]# opensips-cli -x mi dlg_list 209eaf197691d8a937eb9d514104679c at 192.168.20.190:5060 ERROR: command 'dlg_list' returned: -32602: Invalid params (Command only supports named parameters) and if I go by my guess: [root at sbc2 ~]# opensips-cli -x mi dlg_list callid= 209eaf197691d8a937eb9d514104679c at 192.168.20.190:5060 ERROR: command 'dlg_list' returned: -32000: Server error something broken? Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From osas at voipembedded.com Mon Nov 16 18:10:40 2020 From: osas at voipembedded.com (Ovidiu Sas) Date: Mon, 16 Nov 2020 13:10:40 -0500 Subject: [OpenSIPS-Users] Reading contents of a file - OpenSIPS 3.1 In-Reply-To: References: <0a999662-ce34-a05c-a668-a25417f14779@democon.be> Message-ID: Use the sql_cacher module to cache the content of the file. First, declare the cache that you want to use, then configure the sql_cacher to use the file: loadmodule "cachedb_local.so" modparam("cachedb_local", "cache_collections", "my_cache") modparam("cachedb_local", "cachedb_url", "local:///my_cache") loadmodule "sql_cacher.so" modparam("sql_cacher", "cache_table", "id=my_cache_id db_url=text:///tmp/opensipsdb cachedb_url=local:///my_cache table=my_table key=my_key columns=my_value on_demand=0") Or you can simply use the avpops module directly on the db_text file. -ovidiu https://opensips.org/docs/modules/3.1.x/cachedb_local.html https://opensips.org/docs/modules/3.1.x/sql_cacher.html https://opensips.org/docs/modules/3.1.x/avpops.html On Sun, Nov 15, 2020 at 9:49 AM Mark Allen wrote: > > Being a bit dense here - the documentation says to set modparams like... > > modparam("usrloc|auth_db", "db_url", "text:///tmp/opensipsdb") > > ...if I'm using a separate table with our specific info rather than, say, usrloc - what am I putting in as the module name? > > On Fri, 13 Nov 2020 at 16:39, Maxim Sobolev wrote: >> >> Who doubted it?! I personally think db_text is absolutely brilliant, cuts devtesting effort 10x easily. >> >> -Max >> >> On Fri., Nov. 13, 2020, 7:31 a.m. johan, wrote: >>> >>> And so is the usefulness of db_text proven :-) >>> >>> On 13/11/2020 16:06, Ovidiu Sas wrote: >>> >>> Take a look at db_text and sql_cacher modules! >>> >>> Regards, >>> Ovidiu Sas >>> >>> On Fri, Nov 13, 2020 at 09:50 Mark Allen wrote: >>>> >>>> Just would like to consult the hive mind. I want to read the contents of a multi-line text file to be used by my OpenSIPS config. Ideally, I'll get a key:value CSV pair from the file and store each pair in memcache - e.g. >>>> >>>> file contains: >>>> >>>> a, 113 >>>> b, 214 >>>> c, 771 >>>> >>>> read it in line by line and cache_store() with the letter as the attribute and the number as the value. >>>> >>>> I was thinking that I could use exec() to 'cat' the contents of the file, storing stdout in an AVP, and then work through that array splitting letter and number with a string transformation ready for cache_store(). However, if I do this the full file contents are stored as a single string in the first value with "#012" added in place of the new lines. >>>> >>>> Obviously, I can use a string transform s.select{} using #012 as a delimiter in an intermediary step, but am I just doing this the hard way? Is there a better way to achieve this? >>>> _______________________________________________ >>>> Users mailing list >>>> Users at lists.opensips.org >>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >>> -- >>> VoIP Embedded, Inc. >>> http://www.voipembedded.com >>> >>> _______________________________________________ >>> 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 > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- VoIP Embedded, Inc. http://www.voipembedded.com From denys.pozniak at gmail.com Mon Nov 16 18:25:33 2020 From: denys.pozniak at gmail.com (Denys Pozniak) Date: Mon, 16 Nov 2020 20:25:33 +0200 Subject: [OpenSIPS-Users] Separating call branches via topology_hiding Message-ID: Hello! We use the following logic: When the user dials the internal extension, FreeSWITCH adds SIP AoRs of destination devices in X-headers. After that, the downstream Proxy forks this call according to these AoRs (e.g. 1 incoming call spawns 5 outgoing branches). In order to turn these branches into separate calls, we use a sems sbc, but due to certain limitations we are forced to replace it. I tested *topology_hiding* module and determined that it does not split such branches into separate calls (all outgoing calls have the same SIP CallID). Is there any way to solve this problem? -- BR, Denys Pozniak -------------- next part -------------- An HTML attachment was scrubbed... URL: From vladp at opensips.org Mon Nov 16 20:41:58 2020 From: vladp at opensips.org (Vlad Patrascu) Date: Mon, 16 Nov 2020 22:41:58 +0200 Subject: [OpenSIPS-Users] Teams TLS Error In-Reply-To: References: <8pr2c5nhkfoits34vqk0hh2a.1605283027187@gmail.com> Message-ID: <224771a6-5a2a-6593-cebf-dc61c4dfdb74@opensips.org> Hi Mark, Can you post the actual errors that you get in the OpenSIPS logs, if that is the case? Regards, -- Vlad Patrascu OpenSIPS Developer http://www.opensips-solutions.com On 16.11.2020 11:04, Mark Farmer wrote: > Good morning all > > Can anyone clarify whether the TLS domain in SAN is supported or not > please? > > Many thanks > Mark. > > > On Fri, 13 Nov 2020 at 15:59, Kevin Vines > wrote: > > You got me there... the doc states > > OpenSIPS offers SIP service for multiple > 219 domains, e.g.atlanta.com andbiloxi.com . Altough both domains > 220 will be hosted on a single SIP proxy, the SIP proxy needs 2 > 221 certificates: One foratlanta.com and one forbiloxi.com . For > 222 incoming TLS connections > > If you need one cert per domain, maybe it implies that you need to > have the domain as the CN instead of a SAN? > > Kevin > > *From:* farmorg at gmail.com > *Sent:* November 13, 2020 10:43 a.m. > *To:* users at lists.opensips.org > *Reply to:* users at lists.opensips.org > *Subject:* Re: [OpenSIPS-Users] Teams TLS Error > > > OK so now I have this: > > modparam("tls_mgm","certificate", "[my.domain.name > ]/usr/local/etc/opensips/tls/myCert.pem > ") > modparam("tls_mgm","private_key", "[my.domain.name > ]/usr/local/etc/opensips/tls/myKey.key > ") > modparam("tls_mgm","ca_dir", "/etc/ssl/certs") > modparam("tls_mgm","verify_cert", "[my.domain.name > ]1") > modparam("tls_mgm","require_cert", "[my.domain.name > ]1") > modparam("tls_mgm","tls_method", "[my.domain.name > ]TLSv1_2") > modparam("tls_mgm", "match_sip_domain", "my.domain.name > ") > > But now it claims that my.domain.name is > not defined in myCert.pem > I know it is - it is in a SAN within the certificate. > > Any suggestions? > Many thanks > Mark. > > > On Fri, 13 Nov 2020 at 15:12, Kevin Vines > wrote: > > Hi Mark, > > Based on some googling it looks like you need to specify the > domain eg: > > modparam("tls_mgm","verify_cert", "[domain.com > ]1") > > https://fossies.org/linux/opensips/modules/tls_mgm/README > > Kevin > > *From:* farmorg at gmail.com > *Sent:* November 13, 2020 9:49 a.m. > *To:* users at lists.opensips.org > *Reply to:* users at lists.opensips.org > > *Subject:* [OpenSIPS-Users] Teams TLS Error > > > Hi everyone > > OpenSIPS 3.1.0 > > I am following the OpenSIPS as Teams SBC guide and have added > the TLS config: > > modparam("tls_mgm","verify_cert", "1") > modparam("tls_mgm","require_cert", "1") > modparam("tls_mgm","tls_method", "TLSv1_2") > modparam("tls_mgm","certificate", > "/usr/local/etc/opensips/tls/myCert.pem ") > modparam("tls_mgm","private_key", > "/usr/local/etc/opensips/tls/myKey.key ") > modparam("tls_mgm", "ca_dir", "/etc/ssl/certs") > > But I am seeing a TLS domain error: > > Nov 13 14:36:50 [175314] ERROR:tls_mgm:split_param_val: No TLS > domain name > Nov 13 14:36:50 [175314] Traceback (last included file at the > bottom): > Nov 13 14:36:50 [175314]  0. > /usr/local//etc/opensips/opensips.cfg > Nov 13 14:36:50 [175314] CRITICAL:core:yyerror: parse error in > /usr/local//etc/opensips/opensips.cfg:191 > :19-20: Parameter not > found in module - can't set > Nov 13 14:36:50 [175314] #modparam("tls_mgm", "require_cert", > "[dom4]1") > Nov 13 14:36:50 [175314] > Nov 13 14:36:50 [175314] modparam("tls_mgm","verify_cert", "1") > Nov 13 14:36:50 [175314] ^~ > Nov 13 14:36:50 [175314] modparam("tls_mgm","require_cert", "1") > Nov 13 14:36:50 [175314] modparam("tls_mgm","tls_method", > "TLSv1_2") > Nov 13 14:36:50 [175314] DBG:core:set_mod_param_regex: tls_mgm > matches module tls_mgm > Nov 13 14:36:50 [175314] DBG:core:set_mod_param_regex: found > in module tls_mgm > [/usr/local/lib64/opensips/modules/] > Nov 13 14:36:50 [175314] ERROR:tls_mgm:split_param_val: No TLS > domain name > > Can anyone tell me what I might be missing please? > > Many thanks > Mark. > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > -- > Mark Farmer > farmorg at gmail.com > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > -- > Mark Farmer > farmorg at gmail.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 mark at allenclan.co.uk Mon Nov 16 20:51:21 2020 From: mark at allenclan.co.uk (Mark Allen) Date: Mon, 16 Nov 2020 20:51:21 +0000 Subject: [OpenSIPS-Users] Reading contents of a file - OpenSIPS 3.1 In-Reply-To: References: <0a999662-ce34-a05c-a668-a25417f14779@democon.be> Message-ID: thanks - that's really helpful On Mon, 16 Nov 2020 at 18:13, Ovidiu Sas wrote: > Use the sql_cacher module to cache the content of the file. > First, declare the cache that you want to use, then configure the > sql_cacher to use the file: > loadmodule "cachedb_local.so" > modparam("cachedb_local", "cache_collections", "my_cache") > modparam("cachedb_local", "cachedb_url", "local:///my_cache") > loadmodule "sql_cacher.so" > modparam("sql_cacher", "cache_table", > "id=my_cache_id > db_url=text:///tmp/opensipsdb > cachedb_url=local:///my_cache > table=my_table > key=my_key > columns=my_value > on_demand=0") > > Or you can simply use the avpops module directly on the db_text file. > > -ovidiu > > https://opensips.org/docs/modules/3.1.x/cachedb_local.html > https://opensips.org/docs/modules/3.1.x/sql_cacher.html > https://opensips.org/docs/modules/3.1.x/avpops.html > > On Sun, Nov 15, 2020 at 9:49 AM Mark Allen wrote: > > > > Being a bit dense here - the documentation says to set modparams like... > > > > modparam("usrloc|auth_db", "db_url", "text:///tmp/opensipsdb") > > > > ...if I'm using a separate table with our specific info rather than, > say, usrloc - what am I putting in as the module name? > > > > On Fri, 13 Nov 2020 at 16:39, Maxim Sobolev > wrote: > >> > >> Who doubted it?! I personally think db_text is absolutely brilliant, > cuts devtesting effort 10x easily. > >> > >> -Max > >> > >> On Fri., Nov. 13, 2020, 7:31 a.m. johan, wrote: > >>> > >>> And so is the usefulness of db_text proven :-) > >>> > >>> On 13/11/2020 16:06, Ovidiu Sas wrote: > >>> > >>> Take a look at db_text and sql_cacher modules! > >>> > >>> Regards, > >>> Ovidiu Sas > >>> > >>> On Fri, Nov 13, 2020 at 09:50 Mark Allen wrote: > >>>> > >>>> Just would like to consult the hive mind. I want to read the contents > of a multi-line text file to be used by my OpenSIPS config. Ideally, I'll > get a key:value CSV pair from the file and store each pair in memcache - > e.g. > >>>> > >>>> file contains: > >>>> > >>>> a, 113 > >>>> b, 214 > >>>> c, 771 > >>>> > >>>> read it in line by line and cache_store() with the letter as the > attribute and the number as the value. > >>>> > >>>> I was thinking that I could use exec() to 'cat' the contents of the > file, storing stdout in an AVP, and then work through that array splitting > letter and number with a string transformation ready for cache_store(). > However, if I do this the full file contents are stored as a single string > in the first value with "#012" added in place of the new lines. > >>>> > >>>> Obviously, I can use a string transform s.select{} using #012 as a > delimiter in an intermediary step, but am I just doing this the hard way? > Is there a better way to achieve this? > >>>> _______________________________________________ > >>>> Users mailing list > >>>> Users at lists.opensips.org > >>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > >>> > >>> -- > >>> VoIP Embedded, Inc. > >>> http://www.voipembedded.com > >>> > >>> _______________________________________________ > >>> 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 > > > > _______________________________________________ > > Users mailing list > > Users at lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > -- > VoIP Embedded, Inc. > http://www.voipembedded.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 vladp at opensips.org Mon Nov 16 22:42:32 2020 From: vladp at opensips.org (Vlad Patrascu) Date: Tue, 17 Nov 2020 00:42:32 +0200 Subject: [OpenSIPS-Users] dialog module mi dlg_list not working as expected? In-Reply-To: References: Message-ID: <61f36fe7-2b4e-32a5-90c8-af33d70e1904@opensips.org> Hi Mark, This is indeed a bug in the MI output for dlg_list when passing callid and/or from_tag params. I have pushed a fix, thanks for reporting! Regards, -- Vlad Patrascu OpenSIPS Developer http://www.opensips-solutions.com On 16.11.2020 15:05, M S wrote: > Hi, > I think something is not working as expected with dialog: > I check this callid and it exists: > [root at sbc2 ~]# opensips-cli -x mi dlg_list | grep > 209eaf197691d8a937eb9d514104679c >             "callid": > "209eaf197691d8a937eb9d514104679c at 192.168.20.190:5060 > ", > > Then I try it like > https://opensips.org/html/docs/modules/3.1.x/dialog.html#mi_dlg_list : > [root at sbc2 ~]# opensips-cli -x mi dlg_list > 209eaf197691d8a937eb9d514104679c at 192.168.20.190:5060 > > ERROR: command 'dlg_list' returned: -32602: Invalid params (Command > only supports named parameters) > > and if I go by my guess: > [root at sbc2 ~]# opensips-cli -x mi dlg_list > callid=209eaf197691d8a937eb9d514104679c at 192.168.20.190:5060 > > ERROR: command 'dlg_list' returned: -32000: Server error > > something broken? > > Mark > > _______________________________________________ > 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 rosenberg11219 at gmail.com Tue Nov 17 09:56:18 2020 From: rosenberg11219 at gmail.com (Schneur Rosenberg) Date: Tue, 17 Nov 2020 11:56:18 +0200 Subject: [OpenSIPS-Users] Segfault in OpenSIPs 2.4.8 Message-ID: Hi I just upgraded from 2.4.4 to 2.4.8 and my system crashed, first I got a couple of these messages in my log over a span of a few hours. CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver error (1213): Deadlock found when trying to get lock; try restarting transaction And then this happened CRITICAL:core:sig_usr: segfault in process pid: 2440, id: 88 CRITICAL:core:handle_worker: dead child 88 (EOF received), pid 2440 From denys.pozniak at gmail.com Tue Nov 17 10:05:40 2020 From: denys.pozniak at gmail.com (Denys Pozniak) Date: Tue, 17 Nov 2020 12:05:40 +0200 Subject: [OpenSIPS-Users] Separating call branches via topology_hiding In-Reply-To: References: Message-ID: I will add diagrams to make it clearer. *Now:* FreeSWITCH --> Forking Proxy --> SEMS --> Edge Proxy *Want to build:* FreeSWITCH --> Forking Proxy --> OpenSIPS (topology_hiding) --> Edge Proxy According to our specifics, the Edge Proxy should receive calls with separate SIP CallIDs пн, 16 нояб. 2020 г. в 20:25, Denys Pozniak : > Hello! > > We use the following logic: > When the user dials the internal extension, FreeSWITCH adds SIP AoRs of > destination devices in X-headers. > After that, the downstream Proxy forks this call according to these AoRs > (e.g. 1 incoming call spawns 5 outgoing branches). > In order to turn these branches into separate calls, we use a sems sbc, > but due to certain limitations we are forced to replace it. > > I tested *topology_hiding* module and determined that it does not split > such branches into separate calls (all outgoing calls have the same SIP > CallID). > > Is there any way to solve this problem? > > -- > > BR, > Denys Pozniak > > > -- BR, Denys Pozniak -------------- next part -------------- An HTML attachment was scrubbed... URL: From farmorg at gmail.com Tue Nov 17 11:57:06 2020 From: farmorg at gmail.com (Mark Farmer) Date: Tue, 17 Nov 2020 11:57:06 +0000 Subject: [OpenSIPS-Users] Force rtpmap:101 Message-ID: Hi everyone I am getting some INVITE's that are requesting a=rtpmap:100 telephone-event/8000 and some other codecs too which is breaking DTMF. What I really need to do is to force a=rtpmap:101 telephone-event/8000 in the replies. Can anyone tell me how to do this please? I've been looking at the docs but I'm struggling with this one. I am using RTPEngine and OpenSIPS 3.0 Many thanks! Mark. -------------- next part -------------- An HTML attachment was scrubbed... URL: From razvan at opensips.org Tue Nov 17 14:49:27 2020 From: razvan at opensips.org (=?UTF-8?Q?R=c4=83zvan_Crainea?=) Date: Tue, 17 Nov 2020 16:49:27 +0200 Subject: [OpenSIPS-Users] [RELEASE] OpenSIPS 2.4.9 and 3.0.4 and 3.1.1 minor releases In-Reply-To: <05befc0b-a503-afe1-90bd-d11f2aec5bc6@opensips.org> References: <05befc0b-a503-afe1-90bd-d11f2aec5bc6@opensips.org> Message-ID: <484022d4-79a1-b1b3-ab57-924517a89118@opensips.org> Hi, Everyone! As promissed, we are happy to announce OpenSIPS latest minor releases: 2.4.9[1], 3.0.4[2] and 3.1.1[3]. All stable versions are now released with all the available fixes. In order to migrate from previous minor versions, simply upgrade the packages - there's no need to make any DB or script changes. If you want to migrate from a previous version, make sure you're following the correct migration manual[4]. [1] https://opensips.org/pub/opensips/2.4.9/ChangeLog [2] https://opensips.org/pub/opensips/3.0.4/ChangeLog [3] https://opensips.org/pub/opensips/3.1.1/ChangeLog [4] https://www.opensips.org/Documentation/Migration Enjoy the new releases! Răzvan Crainea OpenSIPS Core Developer http://www.opensips-solutions.com On 11/6/20 12:54 PM, Răzvan Crainea wrote: > Hello, everyone! > > I am happy to announce you that on Tuesday, 17th of November 2020, we > will be releasing three new minor versions, one for each of our > supported branches - 2.4, 3.0 and 3.1. > All these releases will only contain bug fixes gathered from their > previous releases, so no script changes, or migration procedures are > required to use them. A simple upgrade will suffice. > We will let you know when the releases are completed, so you can start > using them. > > Until then, happy hacking! From farmorg at gmail.com Tue Nov 17 16:18:28 2020 From: farmorg at gmail.com (Mark Farmer) Date: Tue, 17 Nov 2020 16:18:28 +0000 Subject: [OpenSIPS-Users] Teams TLS Error In-Reply-To: <224771a6-5a2a-6593-cebf-dc61c4dfdb74@opensips.org> References: <8pr2c5nhkfoits34vqk0hh2a.1605283027187@gmail.com> <224771a6-5a2a-6593-cebf-dc61c4dfdb74@opensips.org> Message-ID: Hi Vlad/all Sure (sanitized) Nov 13 15:35:04 [175814] DBG:core:load_module: loading module /usr/local/lib64/opensips/modules/tls_mgm.so Nov 13 15:35:04 [175814] INFO:tls_mgm:mod_load: openssl version: OpenSSL 1.1.1f 31 Mar 2020 Nov 13 15:35:04 [175814] DBG:core:register_module: register_pv: tls_mgm Nov 13 15:35:04 [175814] DBG:core:set_mod_param_regex: tls_mgm matches module tls_mgm Nov 13 15:35:04 [175814] DBG:core:set_mod_param_regex: found in module tls_mgm [/usr/local/lib64/opensips/modules/] Nov 13 15:35:04 [175814] ERROR:tls_mgm:tlsp_set_certificate: TLS domain [ my.domain.com] not defined in '[my.domain.com ]/usr/local/etc/opensips/tls/my_domain_com.pem' Nov 13 15:35:04 [175814] Traceback (last included file at the bottom): Nov 13 15:35:04 [175814] 0. /usr/local//etc/opensips/opensips.cfg Nov 13 15:35:04 [175814] CRITICAL:core:yyerror: parse error in /usr/local//etc/opensips/opensips.cfg:191:19-20: Parameter not found in module - can't set Nov 13 15:35:04 [175814] #modparam("tls_mgm", "require_cert", "[dom4]1") Nov 13 15:35:04 [175814] Nov 13 15:35:04 [175814] modparam("tls_mgm","certificate", "[my.domain.com ]/usr/local/etc/opensips/tls/my_domain_com.pem") Nov 13 15:35:04 [175814] ^~ Nov 13 15:35:04 [175814] modparam("tls_mgm","private_key", "[my.domain.com ]/usr/local/etc/opensips/tls/my_domain_com.key") Nov 13 15:35:04 [175814] modparam("tls_mgm","ca_dir", "/etc/ssl/certs") Nov 13 15:35:04 [175814] DBG:core:set_mod_param_regex: tls_mgm matches module tls_mgm Nov 13 15:35:04 [175814] DBG:core:set_mod_param_regex: found in module tls_mgm [/usr/local/lib64/opensips/modules/] Nov 13 15:35:04 [175814] ERROR:tls_mgm:tlsp_set_pk: TLS domain [ my.domain.com] not defined in '[my.domain.com ]/usr/local/etc/opensips/tls/my_domain_com.key' Nov 13 15:35:04 [175814] CRITICAL:core:yyerror: parse error in /usr/local//etc/opensips/opensips.cfg:192:19-20: Parameter not found in module - can't set Nov 13 15:35:04 [175814] DBG:core:set_mod_param_regex: tls_mgm matches module tls_mgm Nov 13 15:35:04 [175814] DBG:core:set_mod_param_regex: found in module tls_mgm [/usr/local/lib64/opensips/modules/] Nov 13 15:35:04 [175814] ERROR:tls_mgm:split_param_val: No TLS domain name Nov 13 15:35:04 [175814] CRITICAL:core:yyerror: parse error in /usr/local//etc/opensips/opensips.cfg:193:19-20: Parameter not found in module - can't set Nov 13 15:35:04 [175814] DBG:core:set_mod_param_regex: tls_mgm matches module tls_mgm Nov 13 15:35:04 [175814] DBG:core:set_mod_param_regex: found in module tls_mgm [/usr/local/lib64/opensips/modules/] Nov 13 15:35:04 [175814] ERROR:tls_mgm:tlsp_set_verify: TLS domain [ my.domain.com] not defined in '[my.domain.com]1' Nov 13 15:35:04 [175814] CRITICAL:core:yyerror: parse error in /usr/local//etc/opensips/opensips.cfg:194:19-20: Parameter not found in module - can't set Nov 13 15:35:04 [175814] DBG:core:set_mod_param_regex: tls_mgm matches module tls_mgm Nov 13 15:35:04 [175814] DBG:core:set_mod_param_regex: found in module tls_mgm [/usr/local/lib64/opensips/modules/] Nov 13 15:35:04 [175814] ERROR:tls_mgm:tlsp_set_require: TLS domain [ my.domain.com] not defined in '[my.domain.com]1' Nov 13 15:35:04 [175814] CRITICAL:core:yyerror: parse error in /usr/local//etc/opensips/opensips.cfg:195:19-20: Parameter not found in module - can't set Nov 13 15:35:04 [175814] DBG:core:set_mod_param_regex: tls_mgm matches module tls_mgm Nov 13 15:35:04 [175814] DBG:core:set_mod_param_regex: found in module tls_mgm [/usr/local/lib64/opensips/modules/] Nov 13 15:35:04 [175814] ERROR:tls_mgm:tlsp_set_method: TLS domain [ my.domain.com] not defined in '[my.domain.com]TLSv1_2' Nov 13 15:35:04 [175814] CRITICAL:core:yyerror: parse error in /usr/local//etc/opensips/opensips.cfg:196:19-20: Parameter not found in module - can't set Nov 13 15:35:04 [175814] DBG:core:set_mod_param_regex: tls_mgm matches module tls_mgm Nov 13 15:35:04 [175814] DBG:core:set_mod_param_regex: found in module tls_mgm [/usr/local/lib64/opensips/modules/] Nov 13 15:35:04 [175814] ERROR:tls_mgm:split_param_val: No TLS domain name Nov 13 15:35:04 [175814] CRITICAL:core:yyerror: parse error in /usr/local//etc/opensips/opensips.cfg:198:20-21: Parameter not found in module - can't set On Mon, 16 Nov 2020 at 20:44, Vlad Patrascu wrote: > Hi Mark, > > Can you post the actual errors that you get in the OpenSIPS logs, if that > is the case? > > Regards, > > -- > Vlad Patrascu > OpenSIPS Developerhttp://www.opensips-solutions.com > > On 16.11.2020 11:04, Mark Farmer wrote: > > Good morning all > > Can anyone clarify whether the TLS domain in SAN is supported or not > please? > > Many thanks > Mark. > > > On Fri, 13 Nov 2020 at 15:59, Kevin Vines wrote: > >> You got me there... the doc states >> >> OpenSIPS offers SIP service for multiple 219 domains, e.g. atlanta.com and biloxi.com. Altough both domains 220 will be hosted on a single SIP proxy, the SIP proxy needs 2 221 certificates: One for atlanta.com and one for biloxi.com. For 222 incoming TLS connections >> >> If you need one cert per domain, maybe it implies that you need to have the domain as the CN instead of a SAN? >> >> Kevin >> >> *From:* farmorg at gmail.com >> *Sent:* November 13, 2020 10:43 a.m. >> *To:* users at lists.opensips.org >> *Reply to:* users at lists.opensips.org >> *Subject:* Re: [OpenSIPS-Users] Teams TLS Error >> >> OK so now I have this: >> >> modparam("tls_mgm","certificate", "[my.domain.name >> ]/usr/local/etc/opensips/tls/myCert.pem") >> modparam("tls_mgm","private_key", "[my.domain.name >> ]/usr/local/etc/opensips/tls/myKey.key") >> modparam("tls_mgm","ca_dir", "/etc/ssl/certs") >> modparam("tls_mgm","verify_cert", "[my.domain.name]1") >> modparam("tls_mgm","require_cert", "[my.domain.name]1") >> modparam("tls_mgm","tls_method", "[my.domain.name]TLSv1_2") >> modparam("tls_mgm", "match_sip_domain", "my.domain.name") >> >> But now it claims that my.domain.name is not defined in myCert.pem >> I know it is - it is in a SAN within the certificate. >> >> Any suggestions? >> Many thanks >> Mark. >> >> >> On Fri, 13 Nov 2020 at 15:12, Kevin Vines wrote: >> >>> Hi Mark, >>> >>> Based on some googling it looks like you need to specify the domain eg: >>> >>> modparam("tls_mgm","verify_cert", "[domain.com]1") >>> >>> https://fossies.org/linux/opensips/modules/tls_mgm/README >>> >>> Kevin >>> *From:* farmorg at gmail.com >>> *Sent:* November 13, 2020 9:49 a.m. >>> *To:* users at lists.opensips.org >>> *Reply to:* users at lists.opensips.org >>> *Subject:* [OpenSIPS-Users] Teams TLS Error >>> >>> Hi everyone >>> >>> OpenSIPS 3.1.0 >>> >>> I am following the OpenSIPS as Teams SBC guide and have added the TLS >>> config: >>> >>> modparam("tls_mgm","verify_cert", "1") >>> modparam("tls_mgm","require_cert", "1") >>> modparam("tls_mgm","tls_method", "TLSv1_2") >>> modparam("tls_mgm","certificate", "/usr/local/etc/opensips/tls/ >>> myCert.pem") >>> modparam("tls_mgm","private_key", "/usr/local/etc/opensips/tls/myKey.key >>> ") >>> modparam("tls_mgm", "ca_dir", "/etc/ssl/certs") >>> >>> But I am seeing a TLS domain error: >>> >>> Nov 13 14:36:50 [175314] ERROR:tls_mgm:split_param_val: No TLS domain >>> name >>> Nov 13 14:36:50 [175314] Traceback (last included file at the bottom): >>> Nov 13 14:36:50 [175314] 0. /usr/local//etc/opensips/opensips.cfg >>> Nov 13 14:36:50 [175314] CRITICAL:core:yyerror: parse error in >>> /usr/local//etc/opensips/opensips.cfg:191:19-20: Parameter >>> not found in module - can't set >>> Nov 13 14:36:50 [175314] #modparam("tls_mgm", "require_cert", "[dom4]1") >>> Nov 13 14:36:50 [175314] >>> Nov 13 14:36:50 [175314] modparam("tls_mgm","verify_cert", "1") >>> Nov 13 14:36:50 [175314] ^~ >>> Nov 13 14:36:50 [175314] modparam("tls_mgm","require_cert", "1") >>> Nov 13 14:36:50 [175314] modparam("tls_mgm","tls_method", "TLSv1_2") >>> Nov 13 14:36:50 [175314] DBG:core:set_mod_param_regex: tls_mgm matches >>> module tls_mgm >>> Nov 13 14:36:50 [175314] DBG:core:set_mod_param_regex: found >>> in module tls_mgm [/usr/local/lib64/opensips/modules/] >>> Nov 13 14:36:50 [175314] ERROR:tls_mgm:split_param_val: No TLS domain >>> name >>> >>> Can anyone tell me what I might be missing please? >>> >>> Many thanks >>> Mark. >>> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >> >> >> -- >> Mark Farmer >> farmorg at gmail.com >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > > > -- > Mark Farmer > farmorg at gmail.com > > _______________________________________________ > Users mailing listUsers at lists.opensips.orghttp://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 > -- Mark Farmer farmorg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From vladp at opensips.org Tue Nov 17 16:56:04 2020 From: vladp at opensips.org (Vlad Patrascu) Date: Tue, 17 Nov 2020 18:56:04 +0200 Subject: [OpenSIPS-Users] Teams TLS Error In-Reply-To: References: <8pr2c5nhkfoits34vqk0hh2a.1605283027187@gmail.com> <224771a6-5a2a-6593-cebf-dc61c4dfdb74@opensips.org> Message-ID: <8421770b-80a6-a08d-4aee-428ccf746709@opensips.org> I guess this error, which is indeed not worded very well, threw you off: ERROR:tls_mgm:tlsp_set_certificate: TLS domain [my.domain.com ] not defined in '[my.domain.com ]/usr/local/etc/opensips/tls/my_domain_com.pem' What it actually means is that the TLS domain "my.domain.com" (the tls_mgm module's record/structure, ) is not defined. Refer to this [1] section in docs for a better explanation on the the concept of "TLS domains" in tls_mgm. The term "TLS domain" might be a little loose and generate confusion sometimes. So what you should do is add this in your config: modparam("tls_mgm", "server_domain", "my.domain.com") By the way, you can use any arbitrary identifier for the domain part in the tls_mgm parameters, eg. : modparam("tls_mgm", "server_domain", "mydom") modparam("tls_mgm","certificate", "[mydom]/usr/local/etc/opensips/tls/myCert.pem") ... [1] https://opensips.org/docs/modules/3.1.x/tls_mgm.html#idp2972192 Regards, -- Vlad Patrascu OpenSIPS Developer http://www.opensips-solutions.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mrsanvicente at gmail.com Tue Nov 17 17:49:22 2020 From: mrsanvicente at gmail.com (mrsanvicente) Date: Tue, 17 Nov 2020 11:49:22 -0600 Subject: [OpenSIPS-Users] [RELEASE] OpenSIPS 2.4.9 and 3.0.4 and 3.1.1 minor releases In-Reply-To: <484022d4-79a1-b1b3-ab57-924517a89118@opensips.org> References: <484022d4-79a1-b1b3-ab57-924517a89118@opensips.org> Message-ID: Great news, Bravo!! Mario > El 17 nov 2020, a la(s) 8:53, Răzvan Crainea escribió: > > Hi, Everyone! > > As promissed, we are happy to announce OpenSIPS latest minor releases: 2.4.9[1], 3.0.4[2] and 3.1.1[3]. All stable versions are now released with all the available fixes. > In order to migrate from previous minor versions, simply upgrade the packages - there's no need to make any DB or script changes. If you want to migrate from a previous version, make sure you're following the correct migration manual[4]. > > [1] https://opensips.org/pub/opensips/2.4.9/ChangeLog > [2] https://opensips.org/pub/opensips/3.0.4/ChangeLog > [3] https://opensips.org/pub/opensips/3.1.1/ChangeLog > [4] https://www.opensips.org/Documentation/Migration > > Enjoy the new releases! > > Răzvan Crainea > OpenSIPS Core Developer > http://www.opensips-solutions.com > >> On 11/6/20 12:54 PM, Răzvan Crainea wrote: >> Hello, everyone! >> I am happy to announce you that on Tuesday, 17th of November 2020, we will be releasing three new minor versions, one for each of our supported branches - 2.4, 3.0 and 3.1. >> All these releases will only contain bug fixes gathered from their previous releases, so no script changes, or migration procedures are required to use them. A simple upgrade will suffice. >> We will let you know when the releases are completed, so you can start using them. >> Until then, happy hacking! > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From rembgrets at gmail.com Tue Nov 17 21:35:17 2020 From: rembgrets at gmail.com (ryan embgrets) Date: Wed, 18 Nov 2020 02:35:17 +0500 Subject: [OpenSIPS-Users] [RELEASE] OpenSIPS 2.4.9 and 3.0.4 and 3.1.1 minor releases In-Reply-To: References: <484022d4-79a1-b1b3-ab57-924517a89118@opensips.org> Message-ID: So, I just upgraded my opensips to 3.1 and it looks like cache_raw_query function is broken. On opensips 3.0 it was ok with 2 parameters but now expecting 3 on opensips 3.1 parse error in /etc/opensips/opensips.cfg:265:24-25: too few parameters for command #012 This below is what i have on line 265 cache_raw_query("redis:group1","EXPIRE $ci 3600"); Was the syntax changed for this cache_raw_query? Because I could not seem to find it inside docs. Ryan. On Tue, 17 Nov 2020 at 22:51, mrsanvicente wrote: > Great news, Bravo!! > > > > Mario > > > El 17 nov 2020, a la(s) 8:53, Răzvan Crainea > escribió: > > > > Hi, Everyone! > > > > As promissed, we are happy to announce OpenSIPS latest minor releases: > 2.4.9[1], 3.0.4[2] and 3.1.1[3]. All stable versions are now released with > all the available fixes. > > In order to migrate from previous minor versions, simply upgrade the > packages - there's no need to make any DB or script changes. If you want to > migrate from a previous version, make sure you're following the correct > migration manual[4]. > > > > [1] https://opensips.org/pub/opensips/2.4.9/ChangeLog > > [2] https://opensips.org/pub/opensips/3.0.4/ChangeLog > > [3] https://opensips.org/pub/opensips/3.1.1/ChangeLog > > [4] https://www.opensips.org/Documentation/Migration > > > > Enjoy the new releases! > > > > Răzvan Crainea > > OpenSIPS Core Developer > > http://www.opensips-solutions.com > > > >> On 11/6/20 12:54 PM, Răzvan Crainea wrote: > >> Hello, everyone! > >> I am happy to announce you that on Tuesday, 17th of November 2020, we > will be releasing three new minor versions, one for each of our supported > branches - 2.4, 3.0 and 3.1. > >> All these releases will only contain bug fixes gathered from their > previous releases, so no script changes, or migration procedures are > required to use them. A simple upgrade will suffice. > >> We will let you know when the releases are completed, so you can start > using them. > >> Until then, happy hacking! > > > > _______________________________________________ > > 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 medeanwz at gmail.com Wed Nov 18 01:23:53 2020 From: medeanwz at gmail.com (M S) Date: Wed, 18 Nov 2020 02:23:53 +0100 Subject: [OpenSIPS-Users] topology hiding bug? Message-ID: Dear OpenSIPS development team, I have come across a strange case that sometime when I use topology_hiding("UD"), it makes a mistake in changing Contact field. Scenario is: A: (Contact: ) sends Invite to private IP of opensips, opensips changes Contact field to: (Contact: ) and sends Invite from public IP to B. Then B sends 200 OK back to Opensips public IP, with correct Contact: (Contact: ). so far so good. Now Opensips sends 200 OK back to A from its private IP, and changes Contact to: Contact: As you see, did part is repeated twice.. and that means when A replies with: ACK sip:90006969.did.29c.2ed202e.did.29c.2ed202e at 172.24.8.37 SIP/2.0 Opensips throws an error: ERROR:dialog:dlg_onroute: malformed route param [29c.2ed202e.did.29c.2ed202e] Is this a bug? I am using Opensips 3.1.0. Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From rob.dyck at telus.net Wed Nov 18 03:50:25 2020 From: rob.dyck at telus.net (Robert Dyck) Date: Tue, 17 Nov 2020 19:50:25 -0800 Subject: [OpenSIPS-Users] Opensips-3.0.4 compile tcp fails Message-ID: <1891144.PIDvDuAF1L@blacky.mylan> net/tcp_common.c will not compile. Too many errors to list here. It seems to be a new file as compared to my 3.0.2. Rob -------------- next part -------------- An HTML attachment was scrubbed... URL: From bullehs at gmail.com Wed Nov 18 07:33:56 2020 From: bullehs at gmail.com (HS) Date: Wed, 18 Nov 2020 12:33:56 +0500 Subject: [OpenSIPS-Users] Opensips with RTPEngine Message-ID: Hi all. I just tried to replace RTPProxy with RTPEngine. I did the change as I was getting one-way audio previously. However, one connection seems inconsistent (One-way audio) sometimes and the other connection does not actually even ring a bell. I have tried with both devices on the same Wi-Fi and one on Wi-Fi and the other on a cellular network. There's no error in opensips or rtpengine logs, so it seems that the routing is incorrect. I am using Opensips 3.0. Please let me know what is incorrect or if further information is needed. Following is my opensips.cfg file: Thanks for the help in advance. # # OpenSIPS residential configuration script # by OpenSIPS Solutions # # This script was generated via "make menuconfig", from # the "Residential" scenario. # You can enable / disable more features / functionalities by # re-generating the scenario with different options.# # # Please refer to the Core CookBook at: # https://opensips.org/Resources/DocsCookbooks # for a explanation of possible statements, functions and parameters. # ####### Global Parameters ######### log_level=3 log_stderror=no #log_facility=LOG_LOCAL0 log_facility=LOG_LOCAL7 udp_workers=8 /* uncomment the following lines to enable debugging */ #debug_mode=yes /* uncomment the next line to enable the auto temporary blacklisting of not available destinations (default disabled) */ #disable_dns_blacklist=no /* uncomment the next line to enable IPv6 lookup after IPv4 dns lookup failures (default disabled) */ #dns_try_ipv6=yes /* comment the next line to enable the auto discovery of local aliases based on reverse DNS on IPs */ auto_aliases=no advertised_address= listen= # CUSTOMIZE ME listen= # CUSTOMIZE ME # Set up listeners #listen=ws: #listen=wss: #listen=tls: ####### Modules Section ######## #set module path mpath="/usr/lib/x86_64-linux-gnu/opensips/modules/" #### SIGNALING module loadmodule "signaling.so" #### StateLess module loadmodule "sl.so" #### Transaction Module 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) #### Record Route Module loadmodule "rr.so" /* do not append from tag to the RR (no need for this script) */ modparam("rr", "append_fromtag", 0) #### MAX ForWarD module loadmodule "maxfwd.so" #### SIP MSG OPerationS module loadmodule "sipmsgops.so" #### FIFO Management Interface loadmodule "mi_fifo.so" modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo") modparam("mi_fifo", "fifo_mode", 0666) #### MYSQL module loadmodule "db_mysql.so" #### HTTPD module loadmodule "httpd.so" modparam("httpd", "port", 8888) #### USeR LOCation module loadmodule "usrloc.so" modparam("usrloc", "nat_bflag", "NAT") modparam("usrloc", "db_mode", 2) modparam("usrloc", "db_url", "mysql://opensips:opensipsrw at localhost/opensips") # CUSTOMIZE ME #### REGISTRAR module loadmodule "registrar.so" modparam("registrar", "tcp_persistent_flag", "TCP_PERSISTENT") modparam("registrar", "received_avp", "$avp(received_nh)")/* uncomment the next line not to allow more than 10 contacts per AOR */ #modparam("registrar", "max_contacts", 10) #### ACCounting module loadmodule "acc.so" /* what special events should be accounted ? */ modparam("acc", "early_media", 0) modparam("acc", "report_cancels", 0) /* by default we do not adjust the direct of the sequential requests. if you enable this parameter, be sure the enable "append_fromtag" in "rr" module */ modparam("acc", "detect_direction", 0) modparam("acc", "db_url", "mysql://opensips:opensipsrw at localhost/opensips") # CUSTOMIZE ME #### AUTHentication modules loadmodule "auth.so" loadmodule "auth_db.so" modparam("auth_db", "calculate_ha1", 0) modparam("auth_db", "password_column", "ha1") modparam("auth_db", "db_url", "mysql://opensips:opensipsrw at localhost/opensips") # CUSTOMIZE ME modparam("auth_db", "load_credentials", "") #### ALIAS module loadmodule "alias_db.so" modparam("alias_db", "db_url", "mysql://opensips:opensipsrw at localhost/opensips") # CUSTOMIZE ME #### DOMAIN module loadmodule "domain.so" modparam("domain", "db_url", "mysql://opensips:opensipsrw at localhost/opensips") # CUSTOMIZE ME modparam("domain", "db_mode", 0) # Use caching modparam("auth_db|usrloc", "use_domain", 1) #### PRESENCE modules loadmodule "xcap.so" loadmodule "presence.so" loadmodule "presence_xml.so" modparam("xcap|presence", "db_url", "mysql://opensips:opensipsrw at localhost/opensips") # CUSTOMIZE ME modparam("presence_xml", "force_active", 1) modparam("presence", "fallback2db", 0) #### DIALOG module loadmodule "dialog.so" modparam("dialog", "dlg_match_mode", 1) modparam("dialog", "default_timeout", 21600) # 6 hours timeout modparam("dialog", "db_mode", 2) modparam("dialog", "db_url", "mysql://opensips:opensipsrw at localhost/opensips") # CUSTOMIZE ME #### NAT modules loadmodule "nathelper.so" modparam("registrar|nathelper", "received_avp", "$avp(rcv)") modparam("nathelper", "natping_interval", 10) modparam("nathelper", "ping_nated_only", 1) modparam("nathelper", "sipping_bflag", "SIP_PING_FLAG") modparam("nathelper", "sipping_from", "sip:pinger at 127.0.0.1") #CUSTOMIZE ME modparam("nathelper", "received_avp", "$avp(received_nh)") ##loadmodule "rtpproxy.so" #modparam("rtpproxy", "rtpproxy_sock", "udp:localhost:12221") # CUSTOMIZE ME loadmodule "rtpengine.so" modparam("rtpengine", "rtpengine_sock", "udp:) # CUSTOMIZE ME #modparam("rtpengine", "rtpengine_sock", "udp:localhost:60000") # CUSTOMIZE ME #### DIALPLAN module loadmodule "dialplan.so" modparam("dialplan", "db_url", "mysql://opensips:opensipsrw at localhost/opensips") # CUSTOMIZE ME #### DYNAMMIC ROUTING module loadmodule "drouting.so" modparam("drouting", "db_url", "mysql://opensips:opensipsrw at localhost/opensips") # CUSTOMIZE ME #### MI_HTTP module loadmodule "mi_http.so" loadmodule "proto_udp.so" loadmodule "proto_tcp.so" #loadmodule "proto_tls.so" #### WebSocket and WebSocketSecure protocol #loadmodule "proto_wss.so" #loadmodule "proto_ws.so" # Certificate management # loadmodule "tls_mgm.so" - W # modparam("tls_mgm", "tls_method", "[default]SSLv23") # modparam("tls_mgm","verify_cert", "1") # modparam("tls_mgm","require_cert", "0") # modparam("tls_mgm","tls_method", "[Mydomain:5061]TLSv1") # modparam("tls_mgm", "server_domain", "Mydomain:5061") # modparam("tls_mgm", "certificate", "[Mydomain]/etc/opensips/tls/rootCA/cacert.pem") # modparam("tls_mgm", "private_key", "[Mydomain]/etc/opensips/tls/rootCA/private/cakey.pem") ####### Routing Logic ######## # main request routing logic route{ # initial NAT handling; detect if the request comes from behind a NAT # and apply contact fixing force_rport(); if (nat_uac_test(23)) { if (is_method("REGISTER")) { fix_nated_register(); setbflag(NAT); } else { fix_nated_contact(); setflag(NAT); } } if (!mf_process_maxfwd_header(10)) { send_reply(483,"Too Many Hops"); exit; } if (has_totag()) { # handle hop-by-hop ACK (no routing required) if ( is_method("ACK") && t_check_trans() ) { t_relay(); exit; } # sequential request within a dialog should # take the path determined by record-routing if ( !loose_route() ) { if (is_method("SUBSCRIBE") && is_myself("$rd")) { # in-dialog subscribe requests route(handle_presence); exit; } # we do record-routing for all our traffic, so we should not # receive any sequential requests without Route hdr. send_reply(404,"Not here"); exit; } # validate the sequential request against dialog if ( $DLG_status!=NULL && !validate_dialog() ) { xlog("In-Dialog $rm from $si (callid=$ci) is not valid according to dialog\n"); ## exit; } if (is_method("BYE")) { # do accounting even if the transaction fails do_accounting("db","failed"); } if (check_route_param("nat=yes")) setflag(NAT); # route it out to whatever destination was set by loose_route() # in $du (destination URI). route(relay); exit; } # CANCEL processing if (is_method("CANCEL")) { if (t_check_trans()) t_relay(); exit; } # absorb retransmissions, but do not create transaction t_check_trans(); if ( !(is_method("REGISTER") || is_from_gw() ) ) { if (is_from_local()) { # authenticate if from local subscriber # authenticate all initial non-REGISTER request that pretend to be # generated by local subscriber (domain from FROM URI is local) if (!proxy_authorize("", "subscriber")) { proxy_challenge("", 0); exit; } if ($au!=$fU) { send_reply(403,"Forbidden auth ID"); exit; } consume_credentials(); # caller authenticated } else { # if caller is not local, then called number must be local if (!is_uri_host_local()) { send_reply(403,"Relay Forbidden"); exit; } } } # preloaded route checking if (loose_route()) { xlog("L_ERR", "Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]"); if (!is_method("ACK")) send_reply(403,"Preload Route denied"); exit; } # record routing if (!is_method("REGISTER|MESSAGE")) record_route(); # account only INVITEs if (is_method("INVITE")) { # create dialog with timeout if ( !create_dialog("B") ) { send_reply(500,"Internal Server Error"); exit; } do_accounting("db"); } if (!is_uri_host_local()) { append_hf("P-hint: outbound\r\n"); route(relay); } # requests for my domain if( is_method("PUBLISH|SUBSCRIBE")) route(handle_presence); # check if the clients are using WebSockets or WebSocketSecure # if ($proto == "ws" || $proto == "wss") # setflag(SRC_WS); # else # setflag(SRC_SIP); # } if (is_method("REGISTER")) { # authenticate the REGISTER requests # if (!www_authorize("", "subscriber")) { # www_challenge("", 0); # exit; # } $var(auth_code) = www_authorize("", "subscriber"); if ( $var(auth_code) == -1 || $var(auth_code) == -2 ) { xlog("L_NOTICE","Auth error for $fU@$fd from $si cause $var(auth_code)"); } if ( $var(auth_code) < 0 ) { www_challenge("", 0); exit; } if ($au!=$tU) { send_reply(403,"Forbidden auth ID"); exit; } if ($proto == "tcp") setflag(TCP_PERSISTENT); if (isflagset(NAT)) { setbflag(SIP_PING_FLAG); # check if the clients are using WebSockets or WebSocketSecure if ($proto == "ws" || $proto == "wss") setflag(SRC_WS); else setflag(SRC_SIP); } if (isflagset(SRC_WS)) setbflag(DST_WS); if (!save("location")) sl_reply_error(); exit; } if ($rU==NULL) { # request with no Username in RURI send_reply(484,"Address Incomplete"); exit; } # apply DB based aliases alias_db_lookup("dbaliases"); # apply transformations from dialplan table dp_translate( 0, "$rU", $rU); if ($rU=~"^\+[1-9][0-9]+$") { if (!do_routing(0)) { send_reply(500,"No PSTN Route found"); exit; } route(relay); exit; } # do lookup with method filtering if (!lookup("location","m")) { if (!db_does_uri_exist("$ru","subscriber")) { send_reply(420,"Bad Extension"); exit; } # redirect to a different VM system $du = "sip:127.0.0.2:5060"; # CUSTOMIZE ME route(relay); } if (isbflagset(NAT)) setflag(NAT); # when routing via usrloc, log the missed calls also do_accounting("db","missed"); route(relay); } route[relay] { # for INVITEs enable some additional helper routes if (is_method("INVITE")) { # if (isflagset(NAT)) { # if has_body("application/sdp")) { # rtpengine_offer("trust-address"); # } t_on_branch("handle_nat"); t_on_reply("handle_nat"); t_on_failure("missed_call"); } else if (is_method("BYE|CANCEL")) { rtpengine_delete(); } # if (has_body("application/sdp")) { # if (rtpengine_offer()) # t_on_reply("1"); # } else { # t_on_reply("2"); # } # } # if (is_method("ACK")) && has_body("application/sdp")) # rtpengine_answer(); # } if (isflagset(NAT)) { add_rr_param(";nat=yes"); } if (!t_relay()) { send_reply(500,"Internal Error"); } exit; } # Presence route route[handle_presence] { if (!t_newtran()) { sl_reply_error(); exit; } if(is_method("PUBLISH")) { handle_publish(); } else if( is_method("SUBSCRIBE")) { handle_subscribe(); } exit; } branch_route[per_branch_ops] { xlog("new branch at $ru\n"); } branch_route[handle_nat] { if (!is_method("INVITE") || !has_body("application/sdp")) return; if (isflagset(SRC_WS) && isbflagset(DST_WS)) $var(rtpengine_flags) = "ICE=force-relay DTLS=passive"; else if (isflagset(SRC_WS) && !isbflagset(DST_WS)) $var(rtpengine_flags) = "RTP/AVP replace-session-connection replace-origin ICE=remove"; else if (!isflagset(SRC_WS) && isbflagset(DST_WS)) $var(rtpengine_flags) = "UDP/TLS/RTP/SAVPF ICE=force"; else if (!isflagset(SRC_WS) && !isbflagset(DST_WS)) $var(rtpengine_flags) = "RTP/AVP replace-session-connection replace-origin ICE=remove"; rtpengine_offer("$var(rtpengine_flags)"); } #onreply_route[handle_nat] { # if (nat_uac_test(1)) # fix_nated_contact(); # if ( isflagset(NAT) ) # rtpproxy_answer("ro"); #onreply_route[handle_nat] { # if (nat_uac_test(1)) # fix_nated_contact(); # if ( isflagset(NAT) ) # rtpengine_answer("trust-address"); # if (has_body("application/sdp")) # rtpengine_answer(); # xlog("incoming reply\n"); #} onreply_route[handle_nat] { fix_nated_contact(); if (!has_body("application/sdp")) return; if (isflagset(SRC_WS) && isbflagset(DST_WS)) $var(rtpengine_flags) = "ICE=force-relay DTLS=passive"; else if (isflagset(SRC_WS) && !isbflagset(DST_WS)) $var(rtpengine_flags) = "UDP/TLS/RTP/SAVPF ICE=force"; else if (!isflagset(SRC_WS) && isbflagset(DST_WS)) $var(rtpengine_flags) = "RTP/AVP replace-session-connection replace-origin ICE=remove"; else if (!isflagset(SRC_WS) && !isbflagset(DST_WS)) $var(rtpengine_flags) = "RTP/AVP replace-session-connection replace-origin ICE=remove"; rtpengine_answer("$var(rtpengine_flags)"); } failure_route[missed_call] { if (t_was_cancelled()) { exit; } # uncomment the following lines if you want to block client # redirect based on 3xx replies. ##if (t_check_status("3[0-9][0-9]")) { ##t_reply(404,"Not found"); ## exit; ##} # redirect the failed to a different VM system if (t_check_status("486|408")) { $du = "sip:127.0.0.2:5060"; # CUSTOMIZE ME # do not set the missed call flag again route(relay); } } local_route { if (is_method("BYE") && $DLG_dir=="UPSTREAM") { acc_db_request("200 Dialog Timeout", "acc"); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: From rembgrets at gmail.com Wed Nov 18 08:42:01 2020 From: rembgrets at gmail.com (ryan embgrets) Date: Wed, 18 Nov 2020 13:42:01 +0500 Subject: [OpenSIPS-Users] [RELEASE] OpenSIPS 2.4.9 and 3.0.4 and 3.1.1 minor releases In-Reply-To: References: <484022d4-79a1-b1b3-ab57-924517a89118@opensips.org> Message-ID: Sorry, i was on the older version and this seems to be fixed in opensips 3.1.1 Thanks for the great work guys. Ryan On Wed, 18 Nov 2020 at 02:35, ryan embgrets wrote: > So, I just upgraded my opensips to 3.1 and it looks like cache_raw_query > function is broken. > > On opensips 3.0 it was ok with 2 parameters but now expecting 3 on > opensips 3.1 > > parse error in /etc/opensips/opensips.cfg:265:24-25: too few parameters > for command #012 > > This below is what i have on line 265 > > cache_raw_query("redis:group1","EXPIRE $ci 3600"); > > Was the syntax changed for this cache_raw_query? Because I could not seem > to find it inside docs. > > Ryan. > > > On Tue, 17 Nov 2020 at 22:51, mrsanvicente wrote: > >> Great news, Bravo!! >> >> >> >> Mario >> >> > El 17 nov 2020, a la(s) 8:53, Răzvan Crainea >> escribió: >> > >> > Hi, Everyone! >> > >> > As promissed, we are happy to announce OpenSIPS latest minor releases: >> 2.4.9[1], 3.0.4[2] and 3.1.1[3]. All stable versions are now released with >> all the available fixes. >> > In order to migrate from previous minor versions, simply upgrade the >> packages - there's no need to make any DB or script changes. If you want to >> migrate from a previous version, make sure you're following the correct >> migration manual[4]. >> > >> > [1] https://opensips.org/pub/opensips/2.4.9/ChangeLog >> > [2] https://opensips.org/pub/opensips/3.0.4/ChangeLog >> > [3] https://opensips.org/pub/opensips/3.1.1/ChangeLog >> > [4] https://www.opensips.org/Documentation/Migration >> > >> > Enjoy the new releases! >> > >> > Răzvan Crainea >> > OpenSIPS Core Developer >> > http://www.opensips-solutions.com >> > >> >> On 11/6/20 12:54 PM, Răzvan Crainea wrote: >> >> Hello, everyone! >> >> I am happy to announce you that on Tuesday, 17th of November 2020, we >> will be releasing three new minor versions, one for each of our supported >> branches - 2.4, 3.0 and 3.1. >> >> All these releases will only contain bug fixes gathered from their >> previous releases, so no script changes, or migration procedures are >> required to use them. A simple upgrade will suffice. >> >> We will let you know when the releases are completed, so you can start >> using them. >> >> Until then, happy hacking! >> > >> > _______________________________________________ >> > 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 abdoul.osseni at gmail.com Wed Nov 18 09:49:39 2020 From: abdoul.osseni at gmail.com (=?UTF-8?Q?Abdoul_Oss=C3=A9ni?=) Date: Wed, 18 Nov 2020 10:49:39 +0100 Subject: [OpenSIPS-Users] ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip message Message-ID: Hello, When topology_hiding module is enable, we have somes errors: Nov 18 10:47:17 sd-105918 /usr/local/sbin/opensips[32484]: ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip message: HEP3#004% Nov 18 10:47:20 sd-105918 /usr/local/sbin/opensips[32486]: ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip message: HEP3#002? Nov 18 10:47:20 sd-105918 /usr/local/sbin/opensips[32486]: ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip message: HEP3#002o Nov 18 10:47:20 sd-105918 /usr/local/sbin/opensips[32486]: ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip message: HEP3#002 Nov 18 10:47:20 sd-105918 /usr/local/sbin/opensips[32486]: ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip message: HEP3#002? Nov 18 10:47:26 sd-105918 /usr/local/sbin/opensips[32484]: ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip message: HEP3#002? Nov 18 10:47:26 sd-105918 /usr/local/sbin/opensips[32484]: ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip message: HEP3#004#027 It seems this issue was fixed on opensips 3.1.1 but it persists. ~# opensips -V version: opensips 3.1.1 (x86_64/linux) flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_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: 229ec0793 main.c compiled on 22:30:49 Nov 17 2020 with gcc 6.3.0 Regards Abdoul OSSENI -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmartinez at redvoiss.net Wed Nov 18 13:00:09 2020 From: rmartinez at redvoiss.net (Ricardo Martinez) Date: Wed, 18 Nov 2020 10:00:09 -0300 Subject: [OpenSIPS-Users] topology hiding bug? In-Reply-To: References: Message-ID: <1aaf253579f565aedc49d3be427f891b@mail.gmail.com> Hi. I have a very similar problem with the topology hiding module and with the mid_registrar module. I don’t know if maybe I’m doing something wrong or maybe this is the way it has to work?. My scenario is as follows: Private PBX – OpenSIP (Topology Hiding + MidRegistrar) -- UAC When a REGISTER came from the UAC to the PBX I see something like this: 2020/11/18 09:49:00.290304 192.XXX.XXX.4:51045 -> 192.XXX.XXX.133:5060 REGISTER sip:my.domain.com:5060 SIP/2.0 Via: SIP/2.0/UDP 192.XXX.XXX.4:51045;branch=z9hG4bK-524287-1---300f9ecbae4e0c8d;rport Max-Forwards: 70 *Contact: >;+sip.instance="";reg-id=1* To: "Ricardo Martinez" From: "Ricardo Martinez";tag=7bb10a6e Call-ID: 104875NWY1NThmMTJmOWMyNTdlNmY3OGIwZjZlNWIzMzk4NDM CSeq: 1 REGISTER Expires: 600 Allow: OPTIONS, SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE Supported: outbound, path User-Agent: VEX release 6.2.2.0 stamp 104875 Content-Length: 0 But then pass through the OpenSIPS with Topology Hiding enabled and Mid_registrar enabled I see: 2020/11/18 09:49:00.291478 192.XXX.XXX.134:5060 -> 192.141.65.94:5060 REGISTER sip:my.domain.com:5060 SIP/2.0 Via: SIP/2.0/UDP 192.XXX.XXX.134:5060;branch=z9hG4bK4943.c7a48b07.0 Max-Forwards: 69 *Contact: <**sip:d1.922 at 192.XXX.XXX.134;thinfo=VG9obzAdIFs3YnpWYl0DRWlTfWJgXn5ZdFpkW2ZiZFtlVDEdPhInMjoMNVJwQWUEMWU3XjZZIUJiWWRmQ28lCzNOYVhhfWVbYUF1QH5QYGBuWmBZcw-- * *><**sip:2844375008405363167 at 192.XXX.XXX.134:5060 **>;expires=3600* To: "Ricardo Martinez" From: "Ricardo Martinez";tag=7bb10a6e Call-ID: 104875NWY1NThmMTJmOWMyNTdlNmY3OGIwZjZlNWIzMzk4NDM CSeq: 1 REGISTER Expires: 3600 Allow: OPTIONS, SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE Supported: outbound, path User-Agent: VEX release 6.2.2.0 stamp 104875 Content-Length: 0 As you can see the CONTACT is duplicated and I’m getting the next error: ERROR:mid_registrar:save_restore_rpl_contacts: 200 OK reply does not include all req contacts! (ci: 104875NWY1NThmMTJmOWMyNTdlNmY3OGIwZjZlNWIzMzk4NDM) Nov 18 09:58:00 sbcar /usr/local/sbin/opensips[11924]: ERROR:mid_registrar:mid_reg_resp_in: failed to process rpl contacts for AoR 'd1.922' Does someone have a clue on this? Regards, Ricardo *De:* Users *En nombre de *M S *Enviado el:* martes, 17 de noviembre de 2020 22:24 *Para:* OpenSIPS users mailling list *Asunto:* [OpenSIPS-Users] topology hiding bug? Dear OpenSIPS development team, I have come across a strange case that sometime when I use topology_hiding("UD"), it makes a mistake in changing Contact field. Scenario is: A: (Contact: ) sends Invite to private IP of opensips, opensips changes Contact field to: (Contact: < sip:90006969.did.29c.2ed202e at public.ip>) and sends Invite from public IP to B. Then B sends 200 OK back to Opensips public IP, with correct Contact: (Contact: ). so far so good. Now Opensips sends 200 OK back to A from its private IP, and changes Contact to: Contact: As you see, did part is repeated twice.. and that means when A replies with: ACK sip:90006969.did.29c.2ed202e.did.29c.2ed202e at 172.24.8.37 SIP/2.0 Opensips throws an error: ERROR:dialog:dlg_onroute: malformed route param [29c.2ed202e.did.29c.2ed202e] Is this a bug? I am using Opensips 3.1.0. Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From andyvoicetek at gmail.com Wed Nov 18 13:11:21 2020 From: andyvoicetek at gmail.com (Andy Kama) Date: Wed, 18 Nov 2020 13:11:21 +0000 Subject: [OpenSIPS-Users] mid_registart call scenario Message-ID: If i point my freeswitch domain to the ip of opensips and setup mid registrar to the freeswitch server. It passes registrations perfectly but wont pass invites and just fails if i point the domain to freeswitch and then register with an outbound proxy pointing to opensips it works 100% any ideas what i am missing? here is my config portion if (is_method("INVITE") and $si == "fsip" and $sp == 5060) { xlog("$si is"); if (!mid_registrar_lookup("location")) { t_reply(404, "Not Found"); exit; } if (!t_relay()) send_reply(500, "Server Internal Error 3"); exit; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmartinez at redvoiss.net Wed Nov 18 13:42:13 2020 From: rmartinez at redvoiss.net (Ricardo Martinez) Date: Wed, 18 Nov 2020 10:42:13 -0300 Subject: [OpenSIPS-Users] mid_registrar local contact table Message-ID: <811c220a26704157354ed0ff160b495b@mail.gmail.com> Hi. I’m using the mid_registrar module as a front end for my local PBX registrar Service. So far I was able to store the contact for a UAC before it goes to the REGISTRAR server. Is there a way to display or search the contacts stored in that table through the console? Thanks, *Ricardo Martinez.-* -------------- next part -------------- An HTML attachment was scrubbed... URL: From arsperger at gmail.com Wed Nov 18 15:08:00 2020 From: arsperger at gmail.com (Arsen Semenov) Date: Wed, 18 Nov 2020 20:08:00 +0500 Subject: [OpenSIPS-Users] mid_registrar local contact table In-Reply-To: <811c220a26704157354ed0ff160b495b@mail.gmail.com> References: <811c220a26704157354ed0ff160b495b@mail.gmail.com> Message-ID: Hi, try opensips-cli -x mi ul_dump or check you location table in case you use db as a back-end storage On Wed, Nov 18, 2020 at 6:44 PM Ricardo Martinez wrote: > Hi. > > I’m using the mid_registrar module as a front end for my local PBX > registrar Service. > > So far I was able to store the contact for a UAC before it goes to the > REGISTRAR server. > > Is there a way to display or search the contacts stored in that table > through the console? > > > > Thanks, > > *Ricardo Martinez.-* > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Arsen Semenov -------------- next part -------------- An HTML attachment was scrubbed... URL: From social at bohboh.info Wed Nov 18 15:27:40 2020 From: social at bohboh.info (Social Boh) Date: Wed, 18 Nov 2020 10:27:40 -0500 Subject: [OpenSIPS-Users] OpenSIPs Console for OpenSIPs 3.1 Message-ID: <0c56b7c5-fafe-4d5d-4cc7-5de109136cbb@bohboh.info> Hello, id there any date to release de OpenSIPs Console for OpenSIPs 3.1 version? Regards -- --- I'm SoCIaL, MayBe From medeanwz at gmail.com Wed Nov 18 20:03:36 2020 From: medeanwz at gmail.com (M S) Date: Wed, 18 Nov 2020 21:03:36 +0100 Subject: [OpenSIPS-Users] topology hiding bug? In-Reply-To: <1aaf253579f565aedc49d3be427f891b@mail.gmail.com> References: <1aaf253579f565aedc49d3be427f891b@mail.gmail.com> Message-ID: I investigated a bit more about this and although the effects might be similar, I'm not sure if my case and yours are triggered by the same reason. This is how this problem can be simulated: the problem of duplicating did part in contact happens when the callee part sends back its contact with the same username as opensip contact. In my case, if opensips (during topology hiding) changes contact to and sends it to callee, if callee (B side) responds with 200 OK and sets its contact to be: which is the same username as opensips contact, but different ip (which I guess is correct by RFC?) then opensips changes the contact (incorrectly) to If developers of topology hiding module read this, maybe they have some ideas about why this happens? Thanks, Mark On Wed, Nov 18, 2020 at 2:03 PM Ricardo Martinez wrote: > Hi. > > I have a very similar problem with the topology hiding module and with the > mid_registrar module. > > I don’t know if maybe I’m doing something wrong or maybe this is the way > it has to work?. My scenario is as follows: > > > > Private PBX – OpenSIP (Topology Hiding + MidRegistrar) -- UAC > > > > When a REGISTER came from the UAC to the PBX I see something like this: > > > > 2020/11/18 09:49:00.290304 192.XXX.XXX.4:51045 -> 192.XXX.XXX.133:5060 > > REGISTER sip:my.domain.com:5060 SIP/2.0 > > Via: SIP/2.0/UDP > 192.XXX.XXX.4:51045;branch=z9hG4bK-524287-1---300f9ecbae4e0c8d;rport > > Max-Forwards: 70 > > *Contact: > ;+sip.instance="";reg-id=1* > > To: "Ricardo Martinez" > > From: "Ricardo Martinez";tag=7bb10a6e > > Call-ID: 104875NWY1NThmMTJmOWMyNTdlNmY3OGIwZjZlNWIzMzk4NDM > > CSeq: 1 REGISTER > > Expires: 600 > > Allow: OPTIONS, SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, > MESSAGE > > Supported: outbound, path > > User-Agent: VEX release 6.2.2.0 stamp 104875 > > Content-Length: 0 > > > > > > But then pass through the OpenSIPS with Topology Hiding enabled and > Mid_registrar enabled I see: > > > > 2020/11/18 09:49:00.291478 192.XXX.XXX.134:5060 -> 192.141.65.94:5060 > > REGISTER sip:my.domain.com:5060 SIP/2.0 > > Via: SIP/2.0/UDP 192.XXX.XXX.134:5060;branch=z9hG4bK4943.c7a48b07.0 > > Max-Forwards: 69 > > *Contact: <* > *sip:d1.922 at 192.XXX.XXX.134;thinfo=VG9obzAdIFs3YnpWYl0DRWlTfWJgXn5ZdFpkW2ZiZFtlVDEdPhInMjoMNVJwQWUEMWU3XjZZIUJiWWRmQ28lCzNOYVhhfWVbYUF1QH5QYGBuWmBZcw--* > *><**sip:2844375008405363167 at 192.XXX.XXX.134:5060**>;expires=3600* > > To: "Ricardo Martinez" > > From: "Ricardo Martinez";tag=7bb10a6e > > Call-ID: 104875NWY1NThmMTJmOWMyNTdlNmY3OGIwZjZlNWIzMzk4NDM > > CSeq: 1 REGISTER > > Expires: 3600 > > Allow: OPTIONS, SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, > MESSAGE > > Supported: outbound, path > > User-Agent: VEX release 6.2.2.0 stamp 104875 > > Content-Length: 0 > > > > > > As you can see the CONTACT is duplicated and I’m getting the next error: > > ERROR:mid_registrar:save_restore_rpl_contacts: 200 OK reply does not > include all req contacts! (ci: > 104875NWY1NThmMTJmOWMyNTdlNmY3OGIwZjZlNWIzMzk4NDM) > > Nov 18 09:58:00 sbcar /usr/local/sbin/opensips[11924]: > ERROR:mid_registrar:mid_reg_resp_in: failed to process rpl contacts for AoR > 'd1.922' > > > > > > Does someone have a clue on this? > > > > Regards, > > Ricardo > > > > *De:* Users *En nombre de *M S > *Enviado el:* martes, 17 de noviembre de 2020 22:24 > *Para:* OpenSIPS users mailling list > *Asunto:* [OpenSIPS-Users] topology hiding bug? > > > > Dear OpenSIPS development team, > > I have come across a strange case that sometime when I use > topology_hiding("UD"), it makes a mistake in changing Contact field. > > Scenario is: > > > > A: (Contact: ) sends Invite to private IP > of opensips, opensips changes Contact field to: (Contact: < > sip:90006969.did.29c.2ed202e at public.ip>) and sends Invite from public IP > to B. > > Then B sends 200 OK back to Opensips public IP, with correct Contact: > (Contact: ). so far so good. > > Now Opensips sends 200 OK back to A from its private IP, and changes > Contact to: > > Contact: > > > > As you see, did part is repeated twice.. and that means when A replies > with: > > ACK sip:90006969.did.29c.2ed202e.did.29c.2ed202e at 172.24.8.37 SIP/2.0 > > > > Opensips throws an error: ERROR:dialog:dlg_onroute: malformed route param > [29c.2ed202e.did.29c.2ed202e] > > > > Is this a bug? I am using Opensips 3.1.0. > > > > Thanks, > > Mark > _______________________________________________ > 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 Thu Nov 19 05:26:07 2020 From: spanda at 3clogic.com (Sasmita Panda) Date: Thu, 19 Nov 2020 10:56:07 +0530 Subject: [OpenSIPS-Users] using mongodb for dynamic routing . Message-ID: Hi All, I am using opensips-3.1 with backend DB as mongodb . I am facing some problem while using dynamic routing module . cofig looks like below : db_version_table='my_version_table' loadmodule "cachedb_mongodb.so" loadmodule "db_cachedb.so" modparam("cachedb_mongodb","cachedb_url","mongodb://localhost:27017/opensipsDB.subscriber") modparam("db_cachedb","cachedb_url","mongodb:instance1://localhost:27017/opensipsDB.subscriber") loadmodule "drouting.so" #--- load dynamic routing modul -------------- modparam("drouting", "db_url", "cachedb://mongodb:instance1") modparam("drouting", "use_domain", 1) modparam("drouting", "drd_table", "dr_gateways") modparam("drouting", "drr_table", "dr_rules") modparam("drouting", "drg_table", "dr_groups") modparam("drouting", "drc_table", "dr_carriers") my mongodb looks like below . > db.dr_gateways.find() { "_id" : ObjectId("5fb4dbd7516fe875a613faf2"), "id" : 1, "gwid" : "sas", "type" : 3, "address" : "104.131.205.232:5080", "strip" : "", "pri_prefix" : "", "attrs" : "", "probe_mode" : 0, "state" : 0, "socket" : "", "description" : "" } Other collections wont give any error . But while I am starting opensips the process is starting but gives an error as below . *ERROR:drouting:dr_load_routing_info: column gwid has a bad type [4], accepting **only [3]* *.....................* *CRITICAL:drouting:dr_reload_data_head: failed to load routing info* *Due to this when I am trying to execute any routing logic then that wont work . Please assist me where I am wrong . * *Thanks & Regards* *Sasmita Panda* *Senior Network Testing and Software Engineer* *3CLogic , ph:07827611765* -------------- next part -------------- An HTML attachment was scrubbed... URL: From spanda at 3clogic.com Thu Nov 19 08:45:05 2020 From: spanda at 3clogic.com (Sasmita Panda) Date: Thu, 19 Nov 2020 14:15:05 +0530 Subject: [OpenSIPS-Users] Some general query regarding opensips memory caching and local cache . Message-ID: Hi All , I am just wondering whats the difference between memory caching and local cache of opensips . 1. domain module : modparam("domain", "db_mode", 1) this means use caching . This means opensips saves the data in memory . What is the time span the data persists in memory ? 2. In dynamic routing case , I am not configuring any parameter to save the data in memory . But still opensips save the data in memory which I have been configured in the DB . In that case what is the time span till which data persists in memory ? 3. When I am saying about cachedb_local module . Is the module stores data in the memory of opensips or in any other cashe ? 4. Is this make sense , when opensips is storing the data in memory itself , I need to use localcahce module to store the information in db to local cache ? In other way I can ask , what are modules for which opensips is not storing the data in memory . Below are the tables for which I used to do DB query frequently . location , domain , dynamic routing tables, dialplan , subscriber , address Can any one please let me know , in which case I should use localcache module to minimize db query ?? *Thanks & Regards* *Sasmita Panda* *Senior Network Testing and Software Engineer* *3CLogic , ph:07827611765* -------------- next part -------------- An HTML attachment was scrubbed... URL: From liviu at opensips.org Thu Nov 19 11:01:59 2020 From: liviu at opensips.org (Liviu Chircu) Date: Thu, 19 Nov 2020 13:01:59 +0200 Subject: [OpenSIPS-Users] using mongodb for dynamic routing . In-Reply-To: References: Message-ID: On 19.11.2020 07:26, Sasmita Panda wrote: > >  I am using opensips-3.1 with backend DB as mongodb .  I am facing > some problem while using dynamic routing  module . > > *ERROR:drouting:dr_load_routing_info: column gwid has a bad type [4], > accepting **only [3]* > *.....................* > *CRITICAL:drouting:dr_reload_data_head: failed to load routing info* Hi, Sasmita! Could you apply the following patch in your OpenSIPS 3.1 source code root directory, rebuild and see if the problem goes away? git apply <(base64 -d < From bogdan at opensips.org Thu Nov 19 12:00:37 2020 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Thu, 19 Nov 2020 14:00:37 +0200 Subject: [OpenSIPS-Users] Working out OpenSIPS 3.2 roadmap Message-ID: <830e2238-3009-9d8e-3011-67fd1fcc7d89@opensips.org> Hi OpenSIPSers ! Is it the time to turn our eyes to the next major release, to OpenSIPS 3.2 . Is it the time to plan it, to decide what should be the main area to focus on when developing OpenSIPS 3.2, to decide what ideas and features just be counted when putting together the roadmap for 3.2. So, we want to take the community pulse on the upcoming 3.2. Any suggestions, ideas, opinions are (as always) more than welcome for us and for the project. So, make your statement and please fill in this short (but relevant) form :     https://bit.ly/2ISE9uX Best regards, -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 2020 online https://opensips.org/training/OpenSIPS_eBootcamp_2020/ From alain.bieuzent at free.fr Thu Nov 19 16:36:11 2020 From: alain.bieuzent at free.fr (Alain Bieuzent) Date: Thu, 19 Nov 2020 17:36:11 +0100 Subject: [OpenSIPS-Users] Upgrading from 3.0.3 to 3.0.4 failed - [net/tcp_common.o] Error 1 Message-ID: <5075244C-2F8C-4F14-A334-ED3D0710AFF9@free.fr> Hi all, Trying to migrate from 3.0.3 to 3.0.4, but it failed : Compiling net/tcp_common.c In file included from net/tcp_common.c:24:0: net/tcp_common.h:25:5: warning: redundant redeclaration of ‘tcp_connect_blocking’ [-Wredundant-decls] int tcp_connect_blocking(int s, const struct sockaddr *servaddr,      ^~~~~~~~~~~~~~~~~~~~ In file included from net/tcp_common.c:23:0: net/net_tcp.h:83:5: note: previous declaration of ‘tcp_connect_blocking’ was here int tcp_connect_blocking(int s, const struct sockaddr *servaddr,      ^~~~~~~~~~~~~~~~~~~~ Complete logs here : https://pastebin.com/QaM1vAuK Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From spanda at 3clogic.com Fri Nov 20 07:29:39 2020 From: spanda at 3clogic.com (Sasmita Panda) Date: Fri, 20 Nov 2020 12:59:39 +0530 Subject: [OpenSIPS-Users] I am facing some issue while creating DB through opensips-cli . Message-ID: Hi All , I am a first time user of opensips-cli . this installed successfully . I have created a config file with all the details like below . [default] database_modules: All [mysql] database_admin_url: mysql://root:cccl0g1c at localhost/opensips database_url: mysql://opensips:opensipsrw at localhost database_schema_path: ./opt/opensips-3.1/scripts I am running command opensips-cli -f /opt/opensips-cli/etc/opensips-cli.cfg -x database create opensips -d DEBUG: using config file /opt/opensips-cli/etc/opensips-cli.cfg DEBUG: Loaded module 'user' DEBUG: fifo file /tmp/opensips_fifo does not exist! DEBUG: Skipping module 'mi' - excluded on purpose DEBUG: Loaded module 'tls' DEBUG: Loaded module 'database' DEBUG: Loaded module 'instance' DEBUG: Loaded module 'trace' DEBUG: Loaded module 'diagnose' DEBUG: Loaded module 'trap' DEBUG: running in non-interactive mode '['database', 'create', 'opensips']' DEBUG: running command 'create' '['opensips']' DEBUG: db_name: 'opensips' Password for admin MySQL user (root): DEBUG: read password: 'cccl0g1c' DEBUG: admin DB URL: 'mysql://root:cccl0g1c at localhost' DEBUG: connecting to mysql://root:cccl0g1c at localhost DEBUG: check database URL 'mysql://root:cccl0g1c at localhost/opensips' DEBUG: DB does not exist DEBUG: Create Database 'opensips' for dialect 'mysql' ... DEBUG: success DEBUG: DB URL: 'mysql://opensips:opensipsrw at localhost' DEBUG: connecting to mysql://opensips:opensipsrw at localhost/opensips INFO: creating access user for opensips ... INFO: created user 'opensips' /usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/default.py:552: Warning: 'SET PASSWORD FOR = PASSWORD('')' is deprecated and will be removed in a future release. Please use SET PASSWORD FOR = '' instead cursor.execute(statement, parameters) INFO: set password 'o********w' for 'opensips' (MariaDB) INFO: granted access to user 'opensips' on DB 'opensips' INFO: flushed privileges DEBUG: connecting to mysql://opensips:opensipsrw at localhost/opensips DEBUG: check database URL 'mysql://opensips:opensipsrw at localhost/opensips' DEBUG: DB 'opensips' exists *ERROR: path '/usr/share/opensips' to OpenSIPS DB scripts does not exist!* In the config file I have specified the database_schema_path still why its searching in '/usr/share/opensips' . What should I do to avoid this error . *Thanks & Regards* *Sasmita Panda* *Senior Network Testing and Software Engineer* *3CLogic , ph:07827611765* -------------- next part -------------- An HTML attachment was scrubbed... URL: From liviu at opensips.org Fri Nov 20 09:35:46 2020 From: liviu at opensips.org (Liviu Chircu) Date: Fri, 20 Nov 2020 11:35:46 +0200 Subject: [OpenSIPS-Users] I am facing some issue while creating DB through opensips-cli . In-Reply-To: References: Message-ID: On 20.11.2020 09:29, Sasmita Panda wrote: > > [default] > database_modules: All > [mysql] > database_admin_url: mysql://root:cccl0g1c at localhost/opensips > database_url:  mysql://opensips:opensipsrw at localhost > database_schema_path: ./opt/opensips-3.1/scripts Hi, Sasmita? What blog post did you get this example from?  This "smart" example was fixed at some point because it was misleading developers, but I'm afraid it got copy-pasted on a few blogs and is now still spreading... Please read the revised examples in the Database module documentation [1].  Maybe re-read it from the beginning :) TL;DR: in your .cfg file, the [mysql] tag defines a separate opensips-cli instance, not a DB module property!  So please avoid this technique and set all of your options under the [default] tag. Best regards, [1]: https://github.com/OpenSIPS/opensips-cli/blob/master/docs/modules/database.md#database-management -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com From spanda at 3clogic.com Fri Nov 20 10:16:39 2020 From: spanda at 3clogic.com (Sasmita Panda) Date: Fri, 20 Nov 2020 15:46:39 +0530 Subject: [OpenSIPS-Users] I am facing some issue while creating DB through opensips-cli . In-Reply-To: References: Message-ID: Hi , >> cat default.cfg [default] log_level: WARNING prompt_name: opensips-cli prompt_intro: Welcome to OpenSIPS Command Line Interface! prompt_emptyline_repeat_cmd: False history_file: ~/.opensips-cli.history history_file_size: 1000 output_type: pretty-print communication_type: fifo fifo_file: /tmp/opensips_fifo database_modules: All database_admin_url: mysql://root:cccl0g1c at localhost/opensips database_url: mysql://opensips:opensipsrw at localhost database_schema_path: ./opt/opensips-3.1/scripts I have configured this under default.cfg file . When I am creating a database it creates only 27 tables . database_modules: ALL . What does this mean? I think it must create table for all the modules loaded . Isn't it so ? *Thanks & Regards* *Sasmita Panda* *Senior Network Testing and Software Engineer* *3CLogic , ph:07827611765* On Fri, Nov 20, 2020 at 3:07 PM Liviu Chircu wrote: > On 20.11.2020 09:29, Sasmita Panda wrote: > > > > [default] > > database_modules: All > > [mysql] > > database_admin_url: mysql://root:cccl0g1c at localhost/opensips > > database_url: mysql://opensips:opensipsrw at localhost > > database_schema_path: ./opt/opensips-3.1/scripts > > Hi, Sasmita? > > What blog post did you get this example from? This "smart" example was > fixed at some point because it was misleading developers, but I'm afraid > it got copy-pasted on a few blogs and is now still spreading... Please > read the revised examples in the Database module documentation [1]. > Maybe re-read it from the beginning :) > > TL;DR: in your .cfg file, the [mysql] tag defines a separate > opensips-cli instance, not a DB module property! So please avoid this > technique and set all of your options under the [default] tag. > > Best regards, > > [1]: > > https://github.com/OpenSIPS/opensips-cli/blob/master/docs/modules/database.md#database-management > > -- > Liviu Chircu > www.twitter.com/liviuchircu | www.opensips-solutions.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 liviu at opensips.org Fri Nov 20 10:29:56 2020 From: liviu at opensips.org (Liviu Chircu) Date: Fri, 20 Nov 2020 12:29:56 +0200 Subject: [OpenSIPS-Users] I am facing some issue while creating DB through opensips-cli . In-Reply-To: References: Message-ID: <1e542087-622b-5850-499e-762808139a89@opensips.org> On 20.11.2020 12:16, Sasmita Panda wrote: > |I have configured this under default.cfg file . When I am creating a > database it creates only 27 tables . database_modules: ALL . What does > this mean? I think it must create table for all the modules loaded . > Isn't it so ?| |I've no idea why it behaves like this.  With "ALL", it should create 67 tables, not 27.  Can you post the output?| |Also, could you manually check your database afterwards and confirm it contains 27 tables?| |Thanks, | -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From spanda at 3clogic.com Fri Nov 20 10:43:19 2020 From: spanda at 3clogic.com (Sasmita Panda) Date: Fri, 20 Nov 2020 16:13:19 +0530 Subject: [OpenSIPS-Users] I am facing some issue while creating DB through opensips-cli . In-Reply-To: <1e542087-622b-5850-499e-762808139a89@opensips.org> References: <1e542087-622b-5850-499e-762808139a89@opensips.org> Message-ID: DEBUG: DB 'opensips' exists DEBUG: Creating standard tables DEBUG: checking tables: acc alias_db auth_db avpops clusterer dialog dialplan dispatcher domain drouting group load_balancer msilo permissions rtpproxy rtpengine speeddial tls_mgm usrloc INFO: Running standard-create.sql... INFO: Running acc-create.sql... INFO: Running alias_db-create.sql... INFO: Running auth_db-create.sql... INFO: Running avpops-create.sql... INFO: Running clusterer-create.sql... INFO: Running dialog-create.sql... INFO: Running dialplan-create.sql... INFO: Running dispatcher-create.sql... INFO: Running domain-create.sql... INFO: Running drouting-create.sql... INFO: Running group-create.sql... INFO: Running load_balancer-create.sql... INFO: Running msilo-create.sql... INFO: Running permissions-create.sql... INFO: Running rtpproxy-create.sql... INFO: Running rtpengine-create.sql... INFO: Running speeddial-create.sql... INFO: Running tls_mgm-create.sql... INFO: Running usrloc-create.sql... Yes , I have checked mysql . There is also only 27 tables created . mysql> show tables; +--------------------+ | Tables_in_opensips | +--------------------+ | acc | | address | | clusterer | | dbaliases | | dialog | | dialplan | | dispatcher | | domain | | dr_carriers | | dr_gateways | | dr_groups | | dr_partitions | | dr_rules | | grp | | load_balancer | | location | | missed_calls | | re_grp | | rtpengine | | rtpproxy_sockets | | silo | | speed_dial | | subscriber | | tls_mgm | | uri | | usr_preferences | | version | +--------------------+ 27 rows in set (0.00 sec) :( :( :( *Thanks & Regards* *Sasmita Panda* *Senior Network Testing and Software Engineer* *3CLogic , ph:07827611765* On Fri, Nov 20, 2020 at 4:00 PM Liviu Chircu wrote: > On 20.11.2020 12:16, Sasmita Panda wrote: > > I have configured this under default.cfg file . > When I am creating a database it creates only 27 tables . > > database_modules: ALL . What does this mean? I think it must create table for all the modules loaded . > Isn't it so ? > > I've no idea why it behaves like this. With "ALL", it should create 67 > tables, not 27. Can you post the output? > > Also, could you manually check your database afterwards and confirm it > contains 27 tables? > > Thanks, > > -- > Liviu Chircuwww.twitter.com/liviuchircu | www.opensips-solutions.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From liviu at opensips.org Fri Nov 20 10:47:41 2020 From: liviu at opensips.org (Liviu Chircu) Date: Fri, 20 Nov 2020 12:47:41 +0200 Subject: [OpenSIPS-Users] I am facing some issue while creating DB through opensips-cli . In-Reply-To: References: <1e542087-622b-5850-499e-762808139a89@opensips.org> Message-ID: On 20.11.2020 12:43, Sasmita Panda wrote: > DEBUG: DB 'opensips' exists > DEBUG: Creating standard tables > DEBUG: checking tables: acc alias_db auth_db avpops clusterer dialog > dialplan dispatcher domain drouting group load_balancer msilo > permissions rtpproxy rtpengine speeddial tls_mgm usrloc OK, it seems your "default.cfg" file is not picked up, so the CLI uses its built-in paths: * "database_schema_path = /usr/share/opensips", which probably points to some 2.4 scripts ("uri" table?!) * "database_modules" is missing, so it's using the "standard" list of tables Please move that "default.cfg" file to the proper path, or specify it as an argument.  It is the 1st thing mentioned in the documentation [1] Happy hacking, [1]: https://github.com/opensips/opensips-cli#configuration -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com From johan at democon.be Fri Nov 20 10:47:53 2020 From: johan at democon.be (johan) Date: Fri, 20 Nov 2020 11:47:53 +0100 Subject: [OpenSIPS-Users] make menuconfig fialing on latest 3.0 checkout. Message-ID: <1e42e02b-db01-a2f7-fced-f3aab5958d1f@democon.be> Hi, having downloaded this morning the new sources on debian 10, I can't make menuconfig anymore.     /usr/src/opensips_3_0$ sudo make menuconfig Generating parser Generating lexer make -C menuconfig make[1]: Entering directory '/usr/src/opensips_3_0/menuconfig' gcc -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops -falign-loops -ftree-vectorize -fno-common -mtune=nocona -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls  -g -Wall -DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\" -DMENUCONFIG_GEN_PATH=\"etc/\" -DMENUCONFIG_HAVE_SOURCES=1    -c -o cfg.o cfg.c gcc -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops -falign-loops -ftree-vectorize -fno-common -mtune=nocona -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls  -g -Wall -DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\" -DMENUCONFIG_GEN_PATH=\"etc/\" -DMENUCONFIG_HAVE_SOURCES=1    -c -o curses.o curses.c gcc -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops -falign-loops -ftree-vectorize -fno-common -mtune=nocona -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls  -g -Wall -DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\" -DMENUCONFIG_GEN_PATH=\"etc/\" -DMENUCONFIG_HAVE_SOURCES=1    -c -o items.o items.c gcc -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops -falign-loops -ftree-vectorize -fno-common -mtune=nocona -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls  -g -Wall -DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\" -DMENUCONFIG_GEN_PATH=\"etc/\" -DMENUCONFIG_HAVE_SOURCES=1    -c -o commands.o commands.c gcc -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops -falign-loops -ftree-vectorize -fno-common -mtune=nocona -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls  -g -Wall -DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\" -DMENUCONFIG_GEN_PATH=\"etc/\" -DMENUCONFIG_HAVE_SOURCES=1    -c -o menus.o menus.c gcc -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops -falign-loops -ftree-vectorize -fno-common -mtune=nocona -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls  -g -Wall -DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\" -DMENUCONFIG_GEN_PATH=\"etc/\" -DMENUCONFIG_HAVE_SOURCES=1    -c -o parser.o parser.c gcc -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops -falign-loops -ftree-vectorize -fno-common -mtune=nocona -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls  -g -Wall -DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\" -DMENUCONFIG_GEN_PATH=\"etc/\" -DMENUCONFIG_HAVE_SOURCES=1    -c -o main.o main.c gcc -o configure -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops -falign-loops -ftree-vectorize -fno-common -mtune=nocona -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls  -g -Wall -DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\" -DMENUCONFIG_GEN_PATH=\"etc/\" -DMENUCONFIG_HAVE_SOURCES=1  cfg.o curses.o items.o commands.o menus.o parser.o main.o -lncurses   -Wl,-O2 -Wl,-E  make[1]: Leaving directory '/usr/src/opensips_3_0/menuconfig' ./menuconfig/configure --local make: *** [Makefile:621: menuconfig] Error 255 Please advice. -------------- next part -------------- A non-text attachment was scrubbed... Name: 0xD7D896F7DDA70EC3.asc Type: application/pgp-keys Size: 2456 bytes Desc: not available URL: From spanda at 3clogic.com Fri Nov 20 11:15:23 2020 From: spanda at 3clogic.com (Sasmita Panda) Date: Fri, 20 Nov 2020 16:45:23 +0530 Subject: [OpenSIPS-Users] I am facing some issue while creating DB through opensips-cli . In-Reply-To: References: <1e542087-622b-5850-499e-762808139a89@opensips.org> Message-ID: Ok . DEBUG: using config file /root/.opensips-cli.cfg DEBUG: Loaded module 'instance' DEBUG: Loaded module 'trace' DEBUG: Loaded module 'tls' DEBUG: Loaded module 'mi' DEBUG: sent command ':opensips_fifo_reply_20633:{"params": [], "jsonrpc": "2.0", "method": "which", "id": "11598"}' DEBUG: Loaded module 'diagnose' DEBUG: Loaded module 'database' DEBUG: Loaded module 'user' DEBUG: Loaded module 'trap' DEBUG: running in non-interactive mode '['database', 'create', 'opensips']' DEBUG: running command 'create' '['opensips']' DEBUG: db_name: 'opensips' DEBUG: admin DB URL: 'mysql://root:cccl0g1c at localhost/opensips' DEBUG: connecting to mysql://root:cccl0g1c at localhost/opensips Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py", line 2262, in _wrap_pool_connect return fn() File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/pool/base.py", line 303, in unique_connection return _ConnectionFairy._checkout(self) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/pool/base.py", line 760, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/pool/base.py", line 492, in checkout rec = pool._do_get() File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/pool/impl.py", line 139, in _do_get self._dec_overflow() File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/util/langhelpers.py", line 68, in __exit__ compat.reraise(exc_type, exc_value, exc_tb) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/util/compat.py", line 129, in reraise raise value File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/pool/impl.py", line 136, in _do_get return self._create_connection() File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/pool/base.py", line 308, in _create_connection return _ConnectionRecord(self) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/pool/base.py", line 437, in __init__ self.__connect(first_connect_check=True) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/pool/base.py", line 639, in __connect connection = pool._invoke_creator(self) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/strategies.py", line 114, in connect return dialect.connect(*cargs, **cparams) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/default.py", line 453, in connect return self.dbapi.connect(*cargs, **cparams) File "/usr/lib/python3/dist-packages/MySQLdb/__init__.py", line 81, in Connect return Connection(*args, **kwargs) File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 204, in __init__ super(Connection, self).__init__(*args, **kwargs2) _mysql_exceptions.OperationalError: (1049, "Unknown database 'opensips'") The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/opensipscli-0.1.0-py3.5.egg/opensipscli/db.py", line 136, in __init__ self.__conn = self.__engine.connect().\ File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py", line 2193, in connect return self._connection_cls(self, **kwargs) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py", line 103, in __init__ else engine.raw_connection() File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py", line 2293, in raw_connection self.pool.unique_connection, _connection File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py", line 2266, in _wrap_pool_connect e, dialect, self File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1536, in _handle_dbapi_exception_noconnection util.raise_from_cause(sqlalchemy_exception, exc_info) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/util/compat.py", line 383, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/util/compat.py", line 128, in reraise raise value.with_traceback(tb) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py", line 2262, in _wrap_pool_connect return fn() File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/pool/base.py", line 303, in unique_connection return _ConnectionFairy._checkout(self) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/pool/base.py", line 760, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/pool/base.py", line 492, in checkout rec = pool._do_get() File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/pool/impl.py", line 139, in _do_get self._dec_overflow() File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/util/langhelpers.py", line 68, in __exit__ compat.reraise(exc_type, exc_value, exc_tb) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/util/compat.py", line 129, in reraise raise value File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/pool/impl.py", line 136, in _do_get return self._create_connection() File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/pool/base.py", line 308, in _create_connection return _ConnectionRecord(self) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/pool/base.py", line 437, in __init__ self.__connect(first_connect_check=True) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/pool/base.py", line 639, in __connect connection = pool._invoke_creator(self) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/strategies.py", line 114, in connect return dialect.connect(*cargs, **cparams) File "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/default.py", line 453, in connect return self.dbapi.connect(*cargs, **cparams) File "/usr/lib/python3/dist-packages/MySQLdb/__init__.py", line 81, in Connect return Connection(*args, **kwargs) File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 204, in __init__ super(Connection, self).__init__(*args, **kwargs2) sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1049, "Unknown database 'opensips'") (Background on this error at: http://sqlalche.me/e/e3q8) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/bin/opensips-cli", line 4, in __import__('pkg_resources').run_script('opensipscli==0.1.0', 'opensips-cli') File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 719, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1504, in run_script exec(code, namespace, namespace) File "/usr/local/lib/python3.5/dist-packages/opensipscli-0.1.0-py3.5.egg/EGG-INFO/scripts/opensips-cli", line 9, in run_console() File "/usr/local/lib/python3.5/dist-packages/opensipscli-0.1.0-py3.5.egg/EGG-INFO/scripts/opensips-cli", line 6, in run_console main.main() File "/usr/local/lib/python3.5/dist-packages/opensipscli-0.1.0-py3.5.egg/opensipscli/main.py", line 78, in main sys.exit(shell.cmdloop()) File "/usr/local/lib/python3.5/dist-packages/opensipscli-0.1.0-py3.5.egg/opensipscli/cli.py", line 242, in cmdloop ret = self.run_command(self.command[0], command, params) File "/usr/local/lib/python3.5/dist-packages/opensipscli-0.1.0-py3.5.egg/opensipscli/cli.py", line 357, in run_command return mod[0].__invoke__(cmd, params) File "/usr/local/lib/python3.5/dist-packages/opensipscli-0.1.0-py3.5.egg/opensipscli/module.py", line 36, in __invoke__ return f(params) File "/usr/local/lib/python3.5/dist-packages/opensipscli-0.1.0-py3.5.egg/opensipscli/modules/database.py", line 369, in do_create admin_db = self.get_db(admin_url, db_name) File "/usr/local/lib/python3.5/dist-packages/opensipscli-0.1.0-py3.5.egg/opensipscli/modules/database.py", line 630, in get_db return osdb(db_url, db_name) File "/usr/local/lib/python3.5/dist-packages/opensipscli-0.1.0-py3.5.egg/opensipscli/db.py", line 160, in __init__ raise osdbError("unable to connect to the database") opensipscli.db.osdbError: unable to connect to the database This happens when I am giving a file path . *Thanks & Regards* *Sasmita Panda* *Senior Network Testing and Software Engineer* *3CLogic , ph:07827611765* On Fri, Nov 20, 2020 at 4:17 PM Liviu Chircu wrote: > On 20.11.2020 12:43, Sasmita Panda wrote: > > DEBUG: DB 'opensips' exists > > DEBUG: Creating standard tables > > DEBUG: checking tables: acc alias_db auth_db avpops clusterer dialog > > dialplan dispatcher domain drouting group load_balancer msilo > > permissions rtpproxy rtpengine speeddial tls_mgm usrloc > > OK, it seems your "default.cfg" file is not picked up, so the CLI uses > its built-in paths: > > * "database_schema_path = /usr/share/opensips", which probably points to > some 2.4 scripts ("uri" table?!) > * "database_modules" is missing, so it's using the "standard" list of > tables > > Please move that "default.cfg" file to the proper path, or specify it as > an argument. It is the 1st thing mentioned in the documentation [1] > > Happy hacking, > > [1]: https://github.com/opensips/opensips-cli#configuration > > -- > Liviu Chircu > www.twitter.com/liviuchircu | www.opensips-solutions.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From liviu at opensips.org Fri Nov 20 11:25:15 2020 From: liviu at opensips.org (Liviu Chircu) Date: Fri, 20 Nov 2020 13:25:15 +0200 Subject: [OpenSIPS-Users] I am facing some issue while creating DB through opensips-cli . In-Reply-To: References: <1e542087-622b-5850-499e-762808139a89@opensips.org> Message-ID: On 20.11.2020 13:15, Sasmita Panda wrote: > File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line > 204, in __init__ >     super(Connection, self).__init__(*args, **kwargs2) > _mysql_exceptions.OperationalError: (1049, "Unknown database 'opensips'") I think the problem may be related to this setting: /    database_admin_url: mysql://root:cccl0g1c at localhost/opensips/ Try to remove the trailing "/opensips" part of the URL, because the database name is given by the "database_name" setting. If it fixes the issue, we should push a commit which does this automatically. -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at allenclan.co.uk Fri Nov 20 11:47:33 2020 From: mark at allenclan.co.uk (Mark Allen) Date: Fri, 20 Nov 2020 11:47:33 +0000 Subject: [OpenSIPS-Users] Clear local cache collection without OpenSIPS 3.1 restart In-Reply-To: References: <1e542087-622b-5850-499e-762808139a89@opensips.org> Message-ID: I have local cache collections setup in my script: loadmodule "cachedb_local.so" modparam("cachedb_local", "cache_collections", "general; other;") modparam("cachedb_local", "cachedb_url", "local:general:///general") modparam("cachedb_local", "cachedb_url", "local:other:///other") I want to be able to use opensips-cli to clear the contents of the "other" collection from the command line or a script without needing to restart OpenSIPS or losing the contents of the "general" cache collection. I've looked at the cachedb_local documentation for exported MI functions but I don't understand how this translates into a valid opensips-cli command. Any help gratefully received! :D -------------- next part -------------- An HTML attachment was scrubbed... URL: From andyvoicetek at gmail.com Fri Nov 20 11:49:42 2020 From: andyvoicetek at gmail.com (Andy Kama) Date: Fri, 20 Nov 2020 11:49:42 +0000 Subject: [OpenSIPS-Users] Mid_registar and pbx Message-ID: Hi Guys If you are using mid registrar as follows endpoint -- outbound proxy(opensips) -- freeswitch works great except some pbx features like *8 call pickup does not work as it goes via the proxy any ideas what to check on the opensips side -------------- next part -------------- An HTML attachment was scrubbed... URL: From spanda at 3clogic.com Fri Nov 20 12:12:45 2020 From: spanda at 3clogic.com (Sasmita Panda) Date: Fri, 20 Nov 2020 17:42:45 +0530 Subject: [OpenSIPS-Users] I am facing some issue while creating DB through opensips-cli . In-Reply-To: References: <1e542087-622b-5850-499e-762808139a89@opensips.org> Message-ID: Thanks a lot . That works . *Thanks & Regards* *Sasmita Panda* *Senior Network Testing and Software Engineer* *3CLogic , ph:07827611765* On Fri, Nov 20, 2020 at 4:55 PM Liviu Chircu wrote: > On 20.11.2020 13:15, Sasmita Panda wrote: > > File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 204, > in __init__ > super(Connection, self).__init__(*args, **kwargs2) > _mysql_exceptions.OperationalError: (1049, "Unknown database 'opensips'") > > I think the problem may be related to this setting: > > * database_admin_url: mysql://root:cccl0g1c at localhost/opensips* > > Try to remove the trailing "/opensips" part of the URL, because the > database name is given by the "database_name" setting. > > If it fixes the issue, we should push a commit which does this > automatically. > > -- > Liviu Chircuwww.twitter.com/liviuchircu | www.opensips-solutions.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From medeanwz at gmail.com Fri Nov 20 12:48:50 2020 From: medeanwz at gmail.com (M S) Date: Fri, 20 Nov 2020 13:48:50 +0100 Subject: [OpenSIPS-Users] dialog.c problem finding did Message-ID: Hi guys, Checking on an issue with dialog and TH, I realized that there is a potential bug while dialog id is added/retrieved from contact username. If an endpoint has ".did." string in its contact name (if it created its contact based on what opensips sent for example, by using the same contact username and just changing the host part), then dialog module cannot find the correct did in it - because dialog module always looks for the first match of that string inside the username. I believe this is where the problem happens in dialog.c in api_match_dialog: while( (p=q_memchr(s.s,DLG_SEPARATOR,s.len))!=NULL ) { if ( s.s+s.len-p-1 > rr_param.len+2 ) { if (strncmp( p+1, rr_param.s, rr_param.len)==0 && p[rr_param.len+1]==DLG_SEPARATOR ) { p += rr_param.len+2; s.len = s.s+s.len-p; s.s = p; match_param = (void*)(&s); break; } } if (p+10){ p += rr_param.len+2; s.len = s.s+s.len-p; s.s = p; match_param = (void*)(&s); } } This will search for all occurrences of ".did." string, and uses the last one. My code compiles okay but I don't have a test setup to check. I can submit a bug report to github but first I wanted to check if this is considered a real bug, and if anyone can test whether my fix works. Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From johan at democon.be Fri Nov 20 12:53:28 2020 From: johan at democon.be (johan) Date: Fri, 20 Nov 2020 13:53:28 +0100 Subject: [OpenSIPS-Users] make menuconfig fialing on latest 3.0 checkout. In-Reply-To: <1e42e02b-db01-a2f7-fced-f3aab5958d1f@democon.be> References: <1e42e02b-db01-a2f7-fced-f3aab5958d1f@democon.be> Message-ID: <03915cc7-075c-1909-3a5f-a5255c3c0ead@democon.be> I thought it was a permissions problem but no, sudo su - does not change a dime. On 20/11/2020 11:47, johan wrote: > Hi, > > having downloaded this morning the new sources on debian 10, I can't > make menuconfig anymore.     > > > /usr/src/opensips_3_0$ sudo make menuconfig > Generating parser > Generating lexer > make -C menuconfig > make[1]: Entering directory '/usr/src/opensips_3_0/menuconfig' > gcc -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops > -falign-loops -ftree-vectorize -fno-common -mtune=nocona > -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls  > -g -Wall -DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\" > -DMENUCONFIG_GEN_PATH=\"etc/\" -DMENUCONFIG_HAVE_SOURCES=1    -c -o > cfg.o cfg.c > gcc -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops > -falign-loops -ftree-vectorize -fno-common -mtune=nocona > -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls  > -g -Wall -DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\" > -DMENUCONFIG_GEN_PATH=\"etc/\" -DMENUCONFIG_HAVE_SOURCES=1    -c -o > curses.o curses.c > gcc -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops > -falign-loops -ftree-vectorize -fno-common -mtune=nocona > -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls  > -g -Wall -DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\" > -DMENUCONFIG_GEN_PATH=\"etc/\" -DMENUCONFIG_HAVE_SOURCES=1    -c -o > items.o items.c > gcc -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops > -falign-loops -ftree-vectorize -fno-common -mtune=nocona > -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls  > -g -Wall -DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\" > -DMENUCONFIG_GEN_PATH=\"etc/\" -DMENUCONFIG_HAVE_SOURCES=1    -c -o > commands.o commands.c > gcc -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops > -falign-loops -ftree-vectorize -fno-common -mtune=nocona > -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls  > -g -Wall -DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\" > -DMENUCONFIG_GEN_PATH=\"etc/\" -DMENUCONFIG_HAVE_SOURCES=1    -c -o > menus.o menus.c > gcc -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops > -falign-loops -ftree-vectorize -fno-common -mtune=nocona > -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls  > -g -Wall -DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\" > -DMENUCONFIG_GEN_PATH=\"etc/\" -DMENUCONFIG_HAVE_SOURCES=1    -c -o > parser.o parser.c > gcc -g -O9 -funroll-loops -Wcast-align -Wall -minline-all-stringops > -falign-loops -ftree-vectorize -fno-common -mtune=nocona > -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls  > -g -Wall -DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\" > -DMENUCONFIG_GEN_PATH=\"etc/\" -DMENUCONFIG_HAVE_SOURCES=1    -c -o > main.o main.c > gcc -o configure -g -O9 -funroll-loops -Wcast-align -Wall > -minline-all-stringops -falign-loops -ftree-vectorize -fno-common > -mtune=nocona -Wold-style-definition -Wmissing-field-initializers > -Wredundant-decls  -g -Wall > -DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\" > -DMENUCONFIG_GEN_PATH=\"etc/\" -DMENUCONFIG_HAVE_SOURCES=1  cfg.o > curses.o items.o commands.o menus.o parser.o main.o -lncurses   -Wl,-O2 > -Wl,-E  > make[1]: Leaving directory '/usr/src/opensips_3_0/menuconfig' > ./menuconfig/configure --local > make: *** [Makefile:621: menuconfig] Error 255 > > > Please advice. > -------------- next part -------------- A non-text attachment was scrubbed... Name: 0xD7D896F7DDA70EC3.asc Type: application/pgp-keys Size: 2456 bytes Desc: not available URL: From mark at allenclan.co.uk Fri Nov 20 13:16:49 2020 From: mark at allenclan.co.uk (Mark Allen) Date: Fri, 20 Nov 2020 13:16:49 +0000 Subject: [OpenSIPS-Users] Fwd: Clear local cache collection without OpenSIPS 3.1 restart In-Reply-To: References: <1e542087-622b-5850-499e-762808139a89@opensips.org> Message-ID: Sorry - accidentally tagged this on to another thread, so please excuse the repost... I have local cache collections setup in my script: loadmodule "cachedb_local.so" modparam("cachedb_local", "cache_collections", "general; other;") modparam("cachedb_local", "cachedb_url", "local:general:///general") modparam("cachedb_local", "cachedb_url", "local:other:///other") I want to be able to use opensips-cli to clear the contents of the "other" collection from the command line or a script without needing to restart OpenSIPS or losing the contents of the "general" cache collection. I've looked at the cachedb_local documentation for exported MI functions but I don't understand how this translates into a valid opensips-cli command. Any help gratefully received! :D -------------- next part -------------- An HTML attachment was scrubbed... URL: From vladp at opensips.org Fri Nov 20 13:19:01 2020 From: vladp at opensips.org (Vlad Patrascu) Date: Fri, 20 Nov 2020 15:19:01 +0200 Subject: [OpenSIPS-Users] Clear local cache collection without OpenSIPS 3.1 restart In-Reply-To: References: <1e542087-622b-5850-499e-762808139a89@opensips.org> Message-ID: <7852e408-2af2-a9fe-f53c-75c6c1aa388b@opensips.org> Hi Mark, The command you should run is: opensips-cli -x mi cache_remove_chunk * other I will also update the docs as the example is outdated so thanks for pointing it out! Regards, -- Vlad Patrascu OpenSIPS Developer http://www.opensips-solutions.com On 20.11.2020 13:47, Mark Allen wrote: > I have local cache collections setup in my script: > > loadmodule "cachedb_local.so" >     modparam("cachedb_local", "cache_collections", "general; other;") >     modparam("cachedb_local", "cachedb_url", "local:general:///general") >     modparam("cachedb_local", "cachedb_url", "local:other:///other") > > I want to be able to use opensips-cli to clear the contents of the > "other" collection from the command line or a script without needing > to restart OpenSIPS or losing the contents of the "general" cache > collection. I've looked at the cachedb_local documentation for > exported MI functions but I don't understand how this translates into > a valid opensips-cli command. > > Any help gratefully received!   :D > > > _______________________________________________ > 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 mark at allenclan.co.uk Fri Nov 20 13:25:39 2020 From: mark at allenclan.co.uk (Mark Allen) Date: Fri, 20 Nov 2020 13:25:39 +0000 Subject: [OpenSIPS-Users] Clear local cache collection without OpenSIPS 3.1 restart In-Reply-To: <7852e408-2af2-a9fe-f53c-75c6c1aa388b@opensips.org> References: <1e542087-622b-5850-499e-762808139a89@opensips.org> <7852e408-2af2-a9fe-f53c-75c6c1aa388b@opensips.org> Message-ID: thanks Vlad - I've tried it but I get ERROR: command 'cache_remove_chunk' returned: -32602: Invalid params On Fri, 20 Nov 2020 at 13:21, Vlad Patrascu wrote: > Hi Mark, > > The command you should run is: > > opensips-cli -x mi cache_remove_chunk * other > > I will also update the docs as the example is outdated so thanks for > pointing it out! > > Regards, > > -- > Vlad Patrascu > OpenSIPS Developerhttp://www.opensips-solutions.com > > On 20.11.2020 13:47, Mark Allen wrote: > > I have local cache collections setup in my script: > > loadmodule "cachedb_local.so" > modparam("cachedb_local", "cache_collections", "general; other;") > modparam("cachedb_local", "cachedb_url", "local:general:///general") > modparam("cachedb_local", "cachedb_url", "local:other:///other") > > I want to be able to use opensips-cli to clear the contents of the "other" > collection from the command line or a script without needing to restart > OpenSIPS or losing the contents of the "general" cache collection. I've > looked at the cachedb_local documentation for exported MI functions but I > don't understand how this translates into a valid opensips-cli command. > > Any help gratefully received! :D > > > _______________________________________________ > Users mailing listUsers at lists.opensips.orghttp://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 vladp at opensips.org Fri Nov 20 13:40:48 2020 From: vladp at opensips.org (Vlad Patrascu) Date: Fri, 20 Nov 2020 15:40:48 +0200 Subject: [OpenSIPS-Users] Clear local cache collection without OpenSIPS 3.1 restart In-Reply-To: References: <1e542087-622b-5850-499e-762808139a89@opensips.org> <7852e408-2af2-a9fe-f53c-75c6c1aa388b@opensips.org> Message-ID: <51a537a4-f439-041e-6d9d-5c9ac18582ac@opensips.org> I did forget to escape the "*" character in the example I gave, so this should work: opensips-cli -x mi cache_remove_chunk "*" other Regards, -- Vlad Patrascu OpenSIPS Developer http://www.opensips-solutions.com On 20.11.2020 15:25, Mark Allen wrote: > thanks Vlad - I've tried it but I get > > ERROR: command 'cache_remove_chunk' returned: -32602: Invalid params > > On Fri, 20 Nov 2020 at 13:21, Vlad Patrascu > wrote: > > Hi Mark, > > The command you should run is: > > opensips-cli -x mi cache_remove_chunk * other > > I will also update the docs as the example is outdated so thanks > for pointing it out! > > Regards, > > -- > Vlad Patrascu > OpenSIPS Developer > http://www.opensips-solutions.com > > On 20.11.2020 13:47, Mark Allen wrote: >> I have local cache collections setup in my script: >> >> loadmodule "cachedb_local.so" >>     modparam("cachedb_local", "cache_collections", "general; other;") >>     modparam("cachedb_local", "cachedb_url", >> "local:general:///general") >>     modparam("cachedb_local", "cachedb_url", "local:other:///other") >> >> I want to be able to use opensips-cli to clear the contents of >> the "other" collection from the command line or a script without >> needing to restart OpenSIPS or losing the contents of the >> "general" cache collection. I've looked at the cachedb_local >> documentation for exported MI functions but I don't understand >> how this translates into a valid opensips-cli command. >> >> Any help gratefully received!   :D >> >> >> _______________________________________________ >> 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 mark at allenclan.co.uk Fri Nov 20 13:46:06 2020 From: mark at allenclan.co.uk (Mark Allen) Date: Fri, 20 Nov 2020 13:46:06 +0000 Subject: [OpenSIPS-Users] Clear local cache collection without OpenSIPS 3.1 restart In-Reply-To: <51a537a4-f439-041e-6d9d-5c9ac18582ac@opensips.org> References: <1e542087-622b-5850-499e-762808139a89@opensips.org> <7852e408-2af2-a9fe-f53c-75c6c1aa388b@opensips.org> <51a537a4-f439-041e-6d9d-5c9ac18582ac@opensips.org> Message-ID: Bingo! That did the job! Thanks very much for that Vlad - you've saved me hours of head-scratching! On Fri, 20 Nov 2020 at 13:42, Vlad Patrascu wrote: > I did forget to escape the "*" character in the example I gave, so this > should work: > > opensips-cli -x mi cache_remove_chunk "*" other > > Regards, > > -- > Vlad Patrascu > OpenSIPS Developerhttp://www.opensips-solutions.com > > On 20.11.2020 15:25, Mark Allen wrote: > > thanks Vlad - I've tried it but I get > > ERROR: command 'cache_remove_chunk' returned: -32602: Invalid params > > On Fri, 20 Nov 2020 at 13:21, Vlad Patrascu wrote: > >> Hi Mark, >> >> The command you should run is: >> >> opensips-cli -x mi cache_remove_chunk * other >> >> I will also update the docs as the example is outdated so thanks for >> pointing it out! >> >> Regards, >> >> -- >> Vlad Patrascu >> OpenSIPS Developerhttp://www.opensips-solutions.com >> >> On 20.11.2020 13:47, Mark Allen wrote: >> >> I have local cache collections setup in my script: >> >> loadmodule "cachedb_local.so" >> modparam("cachedb_local", "cache_collections", "general; other;") >> modparam("cachedb_local", "cachedb_url", "local:general:///general") >> modparam("cachedb_local", "cachedb_url", "local:other:///other") >> >> I want to be able to use opensips-cli to clear the contents of the >> "other" collection from the command line or a script without needing to >> restart OpenSIPS or losing the contents of the "general" cache collection. >> I've looked at the cachedb_local documentation for exported MI functions >> but I don't understand how this translates into a valid opensips-cli >> command. >> >> Any help gratefully received! :D >> >> >> _______________________________________________ >> Users mailing listUsers at lists.opensips.orghttp://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 listUsers at lists.opensips.orghttp://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 rmartinez at redvoiss.net Fri Nov 20 14:41:22 2020 From: rmartinez at redvoiss.net (Ricardo Martinez) Date: Fri, 20 Nov 2020 11:41:22 -0300 Subject: [OpenSIPS-Users] Weird problem with NATHELPER Message-ID: Hi. I’m facing a weird problem with the NATHELPER module. I’m using Opensips 3.1.0. Seems that for certains REGISTER messages the nathelper module can fix the Contact IP address with the fix_nated_register() function. I don’t know if I’m missing something or maybe is a bug. So, this is the scenarario. I have opensips in front of a PBX, using the NATHELPER module for NAT traversal and the MID_REGISTER module for managing the REGISTER messages to the PBX Local PBX – Opensips (NATHELPE + REGISTER) --- UAC The UAC is a softphone in a local WiFi network, when the softphone register for the first time I can see the REGISTER flow OK, NATHELPER module changing the private IP with the public received IP and port. This is the initial register: 2020/11/20 11:05:21.150428 186.106.166.154:44849 -> 64.76.XXX.133:5060 REGISTER sip:my.domain.com:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.83:44849 ;branch=z9hG4bK-524287-1---10f17e71be522f67;rport Max-Forwards: 70 Contact: ;+sip.instance="";reg-id=1 To: "User 920" From: "User 920";tag=4fa4f17b Call-ID: 186079_mobile-rel120NjE4M2U3MWEzMjFhYjRmZDM0NGQyYWNkYWJjZjliNjA CSeq: 1 REGISTER Expires: 300 Allow: OPTIONS, INVITE, ACK, CANCEL, BYE, REFER, INFO, NOTIFY, UPDATE, PRACK, SUBSCRIBE, MESSAGE Supported: outbound, path User-Agent: VEX Android 6.3.1.1 build 122490 Content-Length: 0 And the output for the command ul_dump [root at sbcar opensips]# opensips-cli -x mi ul_dump { "Domains": [ { "name": "location", "hash_size": 4096, "AORs": [ { "AOR": "d1.920-mydomain1", "Contacts": [ { "Contact": " sip:d1.920 at 186.106.166.154:44849;rinstance=e21f207006bd104d", "ContactID": "933089547795829631", "Expires": 290, "Q": "", "Callid": "186079_mobile-rel120NjE4M2U3MWEzMjFhYjRmZDM0NGQyYWNkYWJjZjliNjA", "Cseq": 10, "User-agent": "VEX Android 6.3.1.1 build 122490", "Received": "sip:186.106.166.154:44849", "State": "CS_NEW", "Flags": 0, "Cflags": "SIP_PING NAT", "Socket": "udp:64.76.XXX.133:5060", "Methods": 8063, "SIP_instance": "" So far so good. But, the softphone is an app in a mobile phone, so at some point the softphone “goes to sleep”, and my “PUSH” server takes control. So the Push server REGISTERS on behalf of the softphone… the REGISTER arrives at the Opensip, again from a NATED environment, so the uac_nat_test(19) catch the REGISTER, and apply fix_nated_register. But for some reason I don’t get the stored “Contact” keeps the “private” IP. This is the “new” REGISTER for the PUSH SERVER…. 2020/11/20 11:06:21.333836 216.93.246.120:5060 -> 64.76.XXX.133:5060 REGISTER sip:my.domain.com:5060 SIP/2.0 Via: SIP/2.0/UDP 10.10.223.107:5060 ;branch=z9hG4bK-524287-1---4703675abd3a9c18;rport Max-Forwards: 70 Contact: < sip:d1.920 at 10.10.223.107:5060;rinstance=d1.920-d789e5c341f8ac524c0a3441cded7ba6 >;+sip.instance="";reg-id=1;expires=600 To: From: ;tag=cfad065a Call-ID: txOBq9Lhk1tSVlM9eOTdzA.. at 216.93.246.122 CSeq: 1 REGISTER Expires: 600 Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, MESSAGE, OPTIONS, PRACK, REGISTER, UPDATE User-Agent: CounterPath Bria Push Server 2.3.0 (20980) Content-Length: 0 And this is the locations table. [root at sbcar opensips]# opensips-cli -x mi ul_dump { "Domains": [ { "name": "location", "hash_size": 4096, "AORs": [ { "AOR": "d1.920-mydomain", "Contacts": [ { "Contact": " sip:d1.920 at 10.10.223.107:5060;rinstance=d1.920-d789e5c341f8ac524c0a3441cded7ba6 ", "ContactID": "933089547795829633", "Expires": 587, "Q": "", "Callid": " txOBq9Lhk1tSVlM9eOTdzA.. at 216.93.246.122", "Cseq": 2, "User-agent": "CounterPath Bria Push Server 2.3.0 (20980)", "Received": "sip:216.93.246.120:5060", "State": "CS_NEW", "Flags": 0, "Cflags": "SIP_PING NAT", "Socket": "udp:64.76.XXX.133:5060", "Methods": 3567, "SIP_instance": "" Does someone have a clue on this? Thanks! *Ricardo Martinez* -------------- next part -------------- An HTML attachment was scrubbed... URL: From farmorg at gmail.com Fri Nov 20 14:48:42 2020 From: farmorg at gmail.com (Mark Farmer) Date: Fri, 20 Nov 2020 14:48:42 +0000 Subject: [OpenSIPS-Users] Force rtpmap:101 In-Reply-To: References: Message-ID: Bump Sorry all to ask again, I'm getting a bit confused now. My trunk provider says that I need to reply 488 in order to change the rtpmap:100 to 101. I have seen posts about using transcode-telephone-event and always-transcode (this one is not listed in the OpenSIPS doc for rtpengine) and I can see there is an option to add a body part. So I'm wondering if I should: A. Use transcoding, although I don't understand how to get it to use rtpmap: 101 B. Intercept the INVITE, strip out the unwanted rtpmap line and reply 488 after using rtpengine module to add a body part to specify rtpmap: 101 C. Something else? Am I on the right track at all here? Mark. On Tue, 17 Nov 2020 at 11:57, Mark Farmer wrote: > Hi everyone > > I am getting some INVITE's that are requesting a=rtpmap:100 > telephone-event/8000 and some other codecs too which is breaking DTMF. > > What I really need to do is to force a=rtpmap:101 telephone-event/8000 in > the replies. > Can anyone tell me how to do this please? I've been looking at the docs > but I'm struggling with this one. > > I am using RTPEngine and OpenSIPS 3.0 > > Many thanks! > Mark. > > -- Mark Farmer farmorg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ag at ag-projects.com Sat Nov 21 13:27:53 2020 From: ag at ag-projects.com (Adrian Georgescu) Date: Sat, 21 Nov 2020 10:27:53 -0300 Subject: [OpenSIPS-Users] New MediaProxy release 4.0.4 Message-ID: <7F1E89CB-FA63-47E1-A933-6678E5853EA5@ag-projects.com> Hello, There is a new MediaProxy release compatible with Python 3. The binary .deb package is available for Debian Sid in AG Projects Debian repository. To install or upgrade see instructions from: http://mediaproxy.ag-projects.com mediaproxy (4.0.4) unstable; urgency=medium * Migration to Python 3 * Fixed checking relay passport * Fix for fetching statistics * Added gracefull shutdown option to systemd unit using reload command * Remove invalid argument to loseConnection * Fix removing expired sessions * Add SIP call-id to logging * Improve logging at start * Added libiptc-dev build dependency * Log which dispatchers will be used * Use local logger for traffic * Log call statistics * Fixed logging of radius configurations * Improve log line for used TLS certificate * Allow use of configured dispatchers in Thor mode * Added logs about TLS certificates loaded at start * Log remote certificate common name for all TLS connections * Fixed sending back expired event to dispatcher Regards, Adrian From abdoul.osseni at gmail.com Mon Nov 23 13:20:53 2020 From: abdoul.osseni at gmail.com (=?UTF-8?Q?Abdoul_Oss=C3=A9ni?=) Date: Mon, 23 Nov 2020 14:20:53 +0100 Subject: [OpenSIPS-Users] ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip message In-Reply-To: References: Message-ID: Hello Team, Any chance to get an update? Thank you. Abdoul OSSENI Le mer. 18 nov. 2020 à 10:49, Abdoul Osséni a écrit : > Hello, > > When topology_hiding module is enable, we have somes errors: > > Nov 18 10:47:17 sd-105918 /usr/local/sbin/opensips[32484]: > ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip > message: HEP3#004% > Nov 18 10:47:20 sd-105918 /usr/local/sbin/opensips[32486]: > ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip > message: HEP3#002? > Nov 18 10:47:20 sd-105918 /usr/local/sbin/opensips[32486]: > ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip > message: HEP3#002o > Nov 18 10:47:20 sd-105918 /usr/local/sbin/opensips[32486]: > ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip > message: HEP3#002 > Nov 18 10:47:20 sd-105918 /usr/local/sbin/opensips[32486]: > ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip > message: HEP3#002? > Nov 18 10:47:26 sd-105918 /usr/local/sbin/opensips[32484]: > ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip > message: HEP3#002? > Nov 18 10:47:26 sd-105918 /usr/local/sbin/opensips[32484]: > ERROR:topology_hiding:topo_callid_post_raw: could not parse resulted sip > message: HEP3#004#027 > > It seems this issue was fixed on opensips 3.1.1 but it persists. > > ~# opensips -V > version: opensips 3.1.1 (x86_64/linux) > flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, > Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_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: 229ec0793 > main.c compiled on 22:30:49 Nov 17 2020 with gcc 6.3.0 > > Regards > > > Abdoul OSSENI > -------------- next part -------------- An HTML attachment was scrubbed... URL: From spanda at 3clogic.com Tue Nov 24 08:21:21 2020 From: spanda at 3clogic.com (Sasmita Panda) Date: Tue, 24 Nov 2020 13:51:21 +0530 Subject: [OpenSIPS-Users] using mongodb for dynamic routing . In-Reply-To: References: Message-ID: Hi, In opensips-3.1 When I am using dynamic routing to do random distribution of calls on the gateway based on their weight . Its not working .Always call goes to the first gateway . failover used to work . If a call fails with the 1st gateway then it goes to the next gateway . My DB looks like below . mysql> select * from dr_gateways; +----+------+------+----------------------+-------+------------+-------+------------+-------+--------+------------------+ | id | gwid | type | address | strip | pri_prefix | attrs | probe_mode | state | socket | description | +----+------+------+----------------------+-------+------------+-------+------------+-------+--------+------------------+ | 1 | gw1 | 3 | 1.1.1.1:5080 | 0 | | | 0 | 0 | NULL | 0 | | 3 | gw2 | 3 | 2.2.2.2:5080 | 0 | NULL | NULL | 0 | 0 | NULL | testing gateway2 | +----+------+------+----------------------+-------+------------+-------+------------+-------+--------+------------------+ 2 rows in set (0.00 sec) mysql> select * from dr_carriers; +----+-----------+-------------+-------+----------+-------+-------+-------------------------+ | id | carrierid | gwlist | flags | sort_alg | state | attrs | description | +----+-----------+-------------+-------+----------+-------+-------+-------------------------+ | 1 | ca3 | gw1=10,gw2=10 | 1 | N | 0 | NULL | homer load random calls | +----+-----------+-------------+-------+----------+-------+-------+-------------------------+ 1 row in set (0.00 sec) mysql> select * from dr_rules; +--------+---------+--------+---------+----------+---------+--------+----------+--------------+-------+--------------------+ | ruleid | groupid | prefix | timerec | priority | routeid | gwlist | sort_alg | sort_profile | attrs | description | +--------+---------+--------+---------+----------+---------+--------+----------+--------------+-------+--------------------+ | 1 | 1 | | | 0 | | #ca3 | | 0 | | Freeswitch_gateway | +--------+---------+--------+---------+----------+---------+--------+----------+--------------+-------+--------------------+ OR mysql> select * from dr_rules; +--------+---------+--------+---------+----------+---------+--------+----------+--------------+-------+--------------------+ | ruleid | groupid | prefix | timerec | priority | routeid | gwlist | sort_alg | sort_profile | attrs | description | +--------+---------+--------+---------+----------+---------+--------+----------+--------------+-------+--------------------+ | 1 | 1 | | | 0 | | gw1=10,gw2=10 | | 0 | | Freeswitch_gateway | +--------+---------+--------+---------+----------+---------+--------+----------+--------------+-------+--------------------+ In my config file the function is like do_routing(,"W") Till opensips-3.0 I have tested this function and this was working fine . Opensips used to fork calls randomly within the gateways when both have similar weight . But in opensips-3.1 its not working . I have tested this with mysql and mongodb also . In both case it's not working . In openisps-1.11 even I am not setting this "W" flag in the function still its working . Am I doing something wrong ? Please assist me . *Thanks & Regards* *Sasmita Panda* *Senior Network Testing and Software Engineer* *3CLogic , ph:07827611765* On Thu, Nov 19, 2020 at 4:33 PM Liviu Chircu wrote: > On 19.11.2020 07:26, Sasmita Panda wrote: > > > I am using opensips-3.1 with backend DB as mongodb . I am facing some > problem while using dynamic routing module . > > *ERROR:drouting:dr_load_routing_info: column gwid has a bad type [4], > accepting **only [3]* > *.....................* > *CRITICAL:drouting:dr_reload_data_head: failed to load routing info* > > Hi, Sasmita! > > Could you apply the following patch in your OpenSIPS 3.1 source code root > directory, rebuild and see if the problem goes away? > > git apply <(base64 -d < > H4sIAEZQtl8AA+1UbW/bNhD+HP2KS4Cmst4iu46TLXDRBkmKAWk7pGmBIg0IiqIcwTLpilQ3r+h/ > > 35GUZNdYuqZfug8TIFE83T187u455WVRQBzPSg30YCHzpuLqgFF2x/OMLKSYyTzb3pM8o4onDLKH > > RnilyPmfkBVsmI5GI5Yk40l2dDiaFAyGaToZj704jh/OxAvD8AfYPHsG8fDJZBwNRxC6lzGgsRQa > > rC96ko8Nr1dE11QovwNiUkCAjwjwoTQoXUOgaVbxzoJOc45hEJB55MGOvcBdhN2w2/hpxTG+fVcR > > vHt+Sc5evz29PPdZU5NPtBoMTrrIrOZ03u0YsofTN69fkev3v5+Tt9cXx796sXM0KMbaY8AUzk7J > > m+urHkvpRKHVZ3cUWQ8yJQUpNa9Jo4tjf9+8RuA3QpUzwXNbjGCwj1FIGBm1B5UF+Mv5jAhNMHuS > > N0t/3xyOJ/VnR4BhA9idQjqAz154f6TSW74t153Ll+T86srfk3LxQeytC7Izk1qCbDThdd1bv3hh > > d8r9hfjt1YuTTS9n2vQzFeoxjcvF1flXQMP+K/I7O33h713IRuRGB6WYwc2jJFC3U7cg7e8TgKuw > > XRUmmm9OZqOTOxS4WdoZOqTjo2P2y/A4SfJxwXnGc/71DFlnNxj21aj96BA1nkJoV6t1pakuGXa5 > > KgW3zVZ3i74xuAaQm+70Qg9A1WzgwUHgAQTwks45UPy8XIEsgAo7DHg3TDc1h0aZihjMBa0qyUwQ > > 1iE0njTPS11KQSt4/CF9DNlK4wApCSvZAEOHhQFvUO2IjCywTF4IgbnNFqZTwwVKBQb6D57vGvQD > > 756kNgT3jbw+o8KNRHdxiwc64a7HnJgTpxDgcmLVZn2NNVGtcBd8obj2LXyK+ZR/ceQf4N7pt+ZY > > GQGp2XxxbZlMoicTbMtRGo2/0Zbvy8BRcvVqKXVjJCTi0BrHGknKegUVL3Q/WDYENYj5pXZEDNC6 > > 0AM7NYE12DpsZhMPXTqA5UNstlz5jkEErpDt2v1ENs7q7L1Z3XRfb/GzkYZhs4XqSt6uDjXcRO3s > > vVnddKY1Kmw2w5B/mKzNb+ynynrrP/ofkjX0zUTYdZ38rtlYquG6ZVtOXaNap39R9LIuP1HN/5f0 > P0v6b8a6yW7jCQAA > EOF > ) > > Cheers, > > -- > Liviu Chircuwww.twitter.com/liviuchircu | www.opensips-solutions.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 liviu at opensips.org Tue Nov 24 09:17:57 2020 From: liviu at opensips.org (Liviu Chircu) Date: Tue, 24 Nov 2020 11:17:57 +0200 Subject: [OpenSIPS-Users] using mongodb for dynamic routing . In-Reply-To: References: Message-ID: <0e3ecd33-6e46-8037-0869-9a6485132dea@opensips.org> On 24.11.2020 10:21, Sasmita Panda wrote: > > In my config file the function is like > do_routing(,"W") > > Till opensips-3.0 I have tested this function and this was working > fine . Opensips used to fork calls randomly within the gateways when > both have similar weight . > But in opensips-3.1 its not working . I have tested this with mysql > and mongodb also . In both case it's not working  . In openisps-1.11 > even I am not setting this "W" flag in the function still its working . Hi, Sasmita! In 3.1, the sorting logic has been moved at table level, as part of the integration of the "qrouting" module (see the "sort_alg" columns for `dr_rules` and `dr_carriers`).  As far as I can remember, the "W" flag of do_routing() has no purpose anymore in this new scheme of things.  I will look into cleaning up the docs if it is still there, thanks! TL;DR: the solution is to put "W" into the `dr_rules.sort_alg` field.  Let me know if this fixes your issue. Best regards, -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com From spanda at 3clogic.com Tue Nov 24 10:04:14 2020 From: spanda at 3clogic.com (Sasmita Panda) Date: Tue, 24 Nov 2020 15:34:14 +0530 Subject: [OpenSIPS-Users] using mongodb for dynamic routing . In-Reply-To: <0e3ecd33-6e46-8037-0869-9a6485132dea@opensips.org> References: <0e3ecd33-6e46-8037-0869-9a6485132dea@opensips.org> Message-ID: Hi Liviu, Thank u so much . It works . flag based routing is still there is the doc . please do update that if possible. Thanks again . *Thanks & Regards* *Sasmita Panda* *Senior Network Testing and Software Engineer* *3CLogic , ph:07827611765* On Tue, Nov 24, 2020 at 2:48 PM Liviu Chircu wrote: > On 24.11.2020 10:21, Sasmita Panda wrote: > > > > In my config file the function is like > > do_routing(,"W") > > > > Till opensips-3.0 I have tested this function and this was working > > fine . Opensips used to fork calls randomly within the gateways when > > both have similar weight . > > But in opensips-3.1 its not working . I have tested this with mysql > > and mongodb also . In both case it's not working . In openisps-1.11 > > even I am not setting this "W" flag in the function still its working . > > Hi, Sasmita! > > In 3.1, the sorting logic has been moved at table level, as part of the > integration of the "qrouting" module (see the "sort_alg" columns for > `dr_rules` and `dr_carriers`). As far as I can remember, the "W" flag > of do_routing() has no purpose anymore in this new scheme of things. I > will look into cleaning up the docs if it is still there, thanks! > > TL;DR: the solution is to put "W" into the `dr_rules.sort_alg` field. > Let me know if this fixes your issue. > > Best regards, > > -- > Liviu Chircu > www.twitter.com/liviuchircu | www.opensips-solutions.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andyvoicetek at gmail.com Tue Nov 24 13:00:29 2020 From: andyvoicetek at gmail.com (Andy Kama) Date: Tue, 24 Nov 2020 13:00:29 +0000 Subject: [OpenSIPS-Users] dispatcher is_in_list Message-ID: Hi Guys How can i specify which id to use? i want to tell opensips to look in dispatcher and if invite is from a specific dispatcher to route to a certain place etc -------------- next part -------------- An HTML attachment was scrubbed... URL: From farmorg at gmail.com Tue Nov 24 14:12:10 2020 From: farmorg at gmail.com (Mark Farmer) Date: Tue, 24 Nov 2020 14:12:10 +0000 Subject: [OpenSIPS-Users] opensips-cli Apt Error in Ubuntu Focal Message-ID: Hi everyone I added the apt repo for opensips-cli on Ubuntu Focal as per: https://apt.opensips.org/packages.php?v=cli apt-get update Hit:1 http://gb.archive.ubuntu.com/ubuntu focal InRelease Hit:2 http://gb.archive.ubuntu.com/ubuntu focal-updates InRelease Hit:3 http://gb.archive.ubuntu.com/ubuntu focal-backports InRelease Hit:4 http://gb.archive.ubuntu.com/ubuntu focal-security InRelease Ign:5 https://apt.opensips.org focal InRelease Hit:6 https://apt.opensips.org focal Release Reading package lists... Done W: Skipping acquire of configured file 'cli-releases/binary-amd64/Packages' as repository 'https://apt.opensips.org focal InRelease' doesn't have the component 'cli-releases' (component misspelt in sources.list?) W: Skipping acquire of configured file 'cli-releases/i18n/Translation-en_US' as repository ' https://apt.opensips.org focal InRelease' doesn't have the component 'cli-releases' (component misspelt in sources.list?) W: Skipping acquire of configured file 'cli-releases/i18n/Translation-en' as repository 'https://apt.opensips.org focal InRelease' doesn't have the component 'cli-releases' (component misspelt in sources.list?) W: Skipping acquire of configured file 'cli-releases/Contents-amd64' as repository 'https://apt.opensips.org focal InRelease' doesn't have the component 'cli-releases' (component misspelt in sources.list?) W: Skipping acquire of configured file 'cli-releases/cnf/Commands-amd64' as repository 'https://apt.opensips.org focal InRelease' doesn't have the component 'cli-releases' (component misspelt in sources.list?) Is there an issue with the repo? Best regards Mark. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alain.bieuzent at free.fr Tue Nov 24 15:16:12 2020 From: alain.bieuzent at free.fr (Alain Bieuzent) Date: Tue, 24 Nov 2020 16:16:12 +0100 Subject: [OpenSIPS-Users] dispatcher is_in_list In-Reply-To: References: Message-ID: Hi Andy, Try with this ; $var(IP) = $(avp(IP){uri.host}); if (!ds_is_in_list("$var(IP)",5060,1, ,1)) ….. Regards De : Users au nom de Andy Kama Répondre à : OpenSIPS users mailling list Date : mardi 24 novembre 2020 à 14:02 À : Objet : [OpenSIPS-Users] dispatcher is_in_list Hi Guys How can i specify which id to use? i want to tell opensips to look in dispatcher and if invite is from a specific dispatcher to route to a certain place etc _______________________________________________ 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 nick at altmann.pro Tue Nov 24 16:00:01 2020 From: nick at altmann.pro (Nick Altmann) Date: Tue, 24 Nov 2020 17:00:01 +0100 Subject: [OpenSIPS-Users] opensips-cli Apt Error in Ubuntu Focal In-Reply-To: References: Message-ID: There is no opensips-cli build for ubuntu focal yet, but I'll fix this soon (in a few days). -- Nick вт, 24 нояб. 2020 г. в 15:13, Mark Farmer : > Hi everyone > > I added the apt repo for opensips-cli on Ubuntu Focal as per: > https://apt.opensips.org/packages.php?v=cli > > apt-get update > Hit:1 http://gb.archive.ubuntu.com/ubuntu focal InRelease > Hit:2 http://gb.archive.ubuntu.com/ubuntu focal-updates InRelease > Hit:3 http://gb.archive.ubuntu.com/ubuntu focal-backports InRelease > Hit:4 http://gb.archive.ubuntu.com/ubuntu focal-security InRelease > Ign:5 https://apt.opensips.org focal InRelease > Hit:6 https://apt.opensips.org focal Release > Reading package lists... Done > W: Skipping acquire of configured file > 'cli-releases/binary-amd64/Packages' as repository ' > https://apt.opensips.org focal InRelease' doesn't have the component > 'cli-releases' (component misspelt in sources.list?) > W: Skipping acquire of configured file > 'cli-releases/i18n/Translation-en_US' as repository ' > https://apt.opensips.org focal InRelease' doesn't have the component > 'cli-releases' (component misspelt in sources.list?) > W: Skipping acquire of configured file 'cli-releases/i18n/Translation-en' > as repository 'https://apt.opensips.org focal InRelease' doesn't have the > component 'cli-releases' (component misspelt in sources.list?) > W: Skipping acquire of configured file 'cli-releases/Contents-amd64' as > repository 'https://apt.opensips.org focal InRelease' doesn't have the > component 'cli-releases' (component misspelt in sources.list?) > W: Skipping acquire of configured file 'cli-releases/cnf/Commands-amd64' > as repository 'https://apt.opensips.org focal InRelease' doesn't have the > component 'cli-releases' (component misspelt in sources.list?) > > Is there an issue with the repo? > > Best regards > Mark. > > _______________________________________________ > 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 bpasquet at openip.fr Tue Nov 24 16:06:02 2020 From: bpasquet at openip.fr (Benjamin Pasquet) Date: Tue, 24 Nov 2020 16:06:02 +0000 Subject: [OpenSIPS-Users] Clusterer module and domain name Message-ID: Hi guys, I'm working on opensips v2.4.8 and clusterer module with domain name identifier. I use db_mysql with the table clusterer, and set a domain name identifier into the url column, like : bin:node1.domain.com:5566. I listen on the domain name into my script, like : listen=bin:node1.domain.com:5566. OpenSIPS do a nslookup at startup on this domain name and listen on the good IP without any issue. When OpenSIPS is loading the clusterer module from db, the domain names of neighboors are resolved, OpenSIPS send ping and got a reply without any issue. All nodes of my cluster are UP. But, if a node already UP restart with a new IP, startup ok, but impossible to join the other cluster nodes. A clusterer_reload is needed on each others nodes to accept the node who has restared with a new IP. Its normal? How does it work? OpenSIPS put in cache at startup the IPs of neighboors and forget the domain name? Without TTL? I have tried to use the dns_cache module to see if any entry will be set but no. Thanks per advance, Benjamin -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmartinez at redvoiss.net Wed Nov 25 13:56:03 2020 From: rmartinez at redvoiss.net (Ricardo Martinez) Date: Wed, 25 Nov 2020 10:56:03 -0300 Subject: [OpenSIPS-Users] Weird problem with NATHELPER In-Reply-To: f133f3830af548d0daa9983723c83095@mail.gmail.com References: f133f3830af548d0daa9983723c83095@mail.gmail.com Message-ID: <2867c56e56561cbc1596c93097a4983e@mail.gmail.com> Hi. Sorry to keep this conversation open. I’m still facing this problem and I don’t know why is happening. The Contact stored in the “location” table keeps the Private IP, despite the fact is fix_nated_register(). { "AOR": "d1.920-mydomain", { "Contact": " sip:d1.920 at 10.10.180.129:5060;rinstance=d1.920-d789e5c341f8ac524c0a3441cded7ba6 ", "ContactID": "933089547795847775", "Expires": 518, "Q": "", "Callid": " KT7tdOfXzroglNwpU5gYrg.. at 216.93.246.121", "Cseq": 2, "User-agent": "CounterPath Bria Push Server 2.3.0 (20980)", "Received": "sip:216.93.246.120:5060", "State": "CS_NEW", "Flags": 0, "Cflags": "SIP_PING NAT", "Socket": "udp:64.76.XXX.133:5060", "Methods": 3567, "SIP_instance": "" And INVITE to this extension flows ok… but the ACK to the 200 OK still goes to the Private IP In the contact header. The thing I don’t get, as I explained in the preview mail, is why the FIRST REGISTER the CONTACT is fixed, but for the second REGISTER (from the Push Server) the contact is not fixed… (despite the fact it has a Received parameter). Ay cloue?. Thanks! Ricardo *De:* Ricardo Martinez *Enviado el:* viernes, 20 de noviembre de 2020 11:41 *Para:* 'OpenSIPS users mailling list' *Asunto:* Weird problem with NATHELPER Hi. I’m facing a weird problem with the NATHELPER module. I’m using Opensips 3.1.0. Seems that for certains REGISTER messages the nathelper module can fix the Contact IP address with the fix_nated_register() function. I don’t know if I’m missing something or maybe is a bug. So, this is the scenarario. I have opensips in front of a PBX, using the NATHELPER module for NAT traversal and the MID_REGISTER module for managing the REGISTER messages to the PBX Local PBX – Opensips (NATHELPE + REGISTER) --- UAC The UAC is a softphone in a local WiFi network, when the softphone register for the first time I can see the REGISTER flow OK, NATHELPER module changing the private IP with the public received IP and port. This is the initial register: 2020/11/20 11:05:21.150428 186.106.166.154:44849 -> 64.76.XXX.133:5060 REGISTER sip:my.domain.com:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.83:44849 ;branch=z9hG4bK-524287-1---10f17e71be522f67;rport Max-Forwards: 70 Contact: ;+sip.instance="";reg-id=1 To: "User 920" From: "User 920";tag=4fa4f17b Call-ID: 186079_mobile-rel120NjE4M2U3MWEzMjFhYjRmZDM0NGQyYWNkYWJjZjliNjA CSeq: 1 REGISTER Expires: 300 Allow: OPTIONS, INVITE, ACK, CANCEL, BYE, REFER, INFO, NOTIFY, UPDATE, PRACK, SUBSCRIBE, MESSAGE Supported: outbound, path User-Agent: VEX Android 6.3.1.1 build 122490 Content-Length: 0 And the output for the command ul_dump [root at sbcar opensips]# opensips-cli -x mi ul_dump { "Domains": [ { "name": "location", "hash_size": 4096, "AORs": [ { "AOR": "d1.920-mydomain1", "Contacts": [ { "Contact": " sip:d1.920 at 186.106.166.154:44849;rinstance=e21f207006bd104d", "ContactID": "933089547795829631", "Expires": 290, "Q": "", "Callid": "186079_mobile-rel120NjE4M2U3MWEzMjFhYjRmZDM0NGQyYWNkYWJjZjliNjA", "Cseq": 10, "User-agent": "VEX Android 6.3.1.1 build 122490", "Received": "sip:186.106.166.154:44849", "State": "CS_NEW", "Flags": 0, "Cflags": "SIP_PING NAT", "Socket": "udp:64.76.XXX.133:5060", "Methods": 8063, "SIP_instance": "" So far so good. But, the softphone is an app in a mobile phone, so at some point the softphone “goes to sleep”, and my “PUSH” server takes control. So the Push server REGISTERS on behalf of the softphone… the REGISTER arrives at the Opensip, again from a NATED environment, so the uac_nat_test(19) catch the REGISTER, and apply fix_nated_register. But for some reason I don’t get the stored “Contact” keeps the “private” IP. This is the “new” REGISTER for the PUSH SERVER…. 2020/11/20 11:06:21.333836 216.93.246.120:5060 -> 64.76.XXX.133:5060 REGISTER sip:my.domain.com:5060 SIP/2.0 Via: SIP/2.0/UDP 10.10.223.107:5060 ;branch=z9hG4bK-524287-1---4703675abd3a9c18;rport Max-Forwards: 70 Contact: < sip:d1.920 at 10.10.223.107:5060;rinstance=d1.920-d789e5c341f8ac524c0a3441cded7ba6 >;+sip.instance="";reg-id=1;expires=600 To: From: ;tag=cfad065a Call-ID: txOBq9Lhk1tSVlM9eOTdzA.. at 216.93.246.122 CSeq: 1 REGISTER Expires: 600 Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, MESSAGE, OPTIONS, PRACK, REGISTER, UPDATE User-Agent: CounterPath Bria Push Server 2.3.0 (20980) Content-Length: 0 And this is the locations table. [root at sbcar opensips]# opensips-cli -x mi ul_dump { "Domains": [ { "name": "location", "hash_size": 4096, "AORs": [ { "AOR": "d1.920-mydomain", "Contacts": [ { "Contact": " sip:d1.920 at 10.10.223.107:5060;rinstance=d1.920-d789e5c341f8ac524c0a3441cded7ba6 ", "ContactID": "933089547795829633", "Expires": 587, "Q": "", "Callid": " txOBq9Lhk1tSVlM9eOTdzA.. at 216.93.246.122", "Cseq": 2, "User-agent": "CounterPath Bria Push Server 2.3.0 (20980)", "Received": "sip:216.93.246.120:5060", "State": "CS_NEW", "Flags": 0, "Cflags": "SIP_PING NAT", "Socket": "udp:64.76.XXX.133:5060", "Methods": 3567, "SIP_instance": "" Does someone have a clue on this? Thanks! *Ricardo Martinez* -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at allenclan.co.uk Wed Nov 25 14:18:36 2020 From: mark at allenclan.co.uk (Mark Allen) Date: Wed, 25 Nov 2020 14:18:36 +0000 Subject: [OpenSIPS-Users] OpenSIPS 3.1 - Test if cache is empty? Message-ID: Is there a simple way to test if a cache has any values stored? I have a cache collection holding a number of IP addresses that are read on startup from a local DB. If the DB table is updated I can flush the cache of the old data with "opensips-cli -x mi cache_remove_chunk". I would then want to have a test in OpenSIPS that says that if the cache is empty, re-populate it from the DB. Is this possible? -------------- next part -------------- An HTML attachment was scrubbed... URL: From liviu at opensips.org Wed Nov 25 14:26:30 2020 From: liviu at opensips.org (Liviu Chircu) Date: Wed, 25 Nov 2020 16:26:30 +0200 Subject: [OpenSIPS-Users] OpenSIPS 3.1 - Test if cache is empty? In-Reply-To: References: Message-ID: On 25.11.2020 16:18, Mark Allen wrote: > If the DB table is updated I can flush the cache of the old data with > "opensips-cli -x mi cache_remove_chunk". I would then want to have a > test in OpenSIPS that says that if the cache is empty, re-populate it > from the DB. Is this possible? Hi, Mark! From my knowledge, the "cachedb is empty" test is not available right now. However, why not use either the recently added "raise_event" [1] function, or even a shared $shv(cache_reset) variable [2] as a pure "on/off" binary marker in order to hook into the opensips.cfg environment via MI interface and then instruct OpenSIPS to do a cache_remove_chunk() [3], followed by re-populating the cache? [1]: https://www.opensips.org/Documentation/Interface-CoreMI-3-2#toc20 [2]: https://opensips.org/docs/modules/3.2.x/cfgutils.html#idp337920 [3]: https://opensips.org/docs/modules/3.2.x/cachedb_local.html#func_cache_remove_chunk Best regards, -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com From farmorg at gmail.com Wed Nov 25 15:23:16 2020 From: farmorg at gmail.com (Mark Farmer) Date: Wed, 25 Nov 2020 15:23:16 +0000 Subject: [OpenSIPS-Users] Regex to test variable Message-ID: Hi everyone I am trying to detect a string using sdp.line,m and a regex pattern but it is failing to match. I am trying to match the 101 at the end of the m=audio line: m=audio 25224 RTP/AVP 8 18 101 This is my code: if (is_method("INVITE") && has_body_part("application/sdp")) { $var(audio_stream) = $(rb{sdp.line,m}); xlog("CUSTOM_LOG: Audio stream is $var(audio_stream)\n"); if ($var(audio_stream) =~ "^m\=audio.*101$") { $var(dtmf_compat)=1; } else $var(dtmf_compat)=0; if ($var(dtmf_compat)=0) { xlog("CUSTOM_LOG: Would do something else now"); } xlog("CUSTOM_LOG: DTMF validity = $var(dtmf_compat)"); } I can see that var(audio_stream) is being set correctly: CUSTOM_LOG: Audio stream is m=audio 25914 RTP/AVP 8 18 101 But it seems not to match: CUSTOM_LOG: DTMF validity = 0 Is anyone able to help me solve this please? Many thanks! Mark. -------------- next part -------------- An HTML attachment was scrubbed... URL: From medeanwz at gmail.com Wed Nov 25 15:52:11 2020 From: medeanwz at gmail.com (M S) Date: Wed, 25 Nov 2020 16:52:11 +0100 Subject: [OpenSIPS-Users] Regex to test variable In-Reply-To: References: Message-ID: something with your regex. each header has a \r\n in the end too, also I'm not sure you need \ before = On Wed, Nov 25, 2020 at 4:26 PM Mark Farmer wrote: > Hi everyone > > I am trying to detect a string using sdp.line,m and a regex pattern but it > is failing to match. > I am trying to match the 101 at the end of the m=audio line: > > m=audio 25224 RTP/AVP 8 18 101 > > This is my code: > > if (is_method("INVITE") && has_body_part("application/sdp")) { > $var(audio_stream) = $(rb{sdp.line,m}); > xlog("CUSTOM_LOG: Audio stream is $var(audio_stream)\n"); > if ($var(audio_stream) =~ "^m\=audio.*101$") { > $var(dtmf_compat)=1; > } else $var(dtmf_compat)=0; > if ($var(dtmf_compat)=0) { > xlog("CUSTOM_LOG: Would do something else now"); > } > xlog("CUSTOM_LOG: DTMF validity = $var(dtmf_compat)"); > } > > I can see that var(audio_stream) is being set correctly: > CUSTOM_LOG: Audio stream is m=audio 25914 RTP/AVP 8 18 101 > > But it seems not to match: > CUSTOM_LOG: DTMF validity = 0 > > Is anyone able to help me solve this please? > > Many thanks! > Mark. > > > _______________________________________________ > 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 farmorg at gmail.com Wed Nov 25 16:09:19 2020 From: farmorg at gmail.com (Mark Farmer) Date: Wed, 25 Nov 2020 16:09:19 +0000 Subject: [OpenSIPS-Users] Regex to test variable In-Reply-To: References: Message-ID: Thanks for the reply! I've changed my regex to if ($avp(audio_stream) =~ "^m=audio.*101\r\n") Tried with and without escaping the equals sign but still not matching. Also changed to using an avp. Mark. On Wed, 25 Nov 2020 at 15:54, M S wrote: > something with your regex. each header has a \r\n in the end too, also I'm > not sure you need \ before = > > On Wed, Nov 25, 2020 at 4:26 PM Mark Farmer wrote: > >> Hi everyone >> >> I am trying to detect a string using sdp.line,m and a regex pattern but >> it is failing to match. >> I am trying to match the 101 at the end of the m=audio line: >> >> m=audio 25224 RTP/AVP 8 18 101 >> >> This is my code: >> >> if (is_method("INVITE") && has_body_part("application/sdp")) { >> $var(audio_stream) = $(rb{sdp.line,m}); >> xlog("CUSTOM_LOG: Audio stream is $var(audio_stream)\n"); >> if ($var(audio_stream) =~ "^m\=audio.*101$") { >> $var(dtmf_compat)=1; >> } else $var(dtmf_compat)=0; >> if ($var(dtmf_compat)=0) { >> xlog("CUSTOM_LOG: Would do something else now"); >> } >> xlog("CUSTOM_LOG: DTMF validity = $var(dtmf_compat)"); >> } >> >> I can see that var(audio_stream) is being set correctly: >> CUSTOM_LOG: Audio stream is m=audio 25914 RTP/AVP 8 18 101 >> >> But it seems not to match: >> CUSTOM_LOG: DTMF validity = 0 >> >> Is anyone able to help me solve this please? >> >> Many thanks! >> Mark. >> >> >> _______________________________________________ >> 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 > -- Mark Farmer farmorg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From farmorg at gmail.com Wed Nov 25 17:11:45 2020 From: farmorg at gmail.com (Mark Farmer) Date: Wed, 25 Nov 2020 17:11:45 +0000 Subject: [OpenSIPS-Users] Regex to test variable In-Reply-To: References: Message-ID: OK some progress I'm using the s.select transformation which returns the last field correctly: $avp(audio_stream) = $(rb{sdp.line,m}{s.select,-1, }); xlog("CUSTOM_LOG: Audio stream is $avp(audio_stream)\n"); if ($avp(audio_stream) == "101") { CUSTOM_LOG: Audio stream is 101 But if ($avp(audio_stream) == "101") still doesn't match :( What am I doing wrong here? Thanks Mark. On Wed, 25 Nov 2020 at 16:09, Mark Farmer wrote: > Thanks for the reply! > > I've changed my regex to > > if ($avp(audio_stream) =~ "^m=audio.*101\r\n") > > Tried with and without escaping the equals sign but still not matching. > Also changed to using an avp. > > Mark. > > > On Wed, 25 Nov 2020 at 15:54, M S wrote: > >> something with your regex. each header has a \r\n in the end too, also >> I'm not sure you need \ before = >> >> On Wed, Nov 25, 2020 at 4:26 PM Mark Farmer wrote: >> >>> Hi everyone >>> >>> I am trying to detect a string using sdp.line,m and a regex pattern but >>> it is failing to match. >>> I am trying to match the 101 at the end of the m=audio line: >>> >>> m=audio 25224 RTP/AVP 8 18 101 >>> >>> This is my code: >>> >>> if (is_method("INVITE") && has_body_part("application/sdp")) { >>> $var(audio_stream) = $(rb{sdp.line,m}); >>> xlog("CUSTOM_LOG: Audio stream is $var(audio_stream)\n"); >>> if ($var(audio_stream) =~ "^m\=audio.*101$") { >>> $var(dtmf_compat)=1; >>> } else $var(dtmf_compat)=0; >>> if ($var(dtmf_compat)=0) { >>> xlog("CUSTOM_LOG: Would do something else now"); >>> } >>> xlog("CUSTOM_LOG: DTMF validity = $var(dtmf_compat)"); >>> } >>> >>> I can see that var(audio_stream) is being set correctly: >>> CUSTOM_LOG: Audio stream is m=audio 25914 RTP/AVP 8 18 101 >>> >>> But it seems not to match: >>> CUSTOM_LOG: DTMF validity = 0 >>> >>> Is anyone able to help me solve this please? >>> >>> Many thanks! >>> Mark. >>> >>> >>> _______________________________________________ >>> 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 >> > > > -- > Mark Farmer > farmorg at gmail.com > -- Mark Farmer farmorg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From donat.zenichev at gmail.com Wed Nov 25 17:31:14 2020 From: donat.zenichev at gmail.com (Donat Zenichev) Date: Wed, 25 Nov 2020 19:31:14 +0200 Subject: [OpenSIPS-Users] Regex to test variable In-Reply-To: References: Message-ID: Hi! Are you sure that the condition indeed doesn't work? It shouldn't have been so, if $avp(audio_stream) is indeed equal to "101". Other than that, I would advise to have more informative xlog() output, something like: xlog("CUSTOM_LOG: Audio stream is <$avp(audio_stream)> \n"); So with braces. Thus you can see if you got some irrelevant spaces or might return a carriage sign. On Wed, Nov 25, 2020 at 7:14 PM Mark Farmer wrote: > OK some progress > > I'm using the s.select transformation which returns the last field > correctly: > > $avp(audio_stream) = $(rb{sdp.line,m}{s.select,-1, }); > xlog("CUSTOM_LOG: Audio stream is $avp(audio_stream)\n"); > if ($avp(audio_stream) == "101") { > > CUSTOM_LOG: Audio stream is 101 > > But if ($avp(audio_stream) == "101") still doesn't match :( > > What am I doing wrong here? > > Thanks > Mark. > > > On Wed, 25 Nov 2020 at 16:09, Mark Farmer wrote: > >> Thanks for the reply! >> >> I've changed my regex to >> >> if ($avp(audio_stream) =~ "^m=audio.*101\r\n") >> >> Tried with and without escaping the equals sign but still not matching. >> Also changed to using an avp. >> >> Mark. >> >> >> On Wed, 25 Nov 2020 at 15:54, M S wrote: >> >>> something with your regex. each header has a \r\n in the end too, also >>> I'm not sure you need \ before = >>> >>> On Wed, Nov 25, 2020 at 4:26 PM Mark Farmer wrote: >>> >>>> Hi everyone >>>> >>>> I am trying to detect a string using sdp.line,m and a regex pattern but >>>> it is failing to match. >>>> I am trying to match the 101 at the end of the m=audio line: >>>> >>>> m=audio 25224 RTP/AVP 8 18 101 >>>> >>>> This is my code: >>>> >>>> if (is_method("INVITE") && has_body_part("application/sdp")) { >>>> $var(audio_stream) = $(rb{sdp.line,m}); >>>> xlog("CUSTOM_LOG: Audio stream is >>>> $var(audio_stream)\n"); >>>> if ($var(audio_stream) =~ "^m\=audio.*101$") { >>>> $var(dtmf_compat)=1; >>>> } else $var(dtmf_compat)=0; >>>> if ($var(dtmf_compat)=0) { >>>> xlog("CUSTOM_LOG: Would do something else now"); >>>> } >>>> xlog("CUSTOM_LOG: DTMF validity = $var(dtmf_compat)"); >>>> } >>>> >>>> I can see that var(audio_stream) is being set correctly: >>>> CUSTOM_LOG: Audio stream is m=audio 25914 RTP/AVP 8 18 101 >>>> >>>> But it seems not to match: >>>> CUSTOM_LOG: DTMF validity = 0 >>>> >>>> Is anyone able to help me solve this please? >>>> >>>> Many thanks! >>>> Mark. >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> >> >> >> -- >> Mark Farmer >> farmorg at gmail.com >> > > > -- > Mark Farmer > farmorg at gmail.com > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Best regards, Donat Zenichev -------------- next part -------------- An HTML attachment was scrubbed... URL: From calvin.ellison at voxox.com Wed Nov 25 18:03:01 2020 From: calvin.ellison at voxox.com (Calvin Ellison) Date: Wed, 25 Nov 2020 10:03:01 -0800 Subject: [OpenSIPS-Users] Getting call analytics to Elasticsearch Message-ID: Is there any best practice or standard method of getting data from OpenSIPS to Elasticsearch? The scenario is an internal call filter that will block or permit a call. e.g. 503 route advance or 603 stop route. Checks are performed against pre-populated caches and database queries, and we want the results of those checks to ultimately reach Elasticsearch. I'd prefer to avoid file-based things like syslog + logstash. The "OpenSIPS and BigData" presentation from 2016 suggested using the Elasticsearch REST API directly with async(rest_post()) or RabbitMQ. Our experience with Elasticsearch indicates it will not keep up with our call volume without a message queue, and now I'm seeing talking about Kafka being the new standard for this. Is this a solved problem? Regards, *Calvin Ellison* Senior Voice Operations Engineer calvin.ellison at voxox.com +1 (213) 285-0555 ----------------------------------------------- *voxox.com * 5825 Oberlin Drive, Suite 5 San Diego, CA 92121 [image: Voxox] -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmartinez at redvoiss.net Wed Nov 25 21:32:23 2020 From: rmartinez at redvoiss.net (Ricardo Martinez) Date: Wed, 25 Nov 2020 18:32:23 -0300 Subject: [OpenSIPS-Users] RTPENGINE RTP-SRTP Message-ID: <62c82a8ffbd350ca9c7794a1c68c224f@mail.gmail.com> Hi. I’m trying to use RTPENGINE + OPENSIPS to connect a RTP PBX with a External SRTP. For this I’m using RTPENGINE module. Questions. Is there a way to indicate to RTPENGINE to use certain cypher suite?. Now, I hace in the offer : m=audio 62768 RTP/SAVP 120 9 0 8 18 101 a=rtpmap:120 opus/48000/2 a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=yes a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=crypto:1 AES_256_CM_HMAC_SHA1_80 inline:dVwYFc1ARkmoeVkPN9JdKXYbJHEA1womGZ3X4gvs3rGZHQew3AaHURWjvO6YtA== a=crypto:2 AES_256_CM_HMAC_SHA1_32 inline:oSgNVYgBtcnf9/tRduZ/3LUgTwqQMfUsOyQcZutOAnBhb+kOdtLN/o6Ezt/e/Q== a=crypto:3 AES_CM_128_HMAC_SHA1_80 inline:PEwsve6fAIxUVHbBnhLZb303atLbFpw193GkTn/Q a=crypto:4 AES_CM_128_HMAC_SHA1_32 inline:XRtaI0RO1Sfhaf8ZstLX5eRUF07y0vIcv9iAOVhC a=sendrecv And then in the ANSWER from RTPENGINE. o=root 2039350566 2039350566 IN IP4 64.76.XXX.94 s=GHJ c=IN IP4 64.76.XXX.133 t=0 0 m=audio 10674 RTP/SAVP 0 101 a=maxptime:150 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=sendrecv a=rtcp:10675 a=crypto:1 AES_256_CM_HMAC_SHA1_80 inline:mObON802Wis2GH0puTCaOznh7as+BTpu1IBZAzNcocQFn95N9YGuZRZ7dNWcyA Second. I’m getting an error in the UA client with SRTP. Indicating this: 2020-11-25 16:45:20.755 | DEBUG | 104875 RemoteParticipant::adjustRTPStreams(): Crypto Suite: SRTP_AES_256_CM_HMAC_SHA1_80 Cipher Key Length: 46 SDP Cipher Key Length: 45 2020-11-25 16:45:20.755 | INFO | 104875 RemoteParticipant::adjustRTPStreams(): SDES crypto key found in SDP, but is not of correct length after base 64 decode: 45, should be: 46 Could it be that the cipher key length calculated by RTPENGINE is cut? Or maybe I’m missing something? Is possible that maybe my Centos 7 is cutting the message ? On the other hand, is possible to force rtpengine to use another of the cipher suites? a=crypto:1 AES_256_CM_HMAC_SHA1_80 inline:dVwYFc1ARkmoeVkPN9JdKXYbJHEA1womGZ3X4gvs3rGZHQew3AaHURWjvO6YtA== a=crypto:2 AES_256_CM_HMAC_SHA1_32 inline:oSgNVYgBtcnf9/tRduZ/3LUgTwqQMfUsOyQcZutOAnBhb+kOdtLN/o6Ezt/e/Q== a=crypto:3 AES_CM_128_HMAC_SHA1_80 inline:PEwsve6fAIxUVHbBnhLZb303atLbFpw193GkTn/Q a=crypto:4 AES_CM_128_HMAC_SHA1_32 inline:XRtaI0RO1Sfhaf8ZstLX5eRUF07y0vIcv9iAOVhC Does someone have any idea here? Thanks in advance, Best Regards, *Ricardo Martinez* -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerwin.van.de.steeg at vadacom.com Wed Nov 25 22:57:58 2020 From: gerwin.van.de.steeg at vadacom.com (Gerwin van de Steeg) Date: Thu, 26 Nov 2020 11:57:58 +1300 Subject: [OpenSIPS-Users] Getting call analytics to Elasticsearch In-Reply-To: References: Message-ID: The usual use case of Kafka (or Redis/AMQP) is to sit as the middle man to buffer and queue the material before it goes into logstash and then elastic. ie. Kafka -> Logstash -> Elastic nodes If you are only pushing the data to Elastic then pushing it via the logstash HTTP input or a load balanced logstash should be suitable to give you some form of buffering and queueing of messages. Or you can skip the intermediate step here and go directly to the event queue based approach start using Kafka/AMQP or even a simple Redis queue, where you would then publish your message to these queues and logstash just pulls them out to populate elastic nodes at the rate it can handle. Cheers, Gerwin On Thu, 26 Nov 2020 at 07:04, Calvin Ellison wrote: > Is there any best practice or standard method of getting data from > OpenSIPS to Elasticsearch? > > The scenario is an internal call filter that will block or permit a call. > e.g. 503 route advance or 603 stop route. Checks are performed against > pre-populated caches and database queries, and we want the results of those > checks to ultimately reach Elasticsearch. > > I'd prefer to avoid file-based things like syslog + logstash. The > "OpenSIPS and BigData" presentation from 2016 suggested using the > Elasticsearch REST API directly with async(rest_post()) or RabbitMQ. Our > experience with Elasticsearch indicates it will not keep up with our call > volume without a message queue, and now I'm seeing talking about Kafka > being the new standard for this. > > Is this a solved problem? > > > Regards, > > *Calvin Ellison* > Senior Voice Operations Engineer > calvin.ellison at voxox.com > +1 (213) 285-0555 > > ----------------------------------------------- > *voxox.com * > 5825 Oberlin Drive, Suite 5 > San Diego, CA 92121 > [image: Voxox] > _______________________________________________ > 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 Thu Nov 26 05:58:20 2020 From: spanda at 3clogic.com (Sasmita Panda) Date: Thu, 26 Nov 2020 11:28:20 +0530 Subject: [OpenSIPS-Users] I am facing some issue while creating DB through opensips-cli . In-Reply-To: References: <1e542087-622b-5850-499e-762808139a89@opensips.org> Message-ID: Hi , opensips-cli -x diagnose sql ERROR: Failed to subscribe for JSON-RPC events ERROR: Is the event_stream.so OpenSIPS module loaded? event_stream.so module is loaded by default . What else I should do to get this output . Nothing I am getting from opensips-cli document . *Thanks & Regards* *Sasmita Panda* *Senior Network Testing and Software Engineer* *3CLogic , ph:07827611765* On Fri, Nov 20, 2020 at 5:42 PM Sasmita Panda wrote: > Thanks a lot . > > That works . > > > *Thanks & Regards* > *Sasmita Panda* > *Senior Network Testing and Software Engineer* > *3CLogic , ph:07827611765* > > > On Fri, Nov 20, 2020 at 4:55 PM Liviu Chircu wrote: > >> On 20.11.2020 13:15, Sasmita Panda wrote: >> >> File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 204, >> in __init__ >> super(Connection, self).__init__(*args, **kwargs2) >> _mysql_exceptions.OperationalError: (1049, "Unknown database 'opensips'") >> >> I think the problem may be related to this setting: >> >> * database_admin_url: mysql://root:cccl0g1c at localhost/opensips* >> >> Try to remove the trailing "/opensips" part of the URL, because the >> database name is given by the "database_name" setting. >> >> If it fixes the issue, we should push a commit which does this >> automatically. >> >> -- >> Liviu Chircuwww.twitter.com/liviuchircu | www.opensips-solutions.com >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From donat.zenichev at gmail.com Thu Nov 26 06:57:57 2020 From: donat.zenichev at gmail.com (Donat Zenichev) Date: Thu, 26 Nov 2020 08:57:57 +0200 Subject: [OpenSIPS-Users] Upgrading from 3.0.3 to 3.0.4 failed - [net/tcp_common.o] Error 1 In-Reply-To: <5075244C-2F8C-4F14-A334-ED3D0710AFF9@free.fr> References: <5075244C-2F8C-4F14-A334-ED3D0710AFF9@free.fr> Message-ID: Hi! I also noticed that issue when downloading 3.0.4 from FTP https://opensips.org/pub/opensips/3.0.4/ I would advise you to switch to pulling from git instead, since it is much more fresh in comparison to FTP. (FTP - last upload 17 November, Git - last day before). So after pulling 3.0.4 from git https://github.com/OpenSIPS/opensips/tree/3.0 the compilation process should work out well. Other than that, I described that issue in details here - http://lists.opensips.org/pipermail/devel/2020-November/028136.html So hopefully someone from the OpenSIPS dev team will see this and provide some updates to FTP. I hope you will find this answer helpful. On Thu, Nov 19, 2020 at 6:38 PM Alain Bieuzent wrote: > Hi all, > > > > Trying to migrate from 3.0.3 to 3.0.4, but it failed : > > > > Compiling net/tcp_common.c > > In file included from net/tcp_common.c:24:0: > > net/tcp_common.h:25:5: warning: redundant redeclaration of > ‘tcp_connect_blocking’ [-Wredundant-decls] > > int tcp_connect_blocking(int s, const struct sockaddr *servaddr, > > ^~~~~~~~~~~~~~~~~~~~ > > In file included from net/tcp_common.c:23:0: > > net/net_tcp.h:83:5: note: previous declaration of > ‘tcp_connect_blocking’ was here > > int tcp_connect_blocking(int s, const struct sockaddr *servaddr, > > ^~~~~~~~~~~~~~~~~~~~ > > > > Complete logs here : https://pastebin.com/QaM1vAuK > > > > Thanks > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Best regards, Donat Zenichev -------------- next part -------------- An HTML attachment was scrubbed... URL: From donat.zenichev at gmail.com Thu Nov 26 08:18:29 2020 From: donat.zenichev at gmail.com (Donat Zenichev) Date: Thu, 26 Nov 2020 10:18:29 +0200 Subject: [OpenSIPS-Users] I am facing some issue while creating DB through opensips-cli . In-Reply-To: References: <1e542087-622b-5850-499e-762808139a89@opensips.org> Message-ID: Hi Sasmita, First of all try to make sure that the needed module is loaded indeed, what opensips.log says after starting the application? There should be something like: "opensips[25960]: NOTICE:event_jsonrpc:mod_init: initializing module ..." Also, as I can see, your output seems to be truncated, could you upload a full python traceback? A brief attempt to reproduce your problem led me to the following. Sometimes the output error description can be a bit non-descriptive. So that module "event_jsonrpc.so" is loaded indeed, but something else appears to be a real obstacle. In my case, I basically tried to reproduce the issue by begetting a contradiction of port numbers used on the system. As you run the command "sudo opensips-cli -x diagnose sql", this by default tries to engage a TCP socket and bind it to 8888. You can easily check this with: sudo watch -n0.5 "netstat -tulpn | grep 8888" after running diagnose sub-tool of opensips-cli. And the reason for that is this code "./opensipscli/modules/diagnose.py" where it's defined that: "JSONRPC_RCV_PORT = 8888" So it seems to be that the default way to communicate over MI interface is http based (I might be mistaken here). A quotation taken from: https://github.com/OpenSIPS/opensips-cli "url: The default URL used when http communication_type is used (Default: http://127.0.0.1:8888/mi)" Getting back to the original question. We have at least this module - "httpd.so", who could try to engage the same port on your system. Sometimes "httpd.so" works in common with "mi_http.so" though. Eventually after loading at least "httpd.so" on my system, "sudo opensips-cli -x diagnose sql" stopped working. And my traceback was as following (is that similar to what you have?) : " sudo opensips-cli -x diagnose sql Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/lib/python3.6/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.6/dist-packages/opensipscli-0.1.0-py3.6.egg/opensipscli/modules/diagnose.py", line 114, in collect_events s.bind((JSONRPC_RCV_HOST, JSONRPC_RCV_PORT)) OSError: [Errno 98] Address already in use ERROR: Failed to subscribe for JSON-RPC events ERROR: Is the event_jsonrpc.so OpenSIPS module loaded? " I hope you will find this useful. Otherwise, please provide a full traceback. On Thu, Nov 26, 2020 at 8:01 AM Sasmita Panda wrote: > Hi , > > opensips-cli -x diagnose sql > ERROR: Failed to subscribe for JSON-RPC events > ERROR: Is the event_stream.so OpenSIPS module loaded? > > event_stream.so module is loaded by default . What else I should do to get > this output . Nothing I am getting from opensips-cli document . > > > > *Thanks & Regards* > *Sasmita Panda* > *Senior Network Testing and Software Engineer* > *3CLogic , ph:07827611765* > > > On Fri, Nov 20, 2020 at 5:42 PM Sasmita Panda wrote: > >> Thanks a lot . >> >> That works . >> >> >> *Thanks & Regards* >> *Sasmita Panda* >> *Senior Network Testing and Software Engineer* >> *3CLogic , ph:07827611765* >> >> >> On Fri, Nov 20, 2020 at 4:55 PM Liviu Chircu wrote: >> >>> On 20.11.2020 13:15, Sasmita Panda wrote: >>> >>> File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line >>> 204, in __init__ >>> super(Connection, self).__init__(*args, **kwargs2) >>> _mysql_exceptions.OperationalError: (1049, "Unknown database 'opensips'") >>> >>> I think the problem may be related to this setting: >>> >>> * database_admin_url: mysql://root:cccl0g1c at localhost/opensips* >>> >>> Try to remove the trailing "/opensips" part of the URL, because the >>> database name is given by the "database_name" setting. >>> >>> If it fixes the issue, we should push a commit which does this >>> automatically. >>> >>> -- >>> Liviu Chircuwww.twitter.com/liviuchircu | www.opensips-solutions.com >>> >>> _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Best regards, Donat Zenichev -------------- next part -------------- An HTML attachment was scrubbed... URL: From donat.zenichev at gmail.com Thu Nov 26 08:54:38 2020 From: donat.zenichev at gmail.com (Donat Zenichev) Date: Thu, 26 Nov 2020 10:54:38 +0200 Subject: [OpenSIPS-Users] I am facing some issue while creating DB through opensips-cli . In-Reply-To: References: <1e542087-622b-5850-499e-762808139a89@opensips.org> Message-ID: One remark though :) I just noticed that the version of my opensips-cli sources was a bit outdated. And your "diagnose.py" should have looked different. Nevertheless, this doesn't change the sense of what I said last time. A quick search through the sources of fresh opensips-cli (at github of the project), gives me "defaults.py" as a holder of port number definitions for sockets. Then try to pay an attention on: https://github.com/OpenSIPS/opensips-cli/blob/524c0202eb31eabef90a553c696d59424ea09015/opensipscli/defaults.py#L67 and https://github.com/OpenSIPS/opensips-cli/blob/524c0202eb31eabef90a553c696d59424ea09015/opensipscli/defaults.py#L79 I didn't try to reproduce your issue with a more fresh opensips-cli sources, but I'm confident this will be the same reason. Have a nice day :) On Thu, Nov 26, 2020 at 10:18 AM Donat Zenichev wrote: > Hi Sasmita, > > First of all try to make sure that the needed module is loaded indeed, > what opensips.log says after starting the application? > There should be something like: > "opensips[25960]: NOTICE:event_jsonrpc:mod_init: initializing module ..." > > Also, as I can see, your output seems to be truncated, could you upload a > full python traceback? > A brief attempt to reproduce your problem led me to the following. > > Sometimes the output error description can be a bit non-descriptive. > So that module "event_jsonrpc.so" is loaded indeed, but something else > appears to be a real obstacle. > > In my case, I basically tried to reproduce the issue by begetting a > contradiction of port numbers used on the system. > As you run the command "sudo opensips-cli -x diagnose sql", this by > default tries to engage a TCP socket and bind it to 8888. > You can easily check this with: sudo watch -n0.5 "netstat -tulpn | grep > 8888" > after running diagnose sub-tool of opensips-cli. > > And the reason for that is this code "./opensipscli/modules/diagnose.py" > where it's defined that: > "JSONRPC_RCV_PORT = 8888" > > So it seems to be that the default way to communicate over MI interface is > http based (I might be mistaken here). > A quotation taken from: https://github.com/OpenSIPS/opensips-cli > "url: The default URL used when http communication_type is used (Default: > http://127.0.0.1:8888/mi)" > > Getting back to the original question. > We have at least this module - "httpd.so", who could try to engage the > same port on your system. > Sometimes "httpd.so" works in common with "mi_http.so" though. > Eventually after loading at least "httpd.so" on my system, "sudo > opensips-cli -x diagnose sql" stopped working. > > And my traceback was as following (is that similar to what you have?) : > > " > sudo opensips-cli -x diagnose sql > Exception in thread Thread-1: > Traceback (most recent call last): > File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner > self.run() > File "/usr/lib/python3.6/threading.py", line 864, in run > self._target(*self._args, **self._kwargs) > File > "/usr/local/lib/python3.6/dist-packages/opensipscli-0.1.0-py3.6.egg/opensipscli/modules/diagnose.py", > line 114, in collect_events > s.bind((JSONRPC_RCV_HOST, JSONRPC_RCV_PORT)) > OSError: [Errno 98] Address already in use > > ERROR: Failed to subscribe for JSON-RPC events > ERROR: Is the event_jsonrpc.so OpenSIPS module loaded? > " > > I hope you will find this useful. Otherwise, please provide a full > traceback. > > On Thu, Nov 26, 2020 at 8:01 AM Sasmita Panda wrote: > >> Hi , >> >> opensips-cli -x diagnose sql >> ERROR: Failed to subscribe for JSON-RPC events >> ERROR: Is the event_stream.so OpenSIPS module loaded? >> >> event_stream.so module is loaded by default . What else I should do to >> get this output . Nothing I am getting from opensips-cli document . >> >> >> >> *Thanks & Regards* >> *Sasmita Panda* >> *Senior Network Testing and Software Engineer* >> *3CLogic , ph:07827611765* >> >> >> On Fri, Nov 20, 2020 at 5:42 PM Sasmita Panda wrote: >> >>> Thanks a lot . >>> >>> That works . >>> >>> >>> *Thanks & Regards* >>> *Sasmita Panda* >>> *Senior Network Testing and Software Engineer* >>> *3CLogic , ph:07827611765* >>> >>> >>> On Fri, Nov 20, 2020 at 4:55 PM Liviu Chircu wrote: >>> >>>> On 20.11.2020 13:15, Sasmita Panda wrote: >>>> >>>> File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line >>>> 204, in __init__ >>>> super(Connection, self).__init__(*args, **kwargs2) >>>> _mysql_exceptions.OperationalError: (1049, "Unknown database >>>> 'opensips'") >>>> >>>> I think the problem may be related to this setting: >>>> >>>> * database_admin_url: mysql://root:cccl0g1c at localhost/opensips* >>>> >>>> Try to remove the trailing "/opensips" part of the URL, because the >>>> database name is given by the "database_name" setting. >>>> >>>> If it fixes the issue, we should push a commit which does this >>>> automatically. >>>> >>>> -- >>>> Liviu Chircuwww.twitter.com/liviuchircu | www.opensips-solutions.com >>>> >>>> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > > > -- > > Best regards, > Donat Zenichev > > -- Best regards, Donat Zenichev -------------- next part -------------- An HTML attachment was scrubbed... URL: From farmorg at gmail.com Thu Nov 26 10:01:17 2020 From: farmorg at gmail.com (Mark Farmer) Date: Thu, 26 Nov 2020 10:01:17 +0000 Subject: [OpenSIPS-Users] Regex to test variable In-Reply-To: References: Message-ID: Thanks Donat, good tip :) Turned out to be a missing equals sign if $avp(dtmf_compat)= "0" { if $avp(dtmf_compat) == "0" { Silly me, took me ages to spot that! Thanks again for the tip! Mark. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Johan at democon.be Thu Nov 26 10:42:07 2020 From: Johan at democon.be (Johan De Clercq) Date: Thu, 26 Nov 2020 11:42:07 +0100 Subject: [OpenSIPS-Users] Regex to test variable In-Reply-To: References: Message-ID: A classic mistake, also very often mate in C. Op do 26 nov. 2020 om 11:04 schreef Mark Farmer : > Thanks Donat, good tip :) > > Turned out to be a missing equals sign > > if $avp(dtmf_compat)= "0" { > > if $avp(dtmf_compat) == "0" { > > Silly me, took me ages to spot that! > > Thanks again for the tip! > > Mark. > > _______________________________________________ > 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 razvan at opensips.org Thu Nov 26 13:37:22 2020 From: razvan at opensips.org (=?UTF-8?Q?R=c4=83zvan_Crainea?=) Date: Thu, 26 Nov 2020 15:37:22 +0200 Subject: [OpenSIPS-Users] OpenSIPs Console for OpenSIPs 3.1 In-Reply-To: <0c56b7c5-fafe-4d5d-4cc7-5de109136cbb@bohboh.info> References: <0c56b7c5-fafe-4d5d-4cc7-5de109136cbb@bohboh.info> Message-ID: <1e5dbcd9-9273-e996-c464-70bed796c2c4@opensips.org> OpenSIPS Console has been deprecated starting with version 3.0. If you're talking about OpenSIPS CLI[1], this is available and can be run for OpenSIPS 3.1 without any problems. [1] https://github.com/OpenSIPS/opensips-cli Best regards, Răzvan Crainea OpenSIPS Core Developer http://www.opensips-solutions.com On 11/18/20 5:27 PM, Social Boh via Users wrote: > Hello, > > id there any date to release de OpenSIPs Console for OpenSIPs 3.1 version? > > Regards > From alain.bieuzent at free.fr Thu Nov 26 17:33:35 2020 From: alain.bieuzent at free.fr (Alain Bieuzent) Date: Thu, 26 Nov 2020 18:33:35 +0100 Subject: [OpenSIPS-Users] Upgrading from 3.0.3 to 3.0.4 failed - [net/tcp_common.o] Error 1 In-Reply-To: References: <5075244C-2F8C-4F14-A334-ED3D0710AFF9@free.fr> Message-ID: Hi Donat, Thanks for the answer, I feel less alone. Regards De : Users au nom de Donat Zenichev Répondre à : OpenSIPS users mailling list Date : jeudi 26 novembre 2020 à 08:00 À : OpenSIPS users mailling list Objet : Re: [OpenSIPS-Users] Upgrading from 3.0.3 to 3.0.4 failed - [net/tcp_common.o] Error 1 Hi! I also noticed that issue when downloading 3.0.4 from FTP https://opensips.org/pub/opensips/3.0.4/ I would advise you to switch to pulling from git instead, since it is much more fresh in comparison to FTP. (FTP - last upload 17 November, Git - last day before). So after pulling 3.0.4 from git https://github.com/OpenSIPS/opensips/tree/3.0 the compilation process should work out well. Other than that, I described that issue in details here - http://lists.opensips.org/pipermail/devel/2020-November/028136.html So hopefully someone from the OpenSIPS dev team will see this and provide some updates to FTP. I hope you will find this answer helpful. On Thu, Nov 19, 2020 at 6:38 PM Alain Bieuzent wrote: Hi all, Trying to migrate from 3.0.3 to 3.0.4, but it failed : Compiling net/tcp_common.c In file included from net/tcp_common.c:24:0: net/tcp_common.h:25:5: warning: redundant redeclaration of ‘tcp_connect_blocking’ [-Wredundant-decls] int tcp_connect_blocking(int s, const struct sockaddr *servaddr, ^~~~~~~~~~~~~~~~~~~~ In file included from net/tcp_common.c:23:0: net/net_tcp.h:83:5: note: previous declaration of ‘tcp_connect_blocking’ was here int tcp_connect_blocking(int s, const struct sockaddr *servaddr, ^~~~~~~~~~~~~~~~~~~~ Complete logs here : https://pastebin.com/QaM1vAuK Thanks _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Best regards, Donat Zenichev _______________________________________________ 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 Fri Nov 27 09:50:26 2020 From: liviu at opensips.org (Liviu Chircu) Date: Fri, 27 Nov 2020 11:50:26 +0200 Subject: [OpenSIPS-Users] Upgrading from 3.0.3 to 3.0.4 failed - [net/tcp_common.o] Error 1 In-Reply-To: <5075244C-2F8C-4F14-A334-ED3D0710AFF9@free.fr> References: <5075244C-2F8C-4F14-A334-ED3D0710AFF9@free.fr> Message-ID: On 19.11.2020 18:36, Alain Bieuzent wrote: > > Trying to migrate from 3.0.3 to 3.0.4, but it failed : > > Compiling net/tcp_common.c > > In file included from net/tcp_common.c:24:0: > > net/tcp_common.h:25:5: warning: redundant redeclaration of > ‘tcp_connect_blocking’ [-Wredundant-decls] > > int tcp_connect_blocking(int s, const struct sockaddr *servaddr, > > ^~~~~~~~~~~~~~~~~~~~ > > In file included from net/tcp_common.c:23:0: > > net/net_tcp.h:83:5: note: previous declaration of > ‘tcp_connect_blocking’ was here > > int tcp_connect_blocking(int s, const struct sockaddr *servaddr, > > ^~~~~~~~~~~~~~~~~~~~ > Hi, Alain! Thank you for the hints - we understand the issue now. To move on with your work, simply delete the files which upset the compiler [*], then OpenSIPS should build fine:    rm -fr net/tcp_common.[ch] [*]: this is a special situation, since these files seem to have been erroneously included in the tarball.  Do not make a habit out of solving compilation problems using this technique! Cheers, -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From farmorg at gmail.com Fri Nov 27 16:00:44 2020 From: farmorg at gmail.com (Mark Farmer) Date: Fri, 27 Nov 2020 16:00:44 +0000 Subject: [OpenSIPS-Users] socket question Message-ID: Hi everyone Reading the docs for socket and advertised_address it says that a socket can accept AS and advertised_address can accept either a or a string. My question is, can I use a string in an AS for socket? Something like socket=tls:10.148.52.107:5061 as sbc.example.com:5061 The reason for the question is that I use mhomed=1 and I want to use an AS statement to advertise an FQDN but only on one interface. Many thanks Mark. -------------- next part -------------- An HTML attachment was scrubbed... URL: From solarmon at one-n.co.uk Mon Nov 30 11:13:55 2020 From: solarmon at one-n.co.uk (solarmon) Date: Mon, 30 Nov 2020 11:13:55 +0000 Subject: [OpenSIPS-Users] Injecting 'user=phone' in to SIP URI Message-ID: Hi, As per NICC N1035 document section 6.2 the SIP URI must end with 'user=phone'. How can this be added to a SIP URI that doesn't contain it? Is using the add_uri_param() function ( https://opensips.org/html/docs/modules/2.4.x/uri.html#func_add_uri_param) the best way to do this - i.e.? add_uri_param("user=phone"); If so, where is best to inject this? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbgatherer at gmail.com Mon Nov 30 14:51:22 2020 From: mbgatherer at gmail.com (Maciej Bylica) Date: Mon, 30 Nov 2020 15:51:22 +0100 Subject: [OpenSIPS-Users] Opensips-cp 8.3.0 / Call to undefined function json_encode() Message-ID: Hello I am struggling with OpenSIPS-CP 8.3.0 (.zip source) configuration on Centos 8.2 Opensips 3.1 uses port 8000 to interop with opensips-cp, but there are no tcpdump packets on that port. It turned out that i am getting following errors on php level: [30-Nov-2020 14:13:54 UTC] PHP Warning: Creating default object from empty value in /var/www/html/opensips-cp/config/tools/system/drouting/local.inc.php on line 24 [30-Nov-2020 14:13:54 UTC] PHP Stack trace: [30-Nov-2020 14:13:54 UTC] PHP 1. {main}() /var/www/html/opensips-cp/web/tools/system/drouting/apply_changes.php:0 [30-Nov-2020 14:13:54 UTC] PHP 2. require() /var/www/html/opensips-cp/web/tools/system/drouting/apply_changes.php:25 [30-Nov-2020 14:13:54 UTC] PHP Error: Call to undefined function json_encode() in /var/www/html/opensips-cp/web/common/mi_comm.php on line 31 [30-Nov-2020 14:13:54 UTC] PHP Stack trace: [30-Nov-2020 14:13:54 UTC] PHP 1. {main}() /var/www/html/opensips-cp/web/tools/system/drouting/apply_changes.php:0 [30-Nov-2020 14:13:54 UTC] PHP 2. mi_command($command = 'dr_reload', $params_array = NULL, $mi_url = 'json:127.0.0.1:8000/JSON', $errors = NULL) /var/www/html/opensips-cp/web/tools/system/drouting/apply_changes.php:43 [30-Nov-2020 14:13:54 UTC] PHP 3. write2json($command = 'dr_reload', $params_array = NULL, $json_url = '127.0.0.1:8000/JSON', $errors = NULL) /var/www/html/opensips-cp/web/common/mi_comm.php:87 [30-Nov-2020 14:13:54 UTC] PHP Fatal error: Uncaught Error: Call to undefined function json_encode() in /var/www/html/opensips-cp/web/common/mi_comm.php:31 Stack trace: #0 /var/www/html/opensips-cp/web/common/mi_comm.php(87): write2json('dr_reload', NULL, '127.0.0.1:8000/...', NULL) #1 /var/www/html/opensips-cp/web/tools/system/drouting/apply_changes.php(43): mi_command('dr_reload', NULL, 'json:127.0.0.1:...', NULL) #2 {main} thrown in /var/www/html/opensips-cp/web/common/mi_comm.php on line 31 I followed installation&configuration document located at http://controlpanel.opensips.org/documentation.php. Here is my boxes.global.inc.php config: $boxes[$box_id]['mi']['conn']="json:127.0.0.1:8000/JSON"; but i also tried with $boxes[$box_id]['mi']['conn']="json:127.0.0.1:8000/mi"; with the same effect. Opensips (compiled from the sources) has got following modules up and running: ####HTTP loadmodule "httpd.so" modparam("httpd", "port", 8000) ###JSON loadmodule "json.so" ###MI_HTTP loadmodule "mi_http.so" Could you please point me where the problem might be located ? Thanks Maciej -------------- next part -------------- An HTML attachment was scrubbed... URL: From saurabhc at 3clogic.com Wed Nov 18 12:11:17 2020 From: saurabhc at 3clogic.com (Saurabh Chopra) Date: Wed, 18 Nov 2020 12:11:17 -0000 Subject: [OpenSIPS-Users] Test_mail Message-ID: Best Regards Saurabh Chopra +918861979979 -------------- next part -------------- An HTML attachment was scrubbed... URL: