Hi all,
I'm very new to SER. Currently, I have an asterisk
server running ,and am able make calls thru a
conventional phone via an IAD box. Presently, I am
trying to implement SER on top of asterisk.
My plan is to use SER as a SIP Registrar and then
route calls to asterisk. It needs to be stateful.
Need some clarification on this:
1. When a call is made, (ngrep)it send an INVITE
request instead of a REGISTER. why?
2. I then checked and found out that my sip user has
already been stored in the "location" table even
before any calls were made. Why?
3.What's the difference between "location" and
"subscriber" table? Why does the
if(!lookup("location")) always returns true and gives
a NOT FOUND error when i can see my user in location
table?
Below is my ser.cfg file:
route{
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
break;
};
if ( msg:len > max_len ) {
sl_send_reply("513", "Message too big");
break;
};
record_route();
if (loose_route()) {
t_relay();
break;
};
# if the request is for other domain use
# UsrLoc (in case, it does not work, use the
# following command
# with proper names and addresses in it)
if (uri==myself) {
if (method=="REGISTER") {
if (!www_authorize("202.171.60.3", "subscriber")) {
www_challenge("202.171.60.3", "0");
break;
}
save("location");
break;
} else {
# NO registered contacts,exit now
if (!lookup("location")) {
sl_send_reply("404","Not Found");
break;
};
}
t_relay();
};
# forward to current uri now; use stateful
# forwarding; that works reliably even if we
# forward from TCP to UDP
if (!t_relay()) {
sl_reply_error();
};
}
I'm sure there's something wrong with my route logic.
Please help.
Nikki K
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com