<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:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="&#1;" 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;}
@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: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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1244335064;
        mso-list-type:hybrid;
        mso-list-template-ids:-1181183444 1245772656 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:2;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Calibri","sans-serif";
        mso-fareast-font-family:Calibri;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></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=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks for your reply.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I have checked, and I have one question, from analyzing two points:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span dir=LTR></span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>1<sup>st</sup> point is that before adding the drouting scripts no problem &nbsp;with kamailio and no crash, but after adding the script in the routing logic kamailio app dies<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span dir=LTR></span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>2<sup>nd</sup> point if I have have any wrong data in the database and try to call, I get the &nbsp;</span>(&quot;503&quot;, &quot;No Rules matching the URI&quot;) on the x-lite<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>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>So both points doesn&#8217;t mean that the problem lies in the scripts I have in the routing logic area? (Also please note that I have got these scripts after checking the kamailio doc and other google doc that applied drouting scenario using kamailio 1.5.0).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Following your advice, I have check the syslog file before and after performing the call and am getting the below<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>1)When I start kamailio I have the following in syslog :<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>an:/usr/local/etc/kamailio# kamctl start<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>INFO: Starting Kamailio : <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>INFO: started (pid: 19296)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>debian:/usr/local/etc/kamailio# tail -f /var/lo<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>local/ lock/&nbsp; log/&nbsp;&nbsp; <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>debian:/usr/local/etc/kamailio# tail -f /var/log/syslog<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 05:57:30 debian kamailio: WARNING: &lt;core&gt; [socket_info.c:1275]: WARNING: fix_hostname: could not rev. resolve 192.168.111.139<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 05:57:30 debian kamailio: WARNING: &lt;core&gt; [socket_info.c:1275]: WARNING: fix_hostname: could not rev. resolve 192.168.111.139<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 05:57:30 debian kamailio: INFO: &lt;core&gt; [tcp_main.c:4727]: init_tcp: using epoll_lt as the io watch method (auto detected)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: usrloc [hslot.c:53]: locks array size 512<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: drouting [drouting.c:272]: DRouting - initializing<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: &lt;core&gt; [udp_server.c:179]: INFO: udp_init: SO_RCVBUF is initially 111616<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: &lt;core&gt; [udp_server.c:230]: INFO: udp_init: SO_RCVBUF is finally 262142<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: &lt;core&gt; [udp_server.c:179]: INFO: udp_init: SO_RCVBUF is initially 111616<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 05:57:30 debian /usr/local/sbin/kamailio[19296]: INFO: &lt;core&gt; [udp_server.c:230]: INFO: udp_init: SO_RCVBUF is finally 262142<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 05:57:31 debian /usr/local/sbin/kamailio[19310]: INFO: ctl [io_listener.c:225]: io_listen_loop:&nbsp; using epoll_lt io watch method (config)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>2) When I do the call from x-lite by dialing 961222222, after few seconds I get Call Failed: Request Timeout on x-lite, and the syslog &nbsp;shows:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>an:/usr/local/etc/kamailio# tail -f /var/log/syslog<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19305]: INFO: &lt;core&gt; [main.c:817]: INFO: signal 15 received<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19309]: INFO: &lt;core&gt; [main.c:817]: INFO: signal 15 received<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19310]: INFO: &lt;core&gt; [main.c:817]: INFO: signal 15 received<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19314]: INFO: &lt;core&gt; [main.c:817]: INFO: signal 15 received<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19312]: INFO: &lt;core&gt; [main.c:817]: INFO: signal 15 received<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19316]: INFO: &lt;core&gt; [main.c:817]: INFO: signal 15 received<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19307]: INFO: &lt;core&gt; [main.c:817]: INFO: signal 15 received<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19320]: INFO: &lt;core&gt; [main.c:817]: INFO: signal 15 received<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19318]: INFO: &lt;core&gt; [main.c:817]: INFO: signal 15 received<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Feb 24 06:00:39 debian /usr/local/sbin/kamailio[19301]: INFO: &lt;core&gt; [main.c:817]: INFO: signal 15 received<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>There is no error raised; So, shall I consider this as Kamailio crash and focus my search on this as you mentioned previously? Or I need help in achieving correct route script in the routing logic?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>F.Chahrour<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</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"'> sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] <b>On Behalf Of </b>Stoyan Mihaylov<br><b>Sent:</b> Friday, February 24, 2012 2:48 PM<br><b>To:</b> SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List<br><b>Subject:</b> Re: [SR-Users] DRouting cause Kamailio 3.2 to stop<o:p></o:p></span></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>I suppose - kamailio crashes. You can run in console on same server:<o:p></o:p></p><div><p class=MsoNormal>tail -f /var/log/syslog<o:p></o:p></p></div><div><p class=MsoNormal>or you can tail file where sys logs are stored.<o:p></o:p></p></div><div><p class=MsoNormal>There - you can see some debugs, and you can check discussion about kamailio crashes and how to get dump file.<o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>This way you will identify problem and then either you will fix your cfg file, or you can report bug.<o:p></o:p></p><div><p class=MsoNormal>On Thu, Feb 23, 2012 at 6:01 PM, Fatima Chahrour~Vanrise Support &lt;<a href="mailto:fchahrour@vanrise.com">fchahrour@vanrise.com</a>&gt; wrote:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hi,<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>I am newly experiencing kamailio 3.2. I have installed kamailio and MySQL and tried the test call from 1 PC(x-lite) to another PC(x-lite) and ended successfully.<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Now moving further, I have configured dynamic routing module and applied needed parameters and scripts to finally be able to start kamailio without any issue. Also I set a testing scenario in the related database tables<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>BUT my problem is that whenever am trying to call the predefined prefix (961) from x-lite am getting a &#8216;calling&#8217; message on it and then request timeout where I find that kamailio has stopped running. I kamctrl start again and call 961 then get calling so I wait and kamailio stps again. Below is the script used in the routing logic and database record.<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Any help to achieve a successful call is highly appreciated.<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>dr_gatways:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3, 1, '192.168.111.15', 0, '', '', 2, 'PC1'<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>dr_groups:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2, '.*', '.*', 0, 'Anyone'<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>dr_gw_lists:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2, '3', 'Test Call'<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>dr_rules:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2, '0', '961', '', 0, '1', '#2', 'Lebanon Fix'<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:13.5pt'><span style='font-size:10.0pt;font-family:"Courier New"'>####### Routing Logic ########</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:13.5pt'><span style='font-size:10.0pt;font-family:"Courier New"'># main request routing logic</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:13.5pt'><span style='font-size:10.0pt;font-family:"Courier New"'>route{</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:13.5pt'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:13.5pt'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp; if (is_method(&quot;INVITE&quot;)) {</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:13.5pt'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; setflag(1); # do accounting</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:13.5pt'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; route(4); # Call our dynamic route.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:13.5pt'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp; }</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:13.5pt'><span style='font-size:10.0pt;font-family:"Courier New"'>}</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&#8230;<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&#8230;<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&#8230;<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></p><pre style='line-height:13.5pt'>route[4] {<o:p></o:p></pre><pre style='line-height:13.5pt'>&nbsp; if (!do_routing(&quot;0&quot;)) {<o:p></o:p></pre><pre style='line-height:13.5pt'>&nbsp;&nbsp;&nbsp; send_reply(&quot;503&quot;, &quot;No Rules matching the URI&quot;);<o:p></o:p></pre><pre style='line-height:13.5pt'>&nbsp;&nbsp;&nbsp; exit;<o:p></o:p></pre><pre style='line-height:13.5pt'>&nbsp; }<o:p></o:p></pre><pre style='line-height:13.5pt'>&nbsp; if (is_method(&quot;INVITE&quot;)) {<o:p></o:p></pre><pre style='line-height:13.5pt'>&nbsp;&nbsp;&nbsp; t_on_failure(&quot;4&quot;);<o:p></o:p></pre><pre style='line-height:13.5pt'>&nbsp; }<o:p></o:p></pre><pre style='line-height:13.5pt'>route(RELAY);<o:p></o:p></pre><pre style='line-height:13.5pt'>}<o:p></o:p></pre><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>..<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>..<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>..<o:p></o:p></p><pre style='line-height:13.5pt'><o:p>&nbsp;</o:p></pre><pre style='line-height:13.5pt'>failure_route[4] {<o:p></o:p></pre><pre style='line-height:13.5pt'>&nbsp;&nbsp;&nbsp; if (use_next_gw()) {<o:p></o:p></pre><pre style='line-height:13.5pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_relay();<o:p></o:p></pre><pre style='line-height:13.5pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<o:p></o:p></pre><pre style='line-height:13.5pt'>&nbsp;&nbsp;&nbsp; } else {<o:p></o:p></pre><pre style='line-height:13.5pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_reply (&quot;503&quot;, &quot;Service not available&quot;);<o:p></o:p></pre><pre style='line-height:13.5pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<o:p></o:p></pre><pre style='line-height:13.5pt'>&nbsp;&nbsp;&nbsp; }<o:p></o:p></pre><pre style='line-height:13.5pt'>}<o:p></o:p></pre><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Thanks in Advance,<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>F.Chahrour<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><br>_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br><a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></div></body></html>