In your next post send the actual ngrep output and any
log messages from
the
console or /var/log/messages... Basically what is happening is that the
URI
isn't matching "myself". When you start SER it will tell you what it
binds
to. Include that too next time.
Try this:
xlog("L_INFO", "Got a %rm (URI = %ru) from %is");
if(uri == myself)
{
xlog("L_INFO", "Authenticating Contact (%ct)");
# Make sure they are a valid user on our proxy
if (!www_authorize("yourdomain.com", "location"))
{
www_challenge("yourdomain.com", "0");
break;
};
save("location");
xlog("L_INFO", "Registered Contact (%ct)");
break;
};
----------------------------------------
Michael Shuler, C.E.O.
BitWise Communications, Inc. (CLEC) And BitWise Systems, Inc. (ISP)
682 High Point Lane
East Peoria, IL 61611
Office: (217) 585-0357
Cell: (309) 657-6365
Fax: (309) 213-3500
E-Mail: mike(a)bwsys.net
Customer Service: (877) 976-0711
-----Original Message-----
From: yilan(a)cs.dal.ca [mailto:yilan@cs.dal.ca]
Sent: Tuesday, September 28, 2004 9:30 AM
To: Michael Shuler
Cc: yilan(a)cs.dal.ca; serusers(a)lists.iptel.org
Subject: RE: [Serusers] Ser Register Problem
Hi Michael,
Thank you for your reply. I really appreciate it.
1 - Check out xlog() so you can print out the URI, Contact, etc.
I add xlog () in ser.cfg.Then for the sipsak command "sipsak -vv -s
sip:4500@eplgroup.tara.ca", it shows the following
5(6374) not found:time [Tue Sep 28 11:14:48 2004] method
<OPTIONS> r-uri
<4500(a)eplgroup.tara.ca>
I guess sipsak doesn't send register method here.
But for the phone that is going to register for the ser, nothing shows
although I can see the phone sends register packet from ngrep.
2 - Are you beheind NAT?
NO.
3 - This is all you should be concerend about... What is the last log
message you are getting from here? Then use xlog() to tell
you what you
need to know. If you are not even getting the first log
message then SER
is not aware that it is supposed to respond for whatever the
REGISTER has
requested. You will need to add it as an "alias" global
config option at
the top of the file.
Then how do I let the ser to show the log message?
I modified the following to show the log in the terminal and I did add
"alias" for global config option at the top of ser.cfg.
debug=3
fork=yes
log_stderror=yes
alias="eplgroup.tara.ca"
alias="134.190.64.164"
Thanks,
Yilan
Couple of things to try....
1 - Check out xlog() so you can print out the URI, Contact, etc.
2 - Are you beheind NAT?
3 - This is all you should be concerend about... What is
the last log
message you are getting from here? Then use
xlog() to tell
you what you
need to know. If you are not even getting the
first log
message then SER
is
not aware that it is supposed to respond for whatever the
REGISTER has
requested. You will need to add it as an
"alias" global
config option at
the top of the file.
> 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");
};
----------------------------------------
Michael Shuler, C.E.O.
BitWise Communications, Inc. (CLEC) And BitWise Systems, Inc. (ISP)
682 High Point Lane
East Peoria, IL 61611
Office: (217) 585-0357
Cell: (309) 657-6365
Fax: (309) 213-3500
E-Mail: mike(a)bwsys.net
Customer Service: (877) 976-0711
> -----Original Message-----
> From: serusers-bounces(a)lists.iptel.org
> [mailto:serusers-bounces@lists.iptel.org] On Behalf Of yilan(a)cs.dal.ca
> Sent: Monday, September 27, 2004 7:19 PM
> To: serusers(a)lists.iptel.org
> Subject: [Serusers] Ser Register Problem
>
>
> 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
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers