<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: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:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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;}
span.EmailStyle17
        {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'>Bogdan,<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 apologize for ‘beating a dead horse’. I get
that this is a frustration we’re stuck with for various reasons. <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’ve been writing my Opensips config on a daily basis for
going on six months now, and there’s still a couple of “weird”
spots in my scripts that drive me nuts (I literally have a comment above this
code that says “NEEDS DEBUGGING”). <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'>For anyone interested in the topic, please understand that I
wrote this particular fix ‘under the gun’, we’d just launched
our product and a handful of our customers couldn’t receive calls from a
network we’re peered with because their proxy server fired off an
immediate reinvite and my system couldn’t accept it. This went so
far as the peered telco beginning to call me (unsuccessfully, of course! </span><span
style='font-size:11.0pt;font-family:Wingdings;color:#1F497D'>J</span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>) because
they were getting tickets from their users unable to contact mine.<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'>Having said that, I was in a hurry, and came up with the code
below. I still to this day don’t understand why calling
t_check_trans() twice was necessary, but I can say that if I eliminate one of
them, the system breaks down. <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'>Any advice? Like any good IT/Developer type, I’d
like to totally understand what my script is doing </span><span
style='font-size:11.0pt;font-family:Wingdings;color:#1F497D'>J</span><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'>Cheers,<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'>Jeff Kronlage<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Data102<i><o:p></o:p></i></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"'>
users-bounces@lists.opensips.org [mailto:users-bounces@lists.opensips.org] <b>On
Behalf Of </b>Brett Nemeroff<br>
<b>Sent:</b> Tuesday, October 06, 2009 7:15 AM<br>
<b>To:</b> OpenSIPS users mailling list<br>
<b>Subject:</b> Re: [OpenSIPS-Users] Re-invite problem -> 491 Request
Pending<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Bogdan,<o:p></o:p></p>
<div>
<p class=MsoNormal>I presently record the 200 OK ACK in my ACC, but I don't
seem to actually utilize it for anything at present. If I did the fix jeff
mentioned, will I no longer get that ACK in ACC?<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>so performing the t_check_trans() is faster than tm module's
built in matching? I'm not sure I get why this is faster. I would have thought
that the work t_check_trans does is similar to what the tm module already does.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>BTW ,is this a bug that is planned to be fixed? Or should I
just expect that this scripting fix be a regular part of my scripts (if so,
perhaps it should be in the example scripts?)<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Thanks,<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Brett<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p>
<div>
<p class=MsoNormal>On Tue, Oct 6, 2009 at 8:01 AM, Bogdan-Andrei Iancu <<a
href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>> wrote:<o:p></o:p></p>
<p class=MsoNormal>Hi Brett,<br>
<br>
This is an ancient topic that needs to be solved once for all. The<br>
bottom problem is that OpenSIPS / TM does try o match the 200OK ACK<br>
against the INVITE transaction - and it should not do that as 200OK ACK<br>
forms a separate transaction and it matches at dialog level, not<br>
transaction level. Because of this, the 200OK ACK matching is not<br>
reliable (especially if you do spirals on opensips) and it is also time<br>
consuming.<br>
<br>
Because of this, the 200OK ACK matching takes longer than processing of<br>
a re-INVITE and here comes the changing in order.<br>
<br>
IMO, this artificial / forced matching of 200 OK should be dropped.<br>
<br>
But there are 2 modules using this:<br>
ACC - for accounting ACK for 200 OK - not sure how many people do enable<br>
this<br>
OSP - no clue :D.....<br>
<br>
Regards,<br>
Bogdan<o:p></o:p></p>
<div>
<p class=MsoNormal><br>
Brett Nemeroff wrote:<br>
> Jeff,<br>
> Thanks for your reply. Is this in the loose route? or.. ? Does it<br>
> break anything else? Bogdan, anyway you can explain what's going on<br>
> here? :)<br>
> -Brett<br>
><br>
><br>
> On Mon, Oct 5, 2009 at 12:30 PM, Jeff Kronlage <<a
href="mailto:jeff@data102.com">jeff@data102.com</a><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>> <mailto:<a href="mailto:jeff@data102.com">jeff@data102.com</a>>>
wrote:<br>
><br>
> Brett,<br>
><br>
> I had this same exact problem. The solution was a little
clunky<br>
> but sending the ACK out statelessly solves the problem.<br>
><br>
> My code looks like:<br>
><br>
> t_check_trans();<br>
><br>
> if (is_method("ACK") && !t_check_trans())
{<br>
><br>
> if (!forward()) sl_reply_error();<br>
><br>
> exit;<br>
><br>
> }<br>
><br>
> if (!t_relay()) sl_reply_error();<br>
><br>
> I wish I could give a more techie explanation on why this
works –<br>
> it was a hackjob answer for me. Bogdan posted an answer
perhaps a<br>
> week ago that explained it a bit.<br>
><br>
> Cheers,<br>
><br>
> --<br>
><br>
> Jeff Kronlage<br>
><br>
> Senior IT Engineer, Data102<br>
><br>
> 102 South Tejon, Suite #1250<br>
><br>
> Colorado Springs, CO 80903<br>
><br>
> (719) 387-0000 x 1335 direct<br>
><br>
> (719) 578-8844 fax<br>
><o:p></o:p></p>
</div>
<p class=MsoNormal>> <a href="mailto:jeff@data102.com">jeff@data102.com</a>
<mailto:<a href="mailto:jeff@data102.com">jeff@data102.com</a>> / <a
href="http://www.data102.com" target="_blank">http://www.data102.com</a><o:p></o:p></p>
<div>
<p class=MsoNormal>><br>
> *From:* <a href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a><br>
> <mailto:<a href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a>><br>
> [mailto:<a href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a><br>
> <mailto:<a href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a>>]
*On Behalf Of *Brett<br>
> Nemeroff<br>
> *Sent:* Monday, October 05, 2009 9:51 AM<o:p></o:p></p>
</div>
<p class=MsoNormal>> *To:* <a
href="mailto:users@lists.opensips.org">users@lists.opensips.org</a> <mailto:<a
href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>><o:p></o:p></p>
<div>
<div>
<p class=MsoNormal>> *Subject:* [OpenSIPS-Users] Re-invite
problem -> 491 Request Pending<br>
><br>
> Hello All,<br>
><br>
> I'm not sure where the problem is.. it's either my switch,
or it's<br>
> the customer's box.<br>
><br>
> What's happening is the customer sends a call. As soon as
the<br>
> 200OK gets back to them, they re-invite.. very fast. The
reinvite<br>
> occurs BEFORE the ACK for the 200OK makes it back to the
provider.<br>
> Because of this, when the RE-INVITE hits the provider they
respond<br>
> with "491 Request Pending", in other words, I
can't process a<br>
> re-invite because the last INVITE hasn't send me an ACK back
yet.<br>
> This happens over.. and over.. and over.<br>
><br>
> What I'm wondering is if there is a timer I can adjust for
this.<br>
> Seems like OpenSIPs should know that the transaction is in a
state<br>
> where there is a PENDING ACK and it shouldn't process the<br>
> RE-INVITE quite yet (Request Queued?). Perhaps that isn't a
normal<br>
> function of a Proxy. So I guess I'm looking for either a
timer<br>
> adjustment or a way to insert some sorta delay (sounds like
a bad<br>
> idea) to allow the ACK to traverse.<br>
><br>
> The numbers are VERY close.. the ACK actually arrives at
timestamp<br>
> 12.757073, but the INVITE goes to the provider at 12.755913.
So in<br>
> other words, if the RE-INVITE occured 0.001161 seconds
later, this<br>
> wouldn't happen. Seems like there should be something to
prevent<br>
> these events? (A properly working UAC perhaps?!)<br>
><br>
> Any ideas?<br>
><br>
> Thanks,<br>
><br>
> Brett<br>
><br>
><br>
> _______________________________________________<br>
> Users mailing list<o:p></o:p></p>
</div>
</div>
<p class=MsoNormal>> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>><o:p></o:p></p>
<div>
<p class=MsoNormal>> <a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
><o:p></o:p></p>
</div>
<p class=MsoNormal>>
------------------------------------------------------------------------<o:p></o:p></p>
<div>
<div>
<p class=MsoNormal>><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><br>
><br>
<br>
<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>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</div>
</body>
</html>