<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
<div class="moz-cite-prefix">On 11/16/12 8:54 AM, Grant Bagdasarian
wrote:<br>
</div>
<blockquote
cite="mid:FB7D97A214987F458242ACBDF876140738BFE033DC@clubvirtual40.ClubMessage.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@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;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Verdana","sans-serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;
        mso-fareast-language:EN-US;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Verdana","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></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]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D"
lang="EN-US">Hello Daniel,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D"
lang="EN-US">Yes, dlg_manage() is being called in the BYE,
yet it sometimes still occurs that dialogs aren’t being
cleared.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D"
lang="EN-US">It is critical for us the dialogs are being
cleared as we have an application which heavily relies on
this.</span></p>
</div>
</blockquote>
Do you get any error messages in syslog?<br>
<br>
Can you add an xlog(...) message (or load the debugger module and
enable cfgtrace parameter), then look at the log messages to be sure
dlg_manage() is executed for BYE requests?<br>
<br>
Cheers,<br>
Daniel<br>
<blockquote
cite="mid:FB7D97A214987F458242ACBDF876140738BFE033DC@clubvirtual40.ClubMessage.local"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D"
lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D"
lang="EN-US">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D"
lang="EN-US">Grant Bagdasarian<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D"
lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:NL"
lang="EN-US">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:NL"
lang="EN-US"> Daniel-Constantin Mierla
[<a class="moz-txt-link-freetext" href="mailto:miconda@gmail.com">mailto:miconda@gmail.com</a>] <br>
<b>Sent:</b> donderdag 8 november 2012 8:03<br>
<b>To:</b> SIP Router - Kamailio (OpenSER) and SIP
Express Router (SER) - Users Mailing List<br>
<b>Cc:</b> Grant Bagdasarian<br>
<b>Subject:</b> Re: [SR-Users] Dialog module not
decrementing profile size<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hello,<o:p></o:p></p>
<div>
<p class="MsoNormal">On 10/30/12 10:51 AM, Grant Bagdasarian
wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US">Hello Community,</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US">I’ve recently started to use the Dialog
module to manage the amount of incoming calls from our SIP
provider allowed to pass through by using
profiles_with_values and setting the size of these
profiles to a certain amount.</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US">Most of the time this works as it should, but
sometimes the ‘slots’ available for a profile aren’t
cleared even though a dialog has finished. This seems to
happen when an high amount of regular traffic is hitting
kamailio.</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US">Has anyone else experienced this? Are there
perhaps any other ways to control the slots available for
certain incoming SIP traffic?</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US">Below parts of my configuration file. Perhaps
I’m doing something wrong which causes this to happen.</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US">In my route[WITHINDLG] -> loose_route
-> is_method(“BYE”) I’m not calling dlg_manage(), could
this be the problem?</span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif";mso-fareast-language:NL">is
the dlg_manage() executed or not for BYE? You say no above,
but the example has it. Because you have dlg_match_mode=2,
you must call dlg_manage() for BYE explicitly.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US">Other comments are welcome too, as I’m fairly
new to Kamailio.</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New"">modparam("dialog",
"enable_stats", 1)</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New"">modparam("dialog",
"dlg_flag", 4)</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US">modparam("dialog", "hash_size", 4096)</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US">modparam("dialog", "profiles_with_value",
"318005004");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US">modparam("dialog", "default_timeout", 43200)</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US">modparam("dialog", "dlg_match_mode",2)</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US">modparam("dialog", "detect_spirals", 1)</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US">request_route {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> # per request initial checks</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> route(REQINIT);</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> # handle requests within SIP dialogs</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> route(WITHINDLG);</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> ### only initial requests (no To tag)</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> # CANCEL processing</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if (is_method("CANCEL"))</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if (t_check_trans())</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> t_relay();</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> exit;</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> }</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> t_check_trans();</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> # record routing for dialog forming
requests (in case they are routed)</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> # - remove preloaded route headers</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> remove_hf("Route");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if (is_method("INVITE")) {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> xlog("L_INFO", "Incoming request
for $rU from $fU");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if ($rU == "318005004") {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> route(DIALOG);</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> } </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> }</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> # handle registrations</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> route(REGISTRAR);</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if ($rU==$null)</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> # request with no Username in
RURI</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> sl_send_reply("484","Address
Incomplete");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> exit;</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> }</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> # dispatch destinations</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> route(DISPATCH);</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> route(RELAY);</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US">}</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US">route[DIALOG] {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> dlg_manage();</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> record_route();</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> $var(SIZE) = 0;</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> sql_query("vf", "exec
dbo.SelectAvailableSlots '00$rU'", "ra");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> $avp(s:limit) = $dbr(ra=>[0,7]);</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> xlog("L_INFO", "Maximum simultaneous
calls is configured at $avp(s:limit) ....");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> sql_result_free("ra");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if ($rU == "318005004") {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> get_profile_size("318005004",
"$rU", "$var(SIZE)");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> }</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> xlog("L_INFO", "There are currently
$var(SIZE) calls for $rU, excluding the current call");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if($var(SIZE) >= $avp(s:limit)) {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> xlog("L_INFO", "Simultaneous
calls limit of $avp(s:limit) reached for $rU:
$var(SIZE)\n");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> sl_send_reply("603",
"Simultaneous calls limit reached");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> exit;</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> }</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if ($rU == "318005004") {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> set_dlg_profile("318005004",
"$rU"); </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> } </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if ($rU == "318005004") {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if(get_profile_size("318005004",
"$var(SIZE)")) {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> xlog("L_INFO", "There are
currently $var(SIZE) calls for $rU, including the current
call");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> }</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> } </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US">}</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US">route[WITHINDLG] {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if (has_totag()) {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> # sequential request withing a
dialog should</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> # take the path determined by
record-routing</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if (loose_route()) {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> #Used for call transfer</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if($fU == "318005004") {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if
(is_method("UPDATE")) {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US">
sl_send_reply("405","Method not allowed");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> xlog("L_INFO",
"Dropping UPDATE message...\n");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> exit;</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> }</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if
(is_method("INVITE")) {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> record_route();</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> } </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if (is_method("BYE")) {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> dlg_manage();</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> }</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> }</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if (is_method("BYE")) {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> setflag(1); #
do accounting ...</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> setflag(3); #
... even if the transaction fails</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> }</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> route(RELAY);</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> } else {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if
(is_method("SUBSCRIBE") && uri == myself) {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> # in-dialog
subscribe requests</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US">
route(PRESENCE);</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> exit;</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> }</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if ( is_method("ACK") )
{</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> if (
t_check_trans() ) {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> # non
loose-route, but stateful ACK;</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> # must
be ACK after a 487 or e.g. 404 from upstream server</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US">
t_relay();</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> exit;</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> } else {</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> # ACK
without matching transaction ... ignore and discard.</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> exit;</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> }</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> }</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US">
sl_send_reply("404","Not here");</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New""
lang="EN-US"> </span><span
style="font-size:9.0pt;font-family:"Courier New"">}</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New"">
exit;</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New"">
}</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.0pt;font-family:"Courier New"">}</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US">Regards,</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""
lang="EN-US">Grant</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif";mso-fareast-language:NL"><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></pre>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif";mso-fareast-language:NL"><br>
<br>
<o:p></o:p></span></p>
<pre>-- <o:p></o:p></pre>
<pre>Daniel-Constantin Mierla - <a moz-do-not-send="true" href="http://www.asipto.com">http://www.asipto.com</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a><o:p></o:p></pre>
<pre>Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a moz-do-not-send="true" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a><o:p></o:p></pre>
<pre>Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - <a moz-do-not-send="true" href="http://asipto.com/u/katu">http://asipto.com/u/katu</a><o:p></o:p></pre>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
</body>
</html>