<div dir="ltr"><div><em>Hi all,<br></em><i> I'm trying to register few ata's to openser.</i></div>
<div><em>i puted two registrations to subscribers table.</em></div>
<div><em>but registaration allwais unauthorized.</em></div>
<div><em></em> </div>
<div><em></em> </div>
<div><em>ngrep output: </em></div>
<div><em>interface: eth0 (<a href="http://192.168.27.0/255.255.255.0">192.168.27.0/255.255.255.0</a>)<br>filter: (ip) and ( port 5060 )</em></div>
<div><em>U <a href="http://192.168.27.117:10186">192.168.27.117:10186</a> -> <a href="http://192.168.27.201:5060">192.168.27.201:5060</a><br>REGISTER sip:<a href="http://192.168.27.201">192.168.27.201</a> SIP/2.0.<br>
Via: SIP/2.0/UDP 192.168.27.117:10186;branch=z9hG4bK645148049;rport.<br>From: <<a href="mailto:sip%3A1000@192.168.27.201">sip:1000@192.168.27.201</a>>;tag=604945105.<br>To: <<a href="mailto:sip%3A1000@192.168.27.201">sip:1000@192.168.27.201</a>>.<br>
Call-ID: <a href="mailto:53873712-10186-1@192.168.27.117">53873712-10186-1@192.168.27.117</a>.<br>CSeq: 2000 REGISTER.<br>Contact: *.<br>Max-Forwards: 70.<br>User-Agent: Grandstream HT-502 V1.0B <a href="http://1.0.1.8">1.0.1.8</a>.<br>
Expires: 0.<br>Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE.<br>Content-Length: 0.<br>.</em></div><em>
<div><br>U <a href="http://192.168.27.201:5060">192.168.27.201:5060</a> -> <a href="http://192.168.27.117:10186">192.168.27.117:10186</a><br>SIP/2.0 401 Unauthorized.<br>Via: SIP/2.0/UDP 192.168.27.117:10186;branch=z9hG4bK645148049;rport=10186.<br>
From: <<a href="mailto:sip%3A1000@192.168.27.201">sip:1000@192.168.27.201</a>>;tag=604945105.<br>To: <<a href="mailto:sip%3A1000@192.168.27.201">sip:1000@192.168.27.201</a>>;tag=329cfeaa6ded039da25ff8cbb8668bd2.b963.<br>
Call-ID: <a href="mailto:53873712-10186-1@192.168.27.117">53873712-10186-1@192.168.27.117</a>.<br>CSeq: 2000 REGISTER.<br>WWW-Authenticate: Digest realm="<a href="http://192.168.27.201">192.168.27.201</a>", nonce="48998a3ba4544026eab5a8f7cf93dc258a5d26d7".<br>
Server: OpenSER (1.3.2-notls (i386/linux)).<br>Content-Length: 0.<br>.<br>U <a href="http://192.168.27.117:10186">192.168.27.117:10186</a> -> <a href="http://192.168.27.201:5060">192.168.27.201:5060</a><br>REGISTER sip:<a href="http://192.168.27.201">192.168.27.201</a> SIP/2.0.<br>
Via: SIP/2.0/UDP 192.168.27.117:10186;branch=z9hG4bK142179605;rport.<br>From: <<a href="mailto:sip%3A1000@192.168.27.201">sip:1000@192.168.27.201</a>>;tag=604945105.<br>To: <<a href="mailto:sip%3A1000@192.168.27.201">sip:1000@192.168.27.201</a>>.<br>
Call-ID: <a href="mailto:53873712-10186-1@192.168.27.117">53873712-10186-1@192.168.27.117</a>.<br>CSeq: 2001 REGISTER.<br>Contact: *.<br>Authorization: Digest username="1000", realm="<a href="http://192.168.27.201">192.168.27.201</a>", nonce="48998a3ba4544026eab5a8f7cf93dc258a5d26d7", uri="sip:19$<br>
Max-Forwards: 70.<br>User-Agent: Grandstream HT-502 V1.0B <a href="http://1.0.1.8">1.0.1.8</a>.<br>Expires: 0.<br>Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE.<br>Content-Length: 0.<br>
.</div>
<div><br>U <a href="http://192.168.27.201:5060">192.168.27.201:5060</a> -> <a href="http://192.168.27.117:10186">192.168.27.117:10186</a><br>SIP/2.0 401 Unauthorized.<br>Via: SIP/2.0/UDP 192.168.27.117:10186;branch=z9hG4bK142179605;rport=10186.<br>
From: <<a href="mailto:sip%3A1000@192.168.27.201">sip:1000@192.168.27.201</a>>;tag=604945105.<br>To: <<a href="mailto:sip%3A1000@192.168.27.201">sip:1000@192.168.27.201</a>>;tag=329cfeaa6ded039da25ff8cbb8668bd2.3c26.<br>
Call-ID: <a href="mailto:53873712-10186-1@192.168.27.117">53873712-10186-1@192.168.27.117</a>.<br>CSeq: 2001 REGISTER.<br>WWW-Authenticate: Digest realm="<a href="http://192.168.27.201">192.168.27.201</a>", nonce="48998a3ba4544026eab5a8f7cf93dc258a5d26d7".<br>
Server: OpenSER (1.3.2-notls (i386/linux)).<br>Content-Length: 0.<br></div>
<div> </div>
<div>openser.cfg</div>
<div> </div>
<div>:#<br># $Id: openser.cfg 1676 2007-02-21 13:16:34Z bogdan_iancu $<br>#<br># simple quick-start config script<br># Please refer to the Core CookBook at <a href="http://www.openser.org/dokuwiki/doku.php">http://www.openser.org/dokuwiki/doku.php</a><br>
# for a explanation of possible statements, functions and parameters.<br>#</div>
<div># ----------- global configuration parameters ------------------------</div>
<div>debug=3 # debug level (cmd line: -dddddddddd)<br>fork=yes<br>log_stderror=no # (cmd line: -E)<br>children=4</div>
<div># Uncomment these lines to enter debugging mode <br>#fork=no<br>#log_stderror=yes<br>#</div>
<div>port=5060<br># ------------------ module loading ----------------------------------</div>
<div>#set module path<br>mpath="//lib/openser/modules/"</div>
<div># Uncomment this if you want to use SQL database<br>loadmodule "mysql.so"</div>
<div>loadmodule "sl.so"<br>loadmodule "tm.so"<br>loadmodule "rr.so"<br>loadmodule "maxfwd.so"<br>loadmodule "usrloc.so"<br>loadmodule "registrar.so"<br>loadmodule "textops.so"<br>
loadmodule "mi_fifo.so"</div>
<div># Uncomment this if you want digest authentication<br># mysql.so must be loaded !<br>loadmodule "auth.so"<br>loadmodule "auth_db.so"<br># ----------------- setting module-specific parameters ---------------</div>
<div># -- mi_fifo params --</div>
<div>modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")</div>
<div># -- usrloc params --</div>
<div>#modparam("usrloc", "db_mode", 0)</div>
<div># Uncomment this if you want to use SQL database<br># for persistent storage and comment the previous line<br>modparam("usrloc", "db_mode", 2)</div>
<div># -- 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")</div>
<div># -- rr params --<br># add value to ;lr param to make some broken UAs happy<br>modparam("rr", "enable_full_lr", 1)</div>
<div># ------------------------- request routing logic -------------------<br># main routing logic</div>
<div>route{</div>
<div> # 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>
exit;<br> };</div>
<div> if (msg:len >= 2048 ) {<br> sl_send_reply("513", "Message too big");<br> exit;<br> };</div>
<div> # 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 (!method=="REGISTER")<br> record_route();</div>
<div> # 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> };</div>
<div> if (!uri==myself) {<br> # mark routing logic in request<br> append_hf("P-hint: outbound\r\n");<br> # if you have some interdomain connections via TLS<br> #if(uri=~"@<a href="http://tls_domain1.net">tls_domain1.net</a>") {<br>
# t_relay("tls:<a href="http://domain1.net">domain1.net</a>");<br> # exit;<br> #} else if(uri=~"@<a href="http://tls_domain2.net">tls_domain2.net</a>") {<br> # t_relay("tls:<a href="http://domain2.net">domain2.net</a>");<br>
# exit;<br> #}<br> route(1);<br> };</div>
<div> # 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) {</div>
<div> if (method=="REGISTER") {<br> # Uncomment this if you want to use digest.<br> if (!www_authorize("", "subscriber")) {<br> www_challenge("", "0");<br>
exit;<br> };<br> save("location");<br> exit;<br> };</div>
<div> if (!proxy_authorize("","subscriber")) {<br> proxy_challenge("","0");<br> exit;<br> };</div>
<div> consume_credentials();</div>
<div> lookup("aliases");<br> if (!uri==myself) {<br> append_hf("P-hint: outbound alias\r\n");<br> route(1);<br> };</div>
<div> # native SIP destinations are handled using our USRLOC DB<br> if (!lookup("location")) {<br> sl_send_reply("404", "Not Found");<br> exit;<br> };<br>
append_hf("P-hint: usrloc applied\r\n");<br> };<br> route(1);<br>}</div>
<div>route[1] {<br> # send it out now; use stateful forwarding as it works reliably<br> # even for UDP2TCP<br> if (!t_relay()) {<br> sl_reply_error();<br> };<br> exit;<br>}<br></div>
<div> </div>
<div> </div>
<div> </div>
<div>can not understand why this configuration is not working to me???</div>
<div>any help will be apreciated.</div>
<div> </div></em></div>