hi:
I isntall the openser-1.2.2-notls under the centos5. I config the INVITE method like this:
if (is_method("INVITE")) { # enable Record-Route record_route();
# Is this to one of our numbers if (lookup("location")) { append_hf("P-hint: userloc applied\r\n"); } else { sl_send_reply("404","Not found"); } } route(1);
...
route[1] { if (isflagset(2)) { if (is_method("INVITE")) { t_on_reply("1"); t_on_failure("1"); use_media_proxy(); } else if (is_method("BYE|CANCEL")) { end_media_session(); } }
# send it out now; use stateful forwarding as it works reliably # even for UDP2TCP if (!t_relay()) { sl_reply_error(); } exit; }
But when the end ua is not online,the ser proxy seems to be in a loop lock.
Thanks a lot!
El Tuesday 13 November 2007 09:12:26 程千 escribió:
hi:
I isntall the openser-1.2.2-notls under the centos5. I config the INVITE method like this:
if (is_method("INVITE")) { # enable Record-Route record_route();
# Is this to one of our numbers if (lookup("location")) { append_hf("P-hint: userloc applied\r\n"); } else { sl_send_reply("404","Not found"); } } route(1);
...
route[1] { if (isflagset(2)) { if (is_method("INVITE")) { t_on_reply("1"); t_on_failure("1"); use_media_proxy(); } else if (is_method("BYE|CANCEL")) { end_media_session(); } }
# send it out now; use stateful forwarding as it works reliably # even for UDP2TCP if (!t_relay()) { sl_reply_error(); } exit; }
But when the end ua is not online,the ser proxy seems to be in a loop lock.
It's logic, you should add "exit;" after line: sl_send_reply("404","Not found");
If not, because URI is the original AOR (lookup didn't find a contact URI) then route[1] will do "t_relay" so the INVITE resolvs its destination to proxy itself and a loop is generated.
Thanks a lot!