[OpenSIPS-Users] opensips UDP retransmit on load

2020-09-22 Thread Kirill Galinurov
SIP UDP Interface #1 (udp:10.169.115.19:5073)
Receive Queue: 4.8KB
Avg. CPU usage: 0% (last 1 sec)

Process  6 load: 12%, 10%,  3% (SIP receiver udp:10.169.115.19:5073)
Process  7 load: 13%, 10%,  4% (SIP receiver udp:10.169.115.19:5073)
Process  8 load: 13%, 10%,  4% (SIP receiver udp:10.169.115.19:5073)
Process  9 load: 15%, 13%,  5% (SIP receiver udp:10.169.115.19:5073)
Process 10 load: 13%, 12%,  4% (SIP receiver udp:10.169.115.19:5073)
Process 11 load: 12%, 11%,  4% (SIP receiver udp:10.169.115.19:5073)
Process 12 load: 11%, 10%,  4% (SIP receiver udp:10.169.115.19:5073)
Process 13 load: 18%, 13%,  6% (SIP receiver udp:10.169.115.19:5073)

WARNING: the receive queue is NOT empty, SIP signaling may be slower!

How to check why Receive Queue not null ?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] APT/YUM repository downtime today

2020-01-13 Thread Kirill Galinurov
Hi All
Link for centos 7 on
https://yum.opensips.org/packages.php is incorrect.

Correct link
yum install
https://yum.opensips.org/2.4/releases/el/7/x86_64/opensips-yum-releases-2.4-
*5*.el7.noarch.rpm
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] APT and YUM repositories down

2019-10-17 Thread Kirill Galinurov
And now yum.opensips.org seem down again.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Double SDP

2019-09-04 Thread Kirill Galinurov
Hi Dragomir. May be you miss rtpengine_answer on reply?
Like

onreply_route[handle_reply] {

if (has_body("application/sdp"){

$var(rtpengine_flags) = "RTP/AVP replace-session-connection
replace-origin ICE=remove";

}
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Latest opensips crashed on do_routing

2019-09-03 Thread Kirill Galinurov
Hi All/ I use opensips with drouting module.
Version: opensips 3.0.0 (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: 86d83c2b5
main.c compiled on 02:42:45 Sep  4 2019 with gcc 4.8.5
if
(!do_routing(0,,,$avp(route_number),$avp(gateway_attr),$avp(carrier_attr),"*")){

}

(gdb) bt full
#0  0x7f08222c307b in ?? ()
No symbol table info available.
Cannot access memory at address 0x7ffd725e3b50
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips 3.0 segfault on opensips-cli -x mi reload_routes

2019-08-28 Thread Kirill Galinurov
Hi Bogdan. Did you reproduce the problem?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips 3.0 segfault on opensips-cli -x mi reload_routes

2019-06-26 Thread Kirill Galinurov
Do you need any additional information or may be tests?

вт, 25 июн. 2019 г., 19:32 Bogdan-Andrei Iancu :

> Still, whatever syntax (with errors) you have in the cfg, the reload
> should not crash :(... my offer of trying to reproduce it with your script
> is still available.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit 2019
>   https://www.opensips.org/events/Summit-2019Amsterdam/
>
> On 06/25/2019 07:30 PM, Kirill Galinurov wrote:
>
>  Bogdan I am very stupped... I am sorry... But I am found problem...
> I useuac_replace_from("$avp(fU)","sip:$avp(fU)@{{anycast_ip}}");
> To template my config.
> And when I comment this line all became good.
> I guess ... I should not use templating in routes...
>
> вт, 25 июн. 2019 г. в 19:11, Bogdan-Andrei Iancu :
>
>> Kirill,
>>
>> Could you share (off-list, privately) your script with me to see if I can
>> reproduce the crash ?
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>> OpenSIPS Summit 2019
>>   https://www.opensips.org/events/Summit-2019Amsterdam/
>>
>> On 06/25/2019 07:10 PM, Kirill Galinurov wrote:
>>
>> I am very sorry Bogdan. But I have no any useful information for you. I
>> can try to rewrite my config step by step...
>>
>>
>>>
>>>
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips 3.0 segfault on opensips-cli -x mi reload_routes

2019-06-25 Thread Kirill Galinurov
 Bogdan I am very stupped... I am sorry... But I am found problem...
I useuac_replace_from("$avp(fU)","sip:$avp(fU)@{{anycast_ip}}");
To template my config.
And when I comment this line all became good.
I guess ... I should not use templating in routes...

вт, 25 июн. 2019 г. в 19:11, Bogdan-Andrei Iancu :

> Kirill,
>
> Could you share (off-list, privately) your script with me to see if I can
> reproduce the crash ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit 2019
>   https://www.opensips.org/events/Summit-2019Amsterdam/
>
> On 06/25/2019 07:10 PM, Kirill Galinurov wrote:
>
> I am very sorry Bogdan. But I have no any useful information for you. I
> can try to rewrite my config step by step...
>
>
>>
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips 3.0 segfault on opensips-cli -x mi reload_routes

2019-06-25 Thread Kirill Galinurov
I am very sorry Bogdan. But I have no any useful information for you. I can
try to rewrite my config step by step...


>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips 3.0 segfault on opensips-cli -x mi reload_routes

2019-06-25 Thread Kirill Galinurov
It's crashes  exactly when reloading It's my test instance with no traffic
at all yet. I rewrite my old 2.4 config to new syntax I paste block of
code. Then change it. And it's crash. But if I restart opensips everything
looks OK.

вт, 25 июн. 2019 г. в 18:36, Bogdan-Andrei Iancu :

> Do you have any idea if OpenSIPS crashes exactly when reloading or does it
> crash when handling traffic after the reload ? Again, any chances to get a
> valid backtrace ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit 2019
>   https://www.opensips.org/events/Summit-2019Amsterdam/
>
> On 06/25/2019 06:28 PM, Kirill Galinurov wrote:
>
> Hi Bogan,
> Yes my opensips predictably crashes, when I do  routes reload. Even when I
> do not change anythihg. But I think.. It' s probably crashes when I use
> return statement like:
> if (is_method("INVITE")) {
> route(get_account_code);
> route(check_callerid);
> route(number_normalize);
> }
>
> route[check_callerid]{
> xlog("L_INFO","Check callerid to path for operators\n");
> if(! dp_translate(999,$fU,$avp(FromNum))){
> send_reply(404,"Bad From User");
> exit;
> } else {
> return;
> }
> }
> When Opensips run as systemd service It restarts and core was not
> generated.
>
>
>
> вт, 25 июн. 2019 г. в 18:06, Bogdan-Andrei Iancu :
>
>> Hi Kirill,
>>
>> Does your opensips predictably crashes each time you do the routes reload
>> ? if yes, do you get each time an invalid corefile ?
>>
>> Best regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>> OpenSIPS Summit 2019
>>   https://www.opensips.org/events/Summit-2019Amsterdam/
>>
>> On 06/25/2019 11:47 AM, Kirill Galinurov wrote:
>>
>> One more information
>> I run opensips in debug mode with command:
>> opensips -f /etc/opensips/opensips.cfg.j2 -p "python3
>> /etc/opensips/opensips-preproc.py" a Q_MALLOC_DBG -m 16832 -M 512
>>
>> After opensips-cli -x mi reload_routes
>> ERROR: communication exception for 'reload_routes' returned:
>> ERROR: Is OpenSIPS running?
>>
>> Logs:
>>
>> Jun 25 04:37:33 [21481] DBG:core:fix_actions: fixing t_was_cancelled,
>> /etc/opensips/opensips_routes.cfg:346
>> Jun 25 04:37:33 [21481] INFO:core:routes_reload_per_proc: process
>> successfully parsed new cfg (seq 1)
>> Jun 25 04:37:55 [21460] DBG:core:reload_routing_script: done with waiting
>> after 20001 miliseconds
>> Jun 25 04:38:13 [21457] DBG:core:handle_sigs: unknown child process 21458
>> ended. Ignoring
>> Jun 25 04:38:13 [21457] DBG:core:handle_sigs: OpenSIPS exit status = 139
>> Jun 25 04:38:13 [21457] INFO:core:handle_sigs: child process 21463
>> exited by a signal 11
>> Jun 25 04:38:13 [21457] INFO:core:handle_sigs: core was generated
>> Jun 25 04:38:13 [21457] INFO:core:handle_sigs: terminating due to SIGCHLD
>>
>> (gdb) bt full:
>> #0  0x004652b0 in ?? ()
>> No symbol table info available.
>> #1  0x0044 in ?? ()
>> No symbol table info available.
>> #2  0x53d70577fc74 in ?? ()
>> No symbol table info available.
>> #3  0x in ?? ()
>> No symbol table info available.
>>
>>
>>
>> ___
>> Users mailing 
>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips 3.0 segfault on opensips-cli -x mi reload_routes

2019-06-25 Thread Kirill Galinurov
Hi Bogan,
Yes my opensips predictably crashes, when I do  routes reload. Even when I
do not change anythihg. But I think.. It' s probably crashes when I use
return statement like:
if (is_method("INVITE")) {
route(get_account_code);
route(check_callerid);
route(number_normalize);
}

route[check_callerid]{
xlog("L_INFO","Check callerid to path for operators\n");
if(! dp_translate(999,$fU,$avp(FromNum))){
send_reply(404,"Bad From User");
exit;
} else {
return;
}
}
When Opensips run as systemd service It restarts and core was not generated.



вт, 25 июн. 2019 г. в 18:06, Bogdan-Andrei Iancu :

> Hi Kirill,
>
> Does your opensips predictably crashes each time you do the routes reload
> ? if yes, do you get each time an invalid corefile ?
>
> Best regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit 2019
>   https://www.opensips.org/events/Summit-2019Amsterdam/
>
> On 06/25/2019 11:47 AM, Kirill Galinurov wrote:
>
> One more information
> I run opensips in debug mode with command:
> opensips -f /etc/opensips/opensips.cfg.j2 -p "python3
> /etc/opensips/opensips-preproc.py" a Q_MALLOC_DBG -m 16832 -M 512
>
> After opensips-cli -x mi reload_routes
> ERROR: communication exception for 'reload_routes' returned:
> ERROR: Is OpenSIPS running?
>
> Logs:
>
> Jun 25 04:37:33 [21481] DBG:core:fix_actions: fixing t_was_cancelled,
> /etc/opensips/opensips_routes.cfg:346
> Jun 25 04:37:33 [21481] INFO:core:routes_reload_per_proc: process
> successfully parsed new cfg (seq 1)
> Jun 25 04:37:55 [21460] DBG:core:reload_routing_script: done with waiting
> after 20001 miliseconds
> Jun 25 04:38:13 [21457] DBG:core:handle_sigs: unknown child process 21458
> ended. Ignoring
> Jun 25 04:38:13 [21457] DBG:core:handle_sigs: OpenSIPS exit status = 139
> Jun 25 04:38:13 [21457] INFO:core:handle_sigs: child process 21463 exited
> by a signal 11
> Jun 25 04:38:13 [21457] INFO:core:handle_sigs: core was generated
> Jun 25 04:38:13 [21457] INFO:core:handle_sigs: terminating due to SIGCHLD
>
> (gdb) bt full:
> #0  0x004652b0 in ?? ()
> No symbol table info available.
> #1  0x0044 in ?? ()
> No symbol table info available.
> #2  0x53d70577fc74 in ?? ()
> No symbol table info available.
> #3  0x in ?? ()
> No symbol table info available.
>
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips 3.0 segfault on opensips-cli -x mi reload_routes

2019-06-25 Thread Kirill Galinurov
One more information
I run opensips in debug mode with command:
opensips -f /etc/opensips/opensips.cfg.j2 -p "python3
/etc/opensips/opensips-preproc.py" a Q_MALLOC_DBG -m 16832 -M 512

After opensips-cli -x mi reload_routes
ERROR: communication exception for 'reload_routes' returned:
ERROR: Is OpenSIPS running?

Logs:

Jun 25 04:37:33 [21481] DBG:core:fix_actions: fixing t_was_cancelled,
/etc/opensips/opensips_routes.cfg:346
Jun 25 04:37:33 [21481] INFO:core:routes_reload_per_proc: process
successfully parsed new cfg (seq 1)
Jun 25 04:37:55 [21460] DBG:core:reload_routing_script: done with waiting
after 20001 miliseconds
Jun 25 04:38:13 [21457] DBG:core:handle_sigs: unknown child process 21458
ended. Ignoring
Jun 25 04:38:13 [21457] DBG:core:handle_sigs: OpenSIPS exit status = 139
Jun 25 04:38:13 [21457] INFO:core:handle_sigs: child process 21463 exited
by a signal 11
Jun 25 04:38:13 [21457] INFO:core:handle_sigs: core was generated
Jun 25 04:38:13 [21457] INFO:core:handle_sigs: terminating due to SIGCHLD

(gdb) bt full:
#0  0x004652b0 in ?? ()
No symbol table info available.
#1  0x0044 in ?? ()
No symbol table info available.
#2  0x53d70577fc74 in ?? ()
No symbol table info available.
#3  0x in ?? ()
No symbol table info available.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Opensips 3.0 segfault on opensips-cli -x mi reload_routes

2019-06-24 Thread Kirill Galinurov
Hi all. Latest opensips from night build.
I try command - opensips-cli -x mi reload_routes
And get errors::
 INFO:core:routes_reload_per_proc: dropping reload cmd due out of sequence
reason
Jun 24 02:53:14 callout-msk /usr/sbin/opensips[14198]:
CRITICAL:core:sig_usr: segfault in process pid: 14198, id: 5
Jun 24 02:53:14 callout-msk kernel: opensips[14198]: segfault at 1 ip
004652b0 sp 7ffd7cf54050 error 4 in opensips[40+1
f1000]
Jun 24 02:53:15 callout-msk /usr/sbin/opensips[14193]:
INFO:core:handle_sigs: child process 14198 exited by a signal 11
Jun 24 02:53:15 callout-msk /usr/sbin/opensips[14193]:
INFO:core:handle_sigs: core was not generated
Jun 24 02:53:15 callout-msk /usr/sbin/opensips[14193]:
INFO:core:handle_sigs: terminating due to SIGCHLD
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Latest opensips crashed after start. During loading drouting tables.

2019-06-21 Thread Kirill Galinurov
opensips -D -f /etc/opensips/opensips.cfg -a Q_MALLOC_DBG -m 4096 -M 4096

Jun 21 09:30:27 [22590] ERROR:core:new_db_id: error while parsing database
URL: 'postgres://opensips:8T2yJe7tqzolPdn171SO@master.naudb.
service.consul'
Jun 21 09:30:27 [22590] CRITICAL:core:qm_debug_frag: qm_*: fragm.
0x7f3eef53caf0 (address 0x7f3eef53cb20) end overwritten(0, 0)!

So it's looks like my mistake in db_url field in dr_partitions tabel.

>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Latest opensips crashed after start. During loading drouting tables.

2019-06-21 Thread Kirill Galinurov
Hi all. I try latest opensips. And it's crashed   during loading drouting
tables.
version: opensips 3.0.0 (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: bfd80ccde
main.c compiled on 02:37:48 Jun 21 2019 with gcc 4.8.5

opensips -D -f /etc/opensips/opensips.cfg -m 4096 -M 4096
CRITICAL:core:fm_free: freeing already freed pkg pointer (0x7f9869850b98),
first free: (null): (null)(0) - aborting!

bt full
(gdb) bt full
#0  0x7f9969862207 in ?? ()
No symbol table info available.
#1  0x7f99698638f8 in ?? ()
No symbol table info available.
#2  0x0020 in ?? ()
No symbol table info available.
#3  0x in ?? ()
No symbol table info available.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer cluster Opensips 3.0

2019-05-28 Thread Kirill Galinurov
Hi Anton. You must correctly set
 cluster_sharing_tag (string)
parameter in you config file.
Please see

https://opensips.org/html/docs/modules/3.0.x/load_balancer.html#param_cluster_sharing_tag
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Some delusions in module dialog documentation.

2019-04-15 Thread Kirill Galinurov
Hi all. In dialog module documentation we see:
"Also configuring profile replication via the
*profile_replication_cluster* parameter
is not necessary when dialog replication is already configured. The profile
information is included in the dialog updates sent in the dialog
replication cluster. The profiles must still be marked for sharing though
in the *profiles_with_value* or *profiles_no_value* parameters.
"
https://opensips.org/html/docs/modules/2.4.x/dialog.html#dialog-clustering

But when we set only params in config:
modparam("dialog", "dialog_replication_cluster", 1)
modparam("dialog","profiles_with_value","reknumber/b;nccqueue/b;")
modparam("dialog","profiles_no_value","incoming/b;")
We have some warnings at startup

"WARNING:dialog:add_profile_definitions: profile incoming configured to be
replicated over BIN, but 'profile_repl
ication_cluster' is not defined
Apr 15 01:46:22 nau-sbc-test-spb /usr/sbin/opensips[14330]:
WARNING:dialog:add_profile_definitions: profile reknumber configured to be
replicated over BIN, but 'profile_rep
lication_cluster' is not defined
Apr 15 01:46:22 nau-sbc-test-spb /usr/sbin/opensips[14330]:
WARNING:dialog:add_profile_definitions: profile nccqueue configured to be
replicated over BIN, but 'profile_repl
ication_cluster' is not defined

"
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Users Digest, Vol 120, Issue 29

2018-07-20 Thread Kirill Galinurov
Yes it's wrong Data format.
 "Date":"Thu Jul 19 11:30:33 2018

2018-07-19 19:00 GMT+03:00 :

> Send Users mailing list submissions to
> users@lists.opensips.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> or, via email, send a message with subject or body 'help' to
> users-requ...@lists.opensips.org
>
> You can reach the person managing the list at
> users-ow...@lists.opensips.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Users digest..."
>
>
> Today's Topics:
>
>1. Re: mi_json returns invalid JSON (Răzvan Crainea)
>2. Re: mi_json returns invalid JSON (Ben Newlin)
>3. Re: mi_json returns invalid JSON (Ben Newlin)
>
>
> --
>
> Message: 1
> Date: Thu, 19 Jul 2018 10:14:37 +0300
> From: Răzvan Crainea 
> To: users@lists.opensips.org
> Subject: Re: [OpenSIPS-Users] mi_json returns invalid JSON
> Message-ID: <04329915-bc6d-0b21-547f-c114ccca3...@opensips.org>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Hi, Kirill!
>
> This doesn't seem to be an invalid JSON, but only a bad formatting of
> the date. I agree it should not include the "\n", because it is useless,
> but this doesn't make it invalid. Are you experiencing trouble with
> using JSON libraries that don't support this format?
>
> Best regards,
> Răzvan
>
> On 07/17/2018 12:58 PM, Kirill Galinurov wrote:
> > Hi. I use opensips mi_json module to get statistics.
> > But for some commands it returns incorrect JSON.
> > For example /json/dr_reload_status returns
> >
> > {"Partition": [{"value":"sipprovider_def", "attributes":{"Date": "Mon
> > Jul 16 07:10:58 2018
> > "}}, {"value":"beeline", "attributes":{"Date": "Mon Jul 16 07:11:59 2018
> > "}}, {"value":"megafon", "attributes":{"Date": "Mon Jul 16 07:11:59 2018
> > "}}, {"value":"megafon", "attributes":{"Date": "Mon Jul 16 07:12:54 2018
> > "}}, {"value":"mts", "attributes":{"Date": "Mon Jul 16 07:12:54 2018
> > "}}, {"value":"mts", "attributes":{"Date": "Mon Jul 16 07:13:51 2018
> > "}}, {"value":"beeline", "attributes":{"Date": "Mon Jul 16 07:13:52 2018
> > "}}]}
> >
> > This is incorrect, because it shoulde not include "\n" symbols.
> >
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
> --
> Răzvan Crainea
> OpenSIPS Core Developer
>http://www.opensips-solutions.com
>
>
>
> --
>
> Message: 2
> Date: Thu, 19 Jul 2018 12:58:24 +
> From: Ben Newlin 
> To: OpenSIPS users mailling list 
> Subject: Re: [OpenSIPS-Users] mi_json returns invalid JSON
> Message-ID: 
> Content-Type: text/plain; charset=UTF-8
>
> I believe newline characters used within JSON must be escaped. So if the
> JSON actually contains "\n" that is invalid. It must be "\\n".
>
> Ben Newlin
>
> On 7/19/18, 3:19 AM, "Users on behalf of Răzvan Crainea" <
> users-boun...@lists.opensips.org on behalf of raz...@opensips.org> wrote:
>
> Hi, Kirill!
>
> This doesn't seem to be an invalid JSON, but only a bad formatting of
> the date. I agree it should not include the "\n", because it is
> useless,
> but this doesn't make it invalid. Are you experiencing trouble with
> using JSON libraries that don't support this format?
>
> Best regards,
> Răzvan
>
> On 07/17/2018 12:58 PM, Kirill Galinurov wrote:
> > Hi. I use opensips mi_json module to get statistics.
> > But for some commands it returns incorrect JSON.
> > For example /json/dr_reload_status returns
> >
> > {"Partition": [{"value":"sipprovider_def", "attributes":{"Date":
> "Mon
> > Jul 16 07:10:58 2018
> > "}}, {"value":"beeline", "attributes":{"Date": "Mon Jul 16 07:11:59
> 2018
> > "}}, {"value":"megafon", "attri

[OpenSIPS-Users] mi_json returns invalid JSON

2018-07-17 Thread Kirill Galinurov
Hi. I use opensips mi_json module to get statistics.
But for some commands it returns incorrect JSON.
For example /json/dr_reload_status returns

{"Partition": [{"value":"sipprovider_def", "attributes":{"Date": "Mon Jul
16 07:10:58 2018
"}}, {"value":"beeline", "attributes":{"Date": "Mon Jul 16 07:11:59 2018
"}}, {"value":"megafon", "attributes":{"Date": "Mon Jul 16 07:11:59 2018
"}}, {"value":"megafon", "attributes":{"Date": "Mon Jul 16 07:12:54 2018
"}}, {"value":"mts", "attributes":{"Date": "Mon Jul 16 07:12:54 2018
"}}, {"value":"mts", "attributes":{"Date": "Mon Jul 16 07:13:51 2018
"}}, {"value":"beeline", "attributes":{"Date": "Mon Jul 16 07:13:52 2018
"}}]}

This is incorrect, because it shoulde not include "\n" symbols.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] drouting module in opensips 2.4

2018-07-06 Thread Kirill Galinurov
Hi all I migrate from 2.3 to in 2.4 on Centos 7.4.
OpenSIPS 2.3 starts without going to background, while drouting module
fetches all rules from DB into memory.

OpenSIPS 2.4 goes to background immediately, and fetches rules only after
that.

If  you try opensipsctl fifo dr_number_routing mts 0 9195643210 command
during this moment it restart dr_reload.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] How to change From user before do_routing?

2018-06-05 Thread Kirill Galinurov
Hello Вogdan. Thanks for answer. I thought so. I want to use db, and
cache_db to store groups. But our new system is very highload. About 6M
rules over 120 groups and 300 cps. So what about perfomance ? Internal
drouting groups is in memory and it very good.

2018-06-05 11:39 GMT+03:00 Bogdan-Andrei Iancu :

> Hello Kirill,
>
> The drouting module is fetching the original FROM header, as received from
> the network. So your changes from the script will be ignored.
>
> An alternative is to determine the routing group by yourself, at script
> level (like doing a DB query, even to the same dr_groups table, but using
> whatever value you want for the user) and push the group as parameter to
> the do_routing() function.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
> OpenSIPS Summit 2018
>   http://www.opensips.org/events/Summit-2018Amsterdam
>
> On 06/01/2018 05:05 PM, Kirill Galinurov wrote:
>
> Hi all. I use drouting module for LCR. No i use do_routing function in
> request_route() But i want normalize username in From before do_routing.
> How I can do it. Now do_routing() use old username for discover group.
> Also I want to change username in contact field before topology hiding.
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] How to change From user before do_routing?

2018-06-01 Thread Kirill Galinurov
Hi all. I use drouting module for LCR. No i use do_routing function in
request_route() But i want normalize username in From before do_routing.
How I can do it. Now do_routing() use old username for discover group.
Also I want to change username in contact field before topology hiding.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] drouting rule_id is empty

2018-05-23 Thread Kirill Galinurov
Hi Bogdan. Thanks a lot. Everything right now.

2018-05-22 13:33 GMT+03:00 Bogdan-Andrei Iancu <bog...@opensips.org>:

> Hi Kirill,
>
> I see you use partitions, and your lookup is over partition "1". So, in
> the dr_partitions table, when defining the partition "1", have you set the 
> "rule_id_avp"
> field to "$avp(dr_rule_id)" ?
>
> http://www.opensips.org/Documentation/Install-DBSchema-2-3#GEN-DB-DR-
> PARTITIONS
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
> OpenSIPS Summit 2018
>   http://www.opensips.org/events/Summit-2018Amsterdam
>
> On 05/21/2018 06:06 PM, Kirill Galinurov wrote:
>
> Hi i use opensips  2.3 (OpenSIPS (2.3.3 (x86_64/linux)) drouting
> And I need rule_id variable to store in CDR.
> modparam("drouting", "use_partitions", 1)
> modparam("drouting", "carrier_id_avp", '$avp(carrier_id)')
> modparam("drouting", "partition_id_pvar", "$var(matched_partition)")
> modparam("drouting", "rule_id_avp", '$avp(dr_rule_id)')
>
> if(!do_routing("*:1","W",,,"$avp(gateway_attr)","$avp(dr_rule_from)")) {
>   xlog("do_routing: No rules matching the URI/n");
>   send_reply("503","No rules matching the URI");
>   exit;
>} else {
>  xlog("do_routing: to operator $avp(carrier_id)/n");
> xlog("L_INFO", "get_route: rule_id  $avp(dr_rule_id)\n");
> }
> But in output
> Opensips: May 21 18:06:18 [26575] get_route: rule_id   - 
>
>
>
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] drouting rule_id is empty

2018-05-21 Thread Kirill Galinurov
Hi i use opensips  2.3 (OpenSIPS (2.3.3 (x86_64/linux)) drouting
And I need rule_id variable to store in CDR.
modparam("drouting", "use_partitions", 1)
modparam("drouting", "carrier_id_avp", '$avp(carrier_id)')
modparam("drouting", "partition_id_pvar", "$var(matched_partition)")
modparam("drouting", "rule_id_avp", '$avp(dr_rule_id)')

if(!do_routing("*:1","W",,,"$avp(gateway_attr)","$avp(dr_rule_from)")) {
  xlog("do_routing: No rules matching the URI/n");
  send_reply("503","No rules matching the URI");
  exit;
   } else {
 xlog("do_routing: to operator $avp(carrier_id)/n");
xlog("L_INFO", "get_route: rule_id  $avp(dr_rule_id)\n");
}
But in output
Opensips: May 21 18:06:18 [26575] get_route: rule_id   - 
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensipsctl fifo dr_number_routing command and partitions

2018-04-06 Thread Kirill Galinurov
Yes of course.
opensipsctl fifo dr_number_routing mts 1 91956858923 where mts is partition
name -

Matched Prefix:: 91956
   CARRIER:: D4701
 withouth partition name

opensipsctl fifo dr_number_routing  1 91956858923
 400 Bad parameter

And with * as partition name

opensipsctl fifo dr_number_routing * 1 91956858923
400 Bad parameter




2018-04-06 13:01 GMT+03:00 Pasan Meemaduma <pasan...@ymail.com>:

> Hi Kirill,
>
> did you try opensipsctl fifo dr_number_routing 
> 
>
> In my setup
>
> Ex: opensipsctl fifo dr_number_routing 1 0412345678
>
> Matched Prefix:: 04
> CARRIER:: xx
> CARRIER:: xx
>
>
>
>
>
>
> On Friday, April 6, 2018, 3:18:03 PM GMT+5:30, Kirill Galinurov <
> k.galinu...@gmail.com> wrote:
>
>
> Hi all. How to use fifo command dr_number_routing  to search all
> partitions for matching?
> Like do_routing("*:1") in script.
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] opensipsctl fifo dr_number_routing command and partitions

2018-04-06 Thread Kirill Galinurov
Hi all. How to use fifo command dr_number_routing  to search all partitions
for matching?
Like do_routing("*:1") in script.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Remove Sdp line

2018-04-05 Thread Kirill Galinurov
Yes. I tried both .

2018-04-05 16:13 GMT+03:00 Kirill Galinurov <k.galinu...@gmail.com>:

> Hi Bogdan. I try use replace_body("s=Asterisk PBX 13.17.2\r\n","") but
> its not working...
>
> 2018-04-04 17:58 GMT+03:00 Bogdan-Andrei Iancu <bog...@opensips.org>:
>
>> Hi Kirill,
>>
>> Please see http://lists.opensips.org/pipermail/users/2018-April/039219.
>> html
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   http://www.opensips-solutions.com
>> OpenSIPS Summit 2018
>>   http://www.opensips.org/events/Summit-2018Amsterdam
>>
>> On 04/03/2018 05:36 PM, Kirill Galinurov wrote:
>>
>> Hi All. I use opensips 2.3 How I can remove sdp line like s=Asterisk PBX
>> 13.18.1
>>  in SDP ?
>>
>>
>> ___
>> Users mailing 
>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Remove Sdp line

2018-04-05 Thread Kirill Galinurov
Hi Bogdan. I try use replace_body("s=Asterisk PBX 13.17.2\r\n","") but its
not working...

2018-04-04 17:58 GMT+03:00 Bogdan-Andrei Iancu <bog...@opensips.org>:

> Hi Kirill,
>
> Please see http://lists.opensips.org/pipermail/users/2018-April/
> 039219.html
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
> OpenSIPS Summit 2018
>   http://www.opensips.org/events/Summit-2018Amsterdam
>
> On 04/03/2018 05:36 PM, Kirill Galinurov wrote:
>
> Hi All. I use opensips 2.3 How I can remove sdp line like s=Asterisk PBX
> 13.18.1
>  in SDP ?
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Remove Sdp line

2018-04-03 Thread Kirill Galinurov
Hi All. I use opensips 2.3 How I can remove sdp line like s=Asterisk PBX
13.18.1
 in SDP ?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Opensips module like htable in kamailio

2018-03-06 Thread Kirill Galinurov
Hi. we need some module to store some keys like  %ip -> { port => 15643,

  username => 'test',

  domain => 'test',

  auth_count => '2'}
to do  protect against dictionary attacks. Like in Kamaillio.
What is the best module to do this in   Opensips ?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Opensips mid registar module 2 interface configuration

2018-01-15 Thread Kirill Galinurov
Hi I try mid register module in Opensips 2.3

My very simple config is:

mhomed=1

listen=udp:10.23.96.193:5060   # CUSTOMIZE ME
listen=udp:192.168.100.200:5060   # CUSTOMIZE ME


if (is_method("REGISTER"))
   {
mid_registrar_save("location");
   switch ($retcode) {
   case 1:
   xlog("L_INFO", "forwarding REGISTER to main registrar...\n");
   $ru = "sip:192.168.100.100:5070";
   if (!t_relay()) {
   send_reply("500", "Server Internal Error 1");
   }

   break;
   case 2:
   xlog("L_INFO", "REGISTER has been absorbed!\n");
   break;
   default:
   xlog("L_ERR", "mid-registrar error!\n");
   send_reply("500", "Server Internal Error 2");
   }

But REGISTER message is'nt  relayed to 192.168.100.100
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] opensips 2.3 and rtpengine module

2017-11-27 Thread Kirill Galinurov
Hi all. I use latest stable opensips 2.3.2 and rtpengine module. In 2.4
devel branch rtpengine module i can use *in-iface=..., out-iface=. *parmeters.
But what about rtpengine  module in 2.3.2 ?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] topology_hiding

2017-11-17 Thread Kirill Galinurov
Hi Bogdan.
Thanks you for the answer.
I don't want mislead you.
I resolve my problem.
I use uac_replace_from() uac_replace_to() fo rewrite to and from headers.

if(is_method("INVITE"))  {
 if (check_address("1","$si","$sp","any","$avp(ctx)")){
  force_send_socket(udp:10.240.250.121:9918);
  create_dialog();
  topology_hiding();
  setflag(CALL_SW);
  do_accounting("log", "cdr|failed");
  $dlg_val(callee) = $rU;
  $dlg_val(calling) =$fU;
  $dlg_val(callcount) = $var(size);
  xlog("L_INFO","+Incoming call from $fU $sp $proto \n");
  $acc_extra(src_ip) = $si;
  $acc_leg(caller) = $fU;
  $acc_leg(callee) = $rU;
  if(!lb_start_or_next("1","st","s")){
  switch($rc){
  case -1:
  xlog("L_INFO","error  500 General dispatch error\n");
  send_reply("503", "No resource avaiable");
  acc_log_request("503 General dispatch error");
   break;

   case -2:
  xlog("L_INFO", "503 No free resources on nodes\n");
  send_reply("503", "No resource avaible");
  acc_log_request("503 No free resource on nodes");
   break;
   case -3:
  xlog("L_INFO","606 No nodes avaible\n");
  send_reply("503", "No resource avaible");
  acc_log_request("606 No nodes avaible");
   break;
  }
} else {
   xlog("L_INFO","Dispatch request to softswitch $du\n");
  $avp(node) = $du;
  $acc_extra(dst_node) = $du;
  $ru = "sip:" + $rU + "@" + $dd + ":"+$rp +";transport=udp";
  uac_replace_from("",'sip:$fU@10.240.250.121');
  uac_replace_to("sip:$tU@10.240.250.121:$rp");
   t_on_failure("fail_softswitch");
   route(relay);
  }
 But I doubt that it correct way.
Also i want to avp_db_query fo get ip from db.
Can i use variables in force_send_socket() function ?
Regards
Kirill Galinurov

2017-11-16 15:36 GMT+03:00 Bogdan-Andrei Iancu <bog...@opensips.org>:

> Hi,
>
> First, note that "2" is written "two", not "to" - just to be sure people
> do understand your explanations :).
>
> Now, you say you still see the Client IP in the Call-ID and in the FROM
> headers ?? If that is the case:
>
> 1) to change the call-id, see the "C" option in the topology_hiding() call
>
> 2) The FROM hdr is outside the topology-hiding scope, but if you want to
> change it see the uac_replace_from() function from the the uac module.
>
> Regards,
>
> Bogdan-Andrei Iancu
>   OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
>
> On 11/14/2017 05:49 PM, Kirill Galinurov wrote:
>
> Hi. All we try topology hiding module.
> We have opensips 2.3/2 like sbc with to interfaces.
> And ip addresses are X.X.X.X and y.y.y.y.
> We have to softswitch with ip addreses z.z.z.1 and z.z.z.2
> Also we loadbalancing calls between softswitch .
> My config
> if(is_method("INVITE"))  {
>create_dialog();
>topology_hiding();
>if (check_address("1","$si","$sp","any","$avp(ctx)")){
>force_send_socket(udp:10.240.250.121:5126);
>setflag(CALL_SW);
>do_accounting("log", "cdr|failed");
>$dlg_val(callee) = $rU;
>$dlg_val(calling) =$fU;
>$dlg_val(callcount) = $var(size);
>xlog("L_INFO","+Incoming call from $fU $sp $proto
> \n");
>$acc_extra(src_ip) = $si;
>$acc_leg(caller) = $fU;
>$acc_leg(callee) = $rU;
>if(!lb_start_or_next("1","st","s")){
>switch($rc){
>case -1:
>xlog("L_INFO","error  500 General dispatch
> error\n");
>send_reply("503", "No resource avaiable");
>acc_log_request("503 General dispatch error");
>break;
>
>case -2:
>xlog("L_INFO", "503 No free resources on
> nodes\n");
>send_reply("503", "No resource avaible");
>acc_log_request("503 No free resource on
> nodes");
> 

[OpenSIPS-Users] topology_hiding

2017-11-14 Thread Kirill Galinurov
Hi. All we try topology hiding module.
We have opensips 2.3/2 like sbc with to interfaces.
And ip addresses are X.X.X.X and y.y.y.y.
We have to softswitch with ip addreses z.z.z.1 and z.z.z.2
Also we loadbalancing calls between softswitch .
My config
if(is_method("INVITE"))  {
   create_dialog();
   topology_hiding();
   if (check_address("1","$si","$sp","any","$avp(ctx)")){
   force_send_socket(udp:10.240.250.121:5126);
   setflag(CALL_SW);
   do_accounting("log", "cdr|failed");
   $dlg_val(callee) = $rU;
   $dlg_val(calling) =$fU;
   $dlg_val(callcount) = $var(size);
   xlog("L_INFO","+Incoming call from $fU $sp $proto \n");
   $acc_extra(src_ip) = $si;
   $acc_leg(caller) = $fU;
   $acc_leg(callee) = $rU;
   if(!lb_start_or_next("1","st","s")){
   switch($rc){
   case -1:
   xlog("L_INFO","error  500 General dispatch
error\n");
   send_reply("503", "No resource avaiable");
   acc_log_request("503 General dispatch error");
   break;

   case -2:
   xlog("L_INFO", "503 No free resources on
nodes\n");
   send_reply("503", "No resource avaible");
   acc_log_request("503 No free resource on
nodes");
   break;
   case -3:
   xlog("L_INFO","606 No nodes avaible\n");
   send_reply("503", "No resource avaible");
   acc_log_request("606 No nodes avaible");
   break;
   }
 } else {
   xlog("L_INFO","Dispatch request to softswitch
$du\n");
   $avp(node) = $du;
   $acc_extra(dst_node) = $du;
   t_on_failure("fail_softswitch");
   route(relay);
   }
   }
   else
   if (check_address("2","$Ri","$Rp","any","$avp(ctx)")){
   setflag(CALL_FROM_SW);
   do_accounting("log", "cdr|failed");
   $dlg_val(callee) = $rU;
   $dlg_val(calling) = $fU;
   $dlg_val(callcount) = $var(size);
   xlog("L_INFO","+Outgouing call from $fU $sp $proto \n");
   $acc_extra(src_ip) = $si;
   $acc_leg(caller) = $fU;
   $acc_leg(callee) = $rU;
   if(!lb_start_or_next("$avp(ctx)","st","s")){
   switch($rc){
   case -1:
   xlog("L_INFO","error  500 General dispatch
error\n");
   send_reply("503", "No resource avaiable");
   acc_log_request("503 General dispatch error");
   break;

   case -2:
   xlog("L_INFO", "503 No free resources on
operator\n");
   send_reply("503", "No resource avaible");
   acc_log_request("503 No free resource on
operator");
   break;
   case -3:
   xlog("L_INFO","606 No resources avaible\n");
   send_reply("503", "No resource avaible");
   acc_log_request("606 No nodes avaible");
   break;
   }
 } else {
   xlog("L_INFO","Dispatch request to operator sbc
$du\n");
   $avp(node) = $du;
   $acc_extra(dst_node) = $du;
   t_on_failure("fail_operator");
   route(relay);
   }
   }
   else
sl_send_reply("403", "Forbidden posible wrong port");

   }
}
In invite on softswitch i see
NVITE sip:12...@xx.xx.xx.xx:5126 SIP/2.0
Via: SIP/2.0/UDP YY.YY.YY.YY:5126;branch=z9hG4bKe4d9.14b51d57.0
Max-Forwards: 69
From: "Anonymous" ;tag=as59cc9e35
To: 
Contact: 
Call-ID: 0068dba856ae05e8406504ab71fc9...@cc.cc.cc.cc.cc
CSeq: 102 INVITE

Where CC is client ip. I thithk it must be opensips ip adress
10.240.250.121:5126
What is wrong?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Correct connection string for cachedb_url in cachedb_memcached module

2017-06-13 Thread Kirill Galinurov
Sorry I find error.
it's semicolon in my config
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Correct connection string for cachedb_url in cachedb_memcached module

2017-06-13 Thread Kirill Galinurov
Hi all I use opensips-2.3
Аnd try to use cachedb_memcached module to store some information about wss
users.
But i got errors :

DBG:core:set_mod_param_regex: cachedb_memcached matches module
cachedb_memcached
Jun 13 10:51:06 [107947] DBG:core:set_mod_param_regex: found 
in module cachedb_memcached [/usr/lib64/opensips/modules/]
Jun 13 10:51:06 [107947] CRITICAL:core:yyerror: parse error in config file
/etc/opensips/opensips.cfg, line 200, column 20-21: syntax e
rror
Jun 13 10:51:06 [107947] CRITICAL:core:yyerror: parse error in config file
/etc/opensips/opensips.cfg, line 200, column 20-21:
Jun 13 10:51:06 [107947] ERROR:core:main: bad config file (2 errors)
My config is:

loadmodule "cachedb_memcached.so"
modparam("cachedb_memcached",
"cachedb_url","memcached:group1://localhost:11211,127.0.0.1/");

What is a correct string?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] How to monitor WSS socket connection?

2017-06-09 Thread Kirill Galinurov
Hi all.
Is any event raised when WSS socket corrupted ?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] CDR in Flat files

2017-06-08 Thread Kirill Galinurov
Yes i change my rsyslog.conf and now. Everything looks OK
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] CDR in Flat files

2017-06-05 Thread Kirill Galinurov
Hi ALL.
 I try to store cdr in flat files.
My config is
loadmodule "acc.so"
modparam("acc", "detect_direction", 0)
modparam("acc", "extra_fields", "log: src_ip; dst_ip")
modparam("acc", "leg_fields", "log: caller; callee")
modparam("acc", "log_facility", "LOG_DAEMON")

   if(is_method("INVITE"))  {
   if (check_address("0","$si","$sp","any")){
   force_send_socket(udp:172.20.20.30:5060);
   setflag(CALL_AST);
   create_dialog("B");
   do_accounting("log", "cdr");
}

in cosole debug I see
ACC: call ended:
created=1496654777;call_start_time=1496654780;duration=7;ms_duration=7393;setuptime=3;method=I
NVITE;from_tag=SDipn2901-1544324631353641441C2115;to_tag=as51263d7c;call_id=SDipn2901-3f6bad0e2bf09ec16aeaedd37abb0661-v300g00030;code=
200;reason=OK;src_ip=;dst_ip=;caller=;callee=

But no records in log file
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] E_DLG_STATE_CHANGED event parameters and values.

2017-05-17 Thread Kirill Galinurov
Hi all. I try to monitoring opensips using new rabbitmq module and
EVENT_ROUTE.  I try to trace dialog state.
My config is
event_route[E_DLG_STATE_CHANGED] {
   fetch_event_params("$avp(nstate);$avp(ostate)");
   xlog("L_INFO", "newstate $avp(nstate) oldstate  $avp(ostate) of dialog );
}
I thought $avp(nstate) variables like $DLG_status. But in logs I see:

DBG:event_route:scriptroute_fetch: Fetching parameters for event
E_DLG_STATE_CHANGED
May 17 09:24:14 [44736] DBG:event_route:scriptroute_fetch: Successfully
fetched 2 parameters
May 17 09:24:14 [44736] newstate 3984 oldstate  171237808 of dialog to

Not 1-5. Where is my mistake?

Thank you.

Best regards Kirill Galinurov
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] HOW to raise RABBITMQ event when user UNREGISTERED

2017-05-15 Thread Kirill Galinurov
Hi Liviu. I load "event_route.so" module.
Now in logs

May 15 15:13:59 [40117] DBG:core:evi_param_set: adding string param May 15
15:13:59 [40117] DBG:core:evi_param_set: adding string param May 15
15:13:59 [40117] DBG:core:evi_param_set: adding int param May 15 15:13:59
[40117] DBG:core:evi_param_set: adding int param May 15 15:13:59 [40117]
DBG:core:evi_raise_event_msg: found subscriber XX.XX.XX.XX
But in Rabbitmq:

INFO REPORT 15-May-2017::16:14:35 ===

accepting AMQP connection <0.602.0> (YY.YY.YY.YY:42938 -> XX.XX.XX.XX:5672)

=INFO REPORT 15-May-2017::16:14:35 ===
connection <0.602.0> (YY.YY.YY.YY:42938 -> XX.XX.XX.XX.XX:5672): user 'sbc'
authenticated and granted access to vhost '/'

=INFO REPORT 15-May-2017::16:20:34 ===
Enabling tracing for vhost '/'
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] HOW to raise RABBITMQ event when user UNREGISTERED?

2017-05-10 Thread Kirill Galinurov
HI all I try get AMPQ message when user registarion exprires and contact is
deleted from an existing AOR. I try use EVENT_RABBITMQ module. And subscribe
to  E_UL_CONTACT_DELETE event on startup module. Like
startup_route {
   if (!subscribe_event("E_UL_CONTACT_DELETE",
"rabbitmq:wssserver:passw...@xx.xx.xx.xx:5672/voip")) {
   xlog("L_ERR","cannot the RabbitMQ server to the
E_UL_CONTACT_DELETE event\n");
   }
   }

But it's not work.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips 2.3 crashed on user reg - mid_registrar

2017-04-26 Thread Kirill Galinurov
Hi I also have the same problem. Our config is:

loadmodule "mid_registrar.so"
modparam("mid_registrar", "mode", 1) /* 0 = mirror / 1 = ct / 2 = AoR */
modparam("mid_registrar", "outgoing_expires", 3600)
modparam("mid_registrar", "insertion_mode", 0) /* 0 = contact; 1 = path */
modparam("mid_registrar", "max_contacts", 1)
modparam("mid_registrar", "retry_after", 30)
modparam("mid_registrar", "contact_match_param", "rid")

### Routing Logic 

# main request routing logic

route{

if (method=="OPTIONS")
{
sl_send_reply("200", "OK");
exit;
};
if (method=="PUBLISH")
{
exit;
};
if (method=="SUBSCRIBE")
{
sl_send_reply("404", "Not Found");
exit;
};

if (!mf_process_maxfwd_header("40")) {
sl_send_reply("483","Too Many Hops");
exit;
  }


if (is_method("REGISTER")) {
  mid_registrar_save("location");
  switch ($retcode) {
  case 1:
xlog("L_INFO", "forwarding REGISTER to main registrar...\n");
$ru = "sip:192.168.10.201:5070";
if (!t_relay()) {
  send_reply("500", "Server Internal Error 1");
}

break;
  case 2:
xlog("L_INFO", "REGISTER has been absorbed!\n");
break;
  default:
xlog("L_ERR", "mid-registrar error!\n");
send_reply("500", "Server Internal Error 2");
  }

  exit;
}






if (is_method("INVITE|MESSAGE") && $si == "192.168.10.201" && $sp == 5070) {
   xlog("looking up $ru!\n");
  if (!mid_registrar_lookup("location")) {
t_reply("404", "Not Found");
exit;
}

   t_relay();

exit;
}

}

Apr 26 12:58:11 [7524] DBG:core:parse_msg:  method:  
Apr 26 12:58:11 [7524] DBG:core:parse_msg:  uri:

Apr 26 12:58:11 [7524] DBG:core:parse_msg:  version: 
Apr 26 12:58:11 [7524] DBG:core:parse_headers: flags=2
Apr 26 12:58:11 [7524] DBG:core:parse_via_param: found param type 232,
 = ; state=16
Apr 26 12:58:11 [7524] DBG:core:parse_via: end of header reached, state=5
Apr 26 12:58:11 [7524] DBG:core:parse_headers: via found, flags=2
Apr 26 12:58:11 [7524] DBG:core:parse_headers: this is the first via
Apr 26 12:58:11 [7524] DBG:core:receive_msg: After parse_msg...
Apr 26 12:58:11 [7524] DBG:core:receive_msg: preparing to run routing
scripts...
Apr 26 12:58:11 [7524] DBG:core:parse_headers: flags=100
Apr 26 12:58:11 [7524] DBG:maxfwd:is_maxfwd_present: value = 70
Apr 26 12:58:11 [7524] DBG:mid_registrar:mid_reg_save: saving to location...
Apr 26 12:58:11 [7517] DBG:core:handle_sigs: status = 139
Apr 26 12:58:11 [7517] INFO:core:handle_sigs: child process 7524 exited by
a signal 11
Apr 26 12:58:11 [7517] INFO:core:handle_sigs: core was generated
Apr 26 12:58:11 [7517] INFO:core:handle_sigs: terminating due to SIGCHLD
Apr 26 12:58:11 [7518] INFO:core:sig_usr: signal 15 received
Apr 26 12:58:11 [7519] INFO:core:sig_usr: signal 15 received
Apr 26 12:58:11 [7520] INFO:core:sig_usr: signal 15 received
Apr 26 12:58:11 [7521] INFO:core:sig_usr: signal 15 received
Apr 26 12:58:11 [7522] INFO:core:sig_usr: signal 15 received
Apr 26 12:58:11 [7523] INFO:core:sig_usr: signal 15 received
Apr 26 12:58:11 [7525] INFO:core:sig_usr: signal 15 received
Apr 26 12:58:11 [7517] INFO:core:cleanup: cleanup
Apr 26 12:58:11 [7517] DBG:core:pool_remove: removing connection from the
pool
Apr 26 12:58:11 [7517] DBG:db_postgres:db_postgres_free_connection:
PQfinish(0x1bd8980)
Apr 26 12:58:11 [7517] DBG:db_postgres:db_postgres_free_connection:
pkg_free(0x7fbfc037fb68)
Apr 26 12:58:11 [7517] DBG:uac_auth:mod_destroy: done
Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: tm_shutdown : start
Apr 26 12:58:11 [7517] DBG:tm:unlink_timer_lists: emptying DELETE list for
set 0
Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: emptying hash table
Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: releasing timers
Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: removing semaphores
Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: destroying callback lists
Apr 26 12:58:11 [7517] DBG:tm:tm_shutdown: tm_shutdown : done
Apr 26 12:58:11 [7517] DBG:core:shm_mem_destroy: destroying the shared
memory lock
Apr 26 12:58:11 [7517] DBG:core:handle_sigs: terminating due to SIGCHLD

gdb dump file:
https://gist.github.com/anonymous/351c2feb6907c697554ede46f18b0f55
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Opensips 2.3 Crash mid-registrar module

2017-04-19 Thread Kirill Galinurov
Hello. We continue testing Opensips-2.3 with mid-registrar module. Opensips
installed from yum.opensips.org/2.3/nightly/el/7/x86_64/opensips-yum-nightly
repo.
Config file.
loadmodule "mid_registrar.so"
modparam("mid_registrar", "mode", 1) /* 0 = mirror / 1 = ct / 2 = AoR */
modparam("mid_registrar", "outgoing_expires", 7200)
modparam("mid_registrar", "insertion_mode", 0) /* 0 = contact; 1 = path */
modparam("mid_registrar", "max_contacts", 1)
modparam("mid_registrar", "retry_after", 30)
modparam("mid_registrar", "contact_match_param", "rid")


if (is_method("REGISTER")) {
  mid_registrar_save("location", "v");
  switch ($retcode) {
  case 1:
xlog("L_INFO", "forwarding REGISTER to main registrar ($$ci=$ci)\n");
$ru = "sip:192.168.10.201:5061";
if (!t_relay()) {
  send_reply("500", "Server Internal Error 1");
}

break;
  case 2:
xlog("L_INFO", "REGISTER has been absorbed!\n");
break;
  default:
xlog("L_ERR", "mid-registrar error!\n");
send_reply("500", "Server Internal Error 2");
  }

  exit;
}

And it crashed Opensips.

Apr 19 10:32:10 [23576] DBG:mid_registrar:mid_reg_ct_event: Contact
callback (8): 
contact='sip:2102@192.168.76.96:52788;rinstance=1661374fc8fce109;transport=UDP'
| param=(0x754c59c0 -> (nil)) | data[0]=((nil))

Program received signal SIGSEGV, Segmentation fault.
crcitt_string_array (dst=dst@entry=0x70e109e1  "",
src=src@entry=0x90, size=size@entry=1) at crc.c:225
225  len=src[i].len;

gdb core file:
#0  crcitt_string_array (dst=dst@entry=0x70e109e1  "",
src=src@entry=0x90, size=size@entry=1) at crc.c:225
i = 
ccitt = 65535
c = 
len = 
str_len = 4
__FUNCTION__ = "crcitt_string_array"
#1  0x70ba38e5 in generate_fromtag (tag=tag@entry=0x7fffdf70,
callid=callid@entry=0x90) at uac.c:118
No locals.
#2  0x70b9da37 in new_auto_dlg_uac (_luri=0x80, _turi=0x70,
_ruri=0x10, callid=0x90, _sock=0x0, _d=) at dlg.c:210
fromtag = {s = 0x1 , len = -145797379}
clid = {s = 0x777a31c0 <_IO_2_1_stderr_> "\207(\255",
, len = -146460574}
#3  0x7fffef0666a9 in unregister_contact (mri=mri@entry=0x0) at
ulcb.c:122
dlg = 0x7fff0020
ret = 
__FUNCTION__ = "unregister_contact"
#4  0x7fffef066f30 in mid_reg_ct_event (binding=,
type=, data=) at ulcb.c:173
c = 
mri = 0x0
__FUNCTION__ = "mid_reg_ct_event"
#5  0x7fffefb12a9b in run_ul_callbacks (binding=0x754c5890, type=8)
at ul_callback.h:126
cbp = 0x75223ab8Apr 19 10:32:10 [23576]
DBG:mid_registrar:mid_reg_ct_event: Contact callback (8):
contact='sip:2102@192.168.76.96:52788;rinstance=1661374fc8fce109;transport=UDP'
| param=(0x754c59c0 -> (nil)) | data[0]=((nil))

Program received signal SIGSEGV, Segmentation fault.
crcitt_string_array (dst=dst@entry=0x70e109e1  "",
src=src@entry=0x90, size=size@entry=1) at crc.c:225
225  len=src[i].len;
ct_extra_idx = 0
aor_extra_idx = 0
ele = 0x75223ad0
#6  wb_timer (ins_list=0x754afda0, _r=0x754c5890) at urecord.c:320
old_state = 
ptr = 0x754c5890
t = 
op = 
ins_done = 0
#7  timer_urecord (_r=_r@entry=0x754abee0,
ins_list=ins_list@entry=0x754afda0)
at urecord.c:396
No locals.
#8  0x7fffefb04031 in mem_timer_udomain (_d=) at
udomain.c:1147
ptr = 0x754abee0
dest = 
i = 310
ret = 
flush = 0
it = {node = 0x0, map = 0x754be350}
prev = {node = 0x754c57f0, map = 0x754be350}
__FUNCTION__ = "mem_timer_udomain"
#9  0x7fffefb201a1 in synchronize_all_udomains () at dlist.c:803
res = 0
ptr = 0x754afc98
#10 0x7fffefb20d87 in destroy () at ul_mod.c:492
__FUNCTION__ = "destroy"
#11 0x004a5d71 in destroy_modules () at sr_module.c:527
t = 0x772245a0
foo = 0x77224250
__FUNCTION__ = "destroy_modules"
#12 0x004a2057 in cleanup (show_status=show_status@entry=1) at
main.c:319
__FUNCTION__ = "cleanup"
#13 0x004a2df2 in handle_sigs () at main.c:522
chld = 
chld_status = 139
overall_status = 139
i = 
do_exit = 1
__FUNCTION__ = "handle_sigs"
#14 0x0041c818 in main_loop () at main.c:722
startup_done = 
chd_rank = 5
#15 main (argc=, argv=) at main.c:1283
cfg_stream = 
c = 
r = 
tmp = 0xf0b2e4 
tmp_len = 
port = 
proto = 
protos_no = 
options = 0x57c0f8 "f:cCm:M:b:l:n:N:rRvdDFETSVhw:t:u:g:P:G:W:"
seed = 2690059408
rfd = 
__FUNCTION__ = "main"
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] rtpengine database support

2017-04-04 Thread Kirill Galinurov
Hi Bogdan. I think Alex means rtpengine redis support. Rtpengine store
mediasession related info in REDIS DB. We can use 2 rtpengine instance to
HA and failover.
https://github.com/sipwise/rtpengine/wiki/Redis-data-structure
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Possible mid-registrar bug

2017-03-30 Thread Kirill Galinurov
Hi all. We try test new mid-registar feature in opensips 2.3

loadmodule "mid_registrar.so"
modparam("mid_registrar", "mode", 1) /* 0 = mirror / 1 = ct / 2 = AoR */
modparam("mid_registrar", "outgoing_expires", 3600)
modparam("mid_registrar", "insertion_mode", 0) /* 0 = contact; 1 = path */
modparam("mid_registrar", "max_contacts", 1)
modparam("mid_registrar", "retry_after", 30)
modparam("mid_registrar", "contact_match_param", "rid")

if (is_method("REGISTER")) {
mid_registrar_save("location");
switch ($retcode) {
case 1:
 xlog("L_INFO", "forwarding REGISTER to main
registrar...\n");
$ru = "sip:192.168.77.49:5060";
if (!t_relay()) {
send_reply("500", "Server Internal Error 1");
}

break;
case 2:
 xlog("L_INFO", "REGISTER has been absorbed!\n");
break;
default:
xlog("L_ERR", "mid-registrar error!\n");
send_reply("500", "Server Internal Error 2");
}

  exit;
}

if (is_method("INVITE") and $si == "192.168.77.49" and $sp == 5060) {
if (!mid_registrar_lookup("location")) {
t_reply("404", "Not Found");
exit;
}

if (!t_relay())
send_reply("500", "Server Internal Error 3");

exit;
}
When we use rid parameter we have a error in Asterisk.

Initial Register from Client to Opensips

*REGISTER sip:192.168.10.200;transport=UDP SIP/2.0*
*Via: SIP/2.0/UDP
192.168.76.224:33593;branch=z9hG4bK-524287-1---52af00d0e9d590fd*
*Max-Forwards: 70*
*Contact:
*
*To: ;transport=UDP>*
*From: ;transport=UDP>;tag=66282f00*
*Call-ID: zHst9ROVeEmKYQVPUwDz8w..*
*CSeq: 6 REGISTER*
*Expires: 3600*
*User-Agent: Z 3.15.40006 rv2.8.20*
*Authorization: Digest
username="2101",realm="asterisk",nonce="1490856865/be28c84459a2237855ebfa2521ba0bb8",uri="sip:192.168.10.200;transport=UDP",response="753e7a589c04180fa63aecc08bb4b40a",cnonce="91b8e43b5c5c0bc2e45ec37f8ddf53d9",nc=0003,qop=auth,algorithm=md5,opaque="488632b65bf44460"*
*Allow-Events: presence, kpml, talk*
*Content-Length: 0*

>From Opensips to Asterisk

*REGISTER sip:192.168.77.49:5060  SIP/2.0*
*Via: SIP/2.0/UDP 192.168.10.200:5060;branch=z9hG4bK8fa9.40aab787.0*
*Via: SIP/2.0/UDP
192.168.76.224:33593;branch=z9hG4bK-524287-1---52af00d0e9d590fd*
*Max-Forwards: 69*
*Contact:
*
*To: ;transport=UDP>*
*From: ;transport=UDP>;tag=66282f00*
*Call-ID: zHst9ROVeEmKYQVPUwDz8w..*
*CSeq: 6 REGISTER*
*Expires: 3600*
*User-Agent: Z 3.15.40006 rv2.8.20*
*Authorization: Digest
username="2101",realm="asterisk",nonce="1490856865/be28c84459a2237855ebfa2521ba0bb8",uri="sip:192.168.10.200;transport=UDP",response="753e7a589c04180fa63aecc08bb4b40a",cnonce="91b8e43b5c5c0bc2e45ec37f8ddf53d9",nc=0003,qop=auth,algorithm=md5,opaque="488632b65bf44460"*
*Allow-Events: presence, kpml, talk*
*Content-Length: 0*

Asterisk console log:

*[2017-03-30 10:01:31] ERROR[20693]: pjproject:0 :   sip_transport.
Error processing 658 bytes packet from UDP 192.168.10.200:5060
 : PJSIP syntax error exception when parsing ''
header on line 5 col 180:*
*REGISTER sip:192.168.77.49:5060  SIP/2.0*
*Via: SIP/2.0/UDP 192.168.10.200:5060;branch=z9hG4bK4e1d.2e61df17.0*
*Via: SIP/2.0/UDP
192.168.76.224:33593;branch=z9hG4bK-524287-1---51b24eac9ec64d78*
*Max-Forwards: 69*
*Contact:
*
*To: ;transport=UDP>*
*From: ;transport=UDP>;tag=66282f00*
*Call-ID: zHst9ROVeEmKYQVPUwDz8w..*
*CSeq: 15 REGISTER*
*Expires: 3600*
*User-Agent: Z 3.15.40006 rv2.8.20*
*Allow-Events: presence, kpml, talk*
*Content-Length: 0*

So the problem in rid parameter Contact field
 
rid=c2lwOjIxMDFAMTkyLjE2OC43Ni4yMjQ6MzM1OTM7cmluc3RhbmNlPWE2YmIxODU3ZjdlNDFmMzA7dHJhbnNwb3J0PVVEUA==>
in ==> symbols.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] How to store some Sip-header value in variable ?

2016-12-21 Thread Kirill Galinurov
Hi All. I need to store some additional info about user from custom sip
header in Register request. How i can do it? Can i get this info later
from ul_dump or ul_show_contact command ?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Mi_datagram perfomance.

2016-12-21 Thread Kirill Galinurov
Hello all. we want to get some statistic from our opensips. We want to use
http://www.opensips.org/html/docs/modules/2.2.x/mi_datagram.html module to
send some fifo commands like ul_show, reg_list, dlg_lists and others. What
is the right way to get statistics from opensips in realtime. Are there any
performance issues in mi_datagram module?
I see that mi_datagram module used for visualizing OpenSIPS performance in
https://www.youtube.com/watch?v=kfa6NuW7vgk presentation on last opensips
summit.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] drouting

2016-09-22 Thread Kirill Galinurov
Ok Bogdan. I'll try

2016-09-20 22:57 GMT+03:00 Bogdan-Andrei Iancu <bog...@opensips.org>:
> Hi Kirill,
>
> The logs says that a rule was found, but now GW (destination) was selected
> to be used.
>
> I see you checked the status of the GWs, but please check the status of the
> carriers also:
> http://www.opensips.org/html/docs/modules/2.2.x/drouting.html#id296588
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
> On 20.09.2016 15:44, Kirill Galinurov wrote:
>>
>> Hello Bogdan. I try drouting() without any parameters.
>>
>> 2016-09-20 14:20 GMT+03:00 Bogdan-Andrei Iancu <bog...@opensips.org>:
>>>
>>> Hello Kirill,
>>>
>>> I see the MI command succeeded, right? but the scrip do_routing() fails ?
>>> what are the parameters you pass to do_routing() ?
>>>
>>> Best regards,
>>>
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developer
>>> http://www.opensips-solutions.com
>>>
>>>
>>> On 19.09.2016 15:50, Kirill Galinurov wrote:
>>>>
>>>> Hi all I try to use drouting module.
>>>>
>>>> Sep 19 17:18:28 [37245] DBG:drouting:do_routing: using dr group 1,
>>>> rule_idx 0, username 79632780099
>>>> Sep 19 17:18:28 [37245] DBG:drouting:internal_check_rt: found rgid 1
>>>> (rule list 0x7fe60616b800)
>>>> Sep 19 17:18:28 [37245] INFO:drouting:do_routing: no destination for
>>>> dr group 1, rule_idx 0, username 79632780099
>>>> L_INFOdo_routing: No rules matching the URI
>>>> In dr_rules
>>>>ruleid | groupid | prefix | timerec | priority | routeid | gwlist |
>>>> attrs |  description
>>>>
>>>>
>>>> +-++-+--+-++---+
>>>>0 | 1   | 7  | |1 | | #cr1   |
>>>>  | outgoing calls
>>>>
>>>> dr_carriers
>>>>id | carrierid | gwlist | flags | state | attrs | description
>>>> +---++---+---+---+-
>>>>1 | cr1   | gw1;   | 0 | 2 | 0x2   | OUT
>>>>
>>>> dr_gateways
>>>>id | gwid | type |  address  | strip | pri_prefix | attrs |
>>>> probe_mode | state | socket  | description
>>>>
>>>>
>>>> +--+--+---+---++---++---+-+-
>>>>1 | gw1  |1 | sip:out_voip.ru | 0 ||   |
>>>>   0 | 0 | udp:XX.XX.XX.XX:5060 | out
>>>>
>>>> opensipsctl fifo dr_gw_status
>>>> ID:: gw1 IP=XX.XXX.XXX.XX State=Active
>>>>
>>>> [root@sbc-msk opensips]# opensipsctl fifo dr_number_routing 1
>>>> 79182220222
>>>> Matched Prefix:: 7.
>>>> What is wrong?
>>>>
>>>> ___
>>>> Users mailing list
>>>> Users@lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] drouting

2016-09-20 Thread Kirill Galinurov
Hello Bogdan. I try drouting() without any parameters.

2016-09-20 14:20 GMT+03:00 Bogdan-Andrei Iancu <bog...@opensips.org>:
> Hello Kirill,
>
> I see the MI command succeeded, right? but the scrip do_routing() fails ?
> what are the parameters you pass to do_routing() ?
>
> Best regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
>
> On 19.09.2016 15:50, Kirill Galinurov wrote:
>>
>> Hi all I try to use drouting module.
>>
>> Sep 19 17:18:28 [37245] DBG:drouting:do_routing: using dr group 1,
>> rule_idx 0, username 79632780099
>> Sep 19 17:18:28 [37245] DBG:drouting:internal_check_rt: found rgid 1
>> (rule list 0x7fe60616b800)
>> Sep 19 17:18:28 [37245] INFO:drouting:do_routing: no destination for
>> dr group 1, rule_idx 0, username 79632780099
>> L_INFOdo_routing: No rules matching the URI
>> In dr_rules
>>   ruleid | groupid | prefix | timerec | priority | routeid | gwlist |
>> attrs |  description
>>
>> +-++-+--+-++---+
>>   0 | 1   | 7  | |1 | | #cr1   |
>> | outgoing calls
>>
>> dr_carriers
>>   id | carrierid | gwlist | flags | state | attrs | description
>> +---++---+---+---+-
>>   1 | cr1   | gw1;   | 0 | 2 | 0x2   | OUT
>>
>> dr_gateways
>>   id | gwid | type |  address  | strip | pri_prefix | attrs |
>> probe_mode | state | socket  | description
>>
>> +--+--+---+---++---++---+-+-
>>   1 | gw1  |1 | sip:out_voip.ru | 0 ||   |
>>  0 | 0 | udp:XX.XX.XX.XX:5060 | out
>>
>> opensipsctl fifo dr_gw_status
>> ID:: gw1 IP=XX.XXX.XXX.XX State=Active
>>
>> [root@sbc-msk opensips]# opensipsctl fifo dr_number_routing 1 79182220222
>> Matched Prefix:: 7.
>> What is wrong?
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Oopensips 2.2.1 wss Crash

2016-09-19 Thread Kirill Galinurov
Hi,All I testing wss in Opensips 2.2.1. Sometimes it's crashed

 19 17:46:00 [32693] INFO:core:init_sock_keepalive: TCP keepalive
enabled on socket 24
Sep 19 17:46:00 [32693] DBG:core:print_ip: tcpconn_new: new tcp
connection to: 194.186.5.238
Sep 19 17:46:00 [32693] DBG:core:tcpconn_new: on port 35888, proto 6
Sep 19 17:46:00 [32693] DBG:proto_wss:tls_conn_init: entered: Creating
a whole new ssl connection
Sep 19 17:46:00 [32693] DBG:proto_wss:tls_conn_init: looking up socket
based TLS server domain [92.53.102.226:8443]
Sep 19 17:46:00 [32693] DBG:tls_mgm:tls_find_server_domain: virtual
TLS server domain not found, Using default TLS server domain settin
gs
Sep 19 17:46:00 [32693] DBG:proto_wss:tls_conn_init: found socket
based TLS server domain [0.0.0.0:0]
Sep 19 17:46:00 [32693] DBG:proto_wss:tls_conn_init: Setting in ACCEPT
mode (server)
Sep 19 17:46:00 [32693] DBG:core:tcpconn_add: hashes: 754, 98
Sep 19 17:46:00 [32693] DBG:core:handle_new_connect: new connection:
0x7f4b8ab6cab0 24 flags: 0006
Sep 19 17:46:00 [32693] DBG:core:send2child: no free tcp receiver,
connection passed to the least busy one (proc #1, 1 con)
Sep 19 17:46:00 [32693] DBG:core:send2child: to tcp child 1 0(32692),
0x7f4b8ab6cab0 rw 1
Sep 19 17:46:00 [32692] DBG:core:handle_io: We have received conn
0x7f4b8ab6cab0 with rw 1 on fd 25
Sep 19 17:46:00 [32692] DBG:core:io_watch_add: [TCP_worker]
io_watch_add op (25 on 5) (0x7e2fc0, 25, 19, 0x7f4b8ab6cab0,1),
fd_no=3/102
4
Sep 19 17:46:00 [32692] DBG:proto_wss:tls_update_fd: New fd is 25
Sep 19 17:46:00 [32693] DBG:core:io_wait_loop_epoll: [TCP_main]
EPOLLHUP on IN ->connection closed by the remote peer!
Sep 19 17:46:00 [32693] DBG:core:handle_tcp_worker: dead tcp worker 1
(pid 32692, no 0) (shutting down?)
Sep 19 17:46:00 [32693] DBG:core:io_watch_del: [TCP_main] io_watch_del
op on index 10 18 (0x7e2fc0, 18, 10, 0x0,0x1) fd_no=11 called
Sep 19 17:46:00 [32693] DBG:core:io_wait_loop_epoll: [TCP_main]
EPOLLHUP on IN ->connection closed by the remote peer!
Sep 19 17:46:00 [32693] CRITICAL:core:receive_fd: EOF on 21
Sep 19 17:46:00 [32693] DBG:core:handle_worker: dead child 6, pid
32692 (shutting down?)
Sep 19 17:46:00 [32693] DBG:core:io_watch_del: [TCP_main] io_watch_del
op on index 8 21 (0x7e2fc0, 21, 8, 0x0,0x1) fd_no=10 called
Sep 19 17:46:00 [32686] DBG:core:handle_sigs: status = 139
Sep 19 17:46:00 [32686] INFO:core:handle_sigs: child process 32692
exited by a signal 11
Sep 19 17:46:00 [32686] INFO:core:handle_sigs: core was generated
Sep 19 17:46:00 [32686] INFO:core:handle_sigs: terminating due to SIGCHLD
Sep 19 17:46:00 [32688] INFO:core:sig_usr: signal 15 received
Sep 19 17:46:00 [32687] INFO:core:sig_usr: signal 15 received
Sep 19 17:46:00 [32690] INFO:core:sig_usr: signal 15 received
Sep 19 17:46:00 [32691] INFO:core:sig_usr: signal 15 received
Sep 19 17:46:00 [32689] INFO:core:sig_usr: signal 15 received
Sep 19 17:46:00 [32693] INFO:core:sig_usr: signal 15 received
Sep 19 17:46:00 [32686] INFO:core:cleanup: cleanup
Sep 19 17:46:00 [32686] DBG:uac_auth:mod_destroy: done
Sep 19 17:46:00 [32686] DBG:core:pool_remove: removing connection from the pool
Sep 19 17:46:00 [32686] DBG:db_postgres:db_postgres_free_connection:
PQfinish(0xb8df30)
Sep 19 17:46:00 [32686] DBG:db_postgres:db_postgres_free_connection:
pkg_free(0x7f4b8c805150)
Sep 19 17:46:00 [32686] DBG:tls_mgm:mod_destroy: entered
Sep 19 17:46:00 [32686] DBG:tm:tm_shutdown: tm_shutdown : start
Sep 19 17:46:00 [32686] DBG:tm:unlink_timer_lists: emptying DELETE
list for set 0
Sep 19 17:46:00 [32686] DBG:tm:tm_shutdown: emptying hash table
Sep 19 17:46:00 [32686] DBG:tm:tm_shutdown: releasing timers
Sep 19 17:46:00 [32686] DBG:tm:tm_shutdown: removing semaphores
Sep 19 17:46:00 [32686] DBG:tm:tm_shutdown: destroying callback lists
Sep 19 17:46:00 [32686] DBG:tm:tm_shutdown: tm_shutdown : done
Sep 19 17:46:00 [32686] DBG:proto_wss:tls_update_fd: New fd is 24
Sep 19 17:46:00 [32686] ERROR:proto_wss:tls_write: TLS connection to
62.183.124.129:32224 write failed
Sep 19 17:46:00 [32686] ERROR:proto_wss:tls_write: TLS write error:
Sep 19 17:46:00 [32686] ERROR:proto_wss:tls_blocking_write: TLS failed
to send data
Sep 19 17:46:00 [32686] DBG:proto_wss:tls_conn_clean: entered
Sep 19 17:46:00 [32686] DBG:proto_wss:tls_update_fd: New fd is 22
Sep 19 17:47:00 [32686] CRITICAL:core:sig_alarm_abort: BUG - shutdown
timeout triggered, dying...Aborted (core dumped)


(gdb) bt full
#0  0x7f4b88c28669 in ?? ()
No symbol table info available.
#1  0x0001 in ?? ()
No symbol table info available.
#2  0x7f4b8ab89c00 in ?? ()
No symbol table info available.
#3  0x8548 in ?? ()
No symbol table info available.
#4  0x in ?? ()
No symbol table info available.

Core was generated by `opensips'.
Program terminated with signal 6, Aborted.
#0  0x7f4b8ca0d5f7 in ?? ()
"/root/./core.32686" is a core file

(gdb) bt full
#0  0x7f4b8ca0d5f7 in ?? ()
No symbol table info available.
#1  0x7f4b8ca0ece8 in ?? 

[OpenSIPS-Users] drouting

2016-09-19 Thread Kirill Galinurov
Hi all I try to use drouting module.

Sep 19 17:18:28 [37245] DBG:drouting:do_routing: using dr group 1,
rule_idx 0, username 79632780099
Sep 19 17:18:28 [37245] DBG:drouting:internal_check_rt: found rgid 1
(rule list 0x7fe60616b800)
Sep 19 17:18:28 [37245] INFO:drouting:do_routing: no destination for
dr group 1, rule_idx 0, username 79632780099
L_INFOdo_routing: No rules matching the URI
In dr_rules
 ruleid | groupid | prefix | timerec | priority | routeid | gwlist |
attrs |  description
+-++-+--+-++---+
 0 | 1   | 7  | |1 | | #cr1   |
   | outgoing calls

dr_carriers
 id | carrierid | gwlist | flags | state | attrs | description
+---++---+---+---+-
 1 | cr1   | gw1;   | 0 | 2 | 0x2   | OUT

dr_gateways
 id | gwid | type |  address  | strip | pri_prefix | attrs |
probe_mode | state | socket  | description
+--+--+---+---++---++---+-+-
 1 | gw1  |1 | sip:out_voip.ru | 0 ||   |
0 | 0 | udp:XX.XX.XX.XX:5060 | out

opensipsctl fifo dr_gw_status
ID:: gw1 IP=XX.XXX.XXX.XX State=Active

[root@sbc-msk opensips]# opensipsctl fifo dr_number_routing 1 79182220222
Matched Prefix:: 7.
What is wrong?

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips -2.2.1 Clustering

2016-09-05 Thread Kirill Galinurov
You don't understand. Оpensips dont't handle any users registration.
Opensips register itself on VOIP provider Register Server. And I want
to reregister Opensips when active node fail.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty

2016-09-02 Thread Kirill Galinurov
You can use dr_reload_status to check last reload. And
dr_number_routing to test routing table.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Opensips -2.2.1 Clustering.

2016-09-02 Thread Kirill Galinurov
Hi i use Opensips 2.2.1 like SBC. And I use UAC_Registrant module to
register on some Voip providers.
Now i want to build HA-Cluster. I have no problem with ip trunk. But
how i can to trigger and RE-Register when one node fails?

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Opensips 2.2 Craches when loadbalance

2016-07-18 Thread Kirill Galinurov
Hi all. I try to load balance INVITE using load-balancer module.
My config is.
 if ((is_method("INVITE")) && (proto != WS || proto != WSS)){
   if (check_address("2","$si","$sp","any")){
   xlog("L_INFO","+Incoming call from $si $sp
$proto to CallCenter\n");
   lb_start_or_next("1","st");
   t_relay();
   exit;
 }
   }
And opensips crashes with errrors
Incoming call from 192.168.75.223 5060 udp to CallCenter
Jul 18 18:10:40 [5601] DBG:load_balancer:lb_route: initial call of LB
- found requested 1/1 resource [st]
Jul 18 18:10:40 [5601] DBG:dialog:build_new_dlg: new dialog
0x7f41c59737c8 (c=903784011,f=sip:kiry@192.168.76.237,t=sip:100@192.168.10.
25,ft=612508366) on hash 29
Jul 18 18:10:40 [5601] DBG:core:parse_headers: flags=
Jul 18 18:10:40 [5601] DBG:dialog:init_leg_info: route_set , contact
sip:kiry@192.168.76.237, cseq 20 and bind_addr udp:192.168.10.25:5
060
Jul 18 18:10:40 [5601] DBG:dialog:dlg_add_leg_info: set leg 0 for
0x7f41c59737c8: tag=<612508366> rcseq=<0>
Jul 18 18:10:40 [5601] DBG:dialog:link_dlg: ref dlg 0x7f41c59737c8
with 3 -> 3 in h_entry 0x7f41c58d6b88 - 29
Jul 18 18:10:40 [5601] DBG:rr:add_rr_param: adding (;did=d1.2b7d0652)
Jul 18 18:10:40 [5601] DBG:rr:add_rr_param: second RR lump found
Jul 18 18:10:40 [5601] DBG:rr:add_rr_param: second RR lump found
Jul 18 18:10:40 [5606] DBG:core:io_wait_loop_epoll: [TCP_main]
EPOLLHUP on IN ->connection closed by the remote peer!
Jul 18 18:10:40 [5606] CRITICAL:core:receive_fd: EOF on 26
Jul 18 18:10:40 [5606] DBG:core:handle_worker: dead child 9, pid 5601
(shutting down?)
Jul 18 18:10:40 [5606] DBG:core:io_watch_del: [TCP_main] io_watch_del
op on index 14 26 (0x7e2b80, 26, 14, 0x0,0x1) fd_no=21 called
Jul 18 18:10:40 [5592] DBG:core:handle_sigs: status = 139
Jul 18 18:10:40 [5592] INFO:core:handle_sigs: child process 5601
exited by a signal 11
Jul 18 18:10:40 [5592] INFO:core:handle_sigs: core was generated
Jul 18 18:10:40 [5592] INFO:core:handle_sigs: terminating due to SIGCHLD

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] ws wss and permissions module

2016-07-17 Thread Kirill Galinurov
  webrtc. But current version of permission module use only any”, “udp”, “tcp”,
“tls”, “sctp”. When i try to change proto field to ws or wss i get
:reload_address_table:
unknown protocol field in address table, ignoring entry with id 1.
And when i try use if (check_address("0","$si","$sp", "proto")) I also
get   unknown protocol error.

Can you fix it?

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Opensips2.2 Asterisk Sub registartion

2016-06-14 Thread Kirill Galinurov
Hi all. How i can do subregistration on asterisk like in kamaillio.
http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
.
I have some webrtc users/ They register on opensips.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users