[OpenSIPS-Users] Regarding opensips-1.11 variable use .

2016-09-14 Thread Sasmita Panda
Hi All , I am using opensips-1.11 . My config file looks like bellow . *if (method=="INVITE") {* *if(is_present_hf("X-Info"))* * {* *$var(c)=$hdr(X-Info);* *$var(d)=$(var(c){s.select,2,;});* *

Re: [OpenSIPS-Users] Question regarding append_branch

2016-09-14 Thread Bogdan-Andrei Iancu
Hi Agalya, The append_branch() itself is not doing any SIP signaling. It is only creating (internally, as data structure) a new branch for the request (to a new destination). The signalling (to all created branches) is done by TM module when you relay the request out. The forking is a

Re: [OpenSIPS-Users] Regarding opensips-1.11 variable use .

2016-09-14 Thread Bogdan-Andrei Iancu
Hi, Ideally you should init the vars before their usage, rather than trying to reset afterwards. It is much safer. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 14.09.2016 16:59, Benjamin Cropley wrote: the value of script variables

Re: [OpenSIPS-Users] Jabber module issue

2016-09-14 Thread Bogdan-Andrei Iancu
Hello Igor, Could you please try the attached patch ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 12.09.2016 16:23, Igor Pavlov wrote: Hi, all. I'm working on opensips-ejabberd integration. Flow opensips -> ejabberd working fine, but

Re: [OpenSIPS-Users] Regarding opensips-1.11 variable use .

2016-09-14 Thread Benjamin Cropley
the value of script variables persists over any given OpenSIPS process. Therefore, to ensure the value is null on every entry to the route (if a subsequent packet is recieved on the same process) you must set the value back to Null before the route is exited. eg.. route{ if (method=="INVITE")

Re: [OpenSIPS-Users] Regarding opensips-1.11 variable use .

2016-09-14 Thread Benjamin Cropley
Sorry - just realised what you mean. You're saying do it like.. route{ # set vars back to null/init them.. $var(c)=""; $var(d)=""; $var(e)=""; $var(f)=""; if (method=="INVITE") { if(is_present_hf("X-Info")){ # assign values to vars...

Re: [OpenSIPS-Users] Best method to add port to RECORD ROUTE, or should we?

2016-09-14 Thread Bogdan-Andrei Iancu
Hi Jeff, I do not understand how having the port added to RR (as time as it is correct) generates the error in OpenSIPS - do you have an example with a SIP capture and opensips logs ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On

Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-14 Thread Ramachandran, Agalya (Contractor)
Hi Liviu, I understand this way. When we are getting more calls in opensips, and the TCP port is been open in that particular time window. At that time when it tries to send HTTP request, start_async_http_req is called, since is the port is already open, it is assuming that async is

Re: [OpenSIPS-Users] Routing in opensips

2016-09-14 Thread Bogdan-Andrei Iancu
Hi Eric, A good starting point is the residential script that can be generated via the menuconfig tool. See: http://www.opensips.org/Documentation/Generating-Configs-2-2 Then have your unit registered with your OpenSIPS. Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer

Re: [OpenSIPS-Users] Regarding opensips-1.11 variable use .

2016-09-14 Thread Bogdan-Andrei Iancu
Yes :) Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 14.09.2016 17:44, Benjamin Cropley wrote: Sorry - just realised what you mean. You're saying do it like.. route{ # set vars back to null/init them.. $var(c)=""; $var(d)="";

Re: [OpenSIPS-Users] Regarding opensips-1.11 variable use .

2016-09-14 Thread Benjamin Cropley
I was just following the doc :) "if you want to start using a script variable in a route, better initialize it with same value *(or reset it)*, otherwise you may inherit a value from a previous route that was executed by the same process." On Wed, Sep 14, 2016 at 3:23 PM, Bogdan-Andrei Iancu

Re: [OpenSIPS-Users] Routing in opensips

2016-09-14 Thread Eric Freeman
Thank you. I am using the residential script and my device is registered. When I register two devices I can call between them. But, when I want to send the traffic out to the Internet I receive these types of errors. My device is a 10 address trying to call public IPs on the Internet. It

Re: [OpenSIPS-Users] Fwd: 2.2.1 crashing

2016-09-14 Thread Bogdan-Andrei Iancu
Hi Richard, Have you managed to get a corefile and extract a backtrace ? Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 06.09.2016 17:07, Richard Robson wrote: If its any help, I can see packets coming in particularly BYEs that are not

Re: [OpenSIPS-Users] Too many warnings in opensips log

2016-09-14 Thread Bogdan-Andrei Iancu
Hello Agalya, Thank youfor your help in investigating and solving this issue. The patch made its way to all affected versions: trunk: https://github.com/OpenSIPS/opensips/commit/c40f2b057209b8078520abc95e5d1bf5e5a28db6 2.2:

Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-14 Thread Liviu Chircu
So you are doing the $rc < 0 check in the beginning of the resume_route? If yes, could you treat ASYNC_SYNCas a success (it actually is!), and see if your output variables are properlypopulated with the transferred data? Liviu Chircu OpenSIPS Developer http://www.opensips-solutions.com On

Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-14 Thread Ramachandran, Agalya (Contractor)
Hi Liviu, I have tested by treating ASYNC_SYNC as success. Now calls are not failing. When I tried to print the HTTP response which is available in $var(body), I could able to see the payload for HTTP response.

Re: [OpenSIPS-Users] Question regarding append_branch

2016-09-14 Thread Ramachandran, Agalya (Contractor)
Thank you Bogdan. Got it. Regards, Agalya From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Wednesday, September 14, 2016 10:33 AM To: OpenSIPS users mailling list ; Ramachandran, Agalya (Contractor) Subject: Re:

Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-14 Thread Ramachandran, Agalya (Contractor)
Hi Liviu, Thank you for the response. If we configure connection_timeout as '2', then request will be sent out after 200ms. Am I right? Or your re-work will still reduce this value? Are you going to add one more parameter "connect_polling_interval" and what will be use case of it? Is it

Re: [OpenSIPS-Users] Opensips 2.2.1 dr_rules is empty

2016-09-14 Thread Denis
Hello, Liviu! The difficulty is that problem not appear every two times where dr_reload applied. And i think TCP capture will be very big. Last time, for example, problem was detected in 09.09. Since that everything was fine, although dr_reload has been applied many times.

Re: [OpenSIPS-Users] mulitple instance for different rules

2016-09-14 Thread ‪H Yavari‬ ‪
Hi, Yes Docker is good solution. But I'm looking for a solution to expand easily. I mean I want to run 2 OpenSIPS instance on one machine for low loads and for high loads I run 2 instances on different machines. So if I use Docker, I have portability problem and this is difficult to maintain 2

Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-14 Thread Liviu Chircu
Thank you for the logs, this is what I was looking for: Sep 12 19:39:34 sturn-test /usr/local/sbin/opensips[23877]: DBG:rest_client:start_async_http_req: libcurl TCP connect: we should wait up to 977ms (timeout=1000ms)! Sep 12 19:39:34 sturn-test /usr/local/sbin/opensips[23877]:

Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-14 Thread Liviu Chircu
If you notice that log, then the transfer was completed together with the TCP connect operation, an ideal situation! There is no need to call the resume function anymore, since we already have all the data. As soon as we return ASYNC_SYNC, the resume_route will be called. What do you mean by