Re: [OpenSIPS-Users] What is the frequency that OpenSIPS reads the FIFO file?

2015-09-16 Thread Răzvan Crainea

Hi, Rodrigo!

OpenSIPS reads the file instantly, as soon as you send a command through 
the FIFO.


Best regards,

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

On 09/15/2015 08:59 PM, Rodrigo Pimenta Carvalho wrote:


Hi.


The OpenSIPS can read a FIFO file to get requested commands.

The OpenSIPS checks if the FIFO file exists, every 30 seconds by 
default, according to the documentation.



But, what is the frequency that OpenSIPS reads such file getting 
commands from there?



Regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


___
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] How to encode HTTP URL params values?

2015-09-16 Thread Andrey Vorobiev
Great thanks.

On Wed, Sep 16, 2015 at 11:47 AM, Liviu Chircu  wrote:

> Hi Andrey,
>
> You can place the unescaped string into a variable (e.g. "$var"), then use
> the {s.escape.user} transformation.
> e.g.:
> $var(query) = "username=john smith=hard,to#guess";
> xlog("after: \"$(var(query){s.escape.user})\"\n");
>
> rest_get("http://localhost/?$(var(query){s.escape.user})"
> , ...);
>
>
> (output)
> after: "username=john%20smith=hard,to%23guess"
>
> Best regards,
>
> Liviu Chircu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 15.09.2015 23:41, Andrey Vorobiev wrote:
>
> Hi,
>
> I try to use REST_CLIENT (OpenSIPS version 1.11) module in order perform
> HTTP GET request with params in URL query part. Some of parameters may
> contain space characters and need to be encoded according to
> http://www.w3schools.com/tags/ref_urlencode.asp. It seems that
> REST_CLIENT module doesn't encode specified URL. So what function or script
> transformation should I use in order to encode HTTP query params values?
>
> --
> Best regards.
>
>
> ___
> 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
>
>


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


Re: [OpenSIPS-Users] opensips 2.1 not starting when avp_db_query loading

2015-09-16 Thread Игорь Павлов
Oh, Răzvan. Many thanks!

I thought that "db_default_url" will be enough for avpops too.

Now it working, with modparam("avpops","db_url","...")

Is it possible to add some debug information to log when db_url is not
specified for this module?


С уважением,
Павлов Игорь
RingCloud

2015-09-16 11:17 GMT+04:00 Răzvan Crainea :

> You don't have any db_url specified for avpops? Is this generating a core
> dump?
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Solutionswww.opensips-solutions.com
>
> On 09/16/2015 08:34 AM, Игорь Павлов wrote:
>
> Hi,
>
> I don't understand why my opensips 2.1 not starting with avp_db_query()
> function.
> Last output from log (with debug=6):
>
> Sep 14 01:10:16 vs01 /usr/sbin/opensips[21832]: DBG:core:is_mod_func_used:
>> checking avp_db_query against t_relay
>> Sep 14 01:10:16 vs01 /usr/sbin/opensips[21832]:
>> DBG:core:is_mod_func_used: checking avp_db_query against send_reply
>> Sep 14 01:10:16 vs01 /usr/sbin/opensips[21832]:
>> DBG:core:is_mod_func_used: checking avp_db_query against is_method
>> Sep 14 01:10:16 vs01 /usr/sbin/opensips[21832]:
>> DBG:core:is_mod_func_used: checking avp_db_query against www_authorize
>> Sep 14 01:10:16 vs01 /usr/sbin/opensips[21832]:
>> DBG:core:is_mod_func_used: checking avp_db_query against avp_db_query
>> Sep 14 01:10:17 vs01 opensips: DBG:core:wait_status_code: read code 0 ?
>> rc = 0, errno=Success
>> Sep 14 01:10:17 vs01 opensips: INFO:core:daemonize: pre-daemon process
>> exiting with -1
>
>
>
> opensips.cfg contain only this line for avpops:
>
> loadmodule "avpops.so"
> 
> Best regards,
> Pavlov Igor
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips 2.1 not starting when avp_db_query loading

2015-09-16 Thread Răzvan Crainea
Please open at ticket on the ticketing system[1] for us to keep track of 
this issue.


[1] https://github.com/OpenSIPS/opensips/issues

Best regards,

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

On 09/16/2015 10:31 AM, Игорь Павлов wrote:

Oh, Răzvan. Many thanks!
I thoughtthat "db_default_url" will be enough for avpops too.
Now it working, with modparam("avpops","db_url","...")
Is it possible to add some debug information to log when db_url is not 
specified for this module?



С уважением,
Павлов Игорь
RingCloud

2015-09-16 11:17 GMT+04:00 Răzvan Crainea >:


You don't have any db_url specified for avpops? Is this generating
a core dump?

Best regards,

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

On 09/16/2015 08:34 AM, Игорь Павлов wrote:

Hi,

I don't understand why my opensips 2.1 not starting with
avp_db_query() function.
Last output from log (with debug=6):

Sep 14 01:10:16 vs01 /usr/sbin/opensips[21832]:
DBG:core:is_mod_func_used: checking avp_db_query against t_relay
Sep 14 01:10:16 vs01 /usr/sbin/opensips[21832]:
DBG:core:is_mod_func_used: checking avp_db_query against
send_reply
Sep 14 01:10:16 vs01 /usr/sbin/opensips[21832]:
DBG:core:is_mod_func_used: checking avp_db_query against
is_method
Sep 14 01:10:16 vs01 /usr/sbin/opensips[21832]:
DBG:core:is_mod_func_used: checking avp_db_query against
www_authorize
Sep 14 01:10:16 vs01 /usr/sbin/opensips[21832]:
DBG:core:is_mod_func_used: checking avp_db_query against
avp_db_query
Sep 14 01:10:17 vs01 opensips: DBG:core:wait_status_code:
read code 0 ? rc = 0, errno=Success
Sep 14 01:10:17 vs01 opensips: INFO:core:daemonize:
pre-daemon process exiting with -1



opensips.cfg contain only this line for avpops:

loadmodule "avpops.so"

Best regards,
Pavlov Igor


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



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




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


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


Re: [OpenSIPS-Users] How to encode HTTP URL params values?

2015-09-16 Thread Liviu Chircu

Hi Andrey,

You can place the unescaped string into a variable (e.g. "$var"), then 
use the {s.escape.user} transformation.

e.g.:
$var(query) = "username=john smith=hard,to#guess";
xlog("after: \"$(var(query){s.escape.user})\"\n");

rest_get("http://localhost/?$(var(query){s.escape.user})", ...);


(output)
after: "username=john%20smith=hard,to%23guess"

Best regards,

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

On 15.09.2015 23:41, Andrey Vorobiev wrote:

Hi,

I try to use REST_CLIENT (OpenSIPS version 1.11) module in order 
perform HTTP GET request with params in URL query part. Some of 
parameters may contain space characters and need to be encoded 
according to http://www.w3schools.com/tags/ref_urlencode.asp. It seems 
that REST_CLIENT module doesn't encode specified URL. So what function 
or script transformation should I use in order to encode HTTP query 
params values?


--
Best regards.


___
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 2.1 not starting when avp_db_query loading

2015-09-16 Thread Răzvan Crainea
You don't have any db_url specified for avpops? Is this generating a 
core dump?


Best regards,

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

On 09/16/2015 08:34 AM, Игорь Павлов wrote:

Hi,

I don't understand why my opensips 2.1 not starting with 
avp_db_query() function.

Last output from log (with debug=6):

Sep 14 01:10:16 vs01 /usr/sbin/opensips[21832]:
DBG:core:is_mod_func_used: checking avp_db_query against t_relay
Sep 14 01:10:16 vs01 /usr/sbin/opensips[21832]:
DBG:core:is_mod_func_used: checking avp_db_query against send_reply
Sep 14 01:10:16 vs01 /usr/sbin/opensips[21832]:
DBG:core:is_mod_func_used: checking avp_db_query against is_method
Sep 14 01:10:16 vs01 /usr/sbin/opensips[21832]:
DBG:core:is_mod_func_used: checking avp_db_query against www_authorize
Sep 14 01:10:16 vs01 /usr/sbin/opensips[21832]:
DBG:core:is_mod_func_used: checking avp_db_query against avp_db_query
Sep 14 01:10:17 vs01 opensips: DBG:core:wait_status_code: read
code 0 ? rc = 0, errno=Success
Sep 14 01:10:17 vs01 opensips: INFO:core:daemonize: pre-daemon
process exiting with -1



opensips.cfg contain only this line for avpops:

loadmodule "avpops.so"

Best regards,
Pavlov Igor


___
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] What is the frequency that OpenSIPS reads the FIFO file?

2015-09-16 Thread Rodrigo Pimenta Carvalho
Great!


Thanks.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979



De: users-boun...@lists.opensips.org  em nome 
de Razvan Crainea 
Enviado: quarta-feira, 16 de setembro de 2015 04:10
Para: users@lists.opensips.org
Assunto: Re: [OpenSIPS-Users] What is the frequency that OpenSIPS reads the 
FIFO file?

Hi, Rodrigo!

OpenSIPS reads the file instantly, as soon as you send a command through the 
FIFO.

Best regards,

Razvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 09/15/2015 08:59 PM, Rodrigo Pimenta Carvalho wrote:

Hi.


The OpenSIPS can read a FIFO file to get requested commands.

The OpenSIPS checks if the FIFO file exists, every 30 seconds by default, 
according to the documentation.


But, what is the frequency that OpenSIPS reads such file getting commands from 
there?


Regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979



___
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] Dynamic routing module handling Re-invite

2015-09-16 Thread Ping Han
Hi,

I am using dynamic routing module to route the calls to a "carrier", which
is configured to have two gateways (each has 50% weight). The expect
behavior is that the one call is routed to gateway 1 and the next call is
routed to gateway 2.

I have a particular scenario, which is that each call has a Re-invite
following the initial Invite. What I saw is that the initial call goes to
gateway 1 and the re-invite goes to gateway 2. This causes a problem
because gateway 2 knows anything about the initial Invite and takes the
re-invite as a new Invite.

How does Opensips handles this using Dynamic routing module? Is there a way
that Opensips always routes the Re-invite to the same gateway that it
routes the initial Invite to?

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


[OpenSIPS-Users] The "exe" function opens a file and does not close it

2015-09-16 Thread Ping Han
Hi,

I am having a problem using the "exec" function to run a curl command.
Every time the function is executed it opens a file and never close it.

I have example config as follows. I am using Opensips 2.1.
--
$var = "http://myserver/var/tmp/test.php;;
exec("curl '$var(url)'", , "$var(out)");
--

This results in that the number of open files reaches the system limit and
the Opensips process crashes eventually. To workaround it I have to restart
Opensips whenever the number of open files reaches 75% of the system limit.

Has anyone seen the same issue?  Is there any solution for this?

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


Re: [OpenSIPS-Users] Regarding installing cachedb_mangodb with opensips-1.11

2015-09-16 Thread Sasmita Panda
Hi Liviu,


Thank you so much for the reply .

   I had installed mongod: 3.1 and mongo-c-drive : 0.6 . I had already
compiled and install opensips-1.11 with this .
There is no error during compilation and installation .

My opensips is install in the dir : /usr/sbin/opensips  ,
 /usr/etc/opensips/opensips.cfg and modules : /usr/lib64/opensips/modules/

My mongo-c-driver is installed in dir : /usr/local/lib
I have done : took the  tar file of this , extract that and just run  "
make and make install " inside the directory .

When I am trying to run opensips its giving the bellow error .

*ERROR:core:sr_load_module: could not open module
*>* :
libmongoc.so.0.6: cannot open** shared object file: No such file or
directory*


How can I solve this error . I think I am doing some minor mistake while
installation .
Can you please tell me in which directory the mongo-c-driver should get
install and how should I install this to resolve my isssue ?

Please tell me the procedure of installing this, if its something than what
I have done . My machine is Ubuntu-14.0 and 64 bit .

Regards
Sasmita

*Thanks & Regards*
*Sasmita Panda*
*Network Testing and Software Engineer*
*3CLogic , ph:07827611765*

On Mon, Sep 14, 2015 at 7:33 PM, Liviu Chircu  wrote:

> Also, please note that the versions of "mongo-c-driver" and "mongo*"
> binaries do not coincide:
>
> Here are the latest versions of each software:
> * mongo-c-driver: 1.1.10
> * mongod: 3.1.7
>
> Best regards,
>
> Liviu Chircu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 14.09.2015 15:39, Sasmita Panda wrote:
>
> Hi Liviu,
>
>I am installing the mangodb in another server to which I will connect
> opensips .
> Can I install the latest version of Mangodb i.e version-3.0 ?
>
> If the mango-c-driver is version-0.6 and the mangodb version is 3.0 then
> will it create conflict ?
>
> *Thanks & Regards*
> *Sasmita Panda*
> *Network Testing and Software Engineer*
> *3CLogic , ph:07827611765*
>
> On Mon, Sep 14, 2015 at 2:47 PM, Liviu Chircu  wrote:
>
>> Hi Sasmita,
>>
>> Just updated the 1.11 MongoDB [1] docs to match the helpful instructions
>> from the more recent doc releases.
>> You should now be able to download the "v0.6" version of the
>> mongo-c-driver.
>>
>> [1]:
>> http://www.opensips.org/html/docs/modules/1.11.x/cachedb_mongodb.html#id249610
>>
>> Best regards,
>>
>> Liviu Chircu
>> OpenSIPS Developerhttp://www.opensips-solutions.com
>>
>> On 14.09.2015 11:15, Sasmita Panda wrote:
>>
>> Hi All,
>>
>>   I am trying to install opensips-1.11 with cachedb_mangodb support .
>> In the opensips documentation its mentioned to use the 0.6 version of
>> mango c driver .
>>
>>  Unfortunately, I am not getting this version anywhere to install .
>> can anyone let me know whether this is a mandatory version or I can use any
>> other version of it ?
>>
>>  Any kind of information regarding this is appreciated . Thank you in
>> advance .
>>
>>
>> *Thanks & Regards*
>> *Sasmita Panda*
>> *Network Testing and Software Engineer*
>> *3CLogic , ph:07827611765*
>>
>>
>> ___
>> 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


[OpenSIPS-Users] Segfault 1.11.5

2015-09-16 Thread Kneeoh
Any ideas on what this may be? I just had a segfault / crash of opensips. Looks 
like something in the TM module.
opensips[17425]: segfault at c ip 7f24be7da046 sp 7fff4cb3bf00 error 4 
in tm.so[7f24be799000+64000]
I don't see anything else interesting in the logs.

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


Re: [OpenSIPS-Users] OpenSips-CP Not Working

2015-09-16 Thread Giovanni Maruzzelli
Check the web server logs

sent from my mobile,
Giovanni Maruzzelli
cell: +39 347 266 56 18
On Sep 16, 2015 9:03 PM, "Muhammad Usman Shahid" <
usmanshahidmuham...@gmail.com> wrote:

> The following error occurs in Javascript console when I try to login to
> Opensips-cp
>
> POST http://192.168.1.15/opensips-cp/web/login.php 500 (Internal Server
> Error)
>
> Please help
>
> On Wed, Sep 16, 2015 at 10:38 PM, Muhammad Usman Shahid <
> usmanshahidmuham...@gmail.com> wrote:
>
>> Hello,
>>
>> I am trying to run opensips-cp but after I input username and password my
>> browser opens "login.php" but nothing shows.
>>
>> I am using the following tutorial.
>>
>>
>> http://www.opensips.org/Documentation/Tutorials-OpenSIPSFreeSwitchIntegration
>>
>> Please help.
>>
>> --
>> Muhammad Usman Shahid.
>>
>
>
>
> --
> Muhammad Usman Shahid.
>
> ___
> 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-CP Not Working

2015-09-16 Thread Muhammad Usman Shahid
The following error occurs in Javascript console when I try to login to
Opensips-cp

POST http://192.168.1.15/opensips-cp/web/login.php 500 (Internal Server
Error)

Please help

On Wed, Sep 16, 2015 at 10:38 PM, Muhammad Usman Shahid <
usmanshahidmuham...@gmail.com> wrote:

> Hello,
>
> I am trying to run opensips-cp but after I input username and password my
> browser opens "login.php" but nothing shows.
>
> I am using the following tutorial.
>
>
> http://www.opensips.org/Documentation/Tutorials-OpenSIPSFreeSwitchIntegration
>
> Please help.
>
> --
> Muhammad Usman Shahid.
>



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


[OpenSIPS-Users] Table dialog remains empty even after calls. Some error in my config file? Others tables are good.

2015-09-16 Thread Rodrigo Pimenta Carvalho
Dear OpenSIPS-Users,


I'm using OpenSIPS 2.2 with SQLite, from commit 
97ea216790a20e150d09314aeea360aa48a37b36.


I have noticed that my OpenSIPS is recording data only into the following 
tables:

- subscriber

- location

- missed_calls

-acc


I need make my OpenSIPS record data into table dialog too, as I need present 
the list of dialled calls in the GUI of my application. I intend to read 
dialled calls information from table dialog.

So, I suspect that maybe some configuration is wrong in my OpenSIPS environment.


In my opensips_residential.cfg file I have:





 DIALOG module
loadmodule "dialog.so"
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "db_mode", 1)
modparam("dialog", "db_url", "sqlite:///usr/local/opensips_proxy/sqlite")
modparam("dialog", "default_timeout", 540)

---


### Routing Logic 


.

.

.


# account only INVITEs
if (is_method("INVITE")) {

# create dialog with timeout
if ( !create_dialog("B") ) {
send_reply("500","Internal Server Error");
exit;
}

setflag(ACC_DO); # do accounting
}

.

.

.


-


Is there some error in my configuration?

What should I investigate to eliminate the issue?


Any hint will be very helpful!


Thanks alot.



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] OpenSips-CP Not Working

2015-09-16 Thread Muhammad Usman Shahid
Hello,

I am trying to run opensips-cp but after I input username and password my
browser opens "login.php" but nothing shows.

I am using the following tutorial.

http://www.opensips.org/Documentation/Tutorials-OpenSIPSFreeSwitchIntegration

Please help.

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