<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi Brett,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>It was tested with very simple sip signaling. <o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I benched with sipp with a very simple stateless script expecting
a MESSAGE req and essentially just replying with 200 OK if lookup was
successful and 404 if not.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I was actually approaching 20000cps with 2 sipp clients but
somewhere in between 10K and 20K I was getting retransmissions.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Since those numbers were so much higher than I would ever need, I
didn’t look into what was the cause and what was the exact point things
started “not working perfectly”<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I filled a file with random routes one per line.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>And ran sipp as follows… <o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>sipp -i 10.200.1.21 -ci 10.200.1.21 10.200.1.10 -sf uac-msg.xml
-inf sip-users-cachetest.txt -r 20000 -m 1000000 -l 1000<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#999999'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I attached the sipp scenario for you if you would like to do
your own tests.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I don’t have the exact script I used but it looked
something like this..<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>route {<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> if
(perl_exec(“lookup_localdid”)) {<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> sl_send_reply(“200”,”OK”);<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> }
else {<o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:.5in'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'> sl_send_reply(“404”,”No
Route Found”);<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>} <o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> exit;<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>}<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Regards,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>-Adam<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Brett Nemeroff
[mailto:brett@nemeroff.com] <br>
<b>Sent:</b> Wednesday, February 18, 2009 1:14 PM<br>
<b>To:</b> Adam Long<br>
<b>Cc:</b> users@lists.opensips.org<br>
<b>Subject:</b> Re: [OpenSIPS-Users] User inbound rules<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>Great! Thanks for the stats...<br>
Are those lookups independent of SIP signalling? I know memcache supports
well over 10K/sec.. Just curious if you'll get that performance with the perl
libs in the middle.<br>
-Brett<br>
<br>
<o:p></o:p></p>
<div>
<p class=MsoNormal>On Wed, Feb 18, 2009 at 12:11 PM, Adam Long <<a
href="mailto:ajlong@worldlink.net">ajlong@worldlink.net</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p><span style='font-size:11.0pt;color:#1F497D'>I currently do this with 1.4.4
via perl and I use perl's libmemcached wrapper to vastly improve performance.</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>I benched over 10000 lookups
per sec on a QC with mostly cached hits.</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>With a full stateful routing
script I would expect only a 1/10<sup>th</sup> that but still very good.</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>I'm sure the 1.5 c based
memcache module functions would yield even better performance.</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>Regards,</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>-Adam</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0in 0in 0in;
border-color:-moz-use-text-color -moz-use-text-color'>
<p><b><span style='font-size:10.0pt'>From:</span></b><span style='font-size:
10.0pt'> <a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>
[mailto:<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>]
<b>On Behalf Of </b>Gustavo Mistrinelli<br>
<b>Sent:</b> Wednesday, February 18, 2009 10:01 AM<br>
<b>To:</b> Brett Nemeroff<br>
<b>Cc:</b> <a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a><br>
<b>Subject:</b> Re: [OpenSIPS-Users] User inbound rules</span><o:p></o:p></p>
</div>
<div>
<div>
<p> <o:p></o:p></p>
<p style='margin-bottom:12.0pt'>Thanks Brett, I'll take a look at the new
module :)<o:p></o:p></p>
<div>
<p>On Wed, Feb 18, 2009 at 12:47 PM, Brett Nemeroff <<a
href="mailto:brett@nemeroff.com" target="_blank">brett@nemeroff.com</a>>
wrote:<o:p></o:p></p>
<p>Hi Gustavo,<o:p></o:p></p>
<div>
<p>I'm doing something similar, being that I need a lookup per INVITE. Bogdan's
recommendation for me was to use the memcaching functions in 1.5:<o:p></o:p></p>
</div>
<div>
<p><a href="http://www.opensips.org/index.php?n=Resources.DocsTutMemcache"
target="_blank">http://www.opensips.org/index.php?n=Resources.DocsTutMemcache</a><o:p></o:p></p>
</div>
<div>
<p> <o:p></o:p></p>
</div>
<div>
<p style='margin-bottom:12.0pt'> <o:p></o:p></p>
<div>
<div>
<div>
<p>On Wed, Feb 18, 2009 at 8:45 AM, Gustavo Mistrinelli <<a
href="mailto:gmistrinelli@gmail.com" target="_blank">gmistrinelli@gmail.com</a>>
wrote:<o:p></o:p></p>
</div>
</div>
<blockquote style='border:none;border-left:solid windowtext 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt;
border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204)'>
<div>
<div>
<p style='margin-bottom:12.0pt'>Hi all, I'm trying to figure out if we can use
or add functionalities to dynamic routing module to do "incoming
routing" based on callee destination ($ru) per user<br>
The idea is to have inbound rules per user (username/domain or user aliases
i.e. numbers ) <br>
Each user will set their incoming rules, i.e. First rule ring my numbers and
username (lookup registered devices) for 15 seconds, then call my cellphone for
10 second, then call<br clear=all>
home number for 20 seconds and then call my voicemail, each step may ring on
more than one devices at the same time, it's a mix of serial and parallel
forking. Condition to do next step is if get 4XX errors (not found, busy, etc)<br>
We can add also time conditions and black/white list. <br>
<br>
I did it using custom avp_db_query but will be nice have rules on memory
without querying tables every time.<br>
<br>
I'll be waiting for your suggestions<br>
<br>
Best,<br>
<br>
-- <br>
<span style='color:#888888'>Gustavo Mistrinelli</span><o:p></o:p></p>
</div>
</div>
<p style='margin-bottom:12.0pt'>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></p>
</blockquote>
</div>
<p> <o:p></o:p></p>
</div>
</div>
<p><br>
<br clear=all>
<br>
-- <br>
Gustavo Mistrinelli<o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>