<DIV>Hi, Ram</DIV> <DIV> </DIV> <DIV>its Not looking up in aliases table , it look ups only on location table. the each request and responses .</DIV> <DIV><BR>So, You have to add your domain in the domain table by using :</DIV> <DIV><BR><SPAN style="FONT-WEIGHT: bold">insert into domain values('urs_domain', ' date) ; in openser databases tables. </SPAN><BR><BR>I do hope it can help you.</DIV> <DIV> </DIV> <DIV>Thanks.</DIV> <DIV><BR>On 8/22/06, ram <TALK2RAM@GMAIL.COM>wrote:<BR>><BR>> Hi all<BR>><BR>> iam trying to read the getting started document from onsip<BR>> when iam configuring pstn-gw.cfg<BR>> with the below config<BR>><BR>> when the X-lite user try to loging , SIP/2.0 403 Forbidden, in the Log of<BR>> X-lite<BR>><BR>> what is wrong , even i have changed AVP after reading module configs in<BR>> openser.<BR>><BR>> any one suggest me what is wrong iam doing
here<BR>><BR>> Ram<BR>><BR>> -----------------<BR>> openser.cfg<BR>> #<BR>> # $Id: openser.cfg,v 1.6 2006/02/15 18:23:46 bogdan_iancu Exp $<BR>> #<BR>> # simple quick-start config script<BR>> #<BR>><BR>> # ----------- global configuration parameters ------------------------<BR>><BR>> debug=9 # debug level (cmd line: -dddddddddd)<BR>> fork=yes<BR>> log_stderror=no # (cmd line: -E)<BR>><BR>> /* Uncomment these lines to enter debugging mode<BR>> #fork=no<BR>> #log_stderror=yes<BR>> */<BR>><BR>> check_via=no # (cmd. line: -v)<BR>> dns=no # (cmd. line: -r)<BR>> rev_dns=no # (cmd. line: -R)<BR>> listen=myip<BR>> port=5060<BR>> children=4<BR>> fifo="/tmp/openser_fifo"<BR>> fifo_db_url="mysql://openser:openserrw@localhost /openser"<BR>><BR>><BR>> # ------------------ module loading<BR>> ----------------------------------<BR>><BR>><BR>> loadmodule
"/usr/local/lib/openser/modules/mysql.so"<BR>> loadmodule "/usr/local/lib/openser/modules/sl.so"<BR>> loadmodule "/usr/local/lib/openser/modules/tm.so"<BR>> loadmodule "/usr/local/lib/openser/modules/rr.so"<BR>> loadmodule "/usr/local/lib/openser/modules/maxfwd.so"<BR>> loadmodule "/usr/local/lib/openser/modules/usrloc.so"<BR>> loadmodule "/usr/local/lib/openser/modules/registrar.so"<BR>> loadmodule "/usr/local/lib/openser/modules/textops.so"<BR>> loadmodule "/usr/local/lib/openser/modules/auth.so"<BR>> loadmodule "/usr/local/lib/openser/modules/auth_db.so"<BR>> loadmodule "/usr/local/lib/openser/modules/uri.so"<BR>> loadmodule "/usr/local/lib/openser/modules/uri_db.so"<BR>> loadmodule "/usr/local/lib/openser/modules/domain.so"<BR>> loadmodule "/usr/local/lib/openser/modules/mediaproxy.so"<BR>> loadmodule "/usr/local/lib/openser/modules/nathelper.so"<BR>> loadmodule "/usr/local/lib/openser/modules/avpops.so"<BR>> loadmodule
"/usr/local/lib/openser/modules/permissions.so"<BR>><BR>> modparam("auth_db|permissions|uri_db|usrloc","db_url",<BR>> "mysql://openser:openserrw@localhost/openser")<BR>> modparam("auth_db", "calculate_ha1", 1)<BR>> modparam("auth_db", "password_column", "password")<BR>><BR>> modparam("nathelper", "rtpproxy_disable", 1)<BR>> modparam("nathelper", "natping_interval", 0)<BR>><BR>> modparam("mediaproxy","natping_interval", 30)<BR>> modparam("mediaproxy","mediaproxy_socket",<BR>> "/var/run/mediaproxy.sock")<BR>> modparam("mediaproxy","sip_asymmetrics","/usr/local/etc/ser/sip-clients")<BR>> modparam("mediaproxy","rtp_asymmetrics","/usr/local/etc/ser/rtp-clients")<BR>><BR>> modparam("usrloc", "db_mode", 2)<BR>> modparam("auth_db", "calculate_ha1", yes)<BR>> modparam("auth_db", "password_column", "password")<BR>><BR>> modparam("registrar", "nat_flag", 6)<BR>><BR>> modparam("rr", "enable_full_lr", 1)<BR>><BR>>
modparam("tm", "fr_timer_avp", "i:25")<BR>> modparam("tm", "fr_inv_timer_avp", "i:25")<BR>><BR>> modparam("permissions", "db_mode", 1)<BR>> modparam("permissions", "trusted_table", "trusted")<BR>><BR>> route {<BR>><BR>> #<BR>> -----------------------------------------------------------------<BR>> # Sanity Check Section<BR>> #<BR>> -----------------------------------------------------------------<BR>> if (!mf_process_maxfwd_header("10")) {<BR>> sl_send_reply("483", "Too Many Hops");<BR>> return;<BR>> };<BR>><BR>> if (msg:len > max_len) {<BR>> sl_send_reply("513", "Message Overflow");<BR>> return;<BR>> };<BR>><BR>> #<BR>> -----------------------------------------------------------------<BR>> # Record Route Section<BR>> #<BR>> -----------------------------------------------------------------<BR>> if (method=="INVITE" && client_nat_test("3")) {<BR>> # INSERT YOUR IP ADDRESS
HERE<BR>><BR>> record_route_preset("myproxyip:5060;nat=yes");<BR>> } else if (method!="REGISTER") {<BR>> record_route();<BR>> };<BR>><BR>> #<BR>> -----------------------------------------------------------------<BR>> # Call Tear Down Section<BR>> #<BR>> -----------------------------------------------------------------<BR>> if (method=="BYE" || method=="CANCEL") {<BR>> end_media_session();<BR>> };<BR>><BR>> #<BR>> -----------------------------------------------------------------<BR>> # Loose Route Section<BR>> #<BR>> -----------------------------------------------------------------<BR>> if (loose_route()) {<BR>><BR>> if (has_totag() && (method=="INVITE" || method=="ACK")) {<BR>><BR>> if<BR>> (client_nat_test("3")||search("^Route:.*;nat=yes")){<BR>> setflag(6);<BR>> use_media_proxy();<BR>> };<BR>> };<BR>><BR>> route(1);<BR>> return;<BR>> };<BR>><BR>> #<BR>>
-----------------------------------------------------------------<BR>> # Call Type Processing Section<BR>> #<BR>> -----------------------------------------------------------------<BR>> if (!is_uri_host_local()) {<BR>> if (is_from_local() || allow_trusted()) {<BR>> route(4);<BR>> route(1);<BR>> } else {<BR>> sl_send_reply("403", "Forbidden");<BR>> };<BR>> return;<BR>> };<BR>><BR>> if (method=="CANCEL") {<BR>> route(1);<BR>> return;<BR>> } else if (method=="INVITE") {<BR>> route(3);<BR>> return;<BR>> } else if (method=="REGISTER") {<BR>> route(2);<BR>> return;<BR>> };<BR>><BR>> lookup("aliases");<BR>> if (uri!=myself) {<BR>> route(4);<BR>> route(1);<BR>> return;<BR>> };<BR>><BR>> if (!lookup("location")) {<BR>> sl_send_reply("404", "User Not Found");<BR>> return;<BR>> };<BR>><BR>> route(1);<BR>> }<BR>><BR>> route[1] {<BR>><BR>> #<BR>>
-----------------------------------------------------------------<BR>> # Default Message Handler<BR>> #<BR>> -----------------------------------------------------------------<BR>><BR>> t_on_reply("1");<BR>><BR>> if (!t_relay()) {<BR>><BR>> if (method=="INVITE" || method=="ACK") {<BR>> end_media_session();<BR>> };<BR>><BR>> sl_reply_error();<BR>> };<BR>> }<BR>><BR>> route[2] {<BR>><BR>> #<BR>> -----------------------------------------------------------------<BR>> # REGISTER Message Handler<BR>> #<BR>> -----------------------------------------------------------------<BR>><BR>> sl_send_reply("100", "Trying");<BR>><BR>> if (!search("^Contact:[ ]*\*") && client_nat_test("7")) {<BR>> setflag(6);<BR>> fix_nated_register();<BR>> force_rport();<BR>> };<BR>><BR>> if (!www_authorize("","subscriber")) {<BR>> www_challenge("","0");<BR>> return;<BR>> };<BR>><BR>> if
(!check_to()) {<BR>> sl_send_reply("401", "Unauthorized");<BR>> return;<BR>> };<BR>><BR>> consume_credentials();<BR>><BR>> if (!save("location")) {<BR>> sl_reply_error();<BR>> };<BR>> }<BR>><BR>> route[3] {<BR>><BR>> #<BR>> -----------------------------------------------------------------<BR>> # INVITE Message Handler<BR>> #<BR>> -----------------------------------------------------------------<BR>><BR>> if (!allow_trusted()) {<BR>><BR>> if (!proxy_authorize("","subscriber")) {<BR>> proxy_challenge("","0");<BR>> return;<BR>> } else if (!check_from()) {<BR>> sl_send_reply("403", "Use From=ID");<BR>> return;<BR>> };<BR>><BR>> consume_credentials();<BR>> };<BR>><BR>> if (client_nat_test("3")) {<BR>> setflag(7);<BR>> force_rport();<BR>> fix_nated_contact();<BR>> };<BR>><BR>> if (uri=~"^sip:1[0-9]{10}@") {<BR>> strip(1);<BR>> };<BR>><BR>>
lookup("aliases");<BR>> if (uri!=myself) {<BR>> route(4);<BR>> route(1);<BR>> return;<BR><BR>=== message truncated ===</DIV><BR><p> 
                <hr size=1>Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. <a href="http://us.rd.yahoo.com/mail_us/taglines/postman7/*http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com"> Great rates starting at 1¢/min.