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...