[OpenSIPS-Users] Failover using dispatcher in opensips 1.11

2016-02-22 Thread Gunjan Korlekar
Hello,

I am new to the dispatcher module on opensips 1.11 and was trying to
understand how failover works in the ds_select_dst function. I tried
searching for answers online but I could not get much clarity.

So, I have a bunch of destinations in my dispatcher table and the following
piece of code in my route function in the config file -

if ( !ds_select_dst("1", "4") ) {
xlog("L_INFO", "ds_select_dst error");
send_reply("500","Unable to route");
  }

I have ds_probing_mode set in my config file so it always knows what
destinations are active.

Can you please help in clarifying the following -

Will the ds_select_dst() return a 'False' only after it has tried all the
destinations in the dispatcher table or just the one that gets selected in
the round-robin?

If above is not true and the destination selected by ds_select_dst turns
out to be non reachable, will the above call return False for the
destination that it picks? In such a case can you guide me as to what I can
do so that it selects the next available destination in the dispatcher list?

What is the default value of 'max_results' in the ds_select_dst() signature
and does it affect failover selection?

Thanks in advance!

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


[OpenSIPS-Users] Protocol conversion - Double record route issue‏

2016-02-22 Thread Hamid Hashmi
I am using opensips as an edge proxy on Amazon EC2 (server behind NAT) and it 
works fine if It only works on UDP or TCP. but if I need to translate from TCP 
-> UDP, ACK does not reach proxy server due to private IP in record-route. 
EdgeProxy -> B# 
INVITE sip:923003000200@182.185.200.42:46488;transport=tcp;line=fd2af176e9c88c3 
SIP/2.0
Record-Route: 
Record-Route: 
Record-Route: 

Record-Route: 
Record-Route: 

Via: SIP/2.0/TCP 52.76.50.195:6080;branch=z9hG4bK4a7b.55d0e535.0
Via: SIP/2.0/UDP 192.168.26.181:8000;branch=z9hG4bK4a7b.0b4f27b4.0
Via: SIP/2.0/UDP 
52.76.50.195:6080;rport=6080;received=192.168.26.180;branch=z9hG4bK4a7b.45d0e535.0;i=2
Via: SIP/2.0/TCP 
103.255.5.24:47590;received=103.255.5.24;branch=z9hG4bK-524287-1---74668ff8d4027b7c;rport=47590
Max-Forwards: 67
Contact: 
To: 
From: "+92300777";tag=ae2b3a03
EdgeProxy -> A#
SIP/2.0 200 OK
Via: SIP/2.0/TCP 
192.168.10.13:6060;received=182.185.200.42;rport=47103;branch=z9hG4bK801489929
Record-Route: 
Record-Route: 
Record-Route: 

Record-Route: 
Record-Route: 

Contact: 
To: ;tag=12b65b6d
From: ;tag=1252633513
A# -> EdgeProxy
ACK sip:92300777@103.255.5.24:48469;transport=TCP SIP/2.0
Via: SIP/2.0/TCP 192.168.10.13:6060;rport;branch=z9hG4bK184821964
Route: 

Route: 
Route: 

Route: 
Route: 
From: ;tag=1252633513
To: ;tag=12b65b6d
Client send ACK to Private IP of Edge proxy. While it should send it to its 
Public IP.
opensips inserts routes inversely incase of protocol translation. It should 
insert Double route with private IP first and public IP afterwards INSTEAD of 
public IP first for OUTBOUND INVITEs.
Hamid R. HashmiSoftware Engineer - VoIPVopium A/S   
  ___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Help WARNING:core:tcpconn_add_alias: possible port hijack attempt

2016-02-22 Thread Do Nguyen Ha
I got Warning message

Feb 23 10:29:51 localhost /usr/sbin/opensips[17478]:
WARNING:core:receive_msg: tcp alias failed
Feb 23 10:29:54 localhost /usr/sbin/opensips[17477]:
WARNING:core:tcpconn_add_alias: possible port hijack attempt
Feb 23 10:29:54 localhost /usr/sbin/opensips[17477]:
WARNING:core:tcpconn_add_alias: alias already present and points to another
connection (161 : 80 and 257 : 80)


this is my opensips.cfg http://pastebin.com/c4JNqiWC

what is the possible problem with my server

how to fix it

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


[OpenSIPS-Users] Dynamic Routing "flow" question 1.8

2016-02-22 Thread Jim DeVito
Hi All! Question. What I have for testing is below. It works and cycles 
through the gateways for carrier 1. What I can not seem to do right is 
AFTER all the GW's for carrier 1 are exhausted I would like try carrier 
2 (provided a second valid carrier is returned) do_routing does this 
good for me but I want to handle cost based authorization "off-server" 
so I will end up returning to opensips with a variable containing a list 
of valid carriers for that call.


if (route_to_carrier(#carrier1))
{
t_on_failure("next_gw");
t_relay();
}

if (route_to_carrier(#carrier2))
{
t_on_failure("next_gw");
t_relay();
exit;

}

--
Jim DeVito

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


Re: [OpenSIPS-Users] What does exactally mean lots of warnings about timer_ticker in the log (OpenSIPS 2.1)?

2016-02-22 Thread Rodrigo Pimenta Carvalho
Ok Thanks.

I will look for the solution in the docs as you suggested, as now I know it can 
be many things sharing the same timer.

Best regards.


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



De: users-boun...@lists.opensips.org  em nome 
de Eric Tamme 
Enviado: segunda-feira, 22 de fevereiro de 2016 14:35
Para: OpenSIPS users mailling list
Assunto: Re: [OpenSIPS-Users] What does exactally mean lots of warnings about 
timer_ticker in the log (OpenSIPS 2.1)?

Many things share the same timer, dialog expiration cleanup, userlocation 
cleanup, nathelper pings etc.  If one of the processes that is triggered by a 
timer route blocks for some period of time - aka a hung db query, it will cause 
the timer to "drift" and you will get logs indicating that a process that 
should have takeng X amount of time actually took Y amount of time - this is 
due to the blocking operation.

I would suggest that you use dedicated timer processes for as many things as 
you can - dialog, tm etc. see the module docs for how to do this.

-Eric

On 02/22/2016 10:28 AM, Rodrigo Pimenta Carvalho wrote:


Hi.

The log of my OpenSIPS began to present thousands of warnings similar to:



"WARNING:core:timer_ticker: timer task  already schedualed for 
93991120 ms (now 248157560 ms), it may ove rlap.."


What does exactly means it?

Some discussions from the past said something about increasing the number in 
the global variable "children".


Should I change the number for children?  Before trying it i would like to hear 
something about, just to know better what I'm going to do.


Any hint will be very helpful!


Thanks a lot.



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] What does exactally mean lots of warnings about timer_ticker in the log (OpenSIPS 2.1)?

2016-02-22 Thread Eric Tamme
Many things share the same timer, dialog expiration cleanup, 
userlocation cleanup, nathelper pings etc.  If one of the processes that 
is triggered by a timer route blocks for some period of time - aka a 
hung db query, it will cause the timer to "drift" and you will get logs 
indicating that a process that should have takeng X amount of time 
actually took Y amount of time - this is due to the blocking operation.


I would suggest that you use dedicated timer processes for as many 
things as you can - dialog, tm etc. see the module docs for how to do this.


-Eric

On 02/22/2016 10:28 AM, Rodrigo Pimenta Carvalho wrote:



Hi.

The log of my OpenSIPS began to present thousands of warnings similar to:



"WARNING:core:timer_ticker: timer task  already schedualed 
for 93991120 ms (now 248157560 ms), it may ove rlap.."



What does exactly means it?

Some discussions from the past said something about increasing the 
number in the global variable "children".



Should I change the number for children?  Before trying it i would 
like to hear something about, just to know better what I'm going to do.



Any hint will be very helpful!


Thanks a lot.



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] What does exactally mean lots of warnings about timer_ticker in the log (OpenSIPS 2.1)?

2016-02-22 Thread Rodrigo Pimenta Carvalho

Hi.

The log of my OpenSIPS began to present thousands of warnings similar to:



"WARNING:core:timer_ticker: timer task  already schedualed for 
93991120 ms (now 248157560 ms), it may ove rlap.."


What does exactly means it?

Some discussions from the past said something about increasing the number in 
the global variable "children".


Should I change the number for children?  Before trying it i would like to hear 
something about, just to know better what I'm going to do.


Any hint will be very helpful!


Thanks a lot.



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


Re: [OpenSIPS-Users] Best way to load data into local cache

2016-02-22 Thread John Quick
Hi Liviu,

Thanks. That was exactly the problem. I didn’t see the log messages because 
they were of INFO category and I was looking for WARNING.

John Quick
Smartvox Limited


Hi John,

By any chance, is the /"100 records at a time//" /issue accompanied by a *"max 
while loops encountered"* error? If yes, you can get around it by setting 
"max_while_loops=100" in your OpenSIPS script.

Best regards,

Liviu Chircu
OpenSIPS Developer


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


Re: [OpenSIPS-Users] Best way to load data into local cache

2016-02-22 Thread Liviu Chircu

Hi John,

By any chance, is the /"100 records at a time//" /issue accompanied by a 
*"max while loops encountered"* error? If yes, you can get around it by 
setting "max_while_loops=100" in your OpenSIPS script.


Best regards,

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

On 19.02.2016 16:46, John Quick wrote:

Using version 2.1.1 of OpenSIPS
I want to load several hundred records into local cache memory on startup.
I've tried avp_db_query to read all data into an avp, then a loop to write
it from the avp into cache memory, but it can only do 100 records at a time.
Is this simply a limitation of all avp's?

Is there another way, a better way?

Why do I want to do this? Because I want to check each INVITE ruri
destination username against a list of known "suspicious" destination
prefixes (perhaps 1000 records). Each call may require several checks
because the list contains prefixes of varying lengths. I am concerned that
queries made directly to the MySQL table as each INVITE request is received
could impair performance and would put constant unwanted load on the MySQL
server.

John Quick
Smartvox Limited
Web: www.smartvox.co.uk



___
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