<div>Hi,</div>
<div> </div>
<div>I would say ... first, if you can, stop the local database server.</div>
<div>Then, check in the serctl file the db hostname it uses ... it is probably set to localhost. Change it to the remote db server and it should work.</div>
<div> </div>
<div>Regards,</div>
<div> </div>
<div>Cesc<br><br> </div>
<div><span class="gmail_quote">On 10/24/05, <b class="gmail_sendername">ranveer kunal</b> <<a href="mailto:ranveerkunal@gmail.com">ranveerkunal@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hello Folks,<br> I am trying to use SER with some external database<br>(mysql), which is there on a remote system, no matter what I do, when
<br>I add a user via serctl, the user is added to local database server<br>only. I am sending my ser.cfg file, kindly help me thanks . .. .<br><br>-------------------------------------------------------------------------------------------------------------------
<br>#<br># $Id: ser.cfg,v <a href="http://1.25.2.1">1.25.2.1</a> 2005/02/18 14:30:44 andrei Exp $<br>#<br># simple quick-start config script<br>#<br><br># ----------- global configuration parameters ------------------------
<br><br>#debug=3 # 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=yes # (cmd. line: -v)
<br>dns=no # (cmd. line: -r)<br>rev_dns=no # (cmd. line: -R)<br>#port=5060<br>#children=4<br># advertised_address is the via header's FQDN<br>advertised_address="ran.test"<br>fifo="/tmp/ser_fifo"
<br>fifo_db_url="<a href="mysql://ser:heslo@skywalker/ser">mysql://ser:heslo@skywalker/ser</a>"<br><br># ------------------ module loading ----------------------------------<br><br># Uncomment this if you want to use SQL database
<br>loadmodule "/usr/local/lib/ser/modules/mysql.so"<br><br>loadmodule "/usr/local/lib/ser/modules/sl.so"<br>loadmodule "/usr/local/lib/ser/modules/tm.so"<br>loadmodule "/usr/local/lib/ser/modules/rr.so"
<br>loadmodule "/usr/local/lib/ser/modules/maxfwd.so"<br>loadmodule "/usr/local/lib/ser/modules/usrloc.so"<br>loadmodule "/usr/local/lib/ser/modules/registrar.so"<br>loadmodule "/usr/local/lib/ser/modules/textops.so"
<br>loadmodule "/usr/local/lib/ser/modules/options.so"<br><br># Uncomment this if you want digest authentication<br># mysql.so must be loaded !<br>loadmodule "/usr/local/lib/ser/modules/auth.so"<br>loadmodule "/usr/local/lib/ser/modules/auth_db.so"
<br>loadmodule "/usr/local/lib/ser/modules/uri_db.so"<br><br># ----------------- setting module-specific parameters ---------------<br># -- usrloc params --<br><br>#modparam("usrloc", "db_mode", 0)
<br><br># Uncomment this if you want to use SQL database<br># for persistent storage and comment the previous line<br>modparam("usrloc", "db_mode", 2)<br><br># -- 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")
<br><br>modparam("usrloc", "db_url", "<a href="mysql://ser:heslo@skywalker/ser">mysql://ser:heslo@skywalker/ser</a>")<br>modparam("auth_db", "db_url", "<a href="mysql://ser:heslo@skywalker/ser">
mysql://ser:heslo@skywalker/ser</a>")<br>modparam("uri_db", "db_url", "<a href="mysql://ser:heslo@skywalker/ser">mysql://ser:heslo@skywalker/ser</a>")<br><br># -- rr params --<br># add value to ;lr param to make some broken UAs happy
<br>modparam("rr", "enable_full_lr", 1)<br><br># ------------------------- request routing logic -------------------<br><br># main routing logic<br><br>route{<br><br> # initial sanity checks -- messages with
<br> # max_forwards==0, or excessively long requests<br> if (!mf_process_maxfwd_header("10")) {<br> sl_send_reply("483","Too Many Hops");<br> break;<br> };
<br> if (msg:len >= 2048 ) {<br> sl_send_reply("513", "Message too big");<br> break;<br> };<br><br><br> # we record-route all messages -- to make sure that<br>
# subsequent messages will go through our proxy; that's<br> # particularly good if upstream and downstream entities<br> # use different transport protocol<br> # if U want ip addr for RR just give record_route();
<br> if (!method=="REGISTER") record_route_preset("sip:ran.test");<br><br><br> # subsequent messages withing a dialog should take the<br> # path determined by record-routing<br> if (loose_route()) {
<br> # mark routing logic in request<br> append_hf("P-hint: rr-enforced\r\n");<br> route(1);<br> break;<br> };<br><br> if (!uri==myself) {<br> # mark routing logic in request
<br> append_hf("P-hint: outbound\r\n");<br> route(1);<br> break;<br> };<br><br> # if the request is for other domain use UsrLoc<br> # (in case, it does not work, use the following command
<br> # with proper names and addresses in it)<br> if (uri==myself) {<br><br> if (method=="REGISTER") {<br><br># Uncomment this if you want to use digest authentication<br># uncomment the 4 lines if U donot authentication.
<br> if (!www_authorize("skywalker", "subscriber")) {<br> www_challenge("skywalker", "0");<br> break;<br>
};<br><br> save("location");<br> break;<br> };<br><br> lookup("aliases");<br> if (!uri==myself) {<br>
append_hf("P-hint: outbound alias\r\n");<br> route(1);<br> break;<br> };<br><br> if ((method==OPTIONS) && (! uri=~"sip:.*[@]+.*")) {
<br> options_reply();<br> };<br><br> # native SIP destinations are handled using our USRLOC DB<br> if (!lookup("location")) {<br> sl_send_reply("404", "Not Found");
<br> break;<br> };<br> };<br> append_hf("P-hint: usrloc applied\r\n");<br> route(1);<br>}<br><br>route[1]<br>{<br> # send it out now; use stateful forwarding as it works reliably
<br> # even for UDP2TCP<br> #force_rport();<br># if (!(method==ACK | method=="CANCEL" | method=="BYE")) {<br>#comment 4 lines for non suth<br># if (!proxy_authorize("
sip.test", "subscriber")) {<br># proxy_challenge("sip.test","0");<br># break;<br># };<br># };<br> if (!t_relay()) {
<br> sl_reply_error();<br> };<br>}<br><br>_______________________________________________<br>Serusers mailing list<br><a href="mailto:Serusers@iptel.org">Serusers@iptel.org</a><br><a href="http://mail.iptel.org/mailman/listinfo/serusers">
http://mail.iptel.org/mailman/listinfo/serusers</a><br></blockquote></div><br>