Re: [SR-Users] how to remove non-digits using dp_translate

2014-07-03 Thread Daniel-Constantin Mierla

Hello,

you have to replace [^0-9] with empty, using the global flag.

Cheers,
Daniel

On 02/07/14 23:11, Henry Fernandes wrote:
I'd like to use the dialplan module to remove all non-digits from a 
string.  For example, 1-306-555-1234 becomes 13065551234 and 
(306) 555-1234 becomes 3065551234.


Unfortunately, I can't figure out the regular expressions for 
subst_exp and repl_exp.  I can easily replace one instance of a 
non-digit, however I can't figure out how to replace all non-digits.


-H



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] need help on kamailio-snmpstats module

2014-07-03 Thread Daniel-Constantin Mierla

Hello,

the net-snmp-agent-libs was present on the build system, otherwise the 
rpm creation would have failed.


Are you using the rpms from opensuse build service?

Cheers,
Daniel

On 03/07/14 01:56, Allen Zhang wrote:


Hi,

I’m having trouble on installing kamailio-snmpstats module.

I’m using kamailio 4.0. I want to install kamailio’s snmpstats module 
from RPM.


I compiled net-snmp 5.4 from source and built some RPMS from it.

I’ve installed net-snmp 5.4 from RPM on the target machine. And when I 
run ‘yum install kamailio-snmpstats’, I get:


Error: Package: kamailio-snmpstats-4.0.0-0.el6.x86_64 ()

Requires: net-snmp-agent-libs

Where do I get this net-snmp-agent-libs? Can I buid this from net-snmp 
source somehow?


Regards,

Allen



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Replys though onsend_route?

2014-07-03 Thread Daniel-Constantin Mierla

Hello,

if you relay the request with tm (e.g., via t_relay()) and set before 
the flag for siptrace, the responses should be traced two times: as they 
get in and are sent out.


Cheers,
Daniel

On 02/07/14 14:55, Jöran Vinzens wrote:

Hi Daniel,

we trace the responses, but we cannot see differences we make in 
reply_route since we just see it once.


So far i havn't found a way to trace incoming reply and forwarded reply.

BR
Jöran


On Thu, Jun 26, 2014 at 10:15 AM, Daniel-Constantin Mierla 
mico...@gmail.com mailto:mico...@gmail.com wrote:


Hello,

have you set the siptrace flag for the requests? Because siptrace
is supposed to catch all responses (incoming and outgoing) without
onsend_route.

Cheers,
Daniel


On 24/06/14 14:23, Jöran Vinzens wrote:

Hi all,

is there a possibility to pass reply and failure though
onsend_route as well? We try to capture via siptrace the incoming
and outgoing packet. So far this is only possible with Requests.

I've found this:

http://lists.sip-router.org/pipermail/sr-users/2012-May/073224.html

Can anybody confirm this is still the behavior?
Does anybody have a solution passing reply though onsend_route or
any other way to capture the outgoing reply via siptrace?

Thanks a lot for your help.
BR
Jöran Vinzens

-- 
Jöran Vinzens -vinzens[at]sipgate.de  mailto:vinz...@sipgate.de


sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf


HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391

www.sipgate.de  http://www.sipgate.de  -www.sipgate.at  http://www.sipgate.at 
 -www.sipgate.co.uk  http://www.sipgate.co.uk




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org  mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


-- 
Daniel-Constantin Mierla -http://www.asipto.com

http://twitter.com/#!/miconda  http://twitter.com/#%21/miconda  
-http://www.linkedin.com/in/miconda


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
list
sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




--
Jöran Vinzens -vinzens[at]sipgate.de  mailto:vinz...@sipgate.de



sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391

www.sipgate.de  http://www.sipgate.de  -www.sipgate.at  http://www.sipgate.at  
-www.sipgate.co.uk  http://www.sipgate.co.uk





--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] no rtpengine.so module

2014-07-03 Thread Yuriy Gorlichenko
Hello. I install kamailio 4.1.3 and it works fine. But I neen proxy DTLS
SRTP to backend media servers through kamailio. rtpproxy no not work with
dtls srtp? so I installed rtpengine but can not find rtpengine.so file for
copiyng to kamailio modules directory.

Does anyone can install rtpengine as kamailio module?
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] no rtpengine.so module

2014-07-03 Thread Dani Kamailio
You can use rtpproxy-ng.so that is included (It does the conversion of SDP
packets) with rtpengine media relay from Sipwise , the rtpengine.so is
still a devel module.

Regards.


2014-07-03 10:38 GMT+02:00 Yuriy Gorlichenko ovoshl...@gmail.com:

 Hello. I install kamailio 4.1.3 and it works fine. But I neen proxy DTLS
 SRTP to backend media servers through kamailio. rtpproxy no not work with
 dtls srtp? so I installed rtpengine but can not find rtpengine.so file for
 copiyng to kamailio modules directory.

 Does anyone can install rtpengine as kamailio module?

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] UAC remote registration - refreshing database

2014-07-03 Thread Dan Christian Bogos

Hey Alex,

Many thanks for so fast answer. Could be I have missed the past interest 
(hence re-posting).


Anyway, I wonder what would be the chances that we get Ovidiu's interest 
so he can port registrant module to kamailio maybe? Unfortunately 
without reloads it is hard to push remote registration in enterprise 
solutions.


Thanks again,
DanB

On 03.07.2014 12:00, sr-users-requ...@lists.sip-router.org wrote:

On 07/02/2014 06:22 AM, Dan Christian Bogos wrote:

Anybody aware if it is possible to refresh the list of remote
registrations from the database without restarting the whole server?

This gets asked a lot, and the answer is no. But it is probably a widely
desired feature set by now.

-- Alex Balashov - Principal Evariste Systems LLC Tel: +1-678-954-0670 
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/ Please 
be kind to the English language: 
http://www.entrepreneur.com/article/232906



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] UAC remote registration - refreshing database

2014-07-03 Thread Daniel-Constantin Mierla

Hello,

not having against adding alternatives to existing features/modules, 
apparently here is just about implementing the reload capability. Most 
of the features should be there, like loading from database (which is 
done at startup) and destroying exiting structures in memory (which is 
done at shutdown). Doing the second followed by the first operation upon 
a rpc command should get the feature (of course, there can be some extra 
bits/adjustments needed)


Cheers,
Daniel

On 03/07/14 12:04, Dan Christian Bogos wrote:

Hey Alex,

Many thanks for so fast answer. Could be I have missed the past 
interest (hence re-posting).


Anyway, I wonder what would be the chances that we get Ovidiu's 
interest so he can port registrant module to kamailio maybe? 
Unfortunately without reloads it is hard to push remote registration 
in enterprise solutions.


Thanks again,
DanB

On 03.07.2014 12:00, sr-users-requ...@lists.sip-router.org wrote:

On 07/02/2014 06:22 AM, Dan Christian Bogos wrote:

Anybody aware if it is possible to refresh the list of remote
registrations from the database without restarting the whole server?

This gets asked a lot, and the answer is no. But it is probably a widely
desired feature set by now.

-- Alex Balashov - Principal Evariste Systems LLC Tel: 
+1-678-954-0670 Web: http://www.evaristesys.com/, 
http://www.alexbalashov.com/ Please be kind to the English language: 
http://www.entrepreneur.com/article/232906



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Server generated 408 time out goes to onreply route?

2014-07-03 Thread Daniel-Constantin Mierla

Hello,

local 408 doesn't go in onreply routes, but you can get to failure_route 
and there use t_reply(...) to send out a different response code. 
However, never tried replacing 408 with 200 because it a different 
meaning and makes no much sense at least for INVITEs. But failure route 
is used quite commonly to change a 3xx response to 4xx/5xx.


Cheers,
Daniel


On 02/07/14 06:43, Allen Zhang wrote:


Hi,

Does local server generated 408 time out reply go to onreply_route?

If so, can I  change the status code to a 200 class code by doing: $rs 
= 202?


If I can change it, does it still go to failure_route? (It’s not a 400 
class response anymore.)


The scenario I want to test it’s easy to produce. Otherwise I would 
just try it……


Regards,


Allen



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Calls per second

2014-07-03 Thread Olle E. Johansson
Hi!

Have you implemented a per-customer rate limit in Calls per second? If so - how?

I've played with ratelimit/pipelimit and it seems like I can define a database 
with one pipe per customer - but have to restart Kamailio to add customers. 
There are warnings for low timer settings, like 1 second, but I don't know how 
up-to-date those warnings are.

I guess I could play with hash tables and implement something pike-like there, 
but it seems like a workaround for something pretty common.

So the question remains - how are you limiting on a cps per customer?

/O
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Calls per second

2014-07-03 Thread Fred Posner
I've done this with dialog and a sql lookup/update.

The sql call updates the table with how many calls are in total for the
client and how many international calls. There's a max calls and a max
international.

If current  max, the call can go through.

The db allows me to combine the lookup over multiple media servers and
kamailio servers. The lookup checks the db so any modifications occur in
real-time.

Fred Posner
The Palner Group, Inc.
http://www.palner.com (web)
+1-503-914-0999 (direct)
+1-954-472-2896 (fax)

On 07/03/2014 07:37 AM, Olle E. Johansson wrote:
 Hi!
 
 Have you implemented a per-customer rate limit in Calls per second? If so - 
 how?
 
 I've played with ratelimit/pipelimit and it seems like I can define a 
 database with one pipe per customer - but have to restart Kamailio to add 
 customers. There are warnings for low timer settings, like 1 second, but I 
 don't know how up-to-date those warnings are.
 
 I guess I could play with hash tables and implement something pike-like 
 there, but it seems like a workaround for something pretty common.
 
 So the question remains - how are you limiting on a cps per customer?
 
 /O
 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Calls per second

2014-07-03 Thread Olle E. Johansson
I am looking for calls setups per second - not concurrent calls.
Sorry for not being exact.

/O

On 03 Jul 2014, at 13:41, Fred Posner f...@palner.com wrote:

 I've done this with dialog and a sql lookup/update.
 
 The sql call updates the table with how many calls are in total for the
 client and how many international calls. There's a max calls and a max
 international.
 
 If current  max, the call can go through.
 
 The db allows me to combine the lookup over multiple media servers and
 kamailio servers. The lookup checks the db so any modifications occur in
 real-time.
 
 Fred Posner
 The Palner Group, Inc.
 http://www.palner.com (web)
 +1-503-914-0999 (direct)
 +1-954-472-2896 (fax)
 
 On 07/03/2014 07:37 AM, Olle E. Johansson wrote:
 Hi!
 
 Have you implemented a per-customer rate limit in Calls per second? If so - 
 how?
 
 I've played with ratelimit/pipelimit and it seems like I can define a 
 database with one pipe per customer - but have to restart Kamailio to add 
 customers. There are warnings for low timer settings, like 1 second, but I 
 don't know how up-to-date those warnings are.
 
 I guess I could play with hash tables and implement something pike-like 
 there, but it seems like a workaround for something pretty common.
 
 So the question remains - how are you limiting on a cps per customer?
 
 /O
 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 
 
 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How to check message queue (buffer) in Kamailio

2014-07-03 Thread Morten Isaksen
Hi,

Check out rtimer http://kamailio.org/docs/modules/4.1.x/modules/rtimer.html

/Morten


On Wed, Jul 2, 2014 at 6:59 PM, AliReza Khoshgoftar Monfared 
khoshgof...@gmail.com wrote:

 Thanks very much.

 That is the correct answer.
 just for the record, one can loadmodule exec and then use something like:

 exec_avp(netstat -ul | grep ':sip' | awk '{print $$2}',$avp(s:test));


 the value of the recv-q is then stored in $avp(s:test) and can be used
 anywhere

 Just a side question. I can call exec_avp inside my route{} block
 obviously. I understand that route{} block is entered anytime that there is
 a message for processing (correct me if wrong), but if, say, I want to
 check the value of recv-q every 100ms, where in the config script shall I
 call it and how shall I specify the calling frequency?

 Thanks,
 Alireza


 On Wed, Jul 2, 2014 at 6:57 AM, Morten Isaksen mi...@misak.dk wrote:

 Hi,

 You can use netstat and look at the Recv-Q counter. This should indicate
 the packets that is waiting for kamailio to process.

 /Morten


 On Tue, Jul 1, 2014 at 1:12 PM, Daniel-Constantin Mierla 
 mico...@gmail.com wrote:

  Hello,

 the SIP messages send on UDP/SCTP are received directly from the buffer
 in kernel one by one, each being processed once read. It is hard to know
 how many are waiting in the kernel.

 My question would be, when such information would really help? If
 kamailio is too busy handling traffic, won't get much time to care of other
 tasks (e.g., predict what is in network read kernel queue).

 Cheers,
 Daniel


 On 30/06/14 16:40, AliReza Khoshgoftar Monfared wrote:

  Hi,

  I had another simple question:

  In a kamailio server (proxy), how do I check the number of messages
 currently waiting for processing?


  Is there a variable that I can monitor, say, if I want to make a
 routing decision in my config based on the number of messages in the queue?

  Also, is it possible to get a head count by method? or is it only
 possible after fully parsing the message?

  I see that ratelimit module uses similar information, but I am not
 sure how to get the status of these queues that the module uses.

  Thanks


 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
 listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


 --
 Daniel-Constantin Mierla - 
 http://www.asipto.comhttp://twitter.com/#!/miconda - 
 http://www.linkedin.com/in/miconda


 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




 --
 Morten Isaksen

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




-- 
Morten Isaksen
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Calls per second

2014-07-03 Thread Alex Balashov
I do it using htable. I maintain a rolling 3-second sample of number of 
calls in 'htable', the tail of which is auto-expired. The need to 
implement CPS limits was the basis for the 'updateexpires' option I 
added to the htable code in Dec 2011--I wanted updates not to cause 
entries' expiration time to be reset.


Divide by 3, get CPS. It's crude, but effective. One can, of course, 
have a longer sampling window.


--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Calls per second

2014-07-03 Thread Abdelkader Allam
Hello Olle,

If you are to reimplement this by scripting instead of developing a C
module, maybe you could use redis as a database, and for each invite of a
customer, create a unique key in the redis database like this:

CUSTOMER_A:CALLID

Then set this key to auto expire in let's 10 seconds for instance, with TTL
command http://redis.io/commands/ttl .

Then to check the number of invite per seconds for CUSTOMER_A smoothed over
a window of 10 seconds, you count the keys in the DB that starts with
CUSTOMER_A ( KEYS CUSTOMER_A*) and divide it by 10.

Of course you would have to use a completely empty redis database used only
for this purpose in order to reduce the time spent by the  keys command to
find the number of key matching.











On Thu, Jul 3, 2014 at 11:48 AM, Olle E. Johansson o...@edvina.net wrote:

 I am looking for calls setups per second - not concurrent calls.
 Sorry for not being exact.

 /O

 On 03 Jul 2014, at 13:41, Fred Posner f...@palner.com wrote:

  I've done this with dialog and a sql lookup/update.
 
  The sql call updates the table with how many calls are in total for the
  client and how many international calls. There's a max calls and a max
  international.
 
  If current  max, the call can go through.
 
  The db allows me to combine the lookup over multiple media servers and
  kamailio servers. The lookup checks the db so any modifications occur in
  real-time.
 
  Fred Posner
  The Palner Group, Inc.
  http://www.palner.com (web)
  +1-503-914-0999 (direct)
  +1-954-472-2896 (fax)
 
  On 07/03/2014 07:37 AM, Olle E. Johansson wrote:
  Hi!
 
  Have you implemented a per-customer rate limit in Calls per second? If
 so - how?
 
  I've played with ratelimit/pipelimit and it seems like I can define a
 database with one pipe per customer - but have to restart Kamailio to add
 customers. There are warnings for low timer settings, like 1 second, but I
 don't know how up-to-date those warnings are.
 
  I guess I could play with hash tables and implement something pike-like
 there, but it seems like a workaround for something pretty common.
 
  So the question remains - how are you limiting on a cps per customer?
 
  /O
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
  sr-users@lists.sip-router.org
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 
 
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
  sr-users@lists.sip-router.org
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Calls per second

2014-07-03 Thread Alex Balashov

On 07/03/2014 08:12 AM, Abdelkader Allam wrote:


Then to check the number of invite per seconds for CUSTOMER_A smoothed
over a window of 10 seconds, you count the keys in the DB that starts
with CUSTOMER_A ( KEYS CUSTOMER_A*) and divide it by 10.


Indeed. But one could also do this with a purely in-memory htable and 
obviate the need to talk to any outside service to begin with. :-)


--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Calls per second

2014-07-03 Thread Abdelkader Allam
Very true Alex, didnt knew about htables, just checking about it, very
interesting :) The added value of Redis though is that other scripts
running outside of Kamailio can interact with it and potentially interact
with kamailio, can an external script have access to htables in memory db ?


On Thu, Jul 3, 2014 at 12:14 PM, Alex Balashov abalas...@evaristesys.com
wrote:

 On 07/03/2014 08:12 AM, Abdelkader Allam wrote:

  Then to check the number of invite per seconds for CUSTOMER_A smoothed
 over a window of 10 seconds, you count the keys in the DB that starts
 with CUSTOMER_A ( KEYS CUSTOMER_A*) and divide it by 10.


 Indeed. But one could also do this with a purely in-memory htable and
 obviate the need to talk to any outside service to begin with. :-)


 --
 Alex Balashov - Principal
 Evariste Systems LLC
 Tel: +1-678-954-0670
 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

 Please be kind to the English language:

 http://www.entrepreneur.com/article/232906

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Calls per second

2014-07-03 Thread Alex Balashov

On 07/03/2014 08:18 AM, Abdelkader Allam wrote:

Very true Alex, didnt knew about htables, just checking about it, very
interesting :) The added value of Redis though is that other scripts
running outside of Kamailio can interact with it and potentially
interact with kamailio, can an external script have access to htables in
memory db ?


Yes, but only rather crudely, via the management interface, i.e.

   http://kamailio.org/docs/modules/4.1.x/modules/htable.html#idp1887744

So, I agree that if external access to the raw sampling is desired, 
htable is not the best.


--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Calls per second

2014-07-03 Thread Fred Posner
I think my head isn't fully woken up yet -- sorry about that.

Fred Posner
The Palner Group, Inc.
http://www.palner.com (web)
+1-503-914-0999 (direct)
+1-954-472-2896 (fax)

On 07/03/2014 07:48 AM, Olle E. Johansson wrote:
 I am looking for calls setups per second - not concurrent calls.
 Sorry for not being exact.
 
 /O
 
 On 03 Jul 2014, at 13:41, Fred Posner f...@palner.com wrote:
 
 I've done this with dialog and a sql lookup/update.

 The sql call updates the table with how many calls are in total for the
 client and how many international calls. There's a max calls and a max
 international.

 If current  max, the call can go through.

 The db allows me to combine the lookup over multiple media servers and
 kamailio servers. The lookup checks the db so any modifications occur in
 real-time.

 Fred Posner
 The Palner Group, Inc.
 http://www.palner.com (web)
 +1-503-914-0999 (direct)
 +1-954-472-2896 (fax)

 On 07/03/2014 07:37 AM, Olle E. Johansson wrote:
 Hi!

 Have you implemented a per-customer rate limit in Calls per second? If so - 
 how?

 I've played with ratelimit/pipelimit and it seems like I can define a 
 database with one pipe per customer - but have to restart Kamailio to add 
 customers. There are warnings for low timer settings, like 1 second, but I 
 don't know how up-to-date those warnings are.

 I guess I could play with hash tables and implement something pike-like 
 there, but it seems like a workaround for something pretty common.

 So the question remains - how are you limiting on a cps per customer?

 /O
 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 
 
 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Calls per second

2014-07-03 Thread Olle E. Johansson

On 03 Jul 2014, at 14:21, Alex Balashov abalas...@evaristesys.com wrote:

 On 07/03/2014 08:18 AM, Abdelkader Allam wrote:
 Very true Alex, didnt knew about htables, just checking about it, very
 interesting :) The added value of Redis though is that other scripts
 running outside of Kamailio can interact with it and potentially
 interact with kamailio, can an external script have access to htables in
 memory db ?
 
 Yes, but only rather crudely, via the management interface, i.e.
 
   http://kamailio.org/docs/modules/4.1.x/modules/htable.html#idp1887744
 
 So, I agree that if external access to the raw sampling is desired, htable is 
 not the best.

Yes and no.

It's easy to write a simple HTTP interface for htables...

I really need per second, not average. I need to react FAST.

I think one htable with timestamp for last request per IP and one with number 
of requests for this timestamp will work. Using REDIS may not be fast enough, 
but I haven't tried. Redis or memcache would easily handle a situation with 
multiple proxys.

Would memcached or Redis handle this on a per second basis?
/O
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Calls per second

2014-07-03 Thread Abdelkader Allam
Yes if you set the key created to auto expire in a second


On Thu, Jul 3, 2014 at 12:31 PM, Olle E. Johansson o...@edvina.net wrote:


 On 03 Jul 2014, at 14:21, Alex Balashov abalas...@evaristesys.com wrote:

  On 07/03/2014 08:18 AM, Abdelkader Allam wrote:
  Very true Alex, didnt knew about htables, just checking about it, very
  interesting :) The added value of Redis though is that other scripts
  running outside of Kamailio can interact with it and potentially
  interact with kamailio, can an external script have access to htables in
  memory db ?
 
  Yes, but only rather crudely, via the management interface, i.e.
 
http://kamailio.org/docs/modules/4.1.x/modules/htable.html#idp1887744
 
  So, I agree that if external access to the raw sampling is desired,
 htable is not the best.

 Yes and no.

 It's easy to write a simple HTTP interface for htables...

 I really need per second, not average. I need to react FAST.

 I think one htable with timestamp for last request per IP and one with
 number of requests for this timestamp will work. Using REDIS may not be
 fast enough, but I haven't tried. Redis or memcache would easily handle a
 situation with multiple proxys.

 Would memcached or Redis handle this on a per second basis?
 /O
 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Calls per second

2014-07-03 Thread Alex Balashov

On 07/03/2014 08:31 AM, Olle E. Johansson wrote:


I really need per second, not average. I need to react FAST.


That was why I picked an interval of 3. It seemed the shortest 
practicable interval in which to collect meaningful sampling. But if the 
volume of calls is so large that 1-second collection will do, simply use 
that as the collection interval.


--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Calls per second

2014-07-03 Thread Carlos Ruiz Díaz
Hi,

do you know how the autoexpire is implemented in the htable module? If it's
a timer doing the polling and checking the expiration value, it may not be
ideal for your CPU do it that way. Several entries will surely impact
negatively on the performance.

I'm planning to implement this for cnxcc module, and I'd like to know your
opinion according to the experience you have with this approach.

Thanks,
Carlos


On Thu, Jul 3, 2014 at 7:41 AM, Alex Balashov abalas...@evaristesys.com
wrote:

 On 07/03/2014 08:31 AM, Olle E. Johansson wrote:

  I really need per second, not average. I need to react FAST.


 That was why I picked an interval of 3. It seemed the shortest practicable
 interval in which to collect meaningful sampling. But if the volume of
 calls is so large that 1-second collection will do, simply use that as the
 collection interval.


 --
 Alex Balashov - Principal
 Evariste Systems LLC
 Tel: +1-678-954-0670
 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

 Please be kind to the English language:

 http://www.entrepreneur.com/article/232906

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




-- 
Carlos
http://caruizdiaz.com
http://ngvoice.com
+52 55 3048 3303
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Calls per second

2014-07-03 Thread Alex Balashov

On 07/03/2014 08:52 AM, Carlos Ruiz Díaz wrote:

Hi,

do you know how the autoexpire is implemented in the htable module? If
it's a timer doing the polling and checking the expiration value, it may
not be ideal for your CPU do it that way. Several entries will surely
impact negatively on the performance.


It is implemented as a timer, unfortunately:

http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=blob;f=modules/htable/ht_api.c;h=f55e784ee4efbd6e7846f57e15406869df3e24dd;hb=HEAD#l896

--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Calls per second

2014-07-03 Thread Carlos Ruiz Díaz
Ok. Thanks Alex.


On Thu, Jul 3, 2014 at 8:00 AM, Alex Balashov abalas...@evaristesys.com
wrote:

 On 07/03/2014 08:52 AM, Carlos Ruiz Díaz wrote:

 Hi,

 do you know how the autoexpire is implemented in the htable module? If
 it's a timer doing the polling and checking the expiration value, it may
 not be ideal for your CPU do it that way. Several entries will surely
 impact negatively on the performance.


 It is implemented as a timer, unfortunately:

 http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=
 blob;f=modules/htable/ht_api.c;h=f55e784ee4efbd6e7846f57e154068
 69df3e24dd;hb=HEAD#l896


 --
 Alex Balashov - Principal
 Evariste Systems LLC
 Tel: +1-678-954-0670
 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

 Please be kind to the English language:

 http://www.entrepreneur.com/article/232906

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




-- 
Carlos
http://caruizdiaz.com
http://ngvoice.com
+52 55 3048 3303
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Calls per second

2014-07-03 Thread Daniel-Constantin Mierla

Hello,

On 03/07/14 13:37, Olle E. Johansson wrote:

Hi!

Have you implemented a per-customer rate limit in Calls per second? If so - how?

I've played with ratelimit/pipelimit and it seems like I can define a database 
with one pipe per customer - but have to restart Kamailio to add customers. 
There are warnings for low timer settings, like 1 second, but I don't know how 
up-to-date those warnings are.

I guess I could play with hash tables and implement something pike-like there, 
but it seems like a workaround for something pretty common.

So the question remains - how are you limiting on a cps per customer?
pipelimit from devel branch has this option to create pipes on demand 
with dynamic name. Would be good to get some feedback if works fine, as 
I did limited testing at the time of development. The module should just 
work if placed over 4.1 source code.


Cheers,
Daniel

--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] how to m_store to database not just a body with MSILO?

2014-07-03 Thread denis kremov
 Hello All,

Subj, need you help,

How to store this type of message to MSILO database?

Content-Type: 
message/external-body;access-type=URL;URL=https://xxx.com//download/539c28884_3e071c9db68044f687bf.jpg;
  

I modified and recompiled msilo.c to resolve this error:
ERROR: msilo [msilo.c:626]: m_store(): body of the message is empty! but after 
that - m_store just store this information to database: 

mysql select * from silo;
++-+-+---+---+++--+---+--++++
| id | src_addr | dst_addr | username | domain | inc_time | exp_time | snd_time 
| ctype | body | extra_hdrs | callid | status |
++-+-+---+---+++--+---+--++++
| 30 | sip:777351...@xxx.in | sip:777581...@xxx.in | 777581288 | xxx.in | 
1402479947 | 1403479946 | 0 | message/external-body | | | | 0 |
++-+-+---+---+++--+---+--++++
1 row in set (0.00 sec) How can I store to database access-type=URL and  and 
URL= ?

Thanks All!


-- 
denis kremov___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] no rtpengine.so module

2014-07-03 Thread Yuriy Gorlichenko
thanks for fas reply. If I may user rtpengine as rtpproxy maybe you already
use it or just know - does rtpengine provide ridge mode as rtpproxy between
internal and external interfaces? At my instalne if I add
rtpengine --ip=my.ext.net.addr/my.int.net.addr
It shows that ip if wrong, but I neet proxy rtp between interfaces.
Thanks.


2014-07-03 13:02 GMT+04:00 Dani Kamailio dani.kamai...@gmail.com:

 You can use rtpproxy-ng.so that is included (It does the conversion of SDP
 packets) with rtpengine media relay from Sipwise , the rtpengine.so is
 still a devel module.

 Regards.


 2014-07-03 10:38 GMT+02:00 Yuriy Gorlichenko ovoshl...@gmail.com:

 Hello. I install kamailio 4.1.3 and it works fine. But I neen proxy DTLS
 SRTP to backend media servers through kamailio. rtpproxy no not work with
 dtls srtp? so I installed rtpengine but can not find rtpengine.so file for
 copiyng to kamailio modules directory.

 Does anyone can install rtpengine as kamailio module?

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] no rtpengine.so module

2014-07-03 Thread Andrew Pogrebennyk
On 03/07/14 16:42, Yuriy Gorlichenko wrote:
 thanks for fas reply. If I may user rtpengine as rtpproxy maybe you
 already use it or just know - does rtpengine provide ridge mode as
 rtpproxy between internal and external interfaces? At my instalne if I add
 rtpengine --ip=my.ext.net.addr/my.int.net.addr 
 It shows that ip if wrong, but I neet proxy rtp between interfaces.
 Thanks.

rtpengine does not support the bridge mode.

Regards,
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] UAC remote registration - refreshing database

2014-07-03 Thread Ovidiu Sas
Porting the registrant module is not straight forward.
Best solution here - as Daniel pointed out - would be to enhance the
existing implementation.

-ovidiu

On Thu, Jul 3, 2014 at 6:32 AM, Daniel-Constantin Mierla
mico...@gmail.com wrote:
 Hello,

 not having against adding alternatives to existing features/modules,
 apparently here is just about implementing the reload capability. Most of
 the features should be there, like loading from database (which is done at
 startup) and destroying exiting structures in memory (which is done at
 shutdown). Doing the second followed by the first operation upon a rpc
 command should get the feature (of course, there can be some extra
 bits/adjustments needed)

 Cheers,
 Daniel


 On 03/07/14 12:04, Dan Christian Bogos wrote:

 Hey Alex,

 Many thanks for so fast answer. Could be I have missed the past interest
 (hence re-posting).

 Anyway, I wonder what would be the chances that we get Ovidiu's interest
 so he can port registrant module to kamailio maybe? Unfortunately without
 reloads it is hard to push remote registration in enterprise solutions.

 Thanks again,
 DanB

 On 03.07.2014 12:00, sr-users-requ...@lists.sip-router.org wrote:

 On 07/02/2014 06:22 AM, Dan Christian Bogos wrote:

 Anybody aware if it is possible to refresh the list of remote
 registrations from the database without restarting the whole server?

 This gets asked a lot, and the answer is no. But it is probably a widely
 desired feature set by now.

 -- Alex Balashov - Principal Evariste Systems LLC Tel: +1-678-954-0670
 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/ Please be
 kind to the English language: http://www.entrepreneur.com/article/232906



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


 --
 Daniel-Constantin Mierla - http://www.asipto.com
 http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



-- 
VoIP Embedded, Inc.
http://www.voipembedded.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users