Dear All,
I have the latest ser (0.8.14) on fedora 2 as the sip server ,1 Mitel sip
phone and xpro soft phone as the sip phones. The problem is that either
the mitel or xpro sip phones can't register in ser.
I used "serctl ul show",nothing is registered.
I used "sipsak -vv -s sip:6000@ip address of sipserver",it shows "SIP/2.0
404 Not Found"
Then I added some log functions in ser.cfg where route locates (listed
below).I found out when I used "sipsak -vv -s sip:6000@ip address of
sipserver",the log functions execute first at uri==myself, then
(!lookup("location")) and I can see the logs in the terminal.
But when I started the phone to communicate with the ser, those logs
weren't show although I did see the register request from sip phones to
ser from ngrep.
So my first question is when the ser.cfg is executed. When I used sipsak,
I could see ser.cfg is executed. When I started the sip phone, I can't see
its execution.
My second question is how to find out the reason for not registering. I
used the IP address for the domain name. is it right to use? Because I did
the test in local area network without dns.
route{
log(1,"Begin route\n");
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
log(1,"Too many hops\n");
break;
};
if ( msg:len > max_len ) {
sl_send_reply("513", "Message too big");
log(1,"Message too big\n");
break;
};
record_route();
log(1,"record_route\n");
# loose-route processing
if (loose_route()) {
t_relay();
log(1,"loose route\n");
break;
};
if (uri==myself) {
log(1,"in the served domain");
if (method=="REGISTER") {
log(1,"do the register work");
#Uncomment this if you want to use digest authentication
if (!www_authorize("Ip address of sip server",
"subscriber")) {
www_challenge("Ip address of sip server",
"0");
log(1,"do www_challenge");
break;
};
save("location");
log(1,"save in the location");
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
log(1,"not found in the location");
break;
};
}else{
log(1,"not in the domain");
};
# 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();
};
}
Thanks,
Yilan