<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = 
"urn:schemas-microsoft-com:vml" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word"><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Re-routing to same device in failure_route</TITLE>

<META content="MSHTML 6.00.2800.1498" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
.shape {
        BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
        font-family: Tahoma;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 70.85pt 3.0cm 70.85pt 3.0cm; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
P {
        FONT-SIZE: 12pt; MARGIN-LEFT: 0cm; MARGIN-RIGHT: 0cm; FONT-FAMILY: "Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EstiloCorreo18 {
        COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=ES vLink=purple link=blue>
<DIV><SPAN class=272243116-08062005><FONT face=Arial color=#0000ff size=2>Yes, 
you are right.&nbsp;&nbsp; Both INVITE messages are same except branch 
id.</FONT></SPAN></DIV>
<DIV><SPAN class=272243116-08062005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=272243116-08062005><FONT face=Arial color=#0000ff size=2>Any 
ideas on&nbsp;how can we solve this issue ?</FONT></SPAN></DIV>
<DIV><SPAN class=272243116-08062005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=272243116-08062005><FONT face=Arial color=#0000ff 
size=2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=272243116-08062005><FONT face=Arial color=#0000ff 
size=2>karun</FONT></SPAN></DIV>
<DIV><SPAN class=272243116-08062005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=272243116-08062005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> ggb@tid.es 
  [mailto:ggb@tid.es]<BR><B>Sent:</B> Tuesday, June 07, 2005 3:29 
  PM<BR><B>To:</B> Karun Chemudugunta; serusers@lists.iptel.org<BR><B>Cc:</B> 
  serdev@lists.iptel.org<BR><B>Subject:</B> RE: [Serusers] Re-routing to same device 
  in failure_route<BR><BR></FONT></DIV>
  <DIV class=Section1>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Hi,<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">It&#8217;s possible that 
  the Xten softphone detects that the second INVITE is part of a cleared session 
  (the first INVITE rejected with 400 error), and discards 
  it&#8230;.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">G.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <DIV>
  <DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT 
  face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
  <HR tabIndex=-1 align=center width="100%" SIZE=2>
  </SPAN></FONT></DIV>
  <P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">De:</SPAN></FONT></B><FONT 
  face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> 
  serusers-bounces@iptel.org [mailto:serusers-bounces@lists.iptel.org] <B><SPAN 
  style="FONT-WEIGHT: bold">En nombre de </SPAN></B>Karun 
  Chemudugunta<BR><B><SPAN style="FONT-WEIGHT: bold">Enviado el:</SPAN></B> 
  martes, 07 de junio de 2005 18:43<BR><B><SPAN 
  style="FONT-WEIGHT: bold">Para:</SPAN></B> serusers@lists.iptel.org<BR><B><SPAN 
  style="FONT-WEIGHT: bold">CC:</SPAN></B> serdev@lists.iptel.org<BR><B><SPAN 
  style="FONT-WEIGHT: bold">Asunto:</SPAN></B> [Serusers] Re-routing to same 
  device in failure_route</SPAN></FONT><o:p></o:p></P></DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi Group,</SPAN></FONT> 
  <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp; Cisco 
  5300 -----&gt; SER ----&gt; Xten softphone-A ----&gt; Failed call with error 
  code &gt;400 -------&gt; try to route to Xten softphone A(same as 
  previous)</SPAN></FONT><o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  I am trying to route calls to softphones in such way that, if call failed by 
  some reason (&gt;400), trying to route second time to the same soft phone 
  using append_brach() and t_relay() like below. But, soft phone is unable 
  process INVITE message for some reason.&nbsp; But, if I forward failed call 
  different soft phone,&nbsp; call was successful.</SPAN></FONT><o:p></o:p></P>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Am I doing any thing wrong in 
  config ???</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks for your help in 
  advance.</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Regards,</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Karun</SPAN></FONT> 
<o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">##########################################################################################</SPAN></FONT> 
  <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># $Id: 
  ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># simple 
  quick-start config script</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># 
  ----------- global configuration parameters 
  ------------------------</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#debug=9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # debug level (cmd line: -dddddddddd)</SPAN></FONT> <BR><FONT face=Arial 
  size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#fork=yes</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#log_stderror=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # (cmd line: -E)</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">/* Uncomment these lines to enter 
  debugging mode</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">debug=7</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">fork=no</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">log_stderror=yes</SPAN></FONT> 
  <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">*/</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">check_via=no&nbsp;&nbsp;&nbsp; # 
  (cmd. line: -v)</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # (cmd. line: -r)</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#rev_dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # (cmd. line: -R)</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # (cmd. line: -r)</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">rev_dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # (cmd. line: -R)</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#port=5060</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#children=4</SPAN></FONT> 
  <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">fifo="/tmp/ser_fifo"</SPAN></FONT> 
  <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#alias=voip.cafe.bevocal.com</SPAN></FONT> 
  <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#alias=66.77.14.238</SPAN></FONT> 
  <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">alias=209.233.189.177</SPAN></FONT> 
  <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">alias=voice.engca.bevocal.com</SPAN></FONT> 
  <o:p></o:p></P>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># 
  ------------------ module loading 
  ----------------------------------</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># 
  Uncomment this if you want to use SQL database</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#loadmodule 
  "/usr/lib/ser/modules/mysql.so"</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">loadmodule 
  "/usr/lib/ser/modules/sl.so"</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">loadmodule 
  "/usr/lib/ser/modules/tm.so"</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">loadmodule 
  "/usr/lib/ser/modules/rr.so"</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">loadmodule 
  "/usr/lib/ser/modules/maxfwd.so"</SPAN></FONT> <BR><FONT face=Arial 
  size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">loadmodule 
  "/usr/lib/ser/modules/usrloc.so"</SPAN></FONT> <BR><FONT face=Arial 
  size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">loadmodule 
  "/usr/lib/ser/modules/registrar.so"</SPAN></FONT> <BR><FONT face=Arial 
  size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">loadmodule 
  "/usr/lib/ser/modules/exec.so"</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">loadmodule 
  "/usr/lib/ser/modules/textops.so"</SPAN></FONT> <BR><FONT face=Arial 
  size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#loadmodule 
  "/usr/lib/ser/modules/acc.so"</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#modparam("acc", "log_level", 
  2)</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#modparam("acc", "log_flag", 
  1)</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#modparam("acc", "report_cancels", 
  1)</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#modparam("acc", 
  "failed_transactions", 1)</SPAN></FONT> <o:p></o:p></P>
  <P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><FONT face="Times New Roman" 
  size=3><SPAN style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># 
  Uncomment this if you want digest authentication</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># mysql.so 
  must be loaded !</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#loadmodule 
  "/usr/lib/ser/modules/auth.so"</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#loadmodule 
  "/usr/lib/ser/modules/auth_db.so"</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># 
  ----------------- setting module-specific parameters 
  ---------------</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># 
  -- usrloc params --</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">modparam("usrloc", 
  "db_mode",&nbsp;&nbsp; 0)</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># 
  Uncomment this if you want to use SQL database</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># for 
  persistent storage and comment the previous line</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#modparam("usrloc", "db_mode", 
  2)</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># 
  -- auth params --</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># Uncomment if you are using auth 
  module</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#modparam("auth_db", 
  "calculate_ha1", yes)</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># If you 
  set "calculate_ha1" parameter to yes (which true in this 
  config),</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># uncomment also the following 
  parameter)</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#modparam("auth_db", 
  "password_column", "password")</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># -- rr params --</SPAN></FONT> 
  <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># add value to ;lr param to make 
  some broken UAs happy</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">modparam("rr", "enable_full_lr", 
  1)</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># 
  -------------------------&nbsp; request routing logic 
  -------------------</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"># 
  main routing logic</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">route{</SPAN></FONT> 
  <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # initial sanity checks -- messages with</SPAN></FONT> <BR><FONT face=Arial 
  size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # max_forwards==0, or excessively long requests</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  if (!mf_process_maxfwd_header("10"))</SPAN></FONT> <BR><FONT face=Arial 
  size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  {</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  sl_send_reply("483","Too Many Hops");</SPAN></FONT> <BR><FONT face=Arial 
  size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  break;</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  };</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  if ( msg:len &gt; max_len ) {</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  sl_send_reply("513", "Message too big");</SPAN></FONT> <BR><FONT face=Arial 
  size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  break;</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  };</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # we record-route all messages -- to make sure that</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # subsequent messages will go through our proxy; that's</SPAN></FONT> 
  <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # particularly good if upstream and downstream entities</SPAN></FONT> 
  <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # use different transport protocol</SPAN></FONT> <BR><FONT face=Arial 
  size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  record_route();</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # loose-route processing</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  if (loose_route()) {</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  t_relay();</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  break;</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  };</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # if the request is for other domain use UsrLoc</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # (in case, it does not work, use the following command</SPAN></FONT> 
  <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # with proper names and addresses in it)</SPAN></FONT> <BR><FONT face=Arial 
  size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  if (uri==myself)</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  {</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  if (method=="REGISTER")</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  {</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  save("location");</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  break;</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  };</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  if(method=="INVITE")</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  {</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  log(1,"about lookup in route zero");</SPAN></FONT> <BR><FONT face=Arial 
  size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  if (!lookup("location")) {</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  log(1,"lookup failed :SIP request from config");</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  sl_send_reply("404", "Not Found");</SPAN></FONT> <BR><FONT face=Arial 
  size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  break;</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  };</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  t_on_failure("5");</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  };</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  };</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # forward to current uri now; use stateful forwarding; that</SPAN></FONT> 
  <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # works reliably even if we forward from TCP to UDP</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  if (!t_relay()) {</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  sl_reply_error();</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  };</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">}</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">failure_route[5] {</SPAN></FONT> 
  <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp; log(1,"Inside 
  failure_route five");</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp; 
  revert_uri();</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp; 
  append_branch();</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp; if 
  (!lookup("location")) {</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  log(1,"lookup failed :SIP request from config");</SPAN></FONT> <BR><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  t_reply("404", "Not Found");</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  break;</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  };</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  if (!t_relay()) {</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  sl_reply_error();</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  };</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">}</SPAN></FONT> <o:p></o:p></P>
  <P><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">######################################################################################</SPAN></FONT> 
  <o:p></o:p></P></DIV></BLOCKQUOTE></BODY></HTML>