Hi,<br><br>thanks for your reply. can you please guide me where I&#39;ve to set this flag in my ser.cfg file.<br><br>thanks<br>arun<br><br><div><span class="gmail_quote">On 1/11/07, <b class="gmail_sendername">Greger V. Teigre
</b> &lt;<a href="mailto:greger@teigre.com">greger@teigre.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


  

<div bgcolor="#ffffff" text="#000000">
Do you need to proxy calls to asterisk? If that is the case, you need
to make sure that the NAT flag is set.<br>
g-)<br>
<br>
Arun Kumar wrote:
<blockquote cite="http://mida70a109b0701101957k714d2682s996db572965ba5f8@mail.gmail.com" type="cite"><div><span class="e" id="q_110109d4c222cdba_1">Hi,<br>
  <br>
I&#39;ve configured my SER to send calls to my Asterisk server when user
connects to ser and dial a number ser forwards this to my Asterisk
server and my asterisk server ask for my pin number saying &quot;Please
enter your pin number&quot;. In this config I&#39;m using
rewritehostport(ip:port) to forward the calls and its working fine.
But, Now I&#39;ve implemented the LCR when I see ngrep calls are going to
my asterisk server but I&#39;m not able to hear any sound from my asterisk
server saying &quot;enter your pin number&quot;. Please help in this issue. Here
is my ser.cfg file :<br>
  <br>
&nbsp; debug=3<br>
&nbsp; fork=no<br>
&nbsp; log_stderror=yes<br>
  <br>
&nbsp; listen=<a href="http://192.168.2.210" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">192.168.2.210</a>&nbsp;&nbsp;&nbsp;&nbsp; # INSERT
YOUR IP ADDRESS HERE<br>
&nbsp; port=5060<br>
&nbsp; children=4<br>
  <br>
&nbsp; dns=no<br>
&nbsp; rev_dns=no
  <br>
&nbsp; fifo=&quot;/tmp/ser_fifo&quot;<br>
&nbsp; fifo_db_url=&quot;mysql://ser:arun@localhost/ser&quot;<br>
  <br>
loadmodule &quot;/usr/local/lib/ser/modules/mysql.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/sl.so&quot;
  <br>
loadmodule &quot;/usr/local/lib/ser/modules/tm.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/rr.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/maxfwd.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/usrloc.so&quot;
  <br>
loadmodule &quot;/usr/local/lib/ser/modules/registrar.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/auth.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/auth_db.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/uri.so&quot;
  <br>
loadmodule &quot;/usr/local/lib/ser/modules/uri_db.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/domain.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/nathelper.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/avpops.so&quot;
  <br>
loadmodule &quot;/usr/local/lib/ser/modules/textops.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/mediaproxy.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/permissions.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/acc.so&quot;
  <br>
loadmodule &quot;/usr/local/lib/ser/modules/auth_radius.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/lcr.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/xlog.so&quot;<br>
  <br>
&nbsp; modparam(&quot;auth_db|permissions|uri_db|usrloc|domain&quot;, &quot;db_url&quot;,&nbsp; &quot;
mysql://ser:arun@localhost/ser&quot;)<br>
&nbsp; modparam(&quot;auth_db&quot;, &quot;calculate_ha1&quot;, 1)<br>
&nbsp; modparam(&quot;auth_db&quot;, &quot;password_column&quot;, &quot;password&quot;)<br>
  <br>
&nbsp; modparam(&quot;nathelper&quot;, &quot;rtpproxy_disable&quot;, 1)
  <br>
&nbsp; modparam(&quot;nathelper&quot;, &quot;natping_interval&quot;, 0)<br>
  <br>
&nbsp; modparam(&quot;mediaproxy&quot;,&quot;natping_interval&quot;, 30)<br>
&nbsp; modparam(&quot;mediaproxy&quot;,&quot;mediaproxy_socket&quot;,
&quot;/var/run/mediaproxy.sock&quot;)
  <br>
#&nbsp;
modparam(&quot;mediaproxy&quot;,&quot;sip_asymmetrics&quot;,&quot;/usr/local/etc/ser/sip-clients&quot;)<br>
#&nbsp;
modparam(&quot;mediaproxy&quot;,&quot;rtp_asymmetrics&quot;,&quot;/usr/local/etc/ser/rtp-clients&quot;)<br>
  <br>
&nbsp; modparam(&quot;usrloc&quot;, &quot;db_mode&quot;, 2)<br>
  <br>
&nbsp; modparam(&quot;registrar&quot;, &quot;nat_flag&quot;, 6)<br>
  <br>
&nbsp; modparam(&quot;rr&quot;, &quot;enable_full_lr&quot;, 1)<br>
  <br>
&nbsp; modparam(&quot;tm&quot;, &quot;fr_inv_timer&quot;, 120)
  <br>
&nbsp; modparam(&quot;tm&quot;, &quot;fr_inv_timer_avp&quot;, &quot;inv_timeout&quot;)<br>
  <br>
&nbsp; modparam(&quot;permissions&quot;, &quot;db_mode&quot;, 1)<br>
&nbsp; modparam(&quot;permissions&quot;, &quot;trusted_table&quot;, &quot;trusted&quot;)
  <br>
  <br>
&nbsp;modparam(&quot;lcr&quot;,&quot;db_url&quot;, &quot;mysql://ser:arun@localhost/ser&quot;)<br>
&nbsp;modparam(&quot;lcr&quot;,&quot;gw_table&quot;,&quot;gw&quot;)<br>
&nbsp;modparam(&quot;lcr&quot;,&quot;gw_name_column&quot;,&quot;gw_name&quot;)
  <br>
&nbsp;modparam(&quot;lcr&quot;,&quot;ip_addr_column&quot;,&quot;ip_addr&quot;)<br>
&nbsp;modparam(&quot;lcr&quot;,&quot;port_column&quot;,&quot;port&quot;)<br>
&nbsp;modparam(&quot;lcr&quot;,&quot;grp_id_column&quot;,&quot;grp_id&quot;)
  <br>
&nbsp;modparam(&quot;lcr&quot;,&quot;lcr_table&quot;,&quot;lcr&quot;)<br>
&nbsp;modparam(&quot;lcr&quot;,&quot;prefix_column&quot;,&quot;prefix&quot;)<br>
&nbsp;modparam(&quot;lcr&quot;,&quot;from_uri_column&quot;,&quot;from_uri&quot;)
  <br>
&nbsp;modparam(&quot;lcr&quot;,&quot;priority_column&quot;,&quot;priority&quot;)<br>
&nbsp;modparam(&quot;lcr&quot;,&quot;contact_avp&quot;,&quot;1401&quot;)<br>
&nbsp;modparam(&quot;lcr&quot;,&quot;fr_inv_timer_avp&quot;,&quot;fr_inv_timer_avp&quot;)
  <br>
&nbsp;modparam(&quot;lcr&quot;,&quot;fr_inv_timer&quot;,90)<br>
&nbsp;modparam(&quot;lcr&quot;,&quot;fr_inv_timer_next&quot;,60)<br>
# ------ Account and Radius modules--------------<br>
modparam(&quot;acc&quot;, &quot;db_url&quot;, &quot;
mysql://ser:arun@localhost/ser&quot;)<br>
  <br>
modparam(&quot;acc&quot;,&quot;log_level&quot;,1)<br>
modparam(&quot;acc&quot;,&quot;log_flag&quot;,1)<br>
modparam(&quot;acc&quot;, &quot;db_flag&quot;, 1)<br>
  <br>
modparam(&quot;acc&quot;,&quot;radius_flag&quot;,1)
  <br>
modparam(&quot;acc&quot;,&quot;service_type&quot;,15)<br>
#modparam(&quot;acc&quot;,&quot;radius_config&quot;,&quot;/usr/local/etc/radiusclient-ng/radiusclient.conf&quot;)<br>
  <br>
  <br>
&nbsp; route {<br>
  <br>
&nbsp;&nbsp;&nbsp; # -----------------------------------------------------------------
  <br>
&nbsp;&nbsp;&nbsp; # Sanity Check Section<br>
&nbsp;&nbsp;&nbsp; # -----------------------------------------------------------------<br>
&nbsp;&nbsp;&nbsp; if (!mf_process_maxfwd_header(&quot;10&quot;)) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;483&quot;, &quot;Too Many Hops&quot;);
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&nbsp;&nbsp;&nbsp; };<br>
  <br>
&nbsp;&nbsp;&nbsp; if (msg:len &gt; max_len) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;513&quot;, &quot;Message Overflow&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&nbsp;&nbsp;&nbsp; };<br>
  <br>
if (!load_gws()) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;500&quot;, &quot;Server Internal Error - Cannot load
gateways&quot;);
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog(&quot;L_INFO&quot;, &quot;\n[SER]: - [$Tf] Method: &lt;$rm&gt; R-uri:
&lt;$ru&gt; From: &lt;$fu&gt;To &lt;$tu&gt;&nbsp; : Successfully Loaded
Gateway List\n&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };
  <br>
  <br>
&nbsp;&nbsp;&nbsp; # -----------------------------------------------------------------<br>
&nbsp;&nbsp;&nbsp; # Record Route Section<br>
&nbsp;&nbsp;&nbsp; # -----------------------------------------------------------------<br>
&nbsp;&nbsp;&nbsp; if (method==&quot;INVITE&quot; &amp;&amp; client_nat_test(&quot;3&quot;)) { <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # INSERT YOUR IP ADDRESS HERE<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; record_route_preset(&quot;<a href="http://192.168.2.210:5060" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">192.168.2.210:5060</a>;nat=yes&quot;);<br>
&nbsp;&nbsp;&nbsp; } else if (method!=&quot;REGISTER&quot;) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; record_route();
  <br>
&nbsp;&nbsp;&nbsp; };<br>
  <br>
  <br>
&nbsp;&nbsp;&nbsp; # -----------------------------------------------------------------<br>
&nbsp;&nbsp;&nbsp; # Call Tear Down Section<br>
&nbsp;&nbsp;&nbsp; # -----------------------------------------------------------------<br>
&nbsp;&nbsp;&nbsp; if (method==&quot;BYE&quot; || method==&quot;CANCEL&quot;) {&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp; setflag(1);<br>
&nbsp;&nbsp;&nbsp;&nbsp; end_media_session();<br>
&nbsp;&nbsp;&nbsp; };<br>
  <br>
&nbsp;&nbsp;&nbsp; # -----------------------------------------------------------------<br>
&nbsp;&nbsp;&nbsp; # Loose Route Section<br>
&nbsp;&nbsp;&nbsp; # -----------------------------------------------------------------
  <br>
&nbsp;&nbsp;&nbsp; if (loose_route()) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ((method==&quot;INVITE&quot; || method==&quot;REFER&quot;) &amp;&amp;
!has_totag()) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;403&quot;, &quot;Forbidden Cant cross 1st bridge&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method==&quot;INVITE&quot;) {<br>
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!allow_trusted()) {<br>
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!proxy_authorize(&quot;&quot;,&quot;subscriber&quot;)) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_challenge(&quot;&quot;,&quot;0&quot;);
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else if (!check_from()) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;403&quot;, &quot;Use From=ID&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; consume_credentials();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };
  <br>
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (client_nat_test(&quot;3&quot;)||search(&quot;^Route:.*;nat=yes&quot;)){<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setflag(6);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use_media_proxy();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; route(1);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&nbsp; };
  <br>
  <br>
&nbsp; # -----------------------------------------------------------------<br>
&nbsp; # Call Type Processing Section<br>
&nbsp; # -----------------------------------------------------------------<br>
&nbsp; if (!is_uri_host_local()) {<br>
&nbsp;&nbsp;&nbsp; if (is_from_local() || allow_trusted()) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;404&quot;, &quot;I am trusted host, &quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; route(4);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; route(1);<br>
&nbsp;&nbsp;&nbsp; } else {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;403&quot;, &quot;Forbidden, I am here&quot;);
  <br>
&nbsp;&nbsp;&nbsp; };<br>
&nbsp;&nbsp;&nbsp; break;<br>
&nbsp; };<br>
  <br>
&nbsp; if (method==&quot;ACK&quot;) {&nbsp; <br>
&nbsp;&nbsp;&nbsp; setflag(1);<br>
&nbsp;&nbsp;&nbsp; route(1);<br>
&nbsp;&nbsp;&nbsp; break;<br>
&nbsp; } if (method==&quot;CANCEL&quot;) {&nbsp; <br>
&nbsp;&nbsp;&nbsp; setflag(1);<br>
&nbsp;&nbsp;&nbsp; route(1);<br>
&nbsp;&nbsp;&nbsp; break;<br>
&nbsp; } else if (method==&quot;INVITE&quot;) {&nbsp; <br>
&nbsp;&nbsp;&nbsp; setflag(1);<br>
&nbsp;&nbsp;&nbsp; route(3);<br>
&nbsp;&nbsp;&nbsp; break;<br>
&nbsp; } else&nbsp; if (method==&quot;REGISTER&quot;) {<br>
&nbsp;&nbsp;&nbsp; route(2);<br>
&nbsp;&nbsp;&nbsp; break;<br>
&nbsp; };<br>
  <br>
&nbsp; lookup(&quot;aliases&quot;);<br>
&nbsp; if (!is_uri_host_local()) {<br>
&nbsp;&nbsp;&nbsp; route(4);<br>
&nbsp;&nbsp;&nbsp; route(1);<br>
&nbsp;&nbsp;&nbsp; break;<br>
&nbsp; };<br>
  <br>
&nbsp; if (!lookup(&quot;location&quot;)) {<br>
&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;404&quot;, &quot;User Not Found&quot;);<br>
&nbsp;&nbsp;&nbsp; break;<br>
&nbsp; };<br>
  <br>
&nbsp; route(1);<br>
}<br>
  <br>
route[1] {<br>
  <br>
&nbsp; # -----------------------------------------------------------------<br>
&nbsp; # Default Message Handler<br>
&nbsp; # -----------------------------------------------------------------<br>
&nbsp; t_on_reply(&quot;1&quot;);<br>
  <br>
&nbsp; if (!t_relay()) {<br>
  <br>
&nbsp;&nbsp;&nbsp; if (method==&quot;INVITE&quot; || method==&quot;ACK&quot;) {&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setflag(1);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end_media_session();<br>
&nbsp;&nbsp;&nbsp; };<br>
  <br>
&nbsp;&nbsp;&nbsp; sl_reply_error();<br>
&nbsp; };<br>
  <br>
}<br>
route[2] {<br>
  <br>
&nbsp; # -----------------------------------------------------------------<br>
&nbsp; # REGISTER Message Handler<br>
&nbsp; # -----------------------------------------------------------------<br>
  <br>
&nbsp; sl_send_reply(&quot;100&quot;, &quot;Trying&quot;);
  <br>
  <br>
&nbsp; if (!search(&quot;^Contact:[ ]*\*&quot;) &amp;&amp; client_nat_test(&quot;7&quot;)) {<br>
&nbsp;&nbsp;&nbsp; setflag(6);<br>
&nbsp;&nbsp;&nbsp; fix_nated_register();<br>
&nbsp;&nbsp;&nbsp; force_rport();<br>
&nbsp; };<br>
  <br>
&nbsp; if (!www_authorize(&quot;&quot;,&quot;subscriber&quot;)) {
  <br>
&nbsp;&nbsp;&nbsp; www_challenge(&quot;&quot;,&quot;0&quot;);<br>
&nbsp;&nbsp;&nbsp; break;<br>
&nbsp; };<br>
  <br>
&nbsp; if (!check_to()) {<br>
&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;401&quot;, &quot;Unauthorized&quot;);<br>
&nbsp;&nbsp;&nbsp; break;<br>
&nbsp; };<br>
  <br>
&nbsp; consume_credentials();<br>
  <br>
&nbsp; if (!save(&quot;location&quot;)) {<br>
&nbsp;&nbsp;&nbsp; sl_reply_error();<br>
&nbsp; };<br>
  <br>
}<br>
route[3] {<br>
  <br>
&nbsp; # -----------------------------------------------------------------<br>
&nbsp; # INVITE Message Handler<br>
&nbsp; # -----------------------------------------------------------------
  <br>
  <br>
&nbsp; if (client_nat_test(&quot;3&quot;)) {<br>
&nbsp;&nbsp;&nbsp; setflag(7);<br>
&nbsp;&nbsp;&nbsp; force_rport();<br>
&nbsp;&nbsp;&nbsp; fix_nated_contact();<br>
&nbsp; };<br>
  <br>
&nbsp; if (!allow_trusted()) {<br>
  <br>
&nbsp;&nbsp;&nbsp; if (!proxy_authorize(&quot;&quot;,&quot;subscriber&quot;)) {
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_challenge(&quot;&quot;,&quot;0&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&nbsp;&nbsp;&nbsp; } else if (!check_from()) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;403&quot;, &quot;Use From=ID&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&nbsp;&nbsp;&nbsp; };<br>
  <br>
&nbsp;&nbsp;&nbsp; consume_credentials();
  <br>
&nbsp; };<br>
  <br>
&nbsp; if (!is_uri_host_local()) {<br>
&nbsp;&nbsp;&nbsp; route(4);<br>
&nbsp;&nbsp;&nbsp; route(1);<br>
&nbsp;&nbsp;&nbsp; break;<br>
&nbsp; };<br>
  <br>
if (!next_gw()) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_reply(&quot;503&quot;, &quot;Service not available - No more gateways&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_failure(&quot;2&quot;);&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_relay();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>
  <br>
&nbsp;route(4);<br>
&nbsp;route(1);<br>
}<br>
  <br>
route[4] {<br>
  <br>
&nbsp; # -----------------------------------------------------------------
  <br>
&nbsp; # NAT Traversal Section<br>
&nbsp; # -----------------------------------------------------------------<br>
  <br>
&nbsp; if (isflagset(6) || isflagset(7)) {<br>
&nbsp;&nbsp;&nbsp; if (!isflagset(8)) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setflag(8);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use_media_proxy();
  <br>
&nbsp;&nbsp;&nbsp; };<br>
&nbsp; };<br>
}<br>
  <br>
#route[5] {<br>
  <br>
&nbsp; # -----------------------------------------------------------------<br>
&nbsp; # PSTN Handler<br>
&nbsp; # -----------------------------------------------------------------<br>
  <br>
#&nbsp; rewritehostport(&quot;
  <a href="http://192.168.2.202:5060" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">192.168.2.202:5060</a>&quot;); #
INSERT YOUR PSTN GATEWAY IP ADDRESS<br>
  <br>
#&nbsp; avp_write(&quot;i:45&quot;, &quot;inv_timeout&quot;);<br>
  <br>
#&nbsp; route(1);<br>
#}<br>
  <br>
onreply_route[1] {<br>
xlog(&quot;L_INFO&quot;, &quot;In onreply route&quot;);<br>
&nbsp; if ((isflagset(6) || isflagset(7)) &amp;&amp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (status=~&quot;(180)|(183)|2[0-9][0-9]&quot;)) {<br>
  <br>
&nbsp;&nbsp;&nbsp; if (!search(&quot;^Content-Length:[ ]*0&quot;)) {
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use_media_proxy();<br>
&nbsp;&nbsp;&nbsp; };<br>
&nbsp; };<br>
  <br>
&nbsp; if (client_nat_test(&quot;1&quot;)) {<br>
&nbsp;&nbsp;&nbsp; fix_nated_contact();<br>
&nbsp; };<br>
}<br>
  <br>
&nbsp;failure_route[2] {<br>
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!next_gw()) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_reply(&quot;503&quot;, &quot;Service not available - No more gateways&quot;);
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_failure(&quot;2&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_relay();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; }<br>
  <br>
  <br>
thanks<br>
arun<br>
  </span></div><pre><hr size="4" width="90%">
_______________________________________________<br>Serusers mailing list<br><a href="mailto:Serusers@lists.iptel.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Serusers@lists.iptel.org</a>
<a href="http://lists.iptel.org/mailman/listinfo/serusers" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.iptel.org/mailman/listinfo/serusers</a>
  </pre>
</blockquote>
</div>


</blockquote></div><br>