Re: [OpenSIPS-Users] Opensips 3.1Debian constantly crashing

2021-10-21 Thread Mario San Vicente
Hello Bogdan-Andrei,

I ran some traffic without rtpengine and with the codec operations, i did
not got any core files.  I will take care of not combining those commands.


Thanks and regards.
Mario

On Thu, Oct 21, 2021 at 7:26 AM Bogdan-Andrei Iancu 
wrote:

> Hi Mario,
>
> So you do both rtpengine ops and codecs ops in your cfg. This is a bit of
> a receipt for disaster (as both are independently changing the SDP), still
> not for a crash.
>
> Could you try to run both codec ops, but without rtpengine, just to see if
> ok ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS eBootcamp 2021
>   https://opensips.org/training/OpenSIPS_eBootcamp_2021/
>
> On 10/19/21 7:20 PM, Mario San Vicente wrote:
>
> Hello Bogdan-Andrei,
>
> I removed the following lines and it is working fine now.  Not sure if the
> issue was one or the combination of those 2 lines that made opensips crash.
>
>   #codec_delete_re("PCMA|PCMU");
>   #codec_delete_except_re("speex");
>
> The reason for using those lines was that opensips was doing transcoding
> and after a while it stops doing the transcode, it just was bypassing the
> original codec offer.   This is also solved, the problem is that
> the rtpengine_offer was not closing properly and then i ran out of ports.
>The solution was to add rtpengine_delete(); at the failure route.
>
>
> Thank you all for your help!
>
> Regards.
> Mario
>
> On Tue, Oct 19, 2021 at 2:01 AM Bogdan-Andrei Iancu 
> wrote:
>
>> Hi Mario,
>>
>> What is the codec relate operation you do from the script? As it looks it
>> is crashing there.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>> OpenSIPS eBootcamp 2021
>>   https://opensips.org/training/OpenSIPS_eBootcamp_2021/
>>
>> On 10/19/21 12:15 AM, Mario San Vicente wrote:
>>
>> Thank you Giovany .
>>
>> I got some info, but I'm not sure how to proceed  Looks like an issue
>> assigning core vars..  Here the whole info in a txt file.
>>
>>
>> {rs = {s = 0x6dc2d4a3fa5df100 > 0x6dc2d4a3fa5df100>,
>> sval = {s = 0x10002 > 0x10002>, len = -1510612476}
>>
>> Thank your comments.
>>
>> On Mon, Oct 18, 2021 at 12:39 PM Giovanni Maruzzelli 
>> wrote:
>>
>>> On Mon, Oct 18, 2021 at 7:01 PM Mario San Vicente <
>>> mrsanvice...@gmail.com> wrote:
>>>
 Hello Ovidiu,

 That works for getting the core files.  Then i run the command bt full
 and got the following:


>>> You must install the opensips-dbg debian package, it contains the
>>> symbols, then restart opensips, then retake the core and you'll see info in
>>> it.
>>>
>>> -giovanni
>>>
>>> --
>>> Sincerely,
>>>
>>> Giovanni Maruzzelli
>>> OpenTelecom.IT
>>> cell: +39 347 266 56 18
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>
>>
>> --
>> Mario San Vicente
>> Cheers!
>>
>> ___
>> Users mailing 
>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>
> --
> Mario San Vicente
> Cheers!
>
>
>

-- 
Mario San Vicente
Cheers!
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] question on call handling.

2021-10-21 Thread Calvin Ellison
Johan, is there also a PRACK happening in this call flow, but omitted from
your diagram? The SDP offer/answer model is extended a bit by reliable
provisional response messages.

The Offer/Answer Model and PRACK
https://datatracker.ietf.org/doc/html/rfc3262#section-5



Calvin Ellison

Systems Architect

calvin.elli...@voxox.com

+1 (213) 285-0555



 



The information contained herein is confidential and privileged information
or work product intended only for the individual or entity to whom it is
addressed. Any unauthorized use, distribution, or copying of this
communication is strictly prohibited. If you have received this
communication in error, please notify me immediately.


On Fri, Oct 1, 2021 at 8:07 AM johan  wrote:

> Scenario is this
>
>
> A  ---> OPENSIPS and rtpengine -> B
>
> INV -> >   INV
>
> 183 sdp  <  <183 sdp
>
>   <  480
>
>
> -> Voicemail
>
>  > INV
>
>   < 200 with diff sdp
>
> 200 with diff sdp <
>
> would giving rtpengine the port latching option fix this ?
>
>
> wkr,
> On 1/10/2021 16:41, Ben Newlin wrote:
>
> No, this is not allowed by the specification, though some devices do
> handle it.
>
>
>
> https://datatracker.ietf.org/doc/html/rfc3261#section-13.2.1
>
>
>
> Ben Newlin
>
>
>
> *From: *Users 
>  on behalf of johan 
> 
> *Date: *Friday, October 1, 2021 at 10:35 AM
> *To: *OpenSIPS users mailling list 
> 
> *Subject: *[OpenSIPS-Users] question on call handling.
>
> Dears,
>
>
> this is more a general sip question.  when establishing a dialog is it
> then allowed to change the sdp that you have sent in 183 to somehting
> else in 200 Ok ?
>
>
> wkr,
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> 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
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Need some clarification on rtpengine usage .

2021-10-21 Thread John Burke via Users

Hey Sasmita,

The rtpengine module only tries additional nodes within the specified 
set when a node is unresponsive (controlled via rtpengine_tout[1] and 
rtpengine_retr[2] params) .  If a reply is received, even if it's an 
error, then the rtpengine_xxx functions return an error code and SDP is 
left unaltered [3].


My take on a couple possible causes of your "Ran out of ports" issue:
- Make sure that you properly disengage rtpengine on call 
termination/failures, and are not just relying on RTP timeouts from 
rtpengine.
- If your rtpengine servers are dis-proportionally resourced (ie server1 
has 2X ports than server2), then you could try weighting your node set.

- You are simply maxing out your rtpengine servers :)

[1] 
https://opensips.org/html/docs/modules/3.1.x/rtpengine#param_rtpengine_tout
[2] 
https://opensips.org/html/docs/modules/3.1.x/rtpengine#param_rtpengine_retr
[3] 
https://github.com/OpenSIPS/opensips/blob/cc20f738b83f5a9c7f24630309ddb5bab889bf56/modules/rtpengine/rtpengine.c#L2133-L2150


John Burke

On 10/21/21 1:45 AM, Sasmita Panda wrote:

Hi ,

I have configured 2 rtpengine in opensips-2.2 as beow .

modparam("rtpengine", "rtpengine_sock", "udp:192.168.131.123:22000 
 udp:192.168.128.199:22000 
")


My question is , If 1 rtpengine has port outage and give the error as 
below
*" ERROR:rtpengine:rtpe_function_call: proxy replied with error: Ran 
out of ports"*
in tat case will opensips try the same call to connect with other 
Rtpengine ?


How to overcome this condition ?
*
*
*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/

___
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] question on call handling.

2021-10-21 Thread Ben Newlin
Bogdan,

Actually I was referring to these parts:

If the initial offer is in an INVITE, the answer MUST be in a
reliable non-failure message from UAS back to UAC which is
correlated to that INVITE.  For this specification, that is
only the final 2xx response to that INVITE.  That same exact
answer MAY also be placed in any provisional responses sent
prior to the answer.  The UAC MUST treat the first session
description it receives as the answer, and MUST ignore any
session descriptions in subsequent responses to the initial
INVITE.

…

Concretely, the above rules specify two exchanges for UAs compliant
to this specification alone - the offer is in the INVITE, and the
answer in the 2xx (and possibly in a 1xx as well, with the same
value), or the offer is in the 2xx, and the answer is in the ACK.
All user agents that support INVITE MUST support these two exchanges.

Ben Newlin

From: Bogdan-Andrei Iancu 
Date: Wednesday, October 6, 2021 at 2:37 AM
To: OpenSIPS users mailling list , Ben Newlin 

Subject: Re: [OpenSIPS-Users] question on call handling.
Hi Ben,

The paragraph you refer to is this one :

  o  After having sent or received an answer to the first offer, the

 UAC MAY generate subsequent offers in requests based on rules

 specified for that method, but only if it has received answers

 to any previous offers, and has not sent any offers to which it

 hasn't gotten an answer.

So the 200 must contain the same SDP as the 180 because there is no SDP replied 
back between the 180 and 200 ?

Regards,


Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com

OpenSIPS eBootcamp 2021

  
https://opensips.org/training/OpenSIPS_eBootcamp_2021/
On 10/1/21 5:41 PM, Ben Newlin wrote:
No, this is not allowed by the specification, though some devices do handle it.

https://datatracker.ietf.org/doc/html/rfc3261#section-13.2.1

Ben Newlin

From: Users 
 on 
behalf of johan 
Date: Friday, October 1, 2021 at 10:35 AM
To: OpenSIPS users mailling list 

Subject: [OpenSIPS-Users] question on call handling.
Dears,


this is more a general sip question.  when establishing a dialog is it
then allowed to change the sdp that you have sent in 183 to somehting
else in 200 Ok ?


wkr,


___
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 control panel error connecting to rules, carrier group

2021-10-21 Thread Eamon Garland
Hi Bogdan
i am using the following for the install

wget https://github.com/OpenSIPS/opensips-cp/archive/master.zip

Regards,
Eamon
On Thu, Oct 21, 2021 at 5:55 PM Bogdan-Andrei Iancu 
wrote:

> Hi Eamon,
>
> What version of CP do you use ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS eBootcamp 2021
>   https://opensips.org/training/OpenSIPS_eBootcamp_2021/
>
> On 10/20/21 8:27 PM, Eamon Garland wrote:
>
> Hi
> i have installed latest version on debian 10 and get the following error
> when i try to add rules
>
>  PHP Fatal error:  Uncaught Error: Call t*o undefined function
> get_group()* in
> /var/www/html/opensips-cp/web/tools/system/drouting/template/header.php:33\nStack
> trace:\n#0
> /var/www/html/opensips-cp/web/tools/system/drouting/rules.php(24):
> require()\n#1 {main}\n  thrown in
> /var/www/html/opensips-cp/web/tools/system/drouting/template/header.php on
> line 33, referer: http://x.x.x.x/cp/tools/system/drouting/gateways.php
>
> [image: cdca5e74-523d-4cc2-b56b-f598aed8535d]
>
> ___
> 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
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips control panel error connecting to rules, carrier group

2021-10-21 Thread Bogdan-Andrei Iancu

Hi Eamon,

What version of CP do you use ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS eBootcamp 2021
  https://opensips.org/training/OpenSIPS_eBootcamp_2021/

On 10/20/21 8:27 PM, Eamon Garland wrote:

Hi
i have installed latest version on debian 10 and get the following 
error when i try to add rules


 PHP Fatal error:  Uncaught Error: Call t*o undefined function 
get_group()* in 
/var/www/html/opensips-cp/web/tools/system/drouting/template/header.php:33\nStack 
trace:\n#0 
/var/www/html/opensips-cp/web/tools/system/drouting/rules.php(24): 
require()\n#1 {main}\n  thrown in 
/var/www/html/opensips-cp/web/tools/system/drouting/template/header.php 
on line 33, referer: http://x.x.x.x/cp/tools/system/drouting/gateways.php


cdca5e74-523d-4cc2-b56b-f598aed8535d

___
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] Clarification on Auto-scaling in Opensips

2021-10-21 Thread Bogdan-Andrei Iancu

Hi,

1. See the load (per proc) related stats [1] - they are used to check 
the combined load of the procs in the same auto-scaling group


2. I would say your syslog is very slow and the overhead with extra 
logging (from level 3 to 4) is triggering the up scaling.



[1] 
https://www.opensips.org/Documentation/Interface-CoreStatistics-3-2#toc13


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS eBootcamp 2021
  https://opensips.org/training/OpenSIPS_eBootcamp_2021/

On 10/21/21 3:15 PM, Saurabh Chopra wrote:

Hi All,

We have successfully tested the auto-scaling in opensips after reading 
the blog.
_https://blog.opensips.org/2019/02/25/auto-process-scaling-a-cure-for-load-and-resources-concerns/ 
_ 



But, I am confused with two things,
1. How opensips calculates load to scale the processes UP/DOWN. Is 
there any function that we can use to check the load or any kind of 
xlog so that we can print in our config.
2. The config which i am running is scaling up the process when we are 
adding (*log_level=4*) not for *log_level=3*. Is it specific that we 
have to use log_level=*4*.


version: opensips 3.1.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.
svn revision: 3748:3779M
main.c compiled on 06:18:30 Feb  1 2021 with gcc 5.4.0

Below is the basic of my configuration

*log_level=4
log_stderror=no
log_facility=LOG_LOCAL5
memlog=2
disable_dns_blacklist=no

auto_scaling_profile = PROFILE_SIP
 scale up to 6 on 40% for 4 cycles within 5
 scale down to 2 on 1% for 8 cycles

socket=udp:20.0.xx.xxx:5507 AS 54.227.xx.xx:5507 
use_auto_scaling_profile PROFILE_SIP*


Best Regards
Saurabh Chopra
+918861979979

___
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.1Debian constantly crashing

2021-10-21 Thread Bogdan-Andrei Iancu

Hi Mario,

So you do both rtpengine ops and codecs ops in your cfg. This is a bit 
of a receipt for disaster (as both are independently changing the SDP), 
still not for a crash.


Could you try to run both codec ops, but without rtpengine, just to see 
if ok ?


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS eBootcamp 2021
  https://opensips.org/training/OpenSIPS_eBootcamp_2021/

On 10/19/21 7:20 PM, Mario San Vicente wrote:

Hello Bogdan-Andrei,

I removed the following lines and it is working fine now. Not sure if 
the issue was one or the combination of those 2 lines that made 
opensips crash.


              #codec_delete_re("PCMA|PCMU");
              #codec_delete_except_re("speex");

The reason for using those lines was that opensips was doing 
transcoding and after a while it stops doing the transcode, it just 
was bypassing the original codec offer.  This is also solved, the 
problem is that the rtpengine_offer was not closing properly and then 
i ran out of ports.     The solution was to add rtpengine_delete(); at 
the failure route.



Thank you all for your help!

Regards.
Mario

On Tue, Oct 19, 2021 at 2:01 AM Bogdan-Andrei Iancu 
mailto:bog...@opensips.org>> wrote:


Hi Mario,

What is the codec relate operation you do from the script? As it
looks it is crashing there.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com  
OpenSIPS eBootcamp 2021
   https://opensips.org/training/OpenSIPS_eBootcamp_2021/  


On 10/19/21 12:15 AM, Mario San Vicente wrote:

Thank you Giovany .

I got some info, but I'm not sure how to proceed  Looks like
an issue assigning core vars..  Here the whole info in a txt file.


{rs = {s = 0x6dc2d4a3fa5df100 ,
sval = {s = 0x10002 , len = -1510612476}

Thank your comments.

On Mon, Oct 18, 2021 at 12:39 PM Giovanni Maruzzelli
mailto:gmar...@gmail.com>> wrote:

On Mon, Oct 18, 2021 at 7:01 PM Mario San Vicente
mailto:mrsanvice...@gmail.com>> wrote:

Hello Ovidiu,

That works for getting the core files. Then i run the
command bt full and got the following:


You must install the opensips-dbg debian package, it contains
the symbols, then restart opensips, then retake the core and
you'll see info in it.

-giovanni

-- 
Sincerely,


Giovanni Maruzzelli
OpenTelecom.IT
cell: +39 347 266 56 18

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




-- 
Mario San Vicente

Cheers!

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





--
Mario San Vicente
Cheers!


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


[OpenSIPS-Users] Clarification on Auto-scaling in Opensips

2021-10-21 Thread Saurabh Chopra
Hi All,

We have successfully tested the auto-scaling in opensips after reading the
blog.
*https://blog.opensips.org/2019/02/25/auto-process-scaling-a-cure-for-load-and-resources-concerns/
*


But, I am confused with two things,
1. How opensips calculates load to scale the processes UP/DOWN. Is there
any function that we can use to check the load or any kind of xlog so that
we can print in our config.
2. The config which i am running is scaling up the process when we are
adding (*log_level=4*) not for *log_level=3*. Is it specific that we have
to use log_level=*4*.

version: opensips 3.1.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.
svn revision: 3748:3779M
main.c compiled on 06:18:30 Feb  1 2021 with gcc 5.4.0

Below is the basic of my configuration











*log_level=4log_stderror=nolog_facility=LOG_LOCAL5memlog=2disable_dns_blacklist=noauto_scaling_profile
= PROFILE_SIP scale up to 6 on 40% for 4 cycles within 5 scale down to 2 on
1% for 8 cyclessocket=udp:20.0.xx.xxx:5507 AS 54.227.xx.xx:5507
use_auto_scaling_profile PROFILE_SIP*

Best Regards
Saurabh Chopra
+918861979979
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] opensips control panel error connecting to rules, carrier group

2021-10-21 Thread Eamon Garland
Hi
i have installed latest version on debian 10 and get the following error when i 
try to add rules

 PHP Fatal error:  Uncaught Error: Call to undefined function get_group() in 
/var/www/html/opensips-cp/web/tools/system/drouting/template/header.php:33\nStack
 trace:\n#0 /var/www/html/opensips-cp/web/tools/system/drouting/rules.php(24): 
require()\n#1 {main}\n  thrown in 
/var/www/html/opensips-cp/web/tools/system/drouting/template/header.php on line 
33, referer: http://x.x.x.x/cp/tools/system/drouting/gateways.php


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


Re: [OpenSIPS-Users] MSILO can't send message

2021-10-21 Thread Bogdan-Andrei Iancu

Hi,

I found the issue and have it fixed in master / 3.2 / 3.1 , see:

https://github.com/OpenSIPS/opensips/commit/9bc117953730a0ea761e3ceaeea9fee7facea2cc

https://github.com/OpenSIPS/opensips/commit/cc20f738b83f5a9c7f24630309ddb5bab889bf56

Thanks for the report !

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS eBootcamp 2021
  https://opensips.org/training/OpenSIPS_eBootcamp_2021/

On 10/20/21 3:27 PM, jacky z wrote:

Hi Bogdan_Andrei,

You are right. The actual content is not attached. Attached is the log.


Hi,

So the actual content of the message is not attached to the MSG?
Could you send me (maybe off list) the opensips logs (level 4) for
a m_dump() ?

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com  
OpenSIPS eBootcamp 2021
   https://opensips.org/training/OpenSIPS_eBootcamp_2021/  


On 10/15/21 11:02 AM, jacky z wrote:

Hi Bogdan-Andrei,

Did you also noticed the msilo module still can't send the dumped
message, but send "[Offline message - Thu Jan  1 00:00:00 1970"
no matter what the message is? or just the setting I used?


:+1:

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com  

OpenSIPS eBootcamp 2021
   https://opensips.org/training/OpenSIPS_eBootcamp_2021/  


On 10/14/21 5:03 AM, jacky z wrote:

Hi Bogdan-Andrei,

Finally made it send offline message by setting

modparam("msilo", "outbound_proxy",
"sip:name.domain.com:5061;transport=tls")
modparam("tls_mgm", "match_sip_domain", "[dom]*")

It seems the port number needs to be included and the
match_sip_domain needs to *. If the domain name is included,
the error happens. Hope this info is helpful for others who
may be interested.

However, it still can't send the dumped message, but send
"[Offline message - Thu Jan  1 08:00:00 1970" no matter what
the message is. It seems the message was truncated. Based on
the source code of the msilo module, the message should be
something like  "[Offline message - Thu Jan  1 08:00:00
1970] message here".

In the log, I can see the correct message was read out from
the silo table. Here is the log that shows the correct
offline message that should be sent:

DBG:db_mysql:db_mysql_str2val: converting BLOB
[{"type":"1","cont":"the right message"}]

Thanks!


Hi Jacky,

The m_dump() sends the MESSAGE to the AOR of the user,
so, ideally, you should do take care of the
"lookup(location)" in order to the get it properly routed.

For the TLS part, do you use it between the end-point
and opensips? if so, I guess the MESSAGE sent by
m_dump() and looping back to opensips (for doing the
lookup(location)) is via UDP ?

I'm asking as from the TLS perspective the most
important think to know is where (in the  routing logic)
the TLS connection gets used/opened, as you need to be
sure and correlate the destination IP (at the moment)
with the IPs/mask you have in the TLS client domain.

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com  

OpenSIPS eBootcamp 2021
   https://opensips.org/training/OpenSIPS_eBootcamp_2021/  


On 9/28/21 3:03 AM, jacky z wrote:

Hi Team,

I want to use MSILO to forward offline messages. I use
TLS connections and have set up both server domain and
client domains. If we don't use outbound_proxy, the
logs show no error, but the message just was not sent.
I searched online and it was said that the outbound
proxy needs to be used. However, if we use
outbound_proxy, there will be errors- no TLS client
domain found. Actually, I have set up the client
domain. It seems the MSILO module can't recognize the
client domain. I have checked the messages were all in
the database table silo. Have you ever encountered such
issues? Any clue to debug? Thanks!

Here are the scripts and logs

When m_dump() is called in "REGISTER":

|if (m_dump()) { xlog("MSILO: offline messages dumped -
if they were"); }else{ 

Re: [OpenSIPS-Users] MSILO can't send message

2021-10-21 Thread jacky z
Hi Bogdan_Andrei,

You are right. The actual content is not attached. Attached is the log.


Hi,
>
> So the actual content of the message is not attached to the MSG? Could you
> send me (maybe off list) the opensips logs (level 4) for a m_dump() ?
>
> Best regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS eBootcamp 2021
>   https://opensips.org/training/OpenSIPS_eBootcamp_2021/
>
> On 10/15/21 11:02 AM, jacky z wrote:
>
> Hi Bogdan-Andrei,
>
> Did you also noticed the msilo module still can't send the dumped message,
> but send "[Offline message - Thu Jan  1 00:00:00 1970" no matter what the
> message is? or just the setting I used?
>
>
> :+1:
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>> OpenSIPS eBootcamp 2021
>>   https://opensips.org/training/OpenSIPS_eBootcamp_2021/
>>
>> On 10/14/21 5:03 AM, jacky z wrote:
>>
>> Hi Bogdan-Andrei,
>>
>> Finally made it send offline message by setting
>>
>> modparam("msilo", "outbound_proxy",
>> "sip:name.domain.com:5061;transport=tls")
>> modparam("tls_mgm", "match_sip_domain", "[dom]*")
>>
>> It seems the port number needs to be included and the match_sip_domain
>> needs to *. If the domain name is included, the error happens. Hope this
>> info is helpful for others who may be interested.
>>
>> However, it still can't send the dumped message, but send "[Offline
>> message - Thu Jan  1 08:00:00 1970" no matter what the message is. It seems
>> the message was truncated. Based on the source code of the msilo module,
>> the message should be something like  "[Offline message - Thu Jan  1
>> 08:00:00 1970] message here".
>>
>> In the log, I can see the correct message was read out from the silo
>> table. Here is the log that shows the correct offline message that should
>> be sent:
>>
>> DBG:db_mysql:db_mysql_str2val: converting BLOB [{"type":"1","cont":"the
>> right message"}]
>>
>> Thanks!
>>
>>
>> Hi Jacky,
>>>
>>> The m_dump() sends the MESSAGE to the AOR of the user, so, ideally, you
>>> should do take care of the "lookup(location)" in order to the get it
>>> properly routed.
>>>
>>> For the TLS part, do you use it between the end-point and opensips? if
>>> so, I guess the MESSAGE sent by m_dump() and looping back to opensips (for
>>> doing the lookup(location)) is via UDP ?
>>>
>>> I'm asking as from the TLS perspective the most important think to know
>>> is where (in the  routing logic) the TLS connection gets used/opened, as
>>> you need to be sure and correlate the destination IP (at the moment) with
>>> the IPs/mask you have in the TLS client domain.
>>>
>>> Best regards,
>>>
>>> Bogdan-Andrei Iancu
>>>
>>> OpenSIPS Founder and Developer
>>>   https://www.opensips-solutions.com
>>> OpenSIPS eBootcamp 2021
>>>   https://opensips.org/training/OpenSIPS_eBootcamp_2021/
>>>
>>> On 9/28/21 3:03 AM, jacky z wrote:
>>>
>>> Hi Team,
>>>
>>> I want to use MSILO to forward offline messages. I use TLS connections
>>> and have set up both server domain and client domains. If we don't
>>> use outbound_proxy, the logs show no error, but the message just was not
>>> sent. I searched online and it was said that the outbound proxy needs to be
>>> used. However, if we use outbound_proxy, there will be errors- no TLS
>>> client domain found. Actually, I have set up the client domain. It
>>> seems the MSILO module can't recognize the client domain. I have checked
>>> the messages were all in the database table silo. Have you ever encountered
>>> such issues? Any clue to debug? Thanks!
>>>
>>> Here are the scripts and logs
>>>
>>> When m_dump() is called in "REGISTER":
>>>
>>> if (m_dump()) {
>>> xlog("MSILO: offline messages dumped - if they were");
>>> }else{
>>> xlog("MSILO: no offline messages dumped");
>>> };
>>>
>>> It can dump the message from the database but can't send the message.
>>> Here is the log:
>>>
>>> Sep 18 17:29:55 sipserver /usr/sbin/opensips[9794]: DBG:core:parse_msg:
>>> method:
>>> Sep 18 17:29:55 sipserver /usr/sbin/opensips[9794]: DBG:core:parse_msg:
>>> uri: sip:10...@xxx.com:5061;transport=tls
>>> Sep 18 17:29:55 sipserver /usr/sbin/opensips[9794]: DBG:core:parse_msg:
>>> version: 
>>> Sep 18 17:29:55 sipserver /usr/sbin/opensips[9794]:
>>> DBG:core:parse_headers: flags=
>>> Sep 18 17:29:55 sipserver /usr/sbin/opensips[9794]:
>>> DBG:core:parse_via_param: found param type 232, = ;
>>> state=16
>>> Sep 18 17:29:55 sipserver /usr/sbin/opensips[9794]: DBG:core:parse_via:
>>> end of header reached, state=5
>>> Sep 18 17:29:55 sipserver /usr/sbin/opensips[9794]:
>>> DBG:core:parse_headers: via found, flags=
>>> Sep 18 17:29:55 sipserver /usr/sbin/opensips[9794]:
>>> DBG:core:parse_headers: this is the first via
>>> Sep 18 17:29:55 sipserver /usr/sbin/opensips[9794]:
>>> DBG:core:parse_to_param: transport=tls
>>> 

Re: [OpenSIPS-Users] MSILO can't send message

2021-10-21 Thread jacky z
Hi Bogdan_Andrei,

You are right. The actual content is not attached. Here is the log.

Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]: DBG:msilo:m_dump: user
<1...@sip.domain.com> online - expires=300
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:core:parse_headers: flags=
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:msilo:check_message_support: Allow message: 256
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:msilo:check_message_support: MESSAGE found in Allow Header
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:mysql_raise_event: MySQL status has not changed: connected
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:core:db_new_result: allocate 48 bytes for result set at 0x7f0fc515e718
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_get_columns: 6 columns returned from the query
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:core:db_allocate_columns: allocate 168 bytes for result columns at
0x7f0fc5149760
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x7f0fc5149790)[0]=[id]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_get_columns: use DB_INT result type
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x7f0fc51497a0)[1]=[src_addr]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x7f0fc51497b0)[2]=[dst_addr]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x7f0fc51497c0)[3]=[body]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_get_columns: use DB_BLOB result type
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x7f0fc51497d0)[4]=[ctype]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x7f0fc51497e0)[5]=[inc_time]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_get_columns: use DB_INT result type
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:core:db_allocate_rows: allocate 416 bytes for result rows and values at
0x7f0fc5148600
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_str2val: converting INT [73]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_str2val: converting STRING [sip:5...@sip.domain.com]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_str2val: converting STRING [sip:1...@sip.domain.com]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_str2val: converting BLOB [this is a message]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_str2val: converting STRING [text/plain]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_str2val: converting INT [1634193408]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_str2val: converting INT [74]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_str2val: converting STRING [sip:5...@sip.domain.com]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_str2val: converting STRING [sip:1...@sip.domain.com]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_str2val: converting BLOB [this is another message]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_str2val: converting STRING [text/plain]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:db_mysql:db_mysql_str2val: converting INT [1634193408]
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]: DBG:msilo:m_dump:
dumping [2] messages for <1...@sip.domain.com>!!!
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:msilo:msg_list_check_msg: checking msgid=73
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:msilo:msg_list_check_msg: msg already in sent list.
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]: DBG:msilo:m_dump:
message[0] mid=73 already sent.
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:msilo:msg_list_check_msg: checking msgid=74
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:msilo:msg_list_check_msg: msg already in sent list.
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]: DBG:msilo:m_dump:
message[1] mid=74 already sent.
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]:
DBG:core:db_free_columns: freeing result columns at 0x7f0fc5149760
Oct 18 17:25:19 sipserver /usr/sbin/opensips[18616]: DBG:core:db_free_rows:
freeing 2 rows
Oct 

Re: [OpenSIPS-Users] validate_dialog() failing to recognise reinvites

2021-10-21 Thread Kingsley Tart
Hi,

Thanks, that all makes perfect sense.

During the tests I had to insert another test and forgot to preserve
$rc from validate_dialog() which explains the difference between the -1
I was printing and the -2 that the function would have returned.

Thanks for the reference to the RFC. I shall present this extract to
the carrier to point out what they are doing wrong:

   -  A user, ttl, or method uri-parameter appearing in only one
  URI never matches, even if it contains the default value.

Thank you Bogdan, that's a massive help.

Cheers,
Kingsley.

On Thu, 2021-10-21 at 09:27 +0300, Bogdan-Andrei Iancu wrote:
> Hi,
> 
> So the error log is about the "remote contact", but the return code
> is -1 ?? (which according to doc [1] means invalid cseq). Checking
> the code, you should have get a -2 ret code in correlation to that
> log (see [2]).
> 
> Now, based on the error log, I see that the dialog module retained
> the "sip:asterisk@1.1.1.28:5060" URI (from a received Contact hdr),
> but it gets from the other party (as RURI) a different value, the
> "sip:asterisk@1.1.1.28:5060;user=phone" . And according to RFC3261
> [3], that extra "user" URI param makes the URI not to match anymore -
> see chapter " 9.1.4 URI Comparison"
> 
> 
> o  URI uri-parameter components are compared as follows:
> 
>  -  Any uri-parameter appearing in both URIs must match.
> 
>  -  A user, ttl, or method uri-parameter appearing in only
> one
> URI never matches, even if it contains the default value.
> 
> 
> 
> [1] 
> https://opensips.org/html/docs/modules/3.1.x/dialog.html#func_validate_dialog
> [2] 
> https://github.com/OpenSIPS/opensips/blob/master/modules/dialog/dlg_handlers.c#L2707
> [3] https://www.ietf.org/rfc/rfc3261.txt
> 
> Regards,
> On 10/19/21 12:06 PM, Kingsley Tart wrote:
> > Hi,
> > 
> > Thanks. I hadn't noticed before but yes, I'm seeing this:
> > 
> > ERROR:dialog:dlg_validate_dialog: failed to validate remote
> > contact: dlg=[sip:asterisk@1.1.1.28:5060] , req=[sip:
> > asterisk@1.1.1.28:5060;user=phone]
> > 
> > I can't see anywhere in the SIP trace where that contact URI
> > appears
> > *without* user=phone in it so I don't understand why that's
> > happening.
> > 
> > Cheers,
> > Kingsley.
> > 
> > On Tue, 2021-10-19 at 10:08 +0300, Bogdan-Andrei Iancu wrote:
> > > Hi Kingsley,
> > > 
> > > According to the docs [1], the "-1" ret code means "No  SIP
> > > message". Do you see any parsing errors in the logs, while doing
> > > the validation?
> > > 
> > > 
> > > [1] 
> > > https://opensips.org/html/docs/modules/3.1.x/sipmsgops.html#func_sipmsg_validate
> > > 
> > > Regards,
> > > On 10/18/21 5:25 PM, Kingsley Tart wrote:
> > > > Hi,
> > > > 
> > > > Using OpenSIPS 3.1.5 I'm getting validate_dialog() returning
> > > > $rc=-1 on
> > > > re-invites.
> > > > 
> > > > 
> > > > I have this in opensips.cfg:
> > > > 
> > > > modparam("dialog", "dlg_match_mode", 1)
> > > > 
> > > > 
> > > > The top of route() looks like this:
> > > > 
> > > > route {
> > > > if (has_totag()) {
> > > > if (is_method("ACK") && t_check_trans()) {
> > > > t_relay();
> > > > exit;
> > > > }
> > > > 
> > > > if (!loose_route()) {
> > > > send_reply(404, "Not here");
> > > > exit;
> > > > }
> > > > 
> > > > if (!validate_dialog()) {
> > > > xlog("L_WARN", "Ignoring $rm from $si
> > > > due to invalid dialog; rc=$rc\n");
> > > > }
> > > > 
> > > > 
> > > > I've attached an (anonymised) SIP trace. OpenSIPS isn't
> > > > responding to
> > > > the reinvites as I'm seeing "Ignoring INVITE from (address) due
> > > > to
> > > > invalid dialog: rc=-1" (as per the xlog above).
> > > > 
> > > > Is there something wrong with these re-invite messages, or
> > > > something
> > > > I'm doing wrong in OpenSIPS?
> > > > 
> > > > Cheers,
> > > > Kingsley.
> > > > 
> > > > 
> > > > ___
> > > > 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] Need some clarification on rtpengine usage .

2021-10-21 Thread Sasmita Panda
Hi ,

I have configured 2 rtpengine in opensips-2.2 as beow .

modparam("rtpengine", "rtpengine_sock", "udp:192.168.131.123:22000 udp:
192.168.128.199:22000")

My question is , If 1 rtpengine has port outage and give the error as below
*" ERROR:rtpengine:rtpe_function_call: proxy replied with error: Ran out of
ports"*
in tat case will opensips try the same call to connect with other Rtpengine
?

How to overcome this condition ?

*Thanks & Regards*
*Sasmita Panda*
*Senior Network Testing and Software Engineer*
*3CLogic , ph:07827611765*
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] validate_dialog() failing to recognise reinvites

2021-10-21 Thread Bogdan-Andrei Iancu

Hi,

So the error log is about the "remote contact", but the return code is 
-1 ?? (which according to doc [1] means invalid cseq). Checking the 
code, you should have get a -2 ret code in correlation to that log (see 
[2]).


Now, based on the error log, I see that the dialog module retained the 
"sip:asterisk@1.1.1.28:5060" URI (from a received Contact hdr), but it 
gets from the other party (as RURI) a different value, the 
"sip:asterisk@1.1.1.28:5060;user=phone" . And according to RFC3261 [3], 
that extra "user" URI param makes the URI not to match anymore - see 
chapter " 9.1.4 URI Comparison"



o  URI uri-parameter components are compared as follows:

 -  Any uri-parameter appearing in both URIs must match.

 -*A user, ttl, or method uri-parameter appearing in only one URI never 
matches, even if it contains the default value.*




[1] 
https://opensips.org/html/docs/modules/3.1.x/dialog.html#func_validate_dialog
[2] 
https://github.com/OpenSIPS/opensips/blob/master/modules/dialog/dlg_handlers.c#L2707

[3] https://www.ietf.org/rfc/rfc3261.txt

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS eBootcamp 2021
  https://opensips.org/training/OpenSIPS_eBootcamp_2021/

On 10/19/21 12:06 PM, Kingsley Tart wrote:

Hi,

Thanks. I hadn't noticed before but yes, I'm seeing this:

ERROR:dialog:dlg_validate_dialog: failed to validate remote contact: 
dlg=[sip:asterisk@1.1.1.28:5060] , req=[sip:asterisk@1.1.1.28:5060;user=phone]

I can't see anywhere in the SIP trace where that contact URI appears
*without* user=phone in it so I don't understand why that's happening.

Cheers,
Kingsley.

On Tue, 2021-10-19 at 10:08 +0300, Bogdan-Andrei Iancu wrote:

Hi Kingsley,

According to the docs [1], the "-1" ret code means "No  SIP message". Do you 
see any parsing errors in the logs, while doing the validation?


[1] 
https://opensips.org/html/docs/modules/3.1.x/sipmsgops.html#func_sipmsg_validate

Regards,
On 10/18/21 5:25 PM, Kingsley Tart wrote:

Hi,

Using OpenSIPS 3.1.5 I'm getting validate_dialog() returning $rc=-1 on
re-invites.


I have this in opensips.cfg:

modparam("dialog", "dlg_match_mode", 1)


The top of route() looks like this:

route {
if (has_totag()) {
if (is_method("ACK") && t_check_trans()) {
t_relay();
exit;
}

if (!loose_route()) {
send_reply(404, "Not here");
exit;
}

if (!validate_dialog()) {
xlog("L_WARN", "Ignoring $rm from $si due to invalid dialog; 
rc=$rc\n");
}


I've attached an (anonymised) SIP trace. OpenSIPS isn't responding to
the reinvites as I'm seeing "Ignoring INVITE from (address) due to
invalid dialog: rc=-1" (as per the xlog above).

Is there something wrong with these re-invite messages, or something
I'm doing wrong in OpenSIPS?

Cheers,
Kingsley.


___
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