Re: [OpenSIPS-Users] Cluesterer and ul_add permanent

2017-07-10 Thread Bogdan-Andrei Iancu

Hi,

Ok, so you configured a two nodes cluster (using clusterer) and 
configured the USRLOC replication via the clusterer support.


And when you add a static contact via "ul_add", you get an error with 
2.2.4 and possible a crash on trunk ?


Regards,

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

OpenSIPS Bootcamp 2017, Houston, US
  http://opensips.org/training/OpenSIPS_Bootcamp_2017.html

On 07/07/2017 06:18 PM, Самусенко Андрей wrote:

I try to setup HA OpenSIPS 2.2.4
Using modules clusterer and usrloc.

Master management IP 192.168.1.2
Slave management IP 192.168.1.3

SIP REGISTER replication OK.
REGISTER -> master
master -> slave

Error with MI:
on master run opensipsctl ul add    introduce a
permanent usrloc entry
or XMLRPC ul_add('location', ...)

Brrr, today no warning:usrloc... but on master there is
DBG:core:io_wait_loop_epoll: [TCP_main] EPOLLHUP on IN ->connection closed by
the remote peer!
CRITICAL:core:receive_fd: EOF on 11
DBG:core:handle_worker: dead child 2, pid 7562 (shutting down?)

On четверг, 6 июля 2017 г. 16:28:53 MSK Bogdan-Andrei Iancu wrote:

Hi,

Could you be more specific on what you are trying to do ?

Regards,

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

OpenSIPS Bootcamp 2017, Houston, US
http://opensips.org/training/OpenSIPS_Bootcamp_2017.html

On 07/05/2017 07:03 PM, Andrey wrote:

OpenSIPS 2.2.4
Subject does not work.
Slave: WARNING:usrloc:receive_binary_packet: received bin packet from
unknown source: 192.168.1.2:4414
and MI process shutdown.


select url from clusterer:

bin:192.168.1.2:8026
bin:192.168.1.3:8026


___
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] negative values in math_rpn

2017-07-10 Thread xaled
Hi Liviu,

 

thanks for pointing to the current state of math_eval. It is definitely much 
more user friendly. 

Googling “opensips math_eval” gave me only the 1.10 version of math_eval 
documentation with only the binary operations at that time.

As usual - one should have looked better.

 

I was obviously stuck with the assumption that a value should always come first 
in an RPN expression.

 

Greetings,

xaled   



 

From: Users [mailto:users-boun...@lists.opensips.org] On Behalf Of Liviu Chircu
Sent: Montag, 10. Juli 2017 13:06
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] negative values in math_rpn


 

I suggest you use math_eval() - it's much more human friendly. The following 
should work: 

$var(neg) = "-6.135";

$var(neg_int) = $(var(neg){s.int});

math_eval("abs($var(neg_int))", "$var(result)");

OTOH, if you really want to use RPN, this will fix it:

math_rpn("abs $var(neg_int)", "$var(result)");




Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 10.07.2017 13:55, xaled wrote:

Hi,

 

am I doing something wrong, or can math_rpn not handle negative values?

 

$var(neg) = "-6.135";

$var(neg_int) = $(var(neg){s.int});

math_rpn("$var(neg_int) abs", "$avp(result)");

 

2017-07-10T12:47:59.804008+02:00 fra-ivr01 /usr/local/sbin/opensips[10971]: 
DBG:mathops:w_evaluate_rpn: Evaluating expression: -6 abs

2017-07-10T12:47:59.804339+02:00 fra-ivr01 /usr/local/sbin/opensips[10971]: 
WARNING:mathops:get_rpn_op: Parse expr error: Invalid operator! <-6>

2017-07-10T12:47:59.804669+02:00 fra-ivr01 /usr/local/sbin/opensips[10971]: 
ERROR:mathops:evaluate_rpn: Failed to parse RPN!

 

Thanks,

xaled






___
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] Looking for Mediaproxy developer

2017-07-10 Thread Daniel Zanutti
I'm looking for help to customize some things on mediaproxy software.

Need to:
1) Fix some bugs
2) Implement new features

Please contact me for details.

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


Re: [OpenSIPS-Users] Forking Non-INVITE Requests

2017-07-10 Thread Bogdan-Andrei Iancu

Hi Chad,

No, the functionality, as it is now, does not provide any feedback on 
the reply codes you received on the replicated forks.


Best regards,

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

OpenSIPS Bootcamp 2017, Houston, US
  http://opensips.org/training/OpenSIPS_Bootcamp_2017.html

On 07/07/2017 06:49 PM, Chad Attermann wrote:


Thanks Bogdan, I had seen that function and was wondering if it might 
be applicable.  I don’t suppose there wold be a way to track the 
responses from each destination, and have some logic like if all 
designations fail, then return failure code to orig side, otherwise if 
at least one destination succeeds then send success to orig?


Thanks again,

Chad.

On Jun 30, 2017, at 2:06 AM, Bogdan-Andrei Iancu > wrote:


Hi Chad,

I would say the t_replicate() is what you are looking for :
http://www.opensips.org/html/docs/modules/2.3.x/tm.html#treplicate

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

OpenSIPS Bootcamp 2017, Houston, US
   http://opensips.org/training/OpenSIPS_Bootcamp_2017.html
On 06/29/2017 07:31 PM, Chad Attermann wrote:

Hi All,

I would like to be able to “broadcast” some non-INVITE requests 
(like NOTIFY and MESSAGE) to multiple registered endpoints.  The 
problem with using parallel forking is that the request is not 
reliably delivered to all registered endpoints since retransmission 
of the request stops after the first success response is received. 
 What I need is some hybrid of parallel and serial forking, where 
requests to all registered are sent at once, but each is treated as 
a separate transaction so that the message is sent (or at least 
attempted) reliably to each endpoint.


This sort of situation is mentioned in the docs for the TM module…

"UAC--it is a very simplistic code which allows you to generate your 
own transactions. Particularly useful for things like NOTIFYs or 
IM gateways.”


… but there is no mention of *how* to use it.  I’m sure there is 
probably a simple script for this, but I haven’t had any success 
searching the mailing list or the Internet at large for details.  I 
would appreciate if anybody could provide details or a sample script 
demonstrating how to create a separate transaction for each branch.


Thanks!


___
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] Using usrloc module with Redis DB

2017-07-10 Thread Bogdan-Andrei Iancu

Hi Liran,

Keep in mind that in the USRLOC module, the primary data storage is 
memory, while the DB is just for periodic flushing (write only) for 
restart persistence - the only moment when the DB is read is at startup, 
when the memory is populated.
So, in order to make multiple opensips to share usrloc content via DB is 
to have the DB as primary data storage and this happens exclusively for 
DB ONLY mode (where there is no memory cache).


Regards,

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

OpenSIPS Bootcamp 2017, Houston, US
  http://opensips.org/training/OpenSIPS_Bootcamp_2017.html

On 07/06/2017 02:27 PM, Aknin, Liran wrote:

Thanks again Bogdan, I assumed that what you meant.

Using SQL, preferably PostgreSQL, is it possible to implement 
clustering of some opensips servers, in terms of shared read-write of 
userloc?


Regards,
Liran

On Thu, Jul 6, 2017 at 1:35 PM, Bogdan-Andrei Iancu 
> wrote:


Hi Liran,

yes, typo, it should have been "there is no straight way to use an
noSQL backends"

But this is for location. Otherwise, OpenSIPS has a cachedb_redis
module you can use from script as a key-value cache .

Regards,

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

OpenSIPS Bootcamp 2017, Houston, US
   http://opensips.org/training/OpenSIPS_Bootcamp_2017.html


On 07/06/2017 08:29 AM, Aknin, Liran wrote:

Hi Bogdan,

Thanks for your prompt reply.

Just to make sure I understood you correctly, since I was
actually asking about Redis - you mean that there is support for
*NO-SQL* DB, right?
Is usrloc over Redis going to be introduced in 2.4?

thanks,
Liran

On Wed, Jul 5, 2017 at 5:53 PM, Bogdan-Andrei Iancu
> wrote:

Hi Liran,

Right now, due the complexity of the usrloc data, there is no
straight way to use an SQL backend (there is a need for list
support with atomic ops). We are working for such support for
2.4 release.

Regards,

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


OpenSIPS Bootcamp 2017, Houston, US
   http://opensips.org/training/OpenSIPS_Bootcamp_2017.html


On 07/05/2017 04:23 PM, Aknin, Liran via Users wrote:

Hi Bogdan and all,

We would like to cluster few opensips servers, in terms of
sharing usrloc data between them. We already use Redis on
these servers and we want to take advantage of that, as well
as enjoining faster access comparing to SQL.

Is it possible to use usrloc module with Redis?
If so, can you please provide us with an example of defining
usrloc's db_url parameter to do so?

Thanks and regards,
Liran





___
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] Could not start cdrtool 9.5.0

2017-07-10 Thread Tijmen de Mes
Hi,

Unfortunately some code still uses short open tags in PHP. Please check if 
short_open_tag is set to On in /etc/php5/apache2/php.ini and 
/etc/php5/cli/php.ini.

Best regards,

Tijmen de Mes
—
AG Projects

> On 7 jul. 2017, at 11:22, Aqs Younas  wrote:
> 
> Thanks for reply, David. 
> 
> I think you might missed the part of log.
>  
> Jun  5 02:47:31 debian systemd[1]: Failed to start CDR mediation and rating 
> engine for Call Details Records..
> Jun  5 02:47:31 debian systemd[1]: Unit cdrtool.service entered failed state.
> Jun  5 02:47:31 debian systemd[1]: cdrtool.service start request repeated too 
> quickly, refusing to start.
> Jun  5 02:47:31 debian systemd[1]: Failed to start CDR mediation and rating 
> engine for Call Details Records..
> Jun  5 02:47:31 debian systemd[1]: Unit cdrtool.service entered failed state.
> 
> Well by manually running the Cdrtool it is failing too. 
> 
> root@debian:/var/www/CDRTool/scripts# php ratingEngine.php
>  set_time_limit (0);
> ini_set('mbstring.func_overload', '0');
> ini_set('output_handler', '');
> @ob_end_flush();
> 
> require('/etc/cdrtool/global.inc');
> require('cdr_generic.php');
> require('rating.php');
> require('rating_server.php');
> 
> // Init Rating Engine
> syslog(LOG_NOTICE,"Starting CDRTool Rating Engine...");
> 
> $RatingEngineServer = new RatingEngine();
> 
> if (!$RatingEngineServer->init_ok) {
> syslog(LOG_NOTICE,'Error: Cannot start Rating Engine, fix the errors and 
> try again');
> exit;
> }
> 
> syslog(LOG_NOTICE,"Rating Engine started sucesfully, going to background...");
> 
> // Go to the background
> $d = new Daemon('/var/run/ratingEngine.pid');
> $d->start();
> 
> $daemon = new socketDaemon();
> $server = $daemon->create_server('ratingEngineServer', 'ratingEngineClient', 
> $RatingEngine['socketIP'], $RatingEngine['socketPort']);
> 
> syslog(LOG_NOTICE,"Rating Engine is now ready to serve network requests");
> 
> $daemon->process();
> 
> ?>
> 
> It is simply printing the contents of script. 
> 
> I think it is due to php version compatibility issue. It is having compatible 
> issues with php 5.6 even though release announcements proclaimed this. 
> 
> Any pointer?
> Best Regards. 
> 
> On 7 July 2017 at 05:10, David Villasmil  > wrote:
> I didn't see any errors, in fact it says the engine is ready... Seems to me 
> like a startup script problem, the startup has changed in debian, maybe 
> cdrtool hasn't been updated? Have you tried starting it up manually instead 
> of using the startup script?
> On Thu, Jul 6, 2017 at 11:25 PM Aqs Younas  > wrote:
> Good Day.
> 
> I am trying to start cdrtool 9.5.0 after installation on Debian Jessie 8.3 
> having php 5.6.24 but it is failing with below errors. 
> 
> root@debian:~# /etc/init.d/cdrtool start
> [] Starting cdrtool (via systemctl): cdrtool.serviceJun  5 02:47:30 
> debian ratingEngine.php[13021]:  Jun  5 02:47:30 debian ratingEngine.php[13021]: set_time_limit (0);
> Jun  5 02:47:30 debian ratingEngine.php[13021]: 
> ini_set('mbstring.func_overload', '0');
> Jun  5 02:47:30 debian ratingEngine.php[13021]: ini_set('output_handler', '');
> Jun  5 02:47:30 debian ratingEngine.php[13021]: @ob_end_flush();
> Jun  5 02:47:30 debian ratingEngine.php[13021]: 
> require('/etc/cdrtool/global.inc');
> Jun  5 02:47:30 debian ratingEngine.php[13021]: require('cdr_generic.php');
> Jun  5 02:47:30 debian ratingEngine.php[13021]: require('rating.php');
> Jun  5 02:47:30 debian ratingEngine.php[13021]: require('rating_server.php');
> Jun  5 02:47:30 debian ratingEngine.php[13021]: // Init Rating Engine
> Jun  5 02:47:30 debian ratingEngine.php[13021]: syslog(LOG_NOTICE,"Starting 
> CDRTool Rating Engine...");
> Jun  5 02:47:30 debian ratingEngine.php[13021]: $RatingEngineServer = new 
> RatingEngine();
> Jun  5 02:47:30 debian ratingEngine.php[13021]: if 
> (!$RatingEngineServer->init_ok) {
> Jun  5 02:47:30 debian ratingEngine.php[13021]: syslog(LOG_NOTICE,'Error: 
> Cannot start Rating Engine, fix the errors and try again');
> Jun  5 02:47:30 debian ratingEngine.php[13021]: exit;
> Jun  5 02:47:30 debian ratingEngine.php[13021]: }
> Jun  5 02:47:30 debian ratingEngine.php[13021]: syslog(LOG_NOTICE,"Rating 
> Engine started sucesfully, going to background...");
> Jun  5 02:47:30 debian ratingEngine.php[13021]: // Go to the background
> Jun  5 02:47:30 debian ratingEngine.php[13021]: $d = new 
> Daemon('/var/run/ratingEngine.pid');
> Jun  5 02:47:30 debian ratingEngine.php[13021]: $d->start();
> Jun  5 02:47:30 debian ratingEngine.php[13021]: $daemon = new socketDaemon();
> Jun  5 02:47:30 debian ratingEngine.php[13021]: $server = 
> $daemon->create_server('ratingEngineServer', 'ratingEngineClient', 
> $RatingEngine['socketIP'], $RatingEngine['socketPort']);
> Jun  5 02:47:30 debian ratingEngine.php[13021]: syslog(LOG_NOTICE,"Rating 
> Engine 

Re: [OpenSIPS-Users] negative values in math_rpn

2017-07-10 Thread Liviu Chircu
I suggest you use math_eval() - it's much more human friendly. The 
following should work:


$var(neg) = "-6.135";

$var(neg_int) = $(var(neg){s.int});

math_eval("abs($var(neg_int))", "$var(result)");

OTOH, if you really want to use RPN, this will fix it:

math_rpn("abs $var(neg_int)", "$var(result)");

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 10.07.2017 13:55, xaled wrote:


Hi,

am I doing something wrong, or can math_rpn not handle negative values?

$var(neg) = "-6.135";

$var(neg_int) = $(var(neg){s.int});

math_rpn("$var(neg_int) abs", "$avp(result)");

2017-07-10T12:47:59.804008+02:00 fra-ivr01 
/usr/local/sbin/opensips[10971]: DBG:mathops:w_evaluate_rpn: 
Evaluating expression: -6 abs


2017-07-10T12:47:59.804339+02:00 fra-ivr01 
/usr/local/sbin/opensips[10971]: WARNING:mathops:get_rpn_op: Parse 
expr error: Invalid operator! <-6>


2017-07-10T12:47:59.804669+02:00 fra-ivr01 
/usr/local/sbin/opensips[10971]: ERROR:mathops:evaluate_rpn: Failed to 
parse RPN!


Thanks,

xaled



___
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] negative values in math_rpn

2017-07-10 Thread xaled
Hi,

 

am I doing something wrong, or can math_rpn not handle negative values?

 

$var(neg) = "-6.135";

$var(neg_int) = $(var(neg){s.int});

math_rpn("$var(neg_int) abs", "$avp(result)");

 

2017-07-10T12:47:59.804008+02:00 fra-ivr01 /usr/local/sbin/opensips[10971]: 
DBG:mathops:w_evaluate_rpn: Evaluating expression: -6 abs

2017-07-10T12:47:59.804339+02:00 fra-ivr01 /usr/local/sbin/opensips[10971]: 
WARNING:mathops:get_rpn_op: Parse expr error: Invalid operator! <-6>

2017-07-10T12:47:59.804669+02:00 fra-ivr01 /usr/local/sbin/opensips[10971]: 
ERROR:mathops:evaluate_rpn: Failed to parse RPN!

 

Thanks,

xaled

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


Re: [OpenSIPS-Users] UDP and TCP Listener

2017-07-10 Thread Liviu Chircu

Here is a similar thread [1]

TL;DR: the more blocking I/O operations (DB/HTTP/ENUM queries) you 
include in your script, the more children will be required if you still 
want your OpenSIPS to be able to ingest thousands of CPS.


[1]: http://lists.opensips.org/pipermail/users/2013-December/027530.html

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 08.07.2017 09:21, Voice TAC wrote:

Hello,

Can I know based on what I can set the values of children in the 
following:


children=4

tcp_children=10


I found that the values are:

Number of processes per UDP listener.

Total number of processes for all TCP listeners.


Is there a relation between number of calls and listeners?
I tried to search about listeners meaning but I did not find a clear 
explanation.



___
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