Re: [OpenSIPS-Users] opensips 3.2.2 Segfault on debian 11 bullseye

2021-09-16 Thread William Jin
And I just enabled log_level=4

It connects to db (mysql 8.0.26-1debian11) and converting password string to 
val, then segfault
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:db_mysql_do_prepared_query: conn=0x7f6d33facd80 
(tail=140107000235208) MC=0x7f6d33fac560
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:db_mysql_do_prepared_query: new query=|select password,rpid from 
subscriber where username=?|
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:re_init_statement:  query  is , ptr=(nil)
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:mysql_raise_event: MySQL status has not changed: connected
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:db_mysql_do_prepared_query: new statement(0x7f6d33faf978) on 
connection: (0x7f6d33facd80) 0x7f6d33fac4c8
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:db_mysql_do_prepared_query: set values for the statement run
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:db_mysql_val2bind: added val (0): len=10; type=254; is_null=0
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:db_mysql_do_prepared_query: doing BIND_PARAM in...
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:mysql_raise_event: MySQL status has not changed: connected
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:db_mysql_do_prepared_query: prepared statement has 2 columns in 
result
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:db_mysql_do_prepared_query: doing to BIND_PARAM out ...
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:core:db_new_result: allocate 48 bytes for result set at 0x7f6d33fadf68
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:db_mysql_get_columns: 2 columns returned from the query
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:core:db_allocate_columns: allocate 56 bytes for result columns at 
0x7f6d33faf060
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x7f6d33faf070)[0]=[password]
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x7f6d33faf080)[1]=[rpid]
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:core:db_allocate_rows: allocate 80 bytes for result rows and values at 
0x7f6d33fb0450
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
DBG:db_mysql:db_mysql_str2val: converting STRING [my@password]
Sep 17 14:33:23 ip-10-20-12-22 /usr/sbin/opensips[188225]: 
CRITICAL:core:sig_usr: segfault in process pid: 188225, id: 15

--
Regards,
William Jin

From: Users  on behalf of William Jin 

Sent: Friday, 17 September 2021 2:19 PM
To: Liviu Chircu ; OpenSIPS users mailling list 

Subject: Re: [OpenSIPS-Users] opensips 3.2.2 Segfault on debian 11 bullseye

And just further investigation, looks like it's crashed only after I register 
my test user. (which can register on debian 10 before upgraded to debian 11 
using zoiper softphone)

And the backtrack also indicate the crash from auth_db??

--
Regards,
William Jin

From: Users  on behalf of William Jin 

Sent: Friday, 17 September 2021 9:12 AM
To: Liviu Chircu ; OpenSIPS users mailling list 

Subject: Re: [OpenSIPS-Users] opensips 3.2.2 Segfault on debian 11 bullseye

Hi Liviu,

I attached the backtrace in the init email.

I've attached it again.

--
Regards,
William Jin

From: Liviu Chircu 
Sent: Thursday, 16 September 2021 5:12 PM
To: OpenSIPS users mailling list ; William Jin 

Subject: Re: [OpenSIPS-Users] opensips 3.2.2 Segfault on debian 11 bullseye

On 16.09.2021 02:16, William Jin wrote:
> Anyone has any chance to look into this?

Hi William,

There is not enough info to look into anything, really:

* how are you reproducing this crash?  can you share a basic
opensips.cfg that causes it?
* are there any useful logs _before_ those "signal 11" logs?
* can you obtain a backtrace out of this crash?  See this guide [1] for
some help here

[1]: https://www.opensips.org/Documentation/TroubleShooting-Crash

Best,

--
Liviu Chircu
www.twitter.com/liviuchircu | 
www.opensips-solutions.com

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


Re: [OpenSIPS-Users] 481 dialog does not exist issue

2021-09-16 Thread Vinayak Makwana
Hello Razvan ,
thanks for reply  here is my script part and  scenario

In the main route I used the below script part to identify dialog amd send
481 response.

if(has_totag()) {
  send_reply("481","Dialog does not exist");
  exit;
}
Some time after the dialog established when the caller or callee sent BYE
packet at time if Route: header not there in BYE packet then opensips send
481 reply it is fine but in my case BYE packet has Route: header and dialog
also not changed then also opensips send 481 reply when i end-point send
BYE packet.

can you guide me for  which reason or case opensips send 481 response.

-- 
*Disclaimer*
In addition to generic Disclaimer which you have agreed on our 
website, any views or opinions presented in this email are solely those of 
the originator and do not necessarily represent those of the Company or its 
sister concerns. Any liability (in negligence, contract or otherwise) 
arising from any third party taking any action, or refraining from taking 
any action on the basis of any of the information contained in this email 
is hereby excluded.



*Confidentiality*
This communication (including any 
attachment/s) is intended only for the use of the addressee(s) and contains 
information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, 
dissemination, distribution, or copying of this communication is 
prohibited. Please inform originator if you have received it in error.


*Caution for viruses, malware etc.*
This communication, including any 
attachments, may not be free of viruses, trojans, similar or new 
contaminants/malware, interceptions or interference, and may not be 
compatible with your systems. You shall carry out virus/malware scanning on 
your own before opening any attachment to this e-mail. The sender of this 
e-mail and Company including its sister concerns shall not be liable for 
any damage that may incur to you as a result of viruses, incompleteness of 
this message, a delay in receipt of this message or any other computer 
problems. 
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips 3.2.2 Segfault on debian 11 bullseye

2021-09-16 Thread William Jin
And just further investigation, looks like it's crashed only after I register 
my test user. (which can register on debian 10 before upgraded to debian 11 
using zoiper softphone)

And the backtrack also indicate the crash from auth_db??

--
Regards,
William Jin

From: Users  on behalf of William Jin 

Sent: Friday, 17 September 2021 9:12 AM
To: Liviu Chircu ; OpenSIPS users mailling list 

Subject: Re: [OpenSIPS-Users] opensips 3.2.2 Segfault on debian 11 bullseye

Hi Liviu,

I attached the backtrace in the init email.

I've attached it again.

--
Regards,
William Jin

From: Liviu Chircu 
Sent: Thursday, 16 September 2021 5:12 PM
To: OpenSIPS users mailling list ; William Jin 

Subject: Re: [OpenSIPS-Users] opensips 3.2.2 Segfault on debian 11 bullseye

On 16.09.2021 02:16, William Jin wrote:
> Anyone has any chance to look into this?

Hi William,

There is not enough info to look into anything, really:

* how are you reproducing this crash?  can you share a basic
opensips.cfg that causes it?
* are there any useful logs _before_ those "signal 11" logs?
* can you obtain a backtrace out of this crash?  See this guide [1] for
some help here

[1]: https://www.opensips.org/Documentation/TroubleShooting-Crash

Best,

--
Liviu Chircu
www.twitter.com/liviuchircu | 
www.opensips-solutions.com

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


Re: [OpenSIPS-Users] opensips 3.2.2 Segfault on debian 11 bullseye

2021-09-16 Thread William Jin
Hi Liviu,

I attached the backtrace in the init email.

I've attached it again.

--
Regards,
William Jin

From: Liviu Chircu 
Sent: Thursday, 16 September 2021 5:12 PM
To: OpenSIPS users mailling list ; William Jin 

Subject: Re: [OpenSIPS-Users] opensips 3.2.2 Segfault on debian 11 bullseye

On 16.09.2021 02:16, William Jin wrote:
> Anyone has any chance to look into this?

Hi William,

There is not enough info to look into anything, really:

* how are you reproducing this crash?  can you share a basic
opensips.cfg that causes it?
* are there any useful logs _before_ those "signal 11" logs?
* can you obtain a backtrace out of this crash?  See this guide [1] for
some help here

[1]: https://www.opensips.org/Documentation/TroubleShooting-Crash

Best,

--
Liviu Chircu
www.twitter.com/liviuchircu | 
www.opensips-solutions.com

gdb /usr/sbin/opensips /tmp/core
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/opensips...
Reading symbols from 
/usr/lib/debug/.build-id/68/43b0716a68e5fab40b5fba966d9bce8d0e224f.debug...

warning: Can't open file /dev/zero (deleted) during file-backed mapping note 
processing
[New LWP 10586]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/opensips -P /run/opensips/opensips.pid -f 
/etc/opensips/opensips.cfg'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x559ddc5502a0 in memcpy (__len=64, __src=0xaf01ff, 
__dest=0x7ffd97072be8) at 
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
34return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
(gdb) bt full
#0  0x559ddc5502a0 in memcpy (__len=64, __src=0xaf01ff, 
__dest=0x7ffd97072be8) at 
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
No locals.
#1  MD5_memcpy (len=64, input=0xaf01ff , output=0x7ffd97072be8 "\240-\a\227\375\177") at md5.c:329
No locals.
#2  MD5Update (context=0x7ffd97072bd0, input=0xaf01ff , inputLen=127) at md5.c:152
i = 
index = 0
partLen = 64
#3  0x7f67bad9a788 in digest_calc_HA1 (crd=0x7ffd97072d60, 
sess_key=0x7ffd97072de0) at dauth_calc_md5.c:48
Md5Ctx = {state = {1732584193, 4023233417, 2562383102, 271733878}, 
count = {1016, 0},
  buffer = 
"\240-\a\227\375\177\000\000(-\a\227\375\177\000\000\000\305L\321\027`\200P\220-\a\227\375\177\000\000\200\355\003\277g\177\000\000(-\a\227\375\177\000\000\310\344\003\277g\177\000\000(-\a\227\375\177\000"}
HA1 = "(-\a\227\375\177\000\000z\247\244\272g\177\000"
#4  0x7f67bad9476d in auth_calc_HA1 (params=0x7ffd97072d40, 
sess_key=0x7ffd97072de0) at api.c:341
digest_calc = 0x7f67bada2800 
__FUNCTION__ = "auth_calc_HA1"
#5  0x7f67baa8e936 in get_ha1 (res=0x7ffd97072d28, _ha1=0x7ffd97072de0, 
_table=, _domain=0x7ffd97072f88, digest=0x7f67bf040f58) at 
authorize.c:169
cprms = {use_hashed = 0, alg = ALG_MD5, creds = {open = 0x7ffd97072d60, 
ha1 = 0x7ffd97072d60}, nonce = 0x7f67bf040f98, cnonce = 0x7f67bf040fe0}
vals = {{type = DB_STR, nul = 0, free = 0, val = {int_val = -594864196, 
bigint_val = 94136498329532, double_val = 4.6509609844413654e-310, time_val = 
94136498329532,
  string_val = 0x559ddc8b17bc  
"1122334455\",realm=\"sip1.mydomain.com\",nonce=\"KprTqedqhYxO7vVNGoDdw6U2mvUQ1v6Jd7liqtOCO94A\",uri=\"sip:sip1.mydomain.com;transport=UDP\",response=\"46f25ec4472d495ed41f46677a1eb647\",algorithm=MD5"...,
 str_val = {
s = 0x559ddc8b17bc  
"1122334455\",realm=\"sip1.mydomain.com\",nonce=\"KprTqedqhYxO7vVNGoDdw6U2mvUQ1v6Jd7liqtOCO94A\",uri=\"sip:sip1.mydomain.com;transport=UDP\",response=\"46f25ec4472d495ed41f46677a1eb647\",algorithm=MD5"...,
 len = 10}, blob_val = {
s = 0x559ddc8b17bc  
"1122334455\",realm=\"sip1.mydomain.com\",nonce=\"KprTqedqhYxO7vVNGoDdw6U2mvUQ1v6Jd7liqtOCO94A\",uri=\"sip:sip1.mydomain.com;transport=UDP\",response=\"46f25ec4472d495ed41f46677a1eb647\",algorithm=MD5"...,
 len = 10}, bitmap_val = 3700103100}}, {type = DB_STR, nul = 0, free = 
-1090263712, val = {int_val = -594864527, bigint_val = 94136498329201, 
double_val = 

[OpenSIPS-Users] Tracing REGISTER with HEP

2021-09-16 Thread Alana Heim
We are on OpenSIPS 3.2.2 and are attempting to trace REGISTER messages
coming in. We have the following in opensips.cfg, with the IP address
redacted:

if (is_method("REGISTER")) {
   sl_send_reply(200, "OK");
   if ($var(sipcapture_host) != "disabled") {
   trace("tid", "t", "sip|xlog", "opensips@");
   }
   exit();
   }

With this configuration, we are not seeing REGISTERs coming in to our
capture box. We know tracing is otherwise working because we do receive
dialogs when tracing INVITEs. Is there something else we can do? Thank you

Regards,

*Alana Heim*

*Software Engineer*

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


Re: [OpenSIPS-Users] RTPEngine - changing codec format parameters from default values when transcoding - OpenSIPS 3.1

2021-09-16 Thread Mark Allen
Just posting this to document the end result. The following line to
pass the transcoding parameters I wanted directly to the RTPEngine daemon
worked for me:


transcode-opus/48000/2/32000//stereo--0;useinbandfec--1;maxplaybackrate--16000;sprop-maxcapturerate--16000

NB - The '--' part means '=' and is there to avoid parsing errors in
RTPEngine



On Wed, 15 Sept 2021 at 10:58, Johan De Clercq  wrote:

> No worries
>
> On Wed, Sep 15, 2021, 11:43 Mark Allen  wrote:
>
>> Ah! Thanks Răzvan and Johan. I was thinking that the options described in
>> the OpenSIPS RTPEngine module documentation were the only ones
>> available, but I missed the key phrase...
>>
>> *When passing an option that OpenSIPS is not aware of, it will be
>> blindly sent to the rtpengine daemon to be processed.*
>>
>> ...I should be fine from here I think. Thanks for your help.
>>
>>
>> On Tue, 14 Sept 2021 at 14:29, Răzvan Crainea 
>> wrote:
>>
>>> I think the proper way to do it is
>>>
>>> `transcode-opus/48000/2/32000//maxplaybackrate--48000;stereo--0;useinbandfec--1;maxaveragebitrate--32000`
>>> Anyway, as Johan suggests, follow the rtpengine documentation, you will
>>> find more info there.
>>>
>>> Best regards,
>>>
>>> Răzvan Crainea
>>> OpenSIPS Core Developer
>>> http://www.opensips-solutions.com
>>>
>>> On 9/14/21 15:51, Mark Allen wrote:
>>> > Hi Răzvan
>>> >
>>> > OpenSIPS passes the commands to RTPengine as you supply them, so in
>>> > theory this should be supported. Did you try to set this up? Can
>>> you
>>> > provide any logs about this?
>>> >
>>> >
>>> > No. I'm not sure how I would specify this in the opensips.cfg
>>> > rtpengine_offer parameters. From the documentation for the
>>> > rptengine OpenSIPS module, it doesn't seem as if something like the
>>> > following is an option...
>>> >
>>> >
>>> >
>>> transcode-opus='opus/48000/2/32000//maxplaybackrate=48000;stereo=0;useinbandfec=1;maxaveragebitrate=32000'
>>>
>>> >
>>> >
>>> > ...however, if I have tried this in the code (with or without quotes)
>>> it
>>> > doesn't produce an error, either from OpenSIPS or rtpengine, but
>>> neither
>>> > does it do anything - Opus fmtp in the SDP is not changed. I guess I'm
>>> > looking for the correct OpenSIPS syntax to pass these parameters
>>> > successfully to rtpengine
>>> >
>>> >
>>> >
>>> > ___
>>> > 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
>>>
>> ___
>> 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
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips 3.2.2 Segfault on debian 11 bullseye

2021-09-16 Thread Liviu Chircu

On 16.09.2021 02:16, William Jin wrote:

Anyone has any chance to look into this?


Hi William,

There is not enough info to look into anything, really:

* how are you reproducing this crash?  can you share a basic 
opensips.cfg that causes it?

* are there any useful logs _before_ those "signal 11" logs?
* can you obtain a backtrace out of this crash?  See this guide [1] for 
some help here


[1]: https://www.opensips.org/Documentation/TroubleShooting-Crash

Best,

--
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com


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