[OpenSIPS-Users] db_mysql prep stmt took too long

2016-08-18 Thread Owais Ahmad
Hi all,

I am Currently using opensips 2.2.0 and have the following query threshold
set:

loadmodule "db_mysql.so"
modparam("db_mysql", "exec_query_threshold", 5)

I am getting a lot of errors like the following even with a handful of
incoming SIP messages.

WARNING:db_mysql:log_expiry: threshold exceeded : mysql prep stmt took too
 long - 61625 us.Source

The database exists on the same host as opensips itself. The DB engine is
InnoDB and its optimized because all external queries to the same table /
database return instantly.

Has anyone else experienced the same?
Any ideas to have this fixed?

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


[OpenSIPS-Users] Configure freeswitch and opensips for using tls and udp protocols simultaneously.

2016-08-18 Thread Стас Тельнов
I have freeswitch and opensips working with the mobile client in the
conference mode.
When using UDP connection everything works perfectly, but when using tls
connection the call is interrupted in 30 seconds.
Whether to use TLS or UDP connection - it is assigned on the mobile client
before initialization of connection with opensips server.

Originally I assumed that these problems were caused by the NAT settings,
but in that case the problem would be watched irrespective of the
connection used - UDP or TLS.

Generally such scheme works as it should:

+   udp      udp   +   udp   +
+   + ->  +  +  ->  +   +
->  +   +
+   phone  +   +   SIP + +free+   +
SIP+
+   + <-  +  +  <-  +   switch  + <-  +
provider +
+   udp      udp+   udp   +

And in such scheme a call breaks in 30 seconds:

+   tls   +   udp   +   udp   +
+   + ->  +   +  ->  +   +
->  +   +
+   phone  +   +   SIP  + +free+
+ SIP+
+   + <-  +   +  <-  +   switch  + <-
+ provider +
+   tls   +   udp+   udp   +

SIP and freeswitch are in one local area network (Amazon EC2). SIP provider
doesn't support tls in principle, they have 5061 closed.

And the BYE packet sends freeswitch, as I understand, from packet headers
as I didn't receive the response to ACK in time. There is the packet:
BYE sip:8@85.236.*.*:55194;ob;transport=tls SIP/2.0
Via: SIP/2.0/TLS sip0.*.*:5061;branch=z9hG4bKc7a2.7909e7e1.0;
received=52.58.*.*
Via: SIP/2.0/UDP 172.31.*.*;received=52.58.*.*;rport=5060;branch=
z9hG4bKBK82Zg50c2U0p
Max-Forwards: 69
Contact: 
To: "8" ;tag=59221e6a
From: ;tag=j4aX21rv83etN
Call-ID: O7E3ktwLPiQWDN2Rism-7g..
CSeq: 95383912 BYE
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
REFER, NOTIFY
Supported: timer, path, replaces
User-Agent: FreeSWITCH-mod_sofia/1.6.6~64bit
Reason: SIP;cause=408;text="ACK Timeout"
Content-Length: 0

Having looked on logs, I can tell that the INVITE packet from the mobile
client reach freeswitch and provider, but in reverse Trying/Ringing packet
doesn't reach.

I can't understand at what stage there is a problem. Freeswitch can't
respond and transmit the response through opensips, or there is a problem
in something else?
Who faced similar problem, prompt what settings should be analyzed in order
that the above-stated scheme with tls connection start functionning?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] reject 3xx code

2016-08-18 Thread Newlin, Ben
I see now that status is a global parameter that should also be the reply 
status.

I would still recommend using t_check_status().


Ben Newlin

From:  on behalf of "Newlin, Ben" 

Reply-To: OpenSIPS users mailling list 
Date: Thursday, August 18, 2016 at 8:49 AM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] reject 3xx code

The comma in your regex is unnecessary; it allows a match for “30,”. It should 
just be “30[12]”.

Also, where is the status variable being set from? There are two places to get 
the return code: $rs and $T_reply_code.

Or you could use t_check_status() like so:

if (t_check_status(“30[12]”)) {
  drop();
}


Ben Newlin

From:  on behalf of Denis 
Reply-To: OpenSIPS users mailling list 
Date: Thursday, August 18, 2016 at 4:58 AM
To: "users@lists.opensips.org" 
Subject: [OpenSIPS-Users] reject 3xx code

Hello

I am using Opensips 2.1.2.
I want to block sending 3xx codes to caller.

In reply route i wrote such code
if (status=~"30[1,2]") {
 drop();
}

but i see that 302, for example, still process successfully.

Thank you for any help.

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


Re: [OpenSIPS-Users] reject 3xx code

2016-08-18 Thread Newlin, Ben
The comma in your regex is unnecessary; it allows a match for “30,”. It should 
just be “30[12]”.

Also, where is the status variable being set from? There are two places to get 
the return code: $rs and $T_reply_code.

Or you could use t_check_status() like so:

if (t_check_status(“30[12]”)) {
  drop();
}


Ben Newlin

From:  on behalf of Denis 
Reply-To: OpenSIPS users mailling list 
Date: Thursday, August 18, 2016 at 4:58 AM
To: "users@lists.opensips.org" 
Subject: [OpenSIPS-Users] reject 3xx code

Hello

I am using Opensips 2.1.2.
I want to block sending 3xx codes to caller.

In reply route i wrote such code
if (status=~"30[1,2]") {
 drop();
}

but i see that 302, for example, still process successfully.

Thank you for any help.

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


Re: [OpenSIPS-Users] reject 3xx code

2016-08-18 Thread Denis
Alex, and how can i do it replay route?
exit, drop, t_relay something else?



-- 
mailto:denis7...@mail.ru

> It can certainly be done in the onreply_route. 

> Conceptually, doing it there makes more sense. The failure_route is
> not triggered by any particular SIP reply per se, but rather a
> branch failure event on a transaction. That can be the result of a
> timeout (e.g. fr_timer) or something else that doesn't gather message form.

> In contrast, onreply_route is for actual reply messages. 


> -- Alex

> --
> Principal, Evariste Systems LLC (www.evaristesys.com)

> Sent from my Google Nexus.


> ___
> 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] reject 3xx code

2016-08-18 Thread Alex Balashov
It can certainly be done in the onreply_route. 

Conceptually, doing it there makes more sense. The failure_route is not 
triggered by any particular SIP reply per se, but rather a branch failure event 
on a transaction. That can be the result of a timeout (e.g. fr_timer) or 
something else that doesn't gather message form. 

In contrast, onreply_route is for actual reply messages. 


-- Alex

--
Principal, Evariste Systems LLC (www.evaristesys.com)

Sent from my Google Nexus.


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


Re: [OpenSIPS-Users] Dialog information

2016-08-18 Thread Adrian Fretwell
Ok, To put it another way; It seems like an overhead for me to store say 
a to_tag so I can retrieve it later when the to_tag is already stored in 
the dialog, I just can't work out how to get at it...


if ( t_check_status("200") ) {
store_dlg_value("my_callee_tag","$tt");
}
...

get_dialog_info("my_callee_tag","$var(my_callee_tag)","my_caller_cid","$var(my_srch_call_id)");

Perhaps there is a way I don't need to store something that is already 
there?


Kind regards,

Adrian Fretwell

On 17/08/16 19:25, Adrian Fretwell wrote:


Hello all,  A simple question that I can't seem to work out for myself:

When I execute the MI command :dlg_list_ctx:  I can see lots of useful 
information about the dialog like caller_contact:: and callee_tag:: etc.


Is there a way of retrieving these values from within the script 
especially from another dialog?  I have tried get_dialog_info but this 
will only retrieve values that I have set in the script through 
store_dlg_value.  Or am I just missing a naming convention for the 
other dialog values and attributes?


Kind regards,

Adrian Fretwell


___
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] reject 3xx code

2016-08-18 Thread Denis
Hello

I am using Opensips 2.1.2.
I want to block sending 3xx codes to caller.

In reply route i wrote such code 
 if (status=~"30[1,2]") {
  drop();
 }

but i see that 302, for example, still process successfully.

Thank you for any help.

-- 
mailto:denis7...@mail.ru___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users