Re: [OpenSIPS-Users] Users Digest, Vol 105, Issue 43

2017-04-05 Thread jure
e issue. I call goes_to_gw and
 after that attributes are filled.
 On Tue, Mar 28, 2017 at 3:25 PM, Bogdan-Andrei Iancu
 <bog...@opensips.org <mailto:bog...@opensips.org>> wrote:

 Hello John, Do you use partitions ? Is the use_partition
 enabled ? If not, the use_next_gw() should be used like:
 use_next_gw( "$avp(rules_attributes)","$avp(gw_attributes)")
 (the first param, the partition, is not to be provided) Could
 you check if this solves the problem ? Best regards,

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

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

 On 03/23/2017 09:19 AM, John Nash wrote:

 I am using drouting and recently tried to use gateway
 attribute. I call ...
 do_routing("$avp(int_grp_id)","WF","$avp(gw_whitelist)" ,
 "$avp(rules_attributes)","$avp(gw_attributes)"))
 After this call I can see $avp(gw_attributes) is populated
 frp, attr column of dr_gateways table.
 but when i call following ...
 use_next_gw(,"$avp(rules_attributes)","$avp(gw_attributes)")
 $avp(gw_attributes) becomes empty
 If i call next_routing() instead of use_next_gw then
 $avp(gw_attributes) retains old value but does not populate
 new value

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

-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.opensips.org/pipermail/users/attachments/20170405/036cdbf0/attachment-0001.html>

--

Subject: Digest Footer

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


--

End of Users Digest, Vol 105, Issue 43
**



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


Re: [OpenSIPS-Users] AVP + rest_post with utf-8 values

2017-04-05 Thread SamyGo
Thanks Liviu,
So true..The hex codes indeed represented the characters. It was the remote
URL which wasn't able to collect/read them.

Much appreciate your time
Thanks again.
Sammy


On Tue, Apr 4, 2017 at 3:24 PM, Liviu Chircu  wrote:

> Well, as Linus nicely put it: "Talk is cheap. Show me the code". If you
> take a look at the hex dump, notice that the "..." display characters are
> actually "e7928e", twice. I haven't double-checked, but I have a pretty
> good feeling that they represent our Chinese symbol. Which should mean that
> everything is okay on the OpenSIPS side.
>
> Liviu Chircu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 04.04.2017 20:42, SamyGo wrote:
>
> Hi Liviu,
>
> I confirm that the same happening on my side as well. but take a look at
> the last two lines of your tcpdump the characters are converted to
> *SIP...XXX...SIP.*
> In my case the remove web server in URL receives the data just as is with
> dots, like SIP...XXX..SIP , thats the problem as I stated. !
>
> A bit confused, do you mean that conversion of Chinese characters to "..."
> is the right behavior ?
>
> Looking for some details.
>
> Thanks,
> Sammy
>
>
> On Tue, Apr 4, 2017 at 9:49 AM, Liviu Chircu  wrote:
>
>> Hi SamyGo,
>>
>> The rest_post() function seems to properly put _any_ given bytes on the
>> wire:
>>
>> $var(body) = "SIP璎XXX璎SIP";
>> $var(ctype) = "text/plain";
>> rest_post("http://127.0.0.1; , "$var(body)",
>> "$var(ctype)", "$var(retcode)");
>>
>> produces:
>>
>> 0x:  4500 00a2 67cc 4000 4006 d487 7f00 0001  E...g.@.@...
>> 0x0010:  7f00 0001 8e1d 0050 febf 3131 bf5f d711  ...P..11._..
>> 0x0020:  8018 0156 fe96  0101 080a 0142 56fa  ...V.BV.
>> 0x0030:  0142 56fa 504f 5354 202f 2048 5454 502f  .BV.POST./.HTTP/
>> 0x0040:  312e 310d 0a48 6f73 743a 2031 3237 2e30  1.1..Host:.127.0
>> 0x0050:  2e30 2e31 0d0a 4163 6365 7074 3a20 2a2f  .0.1..Accept:.*/
>> 0x0060:  2a0d 0a43 6f6e 7465 6e74 2d54 7970 653a  *..Content-Type:
>> 0x0070:  2074 6578 742f 706c 6169 6e0d 0a43 6f6e  .text/plain..Con
>> 0x0080:  7465 6e74 2d4c 656e 6774 683a 2031 350d  tent-Length:.15.
>> 0x0090:  0a0d 0a53 4950 e792 8e58 5858 e792 8e53  ...SIP...XXX...S
>> 0x00a0:  4950 IP
>>
>> The command I used for capturing is:
>>
>> tcpdump -nnvvXSs 1514 -i any port 80
>>
>> Please let me know if behavior differs on your platform.
>>
>> Regards,
>>
>> Liviu Chircu
>> OpenSIPS Developerhttp://www.opensips-solutions.com
>>
>> OpenSIPS Summit May 2017 Amsterdam
>>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>>
>> On 28.03.2017 19:55, SamyGo wrote:
>>
>> Hi,
>> I've a specific problem with avps containing values in language other
>> than English. For example an avp(test) holding a Chinese character gets
>> converted to ? while passing to some rest_post URL.
>> *code:*
>> $avp(test) = $fn;
>> xlog("L_INFO","Got Display Name: $avp(test) \n");
>> rest_post("$avp(url)","$avp(test)" );
>> The output in x-log line stays correct but the webserver gets the value
>> of $avp(test) converted in "...??.."
>> I've tried to add the charset=utf-8 in the content-type header but it
>> doesn't help.
>> Looking forward to get some hints/help on this.
>> Thanks,
>> Sammy
>>
>> ___
>> 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 
> 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] Possible Drouting bug

2017-04-05 Thread Bogdan-Andrei Iancu

Hi John,

I tried to reproduce your report, but no luck.

This is the script I used :


if ($rU=~"^1") {
$avp(gw_whitelist) = "one,two,three";
xlog ("Start routing\n");
if ( !do_routing("1","WF","$avp(gw_whitelist)" , 
"$avp(rules_attributes)","$avp(gw_attributes)")) {

xlog ("nothing found\n");
send_reply("404", "Not found");
exit;
}
xlog ("success first $rd, R_attr=$avp(rules_attributes), 
G_attr=$avp(gw_attributes)\n");


while ( 
use_next_gw("$avp(rules_attributes)","$avp(gw_attributes)") ){
xlog ("success next $rd, R_attr=$avp(rules_attributes), 
G_attr=$avp(gw_attributes)\n");

}

xlog ("done\n");
send_reply("404", "Not found");
exit;
}


This generates:

Apr  5 18:41:28 [14657] Start routing
Apr  5 18:41:28 [14657] success init 10.0.0.102, R_attr=rule_124, G_attr=two
Apr  5 18:41:28 [14657] success next 10.0.0.101, R_attr=rule_124, G_attr=one
Apr  5 18:41:28 [14657] success next 10.0.0.103, R_attr=rule_12, 
G_attr=three

Apr  5 18:41:28 [14657] done


The DB looks like:

mysql> select * from dr_gateways;
++---+--+--+---++---++---++-+
| id | gwid  | type | address  | strip | pri_prefix | attrs | 
probe_mode | state | socket | description |

++---+--+--+---++---++---++-+
|  1 | one   |0 | sip:10.0.0.101   | 0 | NULL   | one   
|  0 | 0 | NULL   | NULL|
|  2 | two   |0 | sip:10.0.0.102   | 0 | NULL   | two   
|  0 | 0 | NULL   | NULL|
|  3 | three |0 | sip:10.0.0.103   | 0 | NULL   | three 
|  0 | 0 | NULL   | NULL|

++---+--+--+---++---++---++-+
3 rows in set (0.01 sec)

mysql> select * from dr_rules;
++-++-+--+-+-+--+-+
| ruleid | groupid | prefix | timerec | priority | routeid | gwlist  
| attrs| description |

++-++-+--+-+-+--+-+
|  1 | 1   | 12 | NULL|0 | NULL| three=1 
| rule_12  | NULL|
|  2 | 1   | 124| NULL|0 | NULL| one=1,two=1 
| rule_124 | NULL|

++-++-+--+-+-+--+-+
2 rows in set (0.00 sec)


Let me know the DB content, the script and output for your case. BTW, 
this was tested against OpenSIPS 2.3 version.


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 04/04/2017 11:05 PM, John Nash wrote:

No but I use groups and pass in routing functions.

On Wed, Apr 5, 2017 at 1:31 AM, Bogdan-Andrei Iancu 
> wrote:


John, do you use partitions in DR ?

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 04/04/2017 11:00 PM, John Nash wrote:

Yes I tried that but still same issue. I call goes_to_gw and
after that attributes are filled.
On Tue, Mar 28, 2017 at 3:25 PM, Bogdan-Andrei Iancu
> wrote:

Hello John, Do you use partitions ? Is the use_partition
enabled ? If not, the use_next_gw() should be used like:
use_next_gw( "$avp(rules_attributes)","$avp(gw_attributes)")

(the first param, the partition, is not to be provided) Could
you check if this solves the problem ? 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


On 03/23/2017 09:19 AM, John Nash wrote:

I am using drouting and recently tried to use gateway
attribute. I call ...
do_routing("$avp(int_grp_id)","WF","$avp(gw_whitelist)" ,
"$avp(rules_attributes)","$avp(gw_attributes)"))
After this call I can see $avp(gw_attributes) is populated
frp, attr column of dr_gateways table.
but when i call following ...
use_next_gw(,"$avp(rules_attributes)","$avp(gw_attributes)")
$avp(gw_attributes) 

Re: [OpenSIPS-Users] opensips-1.11 storing data in memory issue .

2017-04-05 Thread Bogdan-Andrei Iancu
The only moment OpenSIPS reads from DB is at startup.at runtime it 
only writes into DB (flushing the memory cache). So, just pending record 
(in DB only) might have been added without OpenSIPS being aware or they 
are bogus records which OpenSIPS refuses to load.


Check the expire time of those records ; also check for errors/warnings 
from OpenSIPS when starting up - maybe it is rejecting those records.


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 04/05/2017 11:32 AM, Sasmita Panda wrote:
Ohk. I got it.  You are saying,  if I am using two instance using 
single DB then both the instance must have same scheme of writing domain.


  If I will make show, then everything will be fine.

  Yesterday,  I have done the same setup,  but still when contact 
are present in the DB, in the same time they are not visible in memory.

I am using same command
opensipsctl fifo ul_dump : to see the memory
opensipsctl dB exec " select * from location"  : to see the dB entry.

 The machine in which I am using single instance of opensips, 
 they are absolutely fine.


On Apr 5, 2017 1:30 PM, "Bogdan-Andrei Iancu" > wrote:


Bingo...that is your problem... Don't you think there is a bit of
a conflict in having 2 OpenSIPS with different use_domain setting
working over the same "location" table ? one OpenSIPS is writing
records without domain, the other is complaining about reading
record without :)

Use different tables or databases.

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 04/05/2017 04:35 AM, Sasmita Panda wrote:

Yes...  Both are sharing same DB.
On Apr 4, 2017 11:08 PM, "Bogdan-Andrei Iancu"
> wrote:

Are the 2 instances sharing the same database ? 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 04/04/2017 06:59 PM, Sasmita Panda wrote:

I am running two different configuration file in a machine
with differ port.
  In one configuration file,  use_domain is disable and
in another it's enable.
  In this case,  I am not able to see those contacts in
memory which are getting saved without domain.
  Is that can be a reason? I have tried a lot to know
the exact reason.  But every time I am seeing different
behaviour.
   The system in which a single configuration is
running,  that's working absolutely fine.
  I am stuck in this issue.
On Apr 4, 2017 4:49 PM, "Bogdan-Andrei Iancu"
> wrote:

Well, if the "use_domain" is enabled for usrloc,
OpenSIPS expects to find a domain set for all the
records in the "location" table, otherwise it will
ignore/discard them at loading time. The primary storage
for registered contacts in the memory cache - OpenSIPS
will perform lookups only in memory cache (and not it
DB) - of course, unless you use the DB ONLY mode. You
can check the in-memory registrations by "opensipsctl ul
dump" 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 04/04/2017 01:39 PM, Sasmita Panda wrote:

Hi Bogdan ,
   Yes , the domain corresponding to this username
is empty . But the domain for all the contact is not
empty .
When the domain for a contact is not empty and
its present in the DB , I am not getting that in the
memory . What could be the reason for this .
   Another strange thing happening . When I am
setting db_mode :2 , even if a contact is not present
in the memory (but present in db)
the call get connected . I was assuming when there is
   

Re: [OpenSIPS-Users] Opensips drouting probing

2017-04-05 Thread Bogdan-Andrei Iancu

Hi Denis,

Indeed, do_routing() returns -1 for all failure cases - no rule matched, 
no available destination or simply internal error. Please open a feature 
request on github, so we can extend and return different negative return 
codes so the script writer can differently handle them.


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

On 04/05/2017 04:08 PM, Denis wrote:

Bogdan, it seems to be working now. Thank you!
Additional moments.
1) As i see in log do_routing returns the same error, '-1', in "no 
prefix in dr_rules" as weel as in "All the gateways are disabled". For 
my project it is enough, but, in a future, i think, it will be more 
useful if do_routing will returns several codes, one for each reason.
2) Now, in situation of "All the gateways are disabled" Opensips 
returns 404 without any script functions. So if 1) will be released, 
admin will have possibility to chose which SIP code Opensips will send 
in each reason.

--
С уважением, Денис.
Best regards, Denis
05.04.2017, 15:02, "Bogdan-Andrei Iancu" :

Hi Denis,

Thank you for your help - the problem was found and fixed in head, 
2.3 , 2.2 and 1.11 versions.


Please update from GIT and give it a try. Let me know if it works for 
you now.


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
On 04/04/2017 08:38 PM, Bogdan-Andrei Iancu wrote:

Could you send me (off list) the full content of this routeid route ?

Thanks,
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 04/04/2017 06:16 PM, Denis wrote:

Yes, without routeid Opensips returns 404 code!
--
С уважением, Денис.
Best regards, Denis
04.04.2017, 17:59, "Bogdan-Andrei Iancu"  
:
And if you remove the routeid (in the rule definition), does the 
routing works ok ?


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 04/04/2017 05:56 PM, Denis wrote:

No, i don`t
--
С уважением, Денис.
Best regards, Denis
04.04.2017, 16:22, "Bogdan-Andrei Iancu"  
:

Do you do an "drop" or "exit" in that routeid ??
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 04/04/2017 03:16 PM, Denis wrote:

Bogdan,
Ok, dr_rules has filled 'routeid' column.
In routeid i, using dialplan, verify dialed prefix for some 
reason. If dialed prefix verified i make some action, if not, 
returns to the parent route.

In my example, dialed prefix does not verified.
So, route with do_routing
951: xlog ("Prepare routing");
952: if (!do_routing("$avp(5)",,,"$avp(300)","$avp(3)",)) {
953: send_reply("404", "Not found");
954: exit;
955: }
route [routeid] {
1848: if (dp_translate("20004", "$rU/$rU", "$avp(999)")) {

   
} else {
..
}
1867: }
The last strings for the call flow in syslog:
:951][me][core xlog]
:952][me][module do_routing]
:1867][me][core if]
:1848][me][module dp_translate]
INFO:drouting:do_routing: All the gateways are disabled
That is all. After that only my CANCEL from the caller, because 
there is no provisioning message after 100 Trying from Opensips.

--
С уважением, Денис.
Best regards, Denis
04.04.2017, 14:14, "Bogdan-Andrei Iancu"  
:

Hi Denis,

Again, as drouting is not doing any signalling action, it 
CANNOT block/freeze your OpenSIPS.


Use script_trace() function to see how your INVITE is handled :
http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc43

Regards,


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


Re: [OpenSIPS-Users] set environment variables for system - opensipsctl?

2017-04-05 Thread Bogdan-Andrei Iancu

Thank you Robert,

Any of your finds (the incorrect configurations) worth be documented in 
the README file, so other user will benefit of it ? if yes, just sent 
the text and where it should be inserted and I can do the task.


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 04/05/2017 04:15 PM, Mundkowsky, Robert wrote:

No. That is set correctly. If it was not, then it would not work for both ways 
to start the server.

Regardless, I think I had something configured incorrectly.  Seems to work now.

Thanks,

Robert Mundkowsky

-Original Message-
From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
Sent: Wednesday, April 5, 2017 4:07 AM
To: Mundkowsky, Robert ; OpenSIPS users mailling list 

Subject: Re: [OpenSIPS-Users] set environment variables for system - 
opensipsctl?

Hi Robert,

I think the difference is not about env vars but about the current path.
As per your error, OpenSIPS (the python module) is not able to locate the 
python file due a wrong basename for the file (given by the script_name module 
parameter).

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 04/05/2017 04:42 AM, Mundkowsky, Robert wrote:

Well, seems to work now. I think I had something wrong in the opensipsctlrc 
file.

Might have been that PID_FILE needed to be explicitly set, because I am not running as 
root and using a "prefix" install location.

BTW, is it reasonable to set PYTHONPATH in the opensipsctlrc file?




Robert Mundkowsky

-Original Message-
From: Mundkowsky, Robert
Sent: Tuesday, April 4, 2017 2:16 PM
To: 'Bogdan-Andrei Iancu' ; OpenSIPS users
mailling list 
Subject: RE: [OpenSIPS-Users] set environment variables for system - 
opensipsctl?

I am using opensips python module.  I am using PYTHONPATH env variable.

System starts without errors via "opensips start", but fails via " opensipsctl 
start" and it complains about the python module. Error messages are:

Apr  4 18:14:32 ip-10-61-81-170
/export/Apps/opensips/2.2.3/sbin/opensips[25723]:
ERROR:python:mod_init: cannot import callbackFromOpenSIPS Apr  4
18:14:32 ip-10-61-81-170
/export/Apps/opensips/2.2.3/sbin/opensips[25723]: ERROR:core:init_mod:
failed to initialize module python Apr  4 18:14:32 ip-10-61-81-170
/export/Apps/opensips/2.2.3/sbin/opensips[25723]: ERROR:core:main:
error while initializing modules


Robert Mundkowsky

-Original Message-
From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
Sent: Tuesday, April 4, 2017 1:52 PM
To: OpenSIPS users mailling list ;
Mundkowsky, Robert 
Subject: Re: [OpenSIPS-Users] set environment variables for system - 
opensipsctl?

Hi Robert,

The opensipsctl tool starts OpenSIPS directly by using the opensips binary - 
nothing special.

What are the env vars you have problems with ?

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 04/04/2017 08:14 PM, robert wrote:

If I start opensips via:

opensips start

It seems to pickup the environment variables from current session
correctly, but if use:

opensipsctl start

It does not pickup the environment variables from current session.

Is there some configuration file where I can set environment
variables for the system regardless of the way I start opensips?







--
View this message in context:
http://opensips-open-sip-server.1449251.n2.nabble.com/set-environment
- variables-for-system-opensipsctl-tp7606807.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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



This e-mail and any files transmitted with it may contain privileged or 
confidential information. It is solely for use by the individual for whom it is 
intended, even if addressed incorrectly. If you received this e-mail in error, 
please notify the sender; do not disclose, copy, distribute, or take any action 
in reliance on the contents of this information; and delete it from your 
system. Any other use of this e-mail is prohibited.


Thank you for your compliance.






This e-mail and any files transmitted with it may contain privileged or 
confidential information. It is solely for use by the individual for whom it is 
intended, even if addressed incorrectly. If you received this e-mail in error, 
please notify the 

Re: [OpenSIPS-Users] Opensips Late reply.

2017-04-05 Thread qasimak...@gmail.com
@Daniel, I know i dont need 1 child per request but i did it because it
might keep delays short as it has more threads to work with. I have limited
input call origination's from mi_datagram's UDP interface. Also maximum
number of calls are capped using dialog profiling.


Also i am using opensips 1.11 and i have got a few more logs to share. This
time i deliberately put maximum load on opensips and let it crash, Here are
is some info collected from core dumps:

*Log File:*
2017-04-05T17:45:04.986687+05:00 sip01 /usr/local/sbin/opensips[29092]:
Total number of dropped replies = 0
2017-04-05T17:45:04.986764+05:00 sip01 /usr/local/sbin/opensips[29344]:
Total number of dropped replies = 0
2017-04-05T17:45:04.987717+05:00 sip01 /usr/local/sbin/opensips[29344]:
Real SHMEM used size is 126444552
2017-04-05T17:45:04.988274+05:00 sip01 /usr/local/sbin/opensips[29344]:
Free SHMEM available is 947297272
2017-04-05T17:45:04.988425+05:00 sip01 /usr/local/sbin/opensips[29344]: The
total number of SHMEM fragments is 99819

2017-04-05T17:45:35.519928+05:00 sip01 /usr/local/sbin/opensips[28681]:
INFO:core:handle_sigs: child process 28887 exited by a signal 6
2017-04-05T17:45:35.730406+05:00 sip01 /usr/local/sbin/opensips[28681]:
INFO:core:handle_sigs: core was generated
2017-04-05T17:45:35.730879+05:00 sip01 /usr/local/sbin/opensips[28681]:
INFO:core:handle_sigs: terminating due to SIGCHLD

*gdb bt full:*
#5  0x7f3a81d17f7e in mi_uac_dlg_hdl (t=,
type=, ps=0x7ffe99c7eeb0) at mi.c:378
mi_hdl = 0x7f3a44b04b18
rpl_tree = 0x7f3a825f9d60
text = {s = 0x3 , len =
0}
__FUNCTION__ = "mi_uac_dlg_hdl"


-Qasim


On Wed, Apr 5, 2017 at 5:53 PM, Daniel Zanutti 
wrote:

> Hi Qasim
>
> How did you limit CPS? Because i have a similar scenario (150cps) but i
> set children to 20 or 24, never 200. You don't need 1 children per request.
>
> On Wed, Apr 5, 2017 at 9:44 AM, qasimak...@gmail.com  > wrote:
>
>> Hi,
>>
>> I have this scenario where i originate calls from mi_datagram and the
>> calls are cancelled as soon as it starts ringing. The problem i am facing
>> is that are running for a few minutes the response from opensips becomes
>> slow i.e. it send packets back to far end after a few seconds. Keeping it
>> running for a few hours and it crashes. I have currently limited the calls
>> per second to 200 and max call session to 600, but still there are calls
>> where opensips responds slow to SIP packets.
>>
>> Here are a few configurations that i am using:
>>
>> fork=yes
>> children=200
>>
>> loadmodule "mi_datagram.so"
>> modparam("mi_datagram", "socket_name", "/tmp/opensips.sock")
>> modparam("mi_datagram", "socket_name", "udp:localhost:2000")
>> modparam("mi_datagram", "children_count", 200)
>>
>>
>> Do you have any pointers where i should start looking at? I have also
>> generated core dump files let me know if you need some more info on this.
>>
>> Regards,
>> Qasim
>>
>> ___
>> 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] set environment variables for system - opensipsctl?

2017-04-05 Thread Mundkowsky, Robert
No. That is set correctly. If it was not, then it would not work for both ways 
to start the server.

Regardless, I think I had something configured incorrectly.  Seems to work now.

Thanks,

Robert Mundkowsky

-Original Message-
From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
Sent: Wednesday, April 5, 2017 4:07 AM
To: Mundkowsky, Robert ; OpenSIPS users mailling list 

Subject: Re: [OpenSIPS-Users] set environment variables for system - 
opensipsctl?

Hi Robert,

I think the difference is not about env vars but about the current path.
As per your error, OpenSIPS (the python module) is not able to locate the 
python file due a wrong basename for the file (given by the script_name module 
parameter).

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 04/05/2017 04:42 AM, Mundkowsky, Robert wrote:
> Well, seems to work now. I think I had something wrong in the opensipsctlrc 
> file.
>
> Might have been that PID_FILE needed to be explicitly set, because I am not 
> running as root and using a "prefix" install location.
>
> BTW, is it reasonable to set PYTHONPATH in the opensipsctlrc file?
>
>
>
>
> Robert Mundkowsky
>
> -Original Message-
> From: Mundkowsky, Robert
> Sent: Tuesday, April 4, 2017 2:16 PM
> To: 'Bogdan-Andrei Iancu' ; OpenSIPS users
> mailling list 
> Subject: RE: [OpenSIPS-Users] set environment variables for system - 
> opensipsctl?
>
> I am using opensips python module.  I am using PYTHONPATH env variable.
>
> System starts without errors via "opensips start", but fails via " 
> opensipsctl start" and it complains about the python module. Error messages 
> are:
>
> Apr  4 18:14:32 ip-10-61-81-170
> /export/Apps/opensips/2.2.3/sbin/opensips[25723]:
> ERROR:python:mod_init: cannot import callbackFromOpenSIPS Apr  4
> 18:14:32 ip-10-61-81-170
> /export/Apps/opensips/2.2.3/sbin/opensips[25723]: ERROR:core:init_mod:
> failed to initialize module python Apr  4 18:14:32 ip-10-61-81-170
> /export/Apps/opensips/2.2.3/sbin/opensips[25723]: ERROR:core:main:
> error while initializing modules
>
>
> Robert Mundkowsky
>
> -Original Message-
> From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
> Sent: Tuesday, April 4, 2017 1:52 PM
> To: OpenSIPS users mailling list ;
> Mundkowsky, Robert 
> Subject: Re: [OpenSIPS-Users] set environment variables for system - 
> opensipsctl?
>
> Hi Robert,
>
> The opensipsctl tool starts OpenSIPS directly by using the opensips binary - 
> nothing special.
>
> What are the env vars you have problems with ?
>
> 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 04/04/2017 08:14 PM, robert wrote:
>> If I start opensips via:
>>
>> opensips start
>>
>> It seems to pickup the environment variables from current session
>> correctly, but if use:
>>
>> opensipsctl start
>>
>> It does not pickup the environment variables from current session.
>>
>> Is there some configuration file where I can set environment
>> variables for the system regardless of the way I start opensips?
>>
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://opensips-open-sip-server.1449251.n2.nabble.com/set-environment
>> - variables-for-system-opensipsctl-tp7606807.html
>> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> 
>
> This e-mail and any files transmitted with it may contain privileged or 
> confidential information. It is solely for use by the individual for whom it 
> is intended, even if addressed incorrectly. If you received this e-mail in 
> error, please notify the sender; do not disclose, copy, distribute, or take 
> any action in reliance on the contents of this information; and delete it 
> from your system. Any other use of this e-mail is prohibited.
>
>
> Thank you for your compliance.
>
> 




This e-mail and any files transmitted with it may contain privileged or 
confidential information. It is solely for use by the individual for whom it is 
intended, even if addressed incorrectly. If you received this e-mail in error, 
please notify the sender; do not disclose, copy, distribute, or take any action 
in reliance on the contents of this information; and delete it from your 
system. Any other use of this e-mail is prohibited.


Thank you for your compliance.



Re: [OpenSIPS-Users] set environment variables for system - opensipsctl?

2017-04-05 Thread robert
No. That is set correctly. If it was not, then it would not work for both ways 
to start the server.

Robert Mundkowsky

From: Bogdan-Andrei Iancu-2 [via OpenSIPS (Open SIP Server)] 
[mailto:ml-node+s1449251n7606824...@n2.nabble.com]
Sent: Wednesday, April 5, 2017 4:08 AM
To: Mundkowsky, Robert 
Subject: Re: set environment variables for system - opensipsctl?

Hi Robert,

I think the difference is not about env vars but about the current path.
As per your error, OpenSIPS (the python module) is not able to locate
the python file due a wrong basename for the file (given by the
script_name module parameter).

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 04/05/2017 04:42 AM, Mundkowsky, Robert wrote:

> Well, seems to work now. I think I had something wrong in the opensipsctlrc 
> file.
>
> Might have been that PID_FILE needed to be explicitly set, because I am not 
> running as root and using a "prefix" install location.
>
> BTW, is it reasonable to set PYTHONPATH in the opensipsctlrc file?
>
>
>
>
> Robert Mundkowsky
>
> -Original Message-
> From: Mundkowsky, Robert
> Sent: Tuesday, April 4, 2017 2:16 PM
> To: 'Bogdan-Andrei Iancu' <[hidden 
> email]>; OpenSIPS users 
> mailling list <[hidden email]>
> Subject: RE: [OpenSIPS-Users] set environment variables for system - 
> opensipsctl?
>
> I am using opensips python module.  I am using PYTHONPATH env variable.
>
> System starts without errors via "opensips start", but fails via " 
> opensipsctl start" and it complains about the python module. Error messages 
> are:
>
> Apr  4 18:14:32 ip-10-61-81-170 
> /export/Apps/opensips/2.2.3/sbin/opensips[25723]: ERROR:python:mod_init: 
> cannot import callbackFromOpenSIPS Apr  4 18:14:32 ip-10-61-81-170 
> /export/Apps/opensips/2.2.3/sbin/opensips[25723]: ERROR:core:init_mod: failed 
> to initialize module python Apr  4 18:14:32 ip-10-61-81-170 
> /export/Apps/opensips/2.2.3/sbin/opensips[25723]: ERROR:core:main: error 
> while initializing modules
>
>
> Robert Mundkowsky
>
> -Original Message-
> From: Bogdan-Andrei Iancu [mailto:[hidden 
> email]]
> Sent: Tuesday, April 4, 2017 1:52 PM
> To: OpenSIPS users mailling list <[hidden 
> email]>; Mundkowsky, Robert 
> <[hidden email]>
> Subject: Re: [OpenSIPS-Users] set environment variables for system - 
> opensipsctl?
>
> Hi Robert,
>
> The opensipsctl tool starts OpenSIPS directly by using the opensips binary - 
> nothing special.
>
> What are the env vars you have problems with ?
>
> 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 04/04/2017 08:14 PM, robert wrote:
>> If I start opensips via:
>>
>> opensips start
>>
>> It seems to pickup the environment variables from current session
>> correctly, but if use:
>>
>> opensipsctl start
>>
>> It does not pickup the environment variables from current session.
>>
>> Is there some configuration file where I can set environment variables
>> for the system regardless of the way I start opensips?
>>
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://opensips-open-sip-server.1449251.n2.nabble.com/set-environment-
>> variables-for-system-opensipsctl-tp7606807.html
>> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>>
>> ___
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> 
>
> This e-mail and any files transmitted with it may contain privileged or 
> confidential information. It is solely for use by the individual for whom it 
> is intended, even if addressed incorrectly. If you received this e-mail in 
> error, please notify the sender; do not disclose, copy, distribute, or take 
> any action in reliance on the contents of this information; and delete it 
> from your system. Any other use of this e-mail is prohibited.
>
>
> Thank you for your compliance.
>
> 


___
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


If you reply to this email, your message will be added to the discussion below:
http://opensips-open-sip-server.1449251.n2.nabble.com/set-environment-variables-for-system-opensipsctl-tp7606807p7606824.html
To unsubscribe from set environment variables for system - opensipsctl?, click 
here.

Re: [OpenSIPS-Users] Opensips drouting probing

2017-04-05 Thread Denis via Users
Bogdan, it seems to be working now. Thank you! Additional moments. 1) As i see in log do_routing returns the same error, '-1', in "no prefix in dr_rules" as weel as in "All the gateways are disabled". For my project it is enough, but, in a future, i think, it will be more useful if do_routing will returns several codes, one for each reason.2) Now, in situation of "All the gateways are disabled" Opensips returns 404 without any script functions. So if 1) will be released, admin will have possibility to chose which SIP code Opensips will send in each reason. -- С уважением, Денис.Best regards, Denis   05.04.2017, 15:02, "Bogdan-Andrei Iancu" :Hi Denis,Thank you for your help - the problem was found and fixed in head, 2.3 , 2.2 and 1.11 versions.Please update from GIT and give it a try. Let me know if it works for you now.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
On 04/04/2017 08:38 PM, Bogdan-Andrei Iancu wrote: Could you send me (off list) the full content of this routeid route ?Thanks,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 04/04/2017 06:16 PM, Denis wrote:Yes, without routeid Opensips returns 404 code! -- С уважением, Денис.Best regards, Denis   04.04.2017, 17:59, "Bogdan-Andrei Iancu" :And if you remove the routeid (in the rule definition), does the routing works ok ?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 04/04/2017 05:56 PM, Denis wrote:No, i don`t -- С уважением, Денис.Best regards, Denis   04.04.2017, 16:22, "Bogdan-Andrei Iancu" :Do you do an "drop" or "exit" in that routeid ??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 04/04/2017 03:16 PM, Denis wrote:Bogdan, Ok, dr_rules has filled 'routeid' column.In routeid i, using dialplan, verify dialed prefix for some reason. If dialed prefix verified i make some action, if not, returns to the parent route.In my example, dialed prefix does not verified. So, route with do_routing951: xlog ("Prepare routing");
952: if (!do_routing("$avp(5)",,,"$avp(300)","$avp(3)",)) {  
953: send_reply("404", "Not found");
954: exit;
955: }route [routeid] {   
1848: if (dp_translate("20004", "$rU/$rU", "$avp(999)")) {

  
} else {
   ..
}  
1867: } The last strings for the call flow in syslog: :951][me][core xlog]:952][me][module do_routing]:1867][me][core if]:1848][me][module dp_translate]INFO:drouting:do_routing: All the gateways are disabled That is all. After that only my CANCEL from the caller, because there is no provisioning message after 100 Trying from Opensips. -- С уважением, Денис.Best regards, Denis   04.04.2017, 14:14, "Bogdan-Andrei Iancu" :Hi Denis,Again, as drouting is not doing any signalling action, it CANNOT block/freeze your OpenSIPS.Use script_trace() function to see how your INVITE is handled :    http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc43Regards,___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips Late reply.

2017-04-05 Thread Daniel Zanutti
Hi Qasim

How did you limit CPS? Because i have a similar scenario (150cps) but i set
children to 20 or 24, never 200. You don't need 1 children per request.

On Wed, Apr 5, 2017 at 9:44 AM, qasimak...@gmail.com 
wrote:

> Hi,
>
> I have this scenario where i originate calls from mi_datagram and the
> calls are cancelled as soon as it starts ringing. The problem i am facing
> is that are running for a few minutes the response from opensips becomes
> slow i.e. it send packets back to far end after a few seconds. Keeping it
> running for a few hours and it crashes. I have currently limited the calls
> per second to 200 and max call session to 600, but still there are calls
> where opensips responds slow to SIP packets.
>
> Here are a few configurations that i am using:
>
> fork=yes
> children=200
>
> loadmodule "mi_datagram.so"
> modparam("mi_datagram", "socket_name", "/tmp/opensips.sock")
> modparam("mi_datagram", "socket_name", "udp:localhost:2000")
> modparam("mi_datagram", "children_count", 200)
>
>
> Do you have any pointers where i should start looking at? I have also
> generated core dump files let me know if you need some more info on this.
>
> Regards,
> Qasim
>
> ___
> 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] Opensips Late reply.

2017-04-05 Thread qasimak...@gmail.com
Hi,

I have this scenario where i originate calls from mi_datagram and the calls
are cancelled as soon as it starts ringing. The problem i am facing is that
are running for a few minutes the response from opensips becomes slow i.e.
it send packets back to far end after a few seconds. Keeping it running for
a few hours and it crashes. I have currently limited the calls per second
to 200 and max call session to 600, but still there are calls where
opensips responds slow to SIP packets.

Here are a few configurations that i am using:

fork=yes
children=200

loadmodule "mi_datagram.so"
modparam("mi_datagram", "socket_name", "/tmp/opensips.sock")
modparam("mi_datagram", "socket_name", "udp:localhost:2000")
modparam("mi_datagram", "children_count", 200)


Do you have any pointers where i should start looking at? I have also
generated core dump files let me know if you need some more info on this.

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


[OpenSIPS-Users] tls_mgm module ERROR

2017-04-05 Thread Dragomir Haralambiev
Hello,

I try to start opensips with tls_mgm module and receive follow errors:

Apr  5 15:14:05 dev /usr/local/sbin/opensips[2628]:
WARNING:tls_mgm:mod_init: disabling compression due ZLIB problems
Apr  5 15:14:05 dev /usr/local/sbin/opensips[2628]:
INFO:tls_mgm:check_for_krb: KRB5 cipher KRB5-IDEA-CBC-SHA found
Apr  5 15:14:05 dev /usr/local/sbin/opensips[2628]: ERROR:tls_mgm:mod_init:
compiled agaist an openssl with kerberos, but run with one with kerberos
Apr  5 15:14:05 dev /usr/local/sbin/opensips[2628]: ERROR:core:init_mod:
failed to initialize module tls_mgm

How must to compile Opensips to run without errors?

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


Re: [OpenSIPS-Users] Opensips drouting probing

2017-04-05 Thread Bogdan-Andrei Iancu

Hi Denis,

Thank you for your help - the problem was found and fixed in head, 2.3 , 
2.2 and 1.11 versions.


Please update from GIT and give it a try. Let me know if it works for 
you now.


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

On 04/04/2017 08:38 PM, Bogdan-Andrei Iancu wrote:

Could you send me (off list) the full content of this routeid route ?

Thanks,
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 04/04/2017 06:16 PM, Denis wrote:

Yes, without routeid Opensips returns 404 code!
--
С уважением, Денис.
Best regards, Denis
04.04.2017, 17:59, "Bogdan-Andrei Iancu" :
And if you remove the routeid (in the rule definition), does the 
routing works ok ?


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 04/04/2017 05:56 PM, Denis wrote:

No, i don`t
--
С уважением, Денис.
Best regards, Denis
04.04.2017, 16:22, "Bogdan-Andrei Iancu" :

Do you do an "drop" or "exit" in that routeid ??
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 04/04/2017 03:16 PM, Denis wrote:

Bogdan,
Ok, dr_rules has filled 'routeid' column.
In routeid i, using dialplan, verify dialed prefix for some 
reason. If dialed prefix verified i make some action, if not, 
returns to the parent route.

In my example, dialed prefix does not verified.
So, route with do_routing
951: xlog ("Prepare routing");
952: if (!do_routing("$avp(5)",,,"$avp(300)","$avp(3)",)) {
953: send_reply("404", "Not found");
954: exit;
955: }
route [routeid] {
1848: if (dp_translate("20004", "$rU/$rU", "$avp(999)")) {

   
} else {
..
}
1867: }
The last strings for the call flow in syslog:
:951][me][core xlog]
:952][me][module do_routing]
:1867][me][core if]
:1848][me][module dp_translate]
INFO:drouting:do_routing: All the gateways are disabled
That is all. After that only my CANCEL from the caller, because 
there is no provisioning message after 100 Trying from Opensips.

--
С уважением, Денис.
Best regards, Denis
04.04.2017, 14:14, "Bogdan-Andrei Iancu" :

Hi Denis,

Again, as drouting is not doing any signalling action, it CANNOT 
block/freeze your OpenSIPS.


Use script_trace() function to see how your INVITE is handled :
http://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc43

Regards,


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


Re: [OpenSIPS-Users] Configure OpenSIPS to use USER based gateway

2017-04-05 Thread Bogdan-Andrei Iancu

The fix is available on GIT for head, 2.3 and 2.2 branches.

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 04/05/2017 02:54 PM, sagar malam wrote:

Hello Bogdan,

Thank you so much for your support.

Yes we will test and revert.

One query :
Can you tell me in which version of OpenSIPs have you fixed this 
issue? Latest one 2.2.3?


Thanks

On Wed, Apr 5, 2017 at 4:48 PM Bogdan-Andrei Iancu 
> wrote:


Hi Sagar,

Thank you for your report and patience in troubleshooting this.
Indeed, there was a bug - I just fixed it on GIT repo.

IF you update from GIT and try again, it should be working fine.

Please confirm.

Many thanks and 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 04/05/2017 09:16 AM, sagar malam wrote:

Hello Bogdan,

Please find attached script.

On Tue, Apr 4, 2017 at 8:33 PM Bogdan-Andrei Iancu
> wrote:

Could you please send me (off list) the script ? There is
something really weird going on.

Thanks,

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 04/04/2017 04:36 PM, sagar malam wrote:

Hello Bogdan,

I disabled Dialog and TH module but result is same.

Please find attached file

On Tue, Apr 4, 2017 at 6:42 PM Bogdan-Andrei Iancu
> wrote:

Thank you Sagar,

I see you use topology hiding - could you please
disabled the dialog and TH support for the call and try
it again ?

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 04/04/2017 03:39 PM, sagar malam wrote:


Yes.

Please find attached file.

On Tue, Apr 4, 2017 at 5:06 PM Bogdan-Andrei Iancu
> wrote:

Whatever headers are added in failure route are
visible only to that particular branch, they are
are not inherited by any future branch. So, if you
do uac_auth() from failure route only, I do not see
how the Auth hdr may propagate to other branch.

Do you have a pcap or txt capture for the call flow ?

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 04/04/2017 01:54 PM, sagar malam wrote:

Hello Bodgan,

Thanks for reply.

Do you use the uac_auth() (which add the Auth hdr)
only from failure route, right ?
Yes exactly.

Also , does your INVITE have any already populated
Auth hdr (when received by OpenSIPS) ?
No,we are adding it using uac_auth function.


On Tue, Apr 4, 2017 at 4:18 PM Bogdan-Andrei Iancu
>
wrote:

Hello,

Do you use the uac_auth() (which add the Auth
hdr) only from failure route, right ?

Also , does your INVITE have any already
populated Auth hdr (when received by OpenSIPS) ?

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

On 04/03/2017 11:26 AM, sagar malam wrote:

Hello,

I am trying to configure OpenSIPS to support
Username-password based authentication Gateway.

Hence i am using uac_auth function to
generated Authorization header before
relaying INVITE packet to gateway.

I am facing 

Re: [OpenSIPS-Users] opensips 1.10.1 crash randomly

2017-04-05 Thread Pasan Meemaduma via Users
Hi Bogdan,
Thanks for the reply. I'll get it to 1.11
 

On Tuesday, 4 April 2017, 23:23, Bogdan-Andrei Iancu  
wrote:
 

  Hi Pasan,
 
 The 1.10 is not supported/maintained for some almost 2 years 
(http://www.opensips.org/About/AvailableVersions).
 
 Better upgrade to 1.11 or 2.2 (1.11 is much closer to 1.10 and easier to 
migrate to)
 
 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 04/04/2017 07:20 PM, Pasan Meemaduma via Users wrote:
  
  Hi Guys, 
  my opensips server started to crash recently. It happens after I did a 
restart to opensips and some times it happens after its being up for a while. I 
have attached the full bt. I know this version has no longer bug fixes, But 
wanted to know if this is common known bug or hardware issue. Tried going 
through git hub issue tracker but didn't help. :/ 
  Looks like it crashes when a dialog timeout and trying to insert the BYE into 
acc table ?
  
  Reading symbols from /usr/sbin/opensips...Reading symbols from 
/usr/lib/debug/usr/sbin/opensips...done.
 done.
 [New LWP 32351]
 
 warning: Can't read pathname for load map: Input/output error.
 [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 /var/run/opensips/opensips.pid -m 
812 -M 64 -u opensips -'.
 Program terminated with signal 11, Segmentation fault.
 #0  0x7f4405a21507 in db_mysql_val2bind (v=v@entry=0x7f440669d7c0, 
binds=binds@entry=0x7f4406ba3288, i=i@entry=13) at val.c:297
 297    val.c: No such file or directory.
 (gdb) bt full
 #0  0x7f4405a21507 in db_mysql_val2bind (v=v@entry=0x7f440669d7c0, 
binds=binds@entry=0x7f4406ba3288, i=i@entry=13) at val.c:297
     t = 
     mt = 
     __FUNCTION__ = "db_mysql_val2bind"
 #1  0x7f4405a19317 in db_mysql_do_prepared_query 
(conn=conn@entry=0x7f4406b9e7c0, v=v@entry=0x7f440669d620, n=n@entry=14, 
     uv=uv@entry=0x0, un=un@entry=0, query=0x7f4405c24aa0) at dbase.c:651
     i = 
     j = 
     code = 32579
     cols = 
     pq_ptr = 0x7f4406ba3248
     ctx = 0x7f4406ba2b78
     mysql_bind = 0x7f4406ba3288
     start = {tv_sec = 1024, tv_usec = 139930128972470}
     buffered_rows = 0x0
 #2  0x7f4405a1daec in db_mysql_insert (_h=0x7f4406b9e7c0, 
_k=0x7f440669d340, _v=0x7f440669d620, _n=14) at dbase.c:1096
     ret = 
 #3  0x7f440646b78a in acc_db_cdrs (dlg=dlg@entry=0x7f43d0046ce0, msg=0x0) 
at acc.c:662
     total = 14
     nr_vals = 0
     i = 
     ret = 10
     res = -1
     nr_bye_vals = 0
     j = 
     created = 
     start_time = 
     core_s = {s = 0x7f4406ba31c8 "\006", len = 97}
     leg_s = {s = 0x7f4406ba1568 "", len = 4}
     extra_s = {s = 0x7f4406ba40f8 "\004", len = 107}
     table = {s = 0x7f4406b8a848 "accX", len = 3}
 ---Type  to continue, or q  to quit---
     nr_legs = 
     my_ps = 0x7f4406ba3248
     ins_list = 0x0
     __FUNCTION__ = "acc_db_cdrs"
 #4  0x7f44064732e7 in acc_dlg_callback (dlg=0x7f43d0046ce0, 
type=, _params=0x7f44028457c0) at acc_logic.c:651
     flags = 1155
     __FUNCTION__ = "acc_dlg_callback"
 #5  0x7f440260169f in run_dlg_callbacks (type=type@entry=64, 
dlg=dlg@entry=0x7f43d0046ce0, msg=msg@entry=0x0, dir=dir@entry=0, 
     dlg_data=dlg_data@entry=0x0) at dlg_cb.c:253
     cb = 
     __FUNCTION__ = "run_dlg_callbacks"
 #6  0x7f440261628d in dlg_ontimeout (tl=0x7f43d0046d20) at 
dlg_handlers.c:1457
     dlg = 0x7f43d0046ce0
     new_state = 5
     old_state = 3
     unref = 
     __FUNCTION__ = "dlg_ontimeout"
 #7  0x7f44026321f7 in dlg_timer_routine (ticks=, 
attr=) at dlg_timer.c:462
     tl = 0x
     ctl = 
     __FUNCTION__ = "dlg_timer_routine"
 #8  0x0049d4ba in timer_ticker (drift=, 
timer_list=) at timer.c:384
     t = 0x7f4406b8a680
     j = 62755
     ij = 6275577
     ij_marker = 6275577
 #9  run_timer_process (tpl=) at timer.c:500
     drift = 0
     wait = 
     o_tv = {tv_sec = 0, tv_usec = 10}
     multiple = 10
 ---Type  to continue, or q  to quit---
     cnt = 
     tv = {tv_sec = 0, tv_usec = 0}
     uinterval = 10
 #10 start_timer_processes () at timer.c:610
     tpl = 0x7f4406b88788
     pid = 
     __FUNCTION__ = "start_timer_processes"
 #11 0x0041881b in main_loop () at main.c:991
     i = 
     pid = 
     si = 0x0
     startup_done = 0x0
     chd_rank = 4
     rc = 
     load_p = 0x7f43d007d718
 #12 main (argc=, argv=) at main.c:1598
     cfg_log_stderr = 
     cfg_stream = 0xd0b010
     c = 
     r = 
     tmp = 0x7fffdf056c05 ""
     tmp_len 

Re: [OpenSIPS-Users] Configure OpenSIPS to use USER based gateway

2017-04-05 Thread Bogdan-Andrei Iancu

Hi Sagar,

Thank you for your report and patience in troubleshooting this. Indeed, 
there was a bug - I just fixed it on GIT repo.


IF you update from GIT and try again, it should be working fine.

Please confirm.

Many thanks and 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 04/05/2017 09:16 AM, sagar malam wrote:

Hello Bogdan,

Please find attached script.

On Tue, Apr 4, 2017 at 8:33 PM Bogdan-Andrei Iancu 
> wrote:


Could you please send me (off list) the script ? There is
something really weird going on.

Thanks,

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 04/04/2017 04:36 PM, sagar malam wrote:

Hello Bogdan,

I disabled Dialog and TH module but result is same.

Please find attached file

On Tue, Apr 4, 2017 at 6:42 PM Bogdan-Andrei Iancu
> wrote:

Thank you Sagar,

I see you use topology hiding - could you please disabled the
dialog and TH support for the call and try it again ?

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 04/04/2017 03:39 PM, sagar malam wrote:


Yes.

Please find attached file.

On Tue, Apr 4, 2017 at 5:06 PM Bogdan-Andrei Iancu
> wrote:

Whatever headers are added in failure route are visible
only to that particular branch, they are are not
inherited by any future branch. So, if you do uac_auth()
from failure route only, I do not see how the Auth hdr
may propagate to other branch.

Do you have a pcap or txt capture for the call flow ?

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 04/04/2017 01:54 PM, sagar malam wrote:

Hello Bodgan,

Thanks for reply.

Do you use the uac_auth() (which add the Auth hdr) only
from failure route, right ?
Yes exactly.

Also , does your INVITE have any already populated Auth
hdr (when received by OpenSIPS) ?
No,we are adding it using uac_auth function.


On Tue, Apr 4, 2017 at 4:18 PM Bogdan-Andrei Iancu
> wrote:

Hello,

Do you use the uac_auth() (which add the Auth hdr)
only from failure route, right ?

Also , does your INVITE have any already populated
Auth hdr (when received by OpenSIPS) ?

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

On 04/03/2017 11:26 AM, sagar malam wrote:

Hello,

I am trying to configure OpenSIPS to support
Username-password based authentication Gateway.

Hence i am using uac_auth function to generated
Authorization header before relaying INVITE packet
to gateway.

I am facing issue in removing old Authorization
header and append new Authorization header in
Failure route before trying next gateway.

OpenSIPs is not detecting old Authorization
headers but when i see sip trace ,headers are present.


Script flow is something like this :
request_route{
 select_gateway
relay_route
}
relay_route{
t_relay
}

failure_route{
Remove old Authirization header
 on,407 or 401,Add Authorization header using uac_auth
select_next gateway
relay_route
}

In Users mailing list i read that headers added in
request route cannot be removed later,hence i need
to add headers during branch route but uac_auth
function 

Re: [OpenSIPS-Users] MediaProxy Got traffic information for stream

2017-04-05 Thread Dan Pascu

On 31 Mar 2017, at 17:18, Andreas Bøckmann wrote:

> Hello,
> 
> I am hoping somebody can explain to me how MediaProxy receives "traffic 
> information" from OpenSIPS. 

Mediaproxy doesn't receive traffic information from OpenSIPS. Mediaproxy 
determines endpoint addresses based in received media from endpoints. If you 
see Unknown in those log lines from mediaproxy, it means it has not received 
any RTP/RTCP traffic from that endpoint, so it cannot determine where to 
forward the streams, thus no audio.

> 
> I am trying to use two different GWs to reach PSTN but I am experiencing 
> no-audio using one of them and the only thing I can see that is different is 
> in MediaProxy logs.
> .
> The call flow is similar (late offer).
> 
> --> INVITE
> <- 183/180
> <-  200 OK SDP
> --> ACK SDP
> 
> Got traffic information for stream: (audio) Unknown (RTP: 1.2.3.4:10002, 
> RTCP: Unknown) <-> 2.3.4.5:16388 <-> 2.3.4.5:16390 <-> 4.5.6.7:11390 (RTP: 
> 4.5.6.7:11390, RTCP: 4.5.6.7:11391)
> 
> Got traffic information for stream: (audio) Unknown (RTP: 1.2.3.4:1, 
> RTCP: Unknown) <-> 2.3.4.5:16384 <-> 2.3.4.5:16386 <-> 3.4.5.6:22458 (RTP: 
> Unknown, RTCP: Unknown)
> 
> As I see this MediaProxy has all 3 relevant IPs in both cases; but it's not 
> set in "RTP:" for the call which does not have audio so I am wondering how 
> this can be? 
> 
> What's the missing piece here so that MediaProxy knows "3.4.5.6" is "RTP:" ?
> 
> 
> //Andreas
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Dan





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


Re: [OpenSIPS-Users] rtpengine database support

2017-04-05 Thread Bogdan-Andrei Iancu

Hi Kirill,

Somehow I suspected this is the idea in Alex's response. Still, the 
original question was about how to provision the rtpengines (as 
connectors) in the OpenSIPS module. keep in mind that the rtpengines may 
be completely standalone or hooked together. So, how does OpenSIPS know 
which RTPengine instances to use - not sure if the REDIS DB (used for HA 
and persistent restarts) can provide such info.


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

On 04/05/2017 08:29 AM, Kirill Galinurov wrote:
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


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


Re: [OpenSIPS-Users] Opensips crash

2017-04-05 Thread Denis via Users
Ok, Bogdan, I'll be waiting any result. Thank you. -- С уважением, Денис.Best regards, Denis   05.04.2017, 11:53, "Bogdan-Andrei Iancu" :Hi Denis,Many thanks for the output - this confirm a suspicious of mine in regards to the cause of the crash - let me try to see if we can reproduce it on our side or if we need more info from your side.Please do not delete the corefile for the moment :)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
On 04/05/2017 11:03 AM, Denis wrote:Hello, Bogdan! f 5#5  0x7fdf6844c4f2 in free_dlg_dlg (dlg=0x7fdf6c4ac158) at dlg_hash.c:183183                     destroy_dlg_callbacks_list(dlg->cbs.first); p *dlg->cbs.first$1 = {types = 96, callback = 0x7fdf67531300 , param = 0x0, callback_param_free = 0x7fdf675318fe , next = 0x7fdf84191080} p *dlg->cbs.first->next$2 = {types = 96, callback = 0x7fdf67531300 , param = 0x7fdf83c9f340, callback_param_free = 0x7fdf675318fe , next = 0x0} p *dlg->cbs.first->next->nextCannot access memory at address 0x0 p *dlg->cbs.first->next->next->nextCannot access memory at address 0x20 and so on with at address 0x20 -- С уважением, Денис.Best regards, Denis   04.04.2017, 18:43, "Bogdan-Andrei Iancu" :Super :)we got to something useful.Now, again in GDB please do:f 5p *dlg->cbs.firstp *dlg->cbs.first->nextp *dlg->cbs.first->next->nextand keep adding "->next" until you get error from gdb.Thanks,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 04/04/2017 06:07 PM, Денис Путято wrote:Sorry, Bogdan, i missed that I found such CRITICAL message"CRITICAL:core:qm_free: freeing already freed pointer, first free: acc_logic.c: dlg_free_acc_mask(211) - aborting" And after that and till crash only "WARNING:core:utimer_ticker:" reports in syslog. (gdb)f 2#2  0x00515592 in qm_free (qm=, p=p@entry=0x7fdf83c9f340, file=file@entry=0x7fdf6753ad62 "acc_logic.c",    func=func@entry=0x7fdf6753af90 <__FUNCTION__.12529> "dlg_free_acc_mask", line=line@entry=211) at mem/q_malloc.c:483483                     abort();  p *((struct qm_frag*) ((char*)p-sizeof(struct qm_frag)))$1 = {size = 8, u = {nxt_free = 0x7fdf71a8c6b0, is_free = 140597661320880}, file = 0x7fdf6753ad62 "acc_logic.c", func = 0x7fdf6753af90 <__FUNCTION__.12529> "dlg_free_acc_mask", line = 211,  check = 17361641481138401520} -- С уважением, Денис.Best regards, Denis   04.04.2017, 17:58, "Bogdan-Andrei Iancu" :The RADIUS part is not relevant.Still you didn;t answer to my question on the CRITICAL error - according to the backtrace, you should have a CRITICAL message in the opensips log, just before the crash.In GDB, do:    f 2    p *((struct qm_frag*) ((char*)p-sizeof(struct qm_frag)))  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 04/04/2017 05:55 PM, Denis wrote:During crash there was another problem with LAN network.Because of this problem Opensips could not connect to radius server.rc_ip_hostname: couldn't look up host by addr: xxrc_send_server: no reply from RADIUS server unknown:1812 No more critical messages. Bogdan, i am sorry, but"in frame 2". What does it mean?  -- С уважением, Денис.Best regards, Denis   04.04.2017, 16:35, "Bogdan-Andrei Iancu" :Any CRITICAL message into the log before the crash ?also, in gdb in frame 2, please print:    p *((struct qm_frag*) ((char*)p-sizeof(struct qm_frag)))   Thanks,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 04/04/2017 03:19 PM, Denis wrote:p shm_block->first_frag$1 = (struct qm_frag *) 0x7fdf6b9d44f8 p shm_block->last_frag_end$2 = (struct qm_frag_end *) 0x7fe02899efd0  p mem_block->first_frag$3 = (struct qm_frag *) 0x7fe029214508 p mem_block->last_frag_end$4 = (struct qm_frag_end *) 0x7fe0691defe0  -- С уважением, Денис.Best regards, Denis   04.04.2017, 14:51, "Bogdan-Andrei Iancu" :OK,please enter gdb and print:    p shm_block->first_frag    p shm_block->last_frag_end    p mem_block->first_frag    p mem_block->last_frag_endThanks,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 04/04/2017 01:42 PM, Denis wrote:Hello, Bogdan! No, i cannot see in the log any messages you mentioned it your letter.The situation dealing with crash had such stage. 1. I prepared to migrate to 2.2.3 from 2.2.2. But do not have a time to restart Opensips2. As a 

Re: [OpenSIPS-Users] Opensips crash

2017-04-05 Thread Bogdan-Andrei Iancu

Hi Denis,

Many thanks for the output - this confirm a suspicious of mine in 
regards to the cause of the crash - let me try to see if we can 
reproduce it on our side or if we need more info from your side.

Please do not delete the corefile for the moment :)

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

On 04/05/2017 11:03 AM, Denis wrote:

Hello, Bogdan!
f 5
#5  0x7fdf6844c4f2 in free_dlg_dlg (dlg=0x7fdf6c4ac158) at 
dlg_hash.c:183

183 destroy_dlg_callbacks_list(dlg->cbs.first);
p *dlg->cbs.first
$1 = {types = 96, callback = 0x7fdf67531300 , param 
= 0x0, callback_param_free = 0x7fdf675318fe , next 
= 0x7fdf84191080}

p *dlg->cbs.first->next
$2 = {types = 96, callback = 0x7fdf67531300 , param 
= 0x7fdf83c9f340, callback_param_free = 0x7fdf675318fe 
, next = 0x0}

p *dlg->cbs.first->next->next
Cannot access memory at address 0x0
p *dlg->cbs.first->next->next->next
Cannot access memory at address 0x20
and so on with at address 0x20
--
С уважением, Денис.
Best regards, Denis
04.04.2017, 18:43, "Bogdan-Andrei Iancu" :

Super :)we got to something useful.

Now, again in GDB please do:

f 5
p *dlg->cbs.first
p *dlg->cbs.first->next
p *dlg->cbs.first->next->next

and keep adding "->next" until you get error from gdb.

Thanks,
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 04/04/2017 06:07 PM, Денис Путято wrote:

Sorry, Bogdan, i missed that
I found such CRITICAL message
"CRITICAL:core:qm_free: freeing already freed pointer, first free: 
acc_logic.c: dlg_free_acc_mask(211) - aborting"
And after that and till crash only "WARNING:core:utimer_ticker:" 
reports in syslog.

(gdb)
f 2
#2  0x00515592 in qm_free (qm=, 
p=p@entry=0x7fdf83c9f340, file=file@entry=0x7fdf6753ad62 "acc_logic.c",
func=func@entry=0x7fdf6753af90 <__FUNCTION__.12529> 
"dlg_free_acc_mask", line=line@entry=211) at mem/q_malloc.c:483

483 abort();
p *((struct qm_frag*) ((char*)p-sizeof(struct qm_frag)))
$1 = {size = 8, u = {nxt_free = 0x7fdf71a8c6b0, is_free = 
140597661320880}, file = 0x7fdf6753ad62 "acc_logic.c", func = 
0x7fdf6753af90 <__FUNCTION__.12529> "dlg_free_acc_mask", line = 211,

  check = 17361641481138401520}
--
С уважением, Денис.
Best regards, Denis
04.04.2017, 17:58, "Bogdan-Andrei Iancu"  
:

The RADIUS part is not relevant.

Still you didn;t answer to my question on the CRITICAL error - 
according to the backtrace, you should have a CRITICAL message in 
the opensips log, just before the crash.


In GDB, do:
f 2
p *((struct qm_frag*) ((char*)p-sizeof(struct qm_frag)))

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 04/04/2017 05:55 PM, Denis wrote:

During crash there was another problem with LAN network.
Because of this problem Opensips could not connect to radius server.
rc_ip_hostname: couldn't look up host by addr: xx
rc_send_server: no reply from RADIUS server unknown:1812
No more critical messages.
Bogdan, i am sorry, but
"in frame 2". What does it mean?
--
С уважением, Денис.
Best regards, Denis
04.04.2017, 16:35, "Bogdan-Andrei Iancu"  
:

Any CRITICAL message into the log before the crash ?

also, in gdb in frame 2, please print:
p *((struct qm_frag*) ((char*)p-sizeof(struct qm_frag)))


Thanks,
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 04/04/2017 03:19 PM, Denis wrote:

p shm_block->first_frag
$1 = (struct qm_frag *) 0x7fdf6b9d44f8
p shm_block->last_frag_end
$2 = (struct qm_frag_end *) 0x7fe02899efd0
 p mem_block->first_frag
$3 = (struct qm_frag *) 0x7fe029214508
p mem_block->last_frag_end
$4 = (struct qm_frag_end *) 0x7fe0691defe0
--
С уважением, Денис.
Best regards, Denis
04.04.2017, 14:51, "Bogdan-Andrei Iancu"  
:

OK,please enter gdb and print:
p shm_block->first_frag
p shm_block->last_frag_end

p mem_block->first_frag
p mem_block->last_frag_end

Thanks,
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 04/04/2017 01:42 PM, Denis wrote:

Hello, Bogdan!
No, i cannot see in the log any messages you 

Re: [OpenSIPS-Users] opensips-1.11 storing data in memory issue .

2017-04-05 Thread Sasmita Panda
Ohk. I got it.  You are saying,  if I am using two instance using single DB
then both the instance must have same scheme of writing domain.

  If I will make show, then everything will be fine.

  Yesterday,  I have done the same setup,  but still when contact are
present in the DB, in the same time they are not visible in memory.
I am using same command
opensipsctl fifo ul_dump : to see the memory
opensipsctl dB exec " select * from location"  : to see the dB entry.

 The machine in which I am using single instance of opensips,  they
are absolutely fine.

On Apr 5, 2017 1:30 PM, "Bogdan-Andrei Iancu"  wrote:

> Bingo...that is your problem... Don't you think there is a bit of a
> conflict in having 2 OpenSIPS with different use_domain setting working
> over the same "location" table ? one OpenSIPS is writing records without
> domain, the other is complaining about reading record without :)
>
> Use different tables or databases.
>
> 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 04/05/2017 04:35 AM, Sasmita Panda wrote:
>
> Yes...  Both are sharing same DB.
>
> On Apr 4, 2017 11:08 PM, "Bogdan-Andrei Iancu" 
> wrote:
>
>> Are the 2 instances sharing the same database ?
>>
>> 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 04/04/2017 06:59 PM, Sasmita Panda wrote:
>>
>> I am running two different configuration file in a machine with differ
>> port.
>>   In one configuration file,  use_domain is disable and in another
>> it's enable.
>>   In this case,  I am not able to see those contacts in memory which
>> are getting saved without domain.
>>
>>   Is that can be a reason? I have tried a lot to know the exact
>> reason.  But every time I am seeing different behaviour.
>>The system in which a single configuration is running,  that's
>> working absolutely fine.
>>   I am stuck in this issue.
>> On Apr 4, 2017 4:49 PM, "Bogdan-Andrei Iancu" 
>> wrote:
>>>
>>> Well, if the "use_domain" is enabled for usrloc, OpenSIPS expects to
>>> find a domain set for all the records in the "location" table, otherwise it
>>> will ignore/discard them at loading time. The primary storage for
>>> registered contacts in the memory cache - OpenSIPS will perform lookups
>>> only in memory cache (and not it DB) - of course, unless you use the DB
>>> ONLY mode. You can check the in-memory registrations by "opensipsctl ul
>>> dump" 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 04/04/2017 01:39 PM, Sasmita Panda wrote:
>>>
>>> Hi Bogdan ,
>>>Yes , the domain corresponding to this username is empty . But
>>> the domain for all the contact is not empty .
>>> When the domain for a contact is not empty and its present in
>>> the DB , I am not getting that in the memory . What could be the reason for
>>> this .
>>>Another strange thing happening . When I am setting db_mode :2 ,
>>> even if a contact is not present in the memory (but present in db)
>>> the call get connected . I was assuming when there is no contact in the
>>> memory it should send  "404 Not Found" .
>>>When I am running opensips in AWS linux , everything works fine .
>>> I am not seeing any issue regarding updating memory .
>>> But when I am running this in centos 7 , there is problem in updating
>>> memory in every refresh  .
>>>  So where was the problem . opensips is version is same every where
>>> . My config file is same everywhere . But still there is difference . Why
>>> this is happening ?
>>>
>>> *Thanks & Regards*
>>> *Sasmita Panda*
>>> *Network Testing and Software Engineer*
>>> *3CLogic , ph:07827611765*
>>> On Tue, Apr 4, 2017 at 3:22 PM, Bogdan-Andrei Iancu >> > wrote:

 Hello Sasmita, The error means that at startup time (preloading the
 usrloc content from DB into memory), OpenSIPS finds a record (in the
 "location" table) with an empty domain field (username '') - could you
 confirm this by checking your DB ? 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

 On 03/31/2017 01:06 PM, Sasmita Panda wrote:

 Hi  All ,
 I am using opensips-1.11 from long time . But today i faced some
 issue .
 when a username det rigistered , it givind some 

Re: [OpenSIPS-Users] set environment variables for system - opensipsctl?

2017-04-05 Thread Bogdan-Andrei Iancu

Hi Robert,

I think the difference is not about env vars but about the current path. 
As per your error, OpenSIPS (the python module) is not able to locate 
the python file due a wrong basename for the file (given by the 
script_name module parameter).


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 04/05/2017 04:42 AM, Mundkowsky, Robert wrote:

Well, seems to work now. I think I had something wrong in the opensipsctlrc 
file.

Might have been that PID_FILE needed to be explicitly set, because I am not running as 
root and using a "prefix" install location.

BTW, is it reasonable to set PYTHONPATH in the opensipsctlrc file?




Robert Mundkowsky

-Original Message-
From: Mundkowsky, Robert
Sent: Tuesday, April 4, 2017 2:16 PM
To: 'Bogdan-Andrei Iancu' ; OpenSIPS users mailling list 

Subject: RE: [OpenSIPS-Users] set environment variables for system - 
opensipsctl?

I am using opensips python module.  I am using PYTHONPATH env variable.

System starts without errors via "opensips start", but fails via " opensipsctl 
start" and it complains about the python module. Error messages are:

Apr  4 18:14:32 ip-10-61-81-170 
/export/Apps/opensips/2.2.3/sbin/opensips[25723]: ERROR:python:mod_init: cannot 
import callbackFromOpenSIPS Apr  4 18:14:32 ip-10-61-81-170 
/export/Apps/opensips/2.2.3/sbin/opensips[25723]: ERROR:core:init_mod: failed 
to initialize module python Apr  4 18:14:32 ip-10-61-81-170 
/export/Apps/opensips/2.2.3/sbin/opensips[25723]: ERROR:core:main: error while 
initializing modules


Robert Mundkowsky

-Original Message-
From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
Sent: Tuesday, April 4, 2017 1:52 PM
To: OpenSIPS users mailling list ; Mundkowsky, Robert 

Subject: Re: [OpenSIPS-Users] set environment variables for system - 
opensipsctl?

Hi Robert,

The opensipsctl tool starts OpenSIPS directly by using the opensips binary - 
nothing special.

What are the env vars you have problems with ?

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 04/04/2017 08:14 PM, robert wrote:

If I start opensips via:

opensips start

It seems to pickup the environment variables from current session
correctly, but if use:

opensipsctl start

It does not pickup the environment variables from current session.

Is there some configuration file where I can set environment variables
for the system regardless of the way I start opensips?







--
View this message in context:
http://opensips-open-sip-server.1449251.n2.nabble.com/set-environment-
variables-for-system-opensipsctl-tp7606807.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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




This e-mail and any files transmitted with it may contain privileged or 
confidential information. It is solely for use by the individual for whom it is 
intended, even if addressed incorrectly. If you received this e-mail in error, 
please notify the sender; do not disclose, copy, distribute, or take any action 
in reliance on the contents of this information; and delete it from your 
system. Any other use of this e-mail is prohibited.


Thank you for your compliance.





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


Re: [OpenSIPS-Users] Opensips crash

2017-04-05 Thread Denis via Users
Hello, Bogdan! f 5#5  0x7fdf6844c4f2 in free_dlg_dlg (dlg=0x7fdf6c4ac158) at dlg_hash.c:183183                     destroy_dlg_callbacks_list(dlg->cbs.first); p *dlg->cbs.first$1 = {types = 96, callback = 0x7fdf67531300 , param = 0x0, callback_param_free = 0x7fdf675318fe , next = 0x7fdf84191080} p *dlg->cbs.first->next$2 = {types = 96, callback = 0x7fdf67531300 , param = 0x7fdf83c9f340, callback_param_free = 0x7fdf675318fe , next = 0x0} p *dlg->cbs.first->next->nextCannot access memory at address 0x0 p *dlg->cbs.first->next->next->nextCannot access memory at address 0x20 and so on with at address 0x20 -- С уважением, Денис.Best regards, Denis   04.04.2017, 18:43, "Bogdan-Andrei Iancu" :Super :)we got to something useful.Now, again in GDB please do:f 5p *dlg->cbs.firstp *dlg->cbs.first->nextp *dlg->cbs.first->next->nextand keep adding "->next" until you get error from gdb.Thanks,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 04/04/2017 06:07 PM, Денис Путято wrote:Sorry, Bogdan, i missed that I found such CRITICAL message"CRITICAL:core:qm_free: freeing already freed pointer, first free: acc_logic.c: dlg_free_acc_mask(211) - aborting" And after that and till crash only "WARNING:core:utimer_ticker:" reports in syslog. (gdb)f 2#2  0x00515592 in qm_free (qm=, p=p@entry=0x7fdf83c9f340, file=file@entry=0x7fdf6753ad62 "acc_logic.c",    func=func@entry=0x7fdf6753af90 <__FUNCTION__.12529> "dlg_free_acc_mask", line=line@entry=211) at mem/q_malloc.c:483483                     abort();  p *((struct qm_frag*) ((char*)p-sizeof(struct qm_frag)))$1 = {size = 8, u = {nxt_free = 0x7fdf71a8c6b0, is_free = 140597661320880}, file = 0x7fdf6753ad62 "acc_logic.c", func = 0x7fdf6753af90 <__FUNCTION__.12529> "dlg_free_acc_mask", line = 211,  check = 17361641481138401520} -- С уважением, Денис.Best regards, Denis   04.04.2017, 17:58, "Bogdan-Andrei Iancu" :The RADIUS part is not relevant.Still you didn;t answer to my question on the CRITICAL error - according to the backtrace, you should have a CRITICAL message in the opensips log, just before the crash.In GDB, do:    f 2    p *((struct qm_frag*) ((char*)p-sizeof(struct qm_frag)))  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 04/04/2017 05:55 PM, Denis wrote:During crash there was another problem with LAN network.Because of this problem Opensips could not connect to radius server.rc_ip_hostname: couldn't look up host by addr: xxrc_send_server: no reply from RADIUS server unknown:1812 No more critical messages. Bogdan, i am sorry, but"in frame 2". What does it mean?  -- С уважением, Денис.Best regards, Denis   04.04.2017, 16:35, "Bogdan-Andrei Iancu" :Any CRITICAL message into the log before the crash ?also, in gdb in frame 2, please print:    p *((struct qm_frag*) ((char*)p-sizeof(struct qm_frag)))   Thanks,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 04/04/2017 03:19 PM, Denis wrote:p shm_block->first_frag$1 = (struct qm_frag *) 0x7fdf6b9d44f8 p shm_block->last_frag_end$2 = (struct qm_frag_end *) 0x7fe02899efd0  p mem_block->first_frag$3 = (struct qm_frag *) 0x7fe029214508 p mem_block->last_frag_end$4 = (struct qm_frag_end *) 0x7fe0691defe0  -- С уважением, Денис.Best regards, Denis   04.04.2017, 14:51, "Bogdan-Andrei Iancu" :OK,please enter gdb and print:    p shm_block->first_frag    p shm_block->last_frag_end    p mem_block->first_frag    p mem_block->last_frag_endThanks,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 04/04/2017 01:42 PM, Denis wrote:Hello, Bogdan! No, i cannot see in the log any messages you mentioned it your letter.The situation dealing with crash had such stage. 1. I prepared to migrate to 2.2.3 from 2.2.2. But do not have a time to restart Opensips2. As a result "i waited" when Opensips have crashed. During crash of 2.2.2 no core file has been generated, but Opensips has been restarted using cron.3. After 2) Opensips became 2.2.3. It was working about 1 minute and crashed again, but in that time, core file has been generated and i attached information from it.So, between 2) and 3) , as i mentioned above, there were no messages about memory, but i see many messages like'WARNING:core:utimer_ticker: utimer task  already scheduled for 71500 msWARNING:core:timer_ticker: timer task  already scheduled for 72400 msWARNING:core:timer_ticker: timer task  already scheduled for 72400 

Re: [OpenSIPS-Users] opensips-1.11 storing data in memory issue .

2017-04-05 Thread Bogdan-Andrei Iancu
Bingo...that is your problem... Don't you think there is a bit of a 
conflict in having 2 OpenSIPS with different use_domain setting working 
over the same "location" table ? one OpenSIPS is writing records without 
domain, the other is complaining about reading record without :)


Use different tables or databases.

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 04/05/2017 04:35 AM, Sasmita Panda wrote:

Yes...  Both are sharing same DB.

On Apr 4, 2017 11:08 PM, "Bogdan-Andrei Iancu" > wrote:


Are the 2 instances sharing the same database ?

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 04/04/2017 06:59 PM, Sasmita Panda wrote:

I am running two different configuration file in a machine with
differ port.
  In one configuration file,  use_domain is disable and in
another it's enable.
  In this case,  I am not able to see those contacts in
memory which are getting saved without domain.
  Is that can be a reason? I have tried a lot to know the
exact reason.  But every time I am seeing different behaviour.
   The system in which a single configuration is running,
 that's working absolutely fine.
  I am stuck in this issue.
On Apr 4, 2017 4:49 PM, "Bogdan-Andrei Iancu"
> wrote:

Well, if the "use_domain" is enabled for usrloc, OpenSIPS
expects to find a domain set for all the records in the
"location" table, otherwise it will ignore/discard them at
loading time. The primary storage for registered contacts in
the memory cache - OpenSIPS will perform lookups only in
memory cache (and not it DB) - of course, unless you use the
DB ONLY mode. You can check the in-memory registrations by
"opensipsctl ul dump" 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 04/04/2017 01:39 PM, Sasmita Panda wrote:

Hi Bogdan ,
   Yes , the domain corresponding to this username is
empty . But the domain for all the contact is not empty .
When the domain for a contact is not empty and its
present in the DB , I am not getting that in the memory .
What could be the reason for this .
   Another strange thing happening . When I am setting
db_mode :2 , even if a contact is not present in the memory
(but present in db)
the call get connected . I was assuming when there is no
contact in the memory it should send  "404 Not Found" .
   When I am running opensips in AWS linux , everything
works fine . I am not seeing any issue regarding updating
memory .
But when I am running this in centos 7 , there is problem in
updating memory in every refresh  .
 So where was the problem . opensips is version is same
every where . My config file is same everywhere . But still
there is difference . Why this is happening ?
*/Thanks & Regards/*
/Sasmita Panda/
/Network Testing and Software Engineer/
/3CLogic , ph:07827611765/
On Tue, Apr 4, 2017 at 3:22 PM, Bogdan-Andrei Iancu
> wrote:

Hello Sasmita, The error means that at startup time
(preloading the usrloc content from DB into memory),
OpenSIPS finds a record (in the "location" table) with
an empty domain field (username '') - could you
confirm this by checking your DB ? 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


On 03/31/2017 01:06 PM, Sasmita Panda wrote:

Hi  All ,
I am using opensips-1.11 from long time . But today
i faced some issue .
when a username det rigistered , it givind some error
in the