Re: [OpenSIPS-Users] [RELEASE] OpenSIPS minor releases: 2.2.3 and 1.11.10

2017-03-10 Thread Ramachandran, Agalya (Contractor)
Hi Liviu,

I tried the following and my observations for the same.


1)  Compiled and installed OpenSIPS of 2.2.3 code(no other patches applied).

2)  async(rest_get("https://example.com;, 
"$var(body)"), resume_route);==> crashes on my machine. Same dump as I shared 
before.

3)  async(rest_get("http://example.com;<%22http:/example.com%22>, 
"$var(body)"), resume_route);==> No crash observed.

4)  Long back I tried to run a sample curl program that will reach 
https://example.com ==> Worked without any crash

5)  I have also tried a sample curl program that interacts with REST server 
(async, https://URL) ==> Worked on the same machine without crash.

Only when the same payload is passed using OpenSIPS, and when processing the 
response of it, OpenSIPS is being crashed.

6)  Tried with async (rest_post(http:// URL)); ==> No crash

7)  Tried with async(rest_post(https://URL)); ==> Crash occurred

I am attaching here with the sample curl file,  where I try to reach 
example.com(getHttps.c) and sample curl program which will do the actual PUT 
request I want to do( asyncPutHttps.c)
With asyncPutHttps.c, whatever I do in the sample program, the same I do 
OpenSIPS too, but not crashing in my sample program and crash occurs only with 
OpenSIPS.

Let me know if you need more information on any of these.

Regards,
Agalya


From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Thursday, March 09, 2017 5:06 AM
To: Ramachandran, Agalya (Contractor) ; 
OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] [RELEASE] OpenSIPS minor releases: 2.2.3 and 
1.11.10


No luck on a CentOS 7.2 system with libcurl 7.29.0 with async rest_get. Some 
more questions:

- does the following crash your system? If not, please detail the nature of 
your HTTP transfer that's causing the crash (server location and a .pcap of a 
successful curl would be nice).

   async(rest_get("https://example.com;, "$var(body)"), 
resume_route);

- are you using any custom patches for rest_client? I suggest we only use the 
2.2.3 tag code when debugging this issue, from now on

Regards,

Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com



OpenSIPS Summit May 2017 Amsterdam

  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 08.03.2017 18:05, Ramachandran, Agalya (Contractor) wrote:
Hi Liviu,

You got time to reproduce this issue? If you need any help towards it let me 
know.

Regards,
Agalya

/***
 **  _   _   _
 **  Project ___| | | |  _ \| |
 ** / __| | | | |_) | |
 **| (__| |_| |  _ <| |___
 ** \___|\___/|_| \_\_|
 **
 ** Copyright (C) 1998 - 2016, Daniel Stenberg, , et al.
 **
 ** This software is licensed as described in the file COPYING, which
 ** you should have received as part of this distribution. The terms
 ** are also available at https://curl.haxx.se/docs/copyright.html.
 **
 ** You may opt to use, copy, modify, merge, publish, distribute and/or sell
 ** copies of the Software, and permit persons to whom the Software is
 ** furnished to do so, under the terms of the COPYING file.
 **
 ** This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 ** KIND, either express or implied.
 **
 / 
/* 
 ** using the multi interface to do a multipart formpost without blocking
 ** 
 **/ 
 
#include 
#include 
#include 
 
#include 
 
int main(void)
{
  CURL *curl;
 
  CURLM *multi_handle;
  int still_running;
 
  struct curl_httppost *formpost=NULL;
  struct curl_httppost *lastptr=NULL;
  struct curl_slist *headerlist=NULL;
  static const char buf[] = "Expect:";
 

  char body[]="{\"Key1\": \"Value1\", \"time\": 1476891582434, \"key3\": 
\"value3\", \"key4\": 
\"value4\",\"Key5\":\"{\\\"test\\\":{\\\"key\\\":\\\"value\\\",\\\"key\\\":\\\"value\\\"},\\\"payload\\\":{\\\"key\\\":\\\"value\\\",\\\"key\\\":\\\"value\\\"}}\"
 }";
  char token[]="sadsddsadlkksadl";


  /* Fill in the file upload field. This makes libcurl load data from
 *  the given file name when curl_easy_perform() is called. */ 
/*  curl_formadd(,
   ,
   CURLFORM_COPYNAME, "sendfile",
   CURLFORM_FILE, "postit2.c",
   CURLFORM_END);
 */ 
  /* Fill in the filename field */ 
/*  curl_formadd(,
   ,
   CURLFORM_COPYNAME, "filename",
   CURLFORM_COPYCONTENTS, "postit2.c",
   CURLFORM_END);
 */
  /* Fill in the submit field too, even if this is rarely needed */ 
/*  curl_formadd(,
   ,
   CURLFORM_COPYNAME, "submit",
   CURLFORM_COPYCONTENTS, "send",
   

Re: [OpenSIPS-Users] SIP password auth mechanism

2017-03-10 Thread Bogdan-Andrei Iancu

Hi Abdul,

I see that's a draft, so hard to judge on how far it will get. And 
something like this is not on our roadmap, maybe because of its very, 
very low priority in terms of needs. Do you have any idea if anyone 
actually implemented this ?


Regards,

Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html

On 03/09/2017 12:37 PM, Abdul Basit wrote:

Hi Geeks,

While exploring further I found a draft explaining elliptic curve 
secure remote protocol (*EC-SRP*) for SIP authentication

https://tools.ietf.org/html/draft-liu-sipcore-ec-srp5-03

This explanation seems align with my requirements of not storing 
password in database.

UAC and UAS both should support EC-SRP.

Do we have any road-map of opensips implementing of EC-RSP or similar 
authentication mechanism?
I will check the same with PJSIP because i couldn't find any traces on 
their forum as well.


--
regards,

abdul basit


On Wed, Mar 8, 2017 at 9:53 PM, Abdul Basit > wrote:


Hi Bogdan,

I am using PJSIP as UAC and Opensips as UAS with radius for AAA.
I wanted to avoid getting into the code but let me check the
flexibility.

Thank you for your reply :)

--
regards,

abdul basit

On Wed, Mar 8, 2017 at 1:34 AM, Bogdan-Andrei Iancu
> wrote:

Hi Abdul,

Besides the digest auth, there is no other standard auth
mechanism for SIP, AFAIK.

If you have control over the SIP UAC, of course, you could try
to build your own auth mechanism - OpenSIPS offers enough
flexibility in terms of both header manipulation and data
computing.

Regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com


OpenSIPS Summit May 2017 Amsterdam
   http://www.opensips.org/events/Summit-2017Amsterdam.html


On 03/07/2017 10:26 AM, Abdul Basit wrote:

Hi,
I have a scenario where I will create password HASH = SALT +
STRING and save SALT and resulted HASH only in DB. I will
transport random STRING value to my custom sip application as
password.
Digest authentication is not comply with this requirement. Is
that any supported authentication mechanism that can fulfill
this requirement.
or is there any more appropriate authentication mechanism by
opensips/kamailio?
One of the objectives is in case DB will compromise, users
passwords will not available because random STRING will not
store in DB.
Looking forward for suggestions and comments.
-- regards,
abdul basit

___
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] Advanced SIP scenarios with Event-based-Routing in OpenSIPS 2.3

2017-03-10 Thread Bogdan-Andrei Iancu
There is an increasing need for more complex SIP scenarios, even for the 
Class 4 Switches. Such scenarios (Push Notification, Call Pickup, Call 
parking) exceed the capabilities of a liner processing - something more 
powerful and flexible is needed in turns of driving the SIP routing.


What is the solution and how does it work in OpenSIPS 2.3 (demo vids are 
provided) ?


https://blog.opensips.org/2017/03/10/advanced-sip-scenarios-with-event-based-routing/


Note that how to implement the Push Notification and Call Pickup 
scenarios with Event-based Routing will be shown during Interactive 
Demos session at OpenSIPS Summit 2017 in Amsterdam !!


Best regards,

--
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html


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


Re: [OpenSIPS-Users] Quest to find memory leak

2017-03-10 Thread John Nash
Yes this patch solves my problem. Thank you. I wonder why it did not show
as memory leak in dumps.

On Fri, Mar 10, 2017 at 3:19 PM, Răzvan Crainea  wrote:

> Hi, John!
>
> I think you might spot something. Can you apply this patch[1] and try
> again?
>
> [1] https://gist.github.com/razvancrainea/03a43bfa8b554a7ca89f2740a3c54c96
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Solutionswww.opensips-solutions.com
>
> On 03/10/2017 10:02 AM, John Nash wrote:
>
> Dear Razvan,
>
> I think I found one issue in do_routing function if i pass gw_whitelist
> then only i see this drop of memory. If I skip this parameter private
> memory does not increase with every call.
>
> Regards
>
> Manoj
>
> On Thu, Mar 9, 2017 at 7:29 PM, John Nash  wrote:
>
>> If I use 2.2 will it give clearer picture of memory allocation? or 2.3
>>
>> On Thu, Mar 9, 2017 at 7:21 PM, Răzvan Crainea 
>> wrote:
>>
>>> There's no need for that. No function should leak in any circumstances
>>> :)
>>>
>>> Răzvan Crainea
>>> OpenSIPS Solutionswww.opensips-solutions.com
>>>
>>> On 03/09/2017 03:27 PM, John Nash wrote:
>>>
>>> OK..May i send you my script privately?
>>>
>>> On Thu, Mar 9, 2017 at 6:13 PM, Răzvan Crainea 
>>> wrote:
>>>
 Hi, John!

 No, I nothing is suspicious. Definitely not from the drouting module.
 Try to make two captures: one after 10 calls, another one after 20
 calls.

 Best regards,

 Răzvan Crainea
 OpenSIPS Solutionswww.opensips-solutions.com

 On 03/09/2017 01:50 PM, John Nash wrote:

 Do you see anything suspicious in the latest mem dump?

 On Wed, Mar 8, 2017 at 7:20 PM, John Nash 
 wrote:

> One more useful info. I disabled drouting functions and just rewrote
> RURI to hardcoded address keeping rest of the functions same and I do not
> see drop in private memory of that process.
>
> On Wed, Mar 8, 2017 at 4:40 PM, John Nash 
> wrote:
>
>> OK Here is the dump
>> https://drive.google.com/open?id=0BxJKNwFalcRMX0xDUlRIa2VUdG8
>>
>>
>> I increased syslog message rate to 50, Made around 10 call
>> attempts. Waited for some time and made sure no call is on server and 
>> then
>> sent signal to dump memory to the process ID i suspect.
>>
>> On Wed, Mar 8, 2017 at 4:07 PM, Răzvan Crainea 
>> wrote:
>>
>>> No, you should not kill any process. Simply send a SIGUSR1 to the
>>> process you suspect.
>>>
>>> Răzvan Crainea
>>> OpenSIPS Solutionswww.opensips-solutions.com
>>>
>>> On 03/08/2017 12:28 PM, John Nash wrote:
>>>
>>> Sorry...Should I kill only the process where i see memory leak?
>>>
>>>
>>> ___
>>> 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] Quest to find memory leak

2017-03-10 Thread Răzvan Crainea

Hi, John!

I think you might spot something. Can you apply this patch[1] and try again?

[1] https://gist.github.com/razvancrainea/03a43bfa8b554a7ca89f2740a3c54c96

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 03/10/2017 10:02 AM, John Nash wrote:

Dear Razvan,

I think I found one issue in do_routing function if i 
pass gw_whitelist then only i see this drop of memory. If I skip this 
parameter private memory does not increase with every call.


Regards

Manoj

On Thu, Mar 9, 2017 at 7:29 PM, John Nash > wrote:


If I use 2.2 will it give clearer picture of memory allocation? or 2.3

On Thu, Mar 9, 2017 at 7:21 PM, Răzvan Crainea
> wrote:

There's no need for that. No function should leak in any
circumstances :)

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com 

On 03/09/2017 03:27 PM, John Nash wrote:

OK..May i send you my script privately?

On Thu, Mar 9, 2017 at 6:13 PM, Răzvan Crainea
> wrote:

Hi, John!

No, I nothing is suspicious. Definitely not from the
drouting module.
Try to make two captures: one after 10 calls, another one
after 20 calls.

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com


On 03/09/2017 01:50 PM, John Nash wrote:

Do you see anything suspicious in the latest mem dump?

On Wed, Mar 8, 2017 at 7:20 PM, John Nash
>
wrote:

One more useful info. I disabled drouting functions
and just rewrote RURI to hardcoded address keeping
rest of the functions same and I do not see drop in
private memory of that process.

On Wed, Mar 8, 2017 at 4:40 PM, John Nash
> wrote:

OK Here is the dump

https://drive.google.com/open?id=0BxJKNwFalcRMX0xDUlRIa2VUdG8




I increased syslog message rate to 50, Made
around 10 call attempts. Waited for some time
and made sure no call is on server and then sent
signal to dump memory to the process ID i suspect.

On Wed, Mar 8, 2017 at 4:07 PM, Răzvan Crainea
> wrote:

No, you should not kill any process. Simply
send a SIGUSR1 to the process you suspect.

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com


On 03/08/2017 12:28 PM, John Nash wrote:

Sorry...Should I kill only the process
where i see memory leak?




___
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] Quest to find memory leak

2017-03-10 Thread John Nash
Dear Razvan,

I think I found one issue in do_routing function if i pass gw_whitelist
then only i see this drop of memory. If I skip this parameter private
memory does not increase with every call.

Regards

Manoj

On Thu, Mar 9, 2017 at 7:29 PM, John Nash  wrote:

> If I use 2.2 will it give clearer picture of memory allocation? or 2.3
>
> On Thu, Mar 9, 2017 at 7:21 PM, Răzvan Crainea 
> wrote:
>
>> There's no need for that. No function should leak in any circumstances :)
>>
>> Răzvan Crainea
>> OpenSIPS Solutionswww.opensips-solutions.com
>>
>> On 03/09/2017 03:27 PM, John Nash wrote:
>>
>> OK..May i send you my script privately?
>>
>> On Thu, Mar 9, 2017 at 6:13 PM, Răzvan Crainea 
>> wrote:
>>
>>> Hi, John!
>>>
>>> No, I nothing is suspicious. Definitely not from the drouting module.
>>> Try to make two captures: one after 10 calls, another one after 20 calls.
>>>
>>> Best regards,
>>>
>>> Răzvan Crainea
>>> OpenSIPS Solutionswww.opensips-solutions.com
>>>
>>> On 03/09/2017 01:50 PM, John Nash wrote:
>>>
>>> Do you see anything suspicious in the latest mem dump?
>>>
>>> On Wed, Mar 8, 2017 at 7:20 PM, John Nash 
>>> wrote:
>>>
 One more useful info. I disabled drouting functions and just rewrote
 RURI to hardcoded address keeping rest of the functions same and I do not
 see drop in private memory of that process.

 On Wed, Mar 8, 2017 at 4:40 PM, John Nash 
 wrote:

> OK Here is the dump
> https://drive.google.com/open?id=0BxJKNwFalcRMX0xDUlRIa2VUdG8
>
>
> I increased syslog message rate to 50, Made around 10 call
> attempts. Waited for some time and made sure no call is on server and then
> sent signal to dump memory to the process ID i suspect.
>
> On Wed, Mar 8, 2017 at 4:07 PM, Răzvan Crainea 
> wrote:
>
>> No, you should not kill any process. Simply send a SIGUSR1 to the
>> process you suspect.
>>
>> Răzvan Crainea
>> OpenSIPS Solutionswww.opensips-solutions.com
>>
>> On 03/08/2017 12:28 PM, John Nash wrote:
>>
>> Sorry...Should I kill only the process where i see memory leak?
>>
>>
>> ___
>> 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