<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2737.800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Trebuchet MS" size=2>Please make sure that the call is 
forwarded to your 5300. The if sentence must be (uri=~"^sip:1.*").</FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2>Also you can make a "debug ccsip message" 
in the gateway to see if the SIP INVITE comes in.</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=garych@unidial.com href="mailto:garych@unidial.com">gc</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=serusers@lists.iptel.org 
  href="mailto:serusers@lists.iptel.org">serusers@lists.iptel.org</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, May 28, 2004 4:51 PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [Serusers] Using AS5300 as PSTN 
  Gateway</DIV>
  <DIV><BR></DIV>
  <DIV><FONT size=2>I have a AS5300 setup as PSTN Gateway. It works fine with 
  VOCAL.</FONT></DIV>
  <DIV><FONT size=2>Now I'd like to connect SER to this PSTN 
  gateway.</FONT></DIV>
  <DIV><FONT size=2>I added following line to the default ser.cfg 
  file:</FONT></DIV>
  <DIV><FONT size=2>if (uri=~"^sip:1") {</FONT></DIV>
  <DIV><FONT size=2>&nbsp;&nbsp;&nbsp; log(1, "Forwarding to 
  PSTN\n"j);</FONT></DIV>
  <DIV><FONT size=2>&nbsp;&nbsp;&nbsp; forward(189.101.110.132, 
  5060);</FONT></DIV>
  <DIV><FONT size=2>&nbsp;&nbsp;&nbsp; break;</FONT></DIV>
  <DIV><FONT size=2>};</FONT></DIV>
  <DIV><FONT size=2></FONT>&nbsp;</DIV>
  <DIV><FONT size=2>This will allow any dialed number starting with 1 being 
  forward to PSTN gateway.</FONT></DIV>
  <DIV><FONT size=2>But it always give me busy signal.</FONT></DIV>
  <DIV><FONT size=2>Can anybody tell me what's wrong?</FONT></DIV>
  <DIV><FONT size=2></FONT>&nbsp;</DIV>
  <DIV><FONT size=2></FONT>&nbsp;</DIV>
  <DIV><FONT size=2>Here is my whole ser.cfg file:</FONT></DIV>
  <DIV><FONT size=2></FONT>&nbsp;</DIV>
  <DIV><FONT size=2>#<BR># $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei 
  Exp $<BR>#<BR># simple quick-start config script<BR>#</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2># ----------- global configuration parameters 
  ------------------------</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2>#debug=3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
  debug level (cmd line: -dddddddddd)<BR>#fork=yes<BR>#log_stderror=no&nbsp;# 
  (cmd line: -E)</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2>/* Uncomment these lines to enter debugging mode 
  <BR>fork=no<BR>log_stderror=yes&nbsp;<BR>debug=3<BR>*/</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2>check_via=no&nbsp;# (cmd. line: 
  -v)<BR>dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
  (cmd. line: -r)<BR>rev_dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: 
  -R)<BR>#port=5060<BR>#children=4<BR>fifo="/tmp/ser_fifo"</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2># ------------------ module loading 
  ----------------------------------</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2># Uncomment this if you want to use SQL 
  database<BR>loadmodule "/usr/lib/ser/modules/mysql.so"</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2>loadmodule "/usr/lib/ser/modules/sl.so"<BR>loadmodule 
  "/usr/lib/ser/modules/tm.so"<BR>loadmodule 
  "/usr/lib/ser/modules/rr.so"<BR>loadmodule 
  "/usr/lib/ser/modules/maxfwd.so"<BR>loadmodule 
  "/usr/lib/ser/modules/usrloc.so"<BR>loadmodule 
  "/usr/lib/ser/modules/registrar.so"</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2># Uncomment this if you want digest authentication<BR># 
  mysql.so must be loaded !<BR>loadmodule 
  "/usr/lib/ser/modules/auth.so"<BR>loadmodule 
  "/usr/lib/ser/modules/auth_db.so"</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2># ----------------- setting module-specific parameters 
  ---------------</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2># -- usrloc params --</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2>modparam("usrloc", "db_mode",&nbsp;&nbsp; 0)</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2># Uncomment this if you want to use SQL database <BR># for 
  persistent storage and comment the previous line<BR>modparam("usrloc", 
  "db_mode", 2)</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2># -- auth params --<BR># Uncomment if you are using auth 
  module<BR>#<BR>modparam("auth_db", "calculate_ha1", yes)<BR>#<BR># If you set 
  "calculate_ha1" parameter to yes (which true in this config), <BR># uncomment 
  also the following parameter)<BR>#<BR>modparam("auth_db", "password_column", 
  "password")</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2># -- rr params --<BR># add value to ;lr param to make some 
  broken UAs happy<BR>modparam("rr", "enable_full_lr", 1)</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2># -------------------------&nbsp; request routing logic 
  -------------------</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2># main routing logic</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2>route{</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2>&nbsp;# initial sanity checks -- messages with<BR>&nbsp;# 
  max_forwards==0, or excessively long requests<BR>&nbsp;if 
  (!mf_process_maxfwd_header("10")) {<BR>&nbsp;&nbsp;sl_send_reply("483","Too 
  Many Hops");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};<BR>&nbsp;if ( msg:len &gt; 
  max_len ) {<BR>&nbsp;&nbsp;sl_send_reply("513", "Message too 
  big");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2>&nbsp;# we record-route all messages -- to make sure 
  that<BR>&nbsp;# subsequent messages will go through our proxy; 
  that's<BR>&nbsp;# particularly good if upstream and downstream 
  entities<BR>&nbsp;# use different transport 
  protocol<BR>&nbsp;record_route();&nbsp;<BR>&nbsp;# loose-route 
  processing<BR>&nbsp;if (loose_route()) 
  {<BR>&nbsp;&nbsp;t_relay();<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2>&nbsp;# if the request is for other domain use 
  UsrLoc<BR>&nbsp;# (in case, it does not work, use the following 
  command<BR>&nbsp;# with proper names and addresses in it)<BR>&nbsp;if 
  (uri==myself) {</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2>&nbsp;&nbsp;if (method=="REGISTER") {</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2># Uncomment this if you want to use digest 
  authentication<BR>&nbsp;&nbsp;&nbsp;if (!www_authorize("vocal0", 
  "subscriber")) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;www_challenge("vocal0", 
  "0");<BR>&nbsp;&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;&nbsp;};</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT 
  size=2>&nbsp;&nbsp;&nbsp;save("location");<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2>&nbsp;&nbsp;# native SIP destinations are handled using our 
  USRLOC DB<BR>&nbsp;&nbsp;if (!lookup("location")) 
  {<BR>&nbsp;&nbsp;&nbsp;sl_send_reply("404", "Not 
  Found");<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};<BR>&nbsp;};<BR>#Handle 
  PSTN calls.<BR>&nbsp;if (uri=~"^sip:1") {<BR>&nbsp;&nbsp;log(1,"Forwarding to 
  PSTN\n");<BR>&nbsp;&nbsp;forward(189.101.110.132, 
  5060);<BR>&nbsp;&nbsp;break;<BR>&nbsp;};<BR><BR>&nbsp;# forward to current uri 
  now; use stateful forwarding; that<BR>&nbsp;# works reliably even if we 
  forward from TCP to UDP<BR>&nbsp;if (!t_relay()) 
  {<BR>&nbsp;&nbsp;sl_reply_error();<BR>&nbsp;};</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2>}</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2></FONT>&nbsp;</DIV>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Serusers mailing 
  list<BR>serusers@lists.iptel.org<BR>http://lists.iptel.org/mailman/listinfo/serusers<BR></BLOCKQUOTE></BODY></HTML>