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

2016-02-19 Thread Schneur Rosenberg
Why don't u use avp_db_query on demand and cache the info so u don't need
to run this particular query again?
On Feb 19, 2016 4:47 PM, "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


[OpenSIPS-Users] Relay SCTP instead of UDP

2016-02-19 Thread Moreira Yokoyama, Daniel
Hi.

I'm trying to relay a message using SCTP instead of UDP.

I found some examples from people trying to relay using TCP and tried using the 
same approach, but using SCTP instead.

So, in my route script I did:

t_relay("sctp:10.0.8.108:5060");

I logged the state of my $du to make sure it was null at the time of the 
t_relay, but although I get SCTP init in the dump, the sip message is never 
sent and I have no error information.

After that I found other information about setting the forced socket ($fs) but 
still having no success.

Is it possible that opensips simply doesn't relay the message using the SCTP 
protocol? Or am I missing something?


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


[OpenSIPS-Users] [RTPENGINE] : OpenSIPS 1.11 : SRTP to RTP

2016-02-19 Thread Dave Lechasseur
Hi,

I have RTPEngine running on a Ubuntu Server with OpenSIPS 1.11.
Thought RTPProxy module I’m able to sends the RTP streams to RTPEngine.
Now I want RTPEngine to convert it to SRTP,  it seem that I need 
rtpengine_manage to do that but it’s not available in OpenSIPS 1.11 and I want 
to stay LTS.

Is there any other option to convert SRTP to RTP ?

Thank you,

[cid:E3068B6E-1E54-446F-BBA7-DC562EE94AC3]

Dave Lechasseur-Grégoire
1440 rue Sainte-Catherine Ouest
Bureau 340
Montréal (Québec) H3G 1R8
Bureau: 514.667.0691 poste 2089
Courriel: dave.lechass...@sbktelecom.com 
| web: www.sbktelecom.com

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


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

2016-02-19 Thread John Quick
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


Re: [OpenSIPS-Users] Permanent registration replication

2016-02-19 Thread Bogdan-Andrei Iancu

Hi Flavio,

By different IPs, you mean in the socket the contact record, right ? If 
you want to have different sockets on each server, maybe it is not a 
"replication" anymore - the basic concept of replication is to "copy" 
something on different servers. But you want different records, not the 
same record.


A really crazy idea is to use the AOR_INSERT event in usrloc (see 
http://www.opensips.org/html/docs/modules/1.11.x/usrloc.html#id295241) 
to trigger a script route when the permanent registration is added (of 
course you have to check the AOR to see if is a permanent or not, based 
on username, if possible). And from event route, use t_new_request (see 
http://www.opensips.org/html/docs/modules/1.11.x/tm.html#id295310) to 
build a REGISTER to go to the other servers, as a replicated register.

As said, this ^^^ is a bit SiFi :(

IMHO, you should stick to the idea of inserting the record on each 
machine, via MI . You mentioned some index issue - could you detail on 
this ?


Regards,

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

On 18.02.2016 00:19, Flavio Goncalves wrote:

Hi Bogdan ,

The binary replication does not support different IP addresses. There 
is no NAT in the implementation, so the idea is to replicate and set 
the local addres on each site.


Regards,

Flavio E. Goncalves
CEO - V.Office Redes e Telecomunicações Ltda.
Phone: +55 48-3332-8590
Skype:flaviogoncalves1
Linkedin: www.linkedin.com/in/flavioegoncalves 

Twitter: www.twitter.com/asteriskguide 




2016-02-17 17:48 GMT-02:00 Bogdan-Andrei Iancu >:


Hi Flavio,

I haven;t tried, but MI registration may get replicated via BIN -
have you tried to set the BIN replication for usrloc (instead of
t_replicate) ?

Regards,

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

On 17.02.2016 16:53, Flavio Goncalves wrote:

Hi,

Does anyone has tried to replicate permanent registrations? For
normal registrations is possible to use t_replicate, but for
permanent inserted over MI, I don't know.

Inserting in two proxies at the same time using MI sometimes
generate duplicate index and abort the process and in some cases
remove all permanent records (using the same DB), I have tried.

Any clue helps,

Flavio E. Goncalves



___
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 cause TCP connection reset ?

2016-02-19 Thread Hamid Hashmi
Hi Răzvan
Thank you, I have already set the TCP chunk size to 8 but it was still showing 
"4 read attempts".
 Protocol TCPloadmodule "proto_tcp.so"modparam("proto_tcp", 
"tcp_send_timeout", 200)modparam("proto_tcp", "tcp_max_msg_chunks", 8)
but from your reply I thought that may there be an potion for TLS too :-p by 
increasing chunk size for TLS. 
 Protocol TLSloadmodule "proto_tls.so"
modparam("proto_tls","verify_cert", "1")modparam("proto_tls","require_cert", 
"1")modparam("proto_tls","tls_method", 
"TLSv1")modparam("proto_tls","certificate", 
"/path/to/certificate.pem")modparam("proto_tls","private_key", 
"/path/to/private_key.key")modparam("proto_tls","ca_list", 
"/path/to/ca_list.pem")modparam("proto_tls", "tls_max_msg_chunks", 
8)modparam("proto_tls", "tls_handshake_timeout", 119)modparam("proto_tls", 
"tls_send_timeout", 121)
It worked. :-) Cheers
Hamid R. HashmiSoftware Engineer - VoIPVopium A/S

To: users@lists.opensips.org
From: raz...@opensips.org
Date: Fri, 19 Feb 2016 10:23:28 +0200
Subject: Re: [OpenSIPS-Users] What cause TCP connection reset ?


  

  
  
This situation appears when a SIP message is sent in more than 4
"chunks" (this is tuneable). If the SIP message is too fragmented,
OpenSIPS closes the connection to prevent packets fragmentation
attacks.



Best regards,

Răzvan



On 02/19/2016 07:25 AM, Hamid Hashmi
  wrote:



  
  Why opensips send TCP
  connection reset packet ?


  
I have been facing an error of 

  

  ERROR:proto_tls:tcp_handle_req:
  Made 4 read attempts but message is not complete yet -
  closing connection
  

  
  while wireshark traces
shows that a TCP connection reset packet was sent back to
UAC by opensips server. 
  

  
  
  

 

  
 
  

  Hamid
R. Hashmi
  Software Engineer - VoIP
  Vopium
  A/S

  
  

  
  

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




-- 
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com
  


___
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 cause TCP connection reset ?

2016-02-19 Thread Răzvan Crainea
This situation appears when a SIP message is sent in more than 4 
"chunks" (this is tuneable). If the SIP message is too fragmented, 
OpenSIPS closes the connection to prevent packets fragmentation attacks.


Best regards,
Răzvan

On 02/19/2016 07:25 AM, Hamid Hashmi wrote:

Why opensips send TCP connection reset packet ?

I have been facing an error of

ERROR:proto_tls:tcp_handle_req: Made 4 read attempts but message is 
not complete yet - closing connection


while wireshark traces shows that a TCP connection reset packet was 
sent back to UAC by opensips server.



*/Hamid R. Hashmi/*
Software Engineer - VoIP
Vopium A/S


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


--
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

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