Hi everybody,
I setup ser 0.8.14 with mysql support on fedora core 2. And two UA could connect over SER successfully.
I give a static IP to my SIP PROXY and followed ONSIP instructions about mediaproxy. But I could not register UAC's behind NAT.
begining of my route block:
if (method=="INVITE" && client_nat_test("3")) { # INSERT YOUR IP ADDRESS HERE record_route_preset("PROXY_IP:5060;nat=yes"); } else if (method!="REGISTER") { record_route(); };
# ----------------------------------------------------------------- # Call Tear Down Section # ----------------------------------------------------------------- if (method=="BYE" || method=="CANCEL") { end_media_session(); };
# ----------------------------------------------------------------- # Loose Route Section # ----------------------------------------------------------------- if (loose_route()) {
if (has_totag() && (method=="INVITE" || method=="ACK")) {
if (client_nat_test("3") || search("^Route:.*;nat=yes")) { setflag(6); use_media_proxy(); }; };
route(1); break; };
my register block:
# ----------------------------------------------------------------- # REGISTER Message Handler # ----------------------------------------------------------------
sl_send_reply("100", "Trying");
if (!search("^Contact:\ +*") && client_nat_test("7")) { setflag(6); fix_nated_contact(); force_rport(); };
if (!www_authorize("PROXY_IP","subscriber")) { www_challenge("PROXY_IP","0"); break; };
if (!check_to()) { sl_send_reply("401", "Unauthorized"); break; };
consume_credentials();
if (!save("location")) { sl_reply_error(); };
invite block:
# ----------------------------------------------------------------- # CANCEL and INVITE Message Handler # -----------------------------------------------------------------
if (client_nat_test("3")) { setflag(7); force_rport(); fix_nated_contact(); };
lookup("aliases"); if (uri!=myself) { route(1); break; };
if (!lookup("location")) { sl_send_reply("404", "User Not Found"); break; };
if (method=="CANCEL") { route(1); break; };
if (!proxy_authorize("PROXY_IP","subscriber")) { proxy_challenge("PROXY_IP","0"); break; } else if (!check_from()) { sl_send_reply("403", "Use From=ID"); break; };
consume_credentials();
if (isflagset(6) || isflagset(7)) { use_media_proxy(); };
route(1);
Any help would be appreciated...
From: Sönmez GünesSent: Thursday, May 26, 2005 5:30 PM
I give a static IP to my SIP PROXY and followed ONSIP instructions about mediaproxy. But I could not register UAC's behind NAT.
Check if SIP Proxy receives the REGISTER requests (using ethereal or ngrep). If you can't get the messages then the problem is outside of you SIP proxy and the messages are perhaps blocked by a firewall.
Franz
I followed messages with Etheral,
1. Sjphone to SER --> "Request : Register x.x.138.165" 2. SER to Sjphone --> "Status : 100 Trying ( 0 Bindings ) 3. SER to Sjphone --> "Status : 401 Unauthorized ( 0 Bindings )
???????
On 5/28/05, Franz Edler franz.edler@ycn.com wrote:
From: Sönmez GünesSent: Thursday, May 26, 2005 5:30 PM
I give a static IP to my SIP PROXY and followed ONSIP instructions about mediaproxy. But I could not register UAC's behind NAT.
Check if SIP Proxy receives the REGISTER requests (using ethereal or ngrep). If you can't get the messages then the problem is outside of you SIP proxy and the messages are perhaps blocked by a firewall.
Franz
From: Sönmez Güneş Sent: Saturday, May 28, 2005 3:07 PM
- Sjphone to SER --> "Request : Register x.x.138.165"
- SER to Sjphone --> "Status : 100 Trying ( 0 Bindings )
- SER to Sjphone --> "Status : 401 Unauthorized ( 0 Bindings )
So, this is totally normal. In the first try, the Sjphone does not send the necessary credentials for registering. The "401 Unauthorized" response should retrigger another REGISTER request from Sjphone with the correct credentials.
When this does not happen, your Sjphone is probably not correctly configured to find the matching credentials.
Franz
Sjpphone should then respond with a new REGISTER, this time with the authentication credentials. It looks like you haven't set up Sjphone correctly with your credentials (Init). g-)
Sönmez Günes wrote:
I followed messages with Etheral,
- Sjphone to SER --> "Request : Register x.x.138.165"
- SER to Sjphone --> "Status : 100 Trying ( 0 Bindings )
- SER to Sjphone --> "Status : 401 Unauthorized ( 0 Bindings )
???????
On 5/28/05, Franz Edler franz.edler@ycn.com wrote:
From: Sönmez GünesSent: Thursday, May 26, 2005 5:30 PM
I give a static IP to my SIP PROXY and followed ONSIP instructions about mediaproxy. But I could not register UAC's behind NAT.
Check if SIP Proxy receives the REGISTER requests (using ethereal or ngrep). If you can't get the messages then the problem is outside of you SIP proxy and the messages are perhaps blocked by a firewall.
Franz
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers