[Serusers] Ser Register Problem

yilan at cs.dal.ca yilan at cs.dal.ca
Tue Sep 28 19:07:26 CEST 2004


Hi Michael,

I added the xlog as you told me and got the following results.

When I send sipsak command,the log messages on the console showed as
following

_________________________________________________________________
[root at sipserv ser]# ser start
Listening on
              127.0.0.1 [127.0.0.1]:5060
              134.190.64.164 [134.190.64.164]:5060
Aliases: sipserv:5060 localhost:5060 134.190.64.164:*
sipserv.eplgroup.tara.ca:* eplgroup.tara.ca:*
stateless - initializing
Maxfwd module- initializing
[root at sipserv ser]#  0(7068) mod_init(): Database connection opened
successfuly
 0(0) INFO: udp_init: SO_RCVBUF is initially 110592
 0(0) INFO: udp_init: SO_RCVBUF is finally 221184
 0(0) INFO: udp_init: SO_RCVBUF is initially 110592
 0(0) INFO: udp_init: SO_RCVBUF is finally 221184
 9(0) INFO: fifo process starting: 7094
 9(7094) SER: open_uac_fifo: fifo server up at /tmp/ser_fifo...
 5(7082) Begin route
 5(7082) Got a OPTIONS (URI = 4500 at eplgroup.tara.ca) from 134.190.64.164
 5(7082) Authenticating Contact (sip:sipsak at sipserv.eplgroup.tara.ca:32839)
_________________________________________________________________

The ngrep output is as followed:

________________________________________________________________

[root at sipserv ngrep-1.42]# ./ngrep -n 5060 -d eth0 4500
interface: eth0 (134.190.64.160/255.255.255.224)
match: 4500
############################################
U 134.190.64.171:5060 -> 134.190.64.164:5060 REGISTER sip:134.190.64.164
SIP/2.0..Via:SIP/2.0/UDP 134.190.64.171:5060..From:"4500"
<sip:4500 at 134.190.64.164>;tag=7-366-5f947b49..To:<sip:4500 at 134.190.64.164>..Contact:<sip:4500 at 134.190.64.171>..Call-ID:70000-5647a0b0 at 134.1
  90.64.171..CSeq:2 REGISTER..Expires: 7200..User-Agent:Mitel-5055-SIP-Phone
  2.0.1.23 08000F0E8F03..Max-Forwards:70..Content-Length:0....
#
I 134.190.64.164 -> 134.190.64.171
3:10....E.......<..... at ...@......p.HREGISTER sip:134.190.64.164
SIP/2.0..Via:SIP/2.0/UDP 134.190.64.171:5060..From:"4500"
<sip:4500 at 134.190.64.164>;tag=7-366-5f947b49..To:<sip:4500 at 134.190.64.164>..Contact:<sip:4500 at 134.190.64.17
  1>..Call-ID:70000-5647a0b0 at 134.190.64.171..CSeq:2 REGISTER..Expires:
7200..User-Agent:Mitel-5055-SIP-Phone 2.0.1.23
08000F0E8F03..Max-Forwards:70..Content-Length:0....
#
U 134.190.64.171:5060 -> 134.190.64.164:5060 REGISTER sip:134.190.64.164
SIP/2.0..Via:SIP/2.0/UDP 134.190.64.171:5060..From:"4500"
<sip:4500 at 134.190.64.164>;tag=7-366-5f947b49..To:<sip:4500 at 134.190.64.164>..Contact:<sip:4500 at 134.190.64.171>..Call-ID:70000-5647a0b0 at 134.1
  90.64.171..CSeq:2 REGISTER..Expires: 7200..User-Agent:Mitel-5055-SIP-Phone
  2.0.1.23 08000F0E8F03..Max-Forwards:70..Content-Length:0....
#
I 134.190.64.164 -> 134.190.64.171 3:10
....E.......<..... at ...@......p.HREGISTER sip:134.190.64.164
SIP/2.0..Via:SI  P/2.0/UDP 134.190.64.171:5060..From:"4500"
sip:4500 at 134.190.64.164>;tag=7- 
366-5f947b49..To:<sip:4500 at 134.190.64.164>..Contact:<sip:4500 at 134.190.64.17
 1>..Call-ID:70000-5647a0b0 at 134.190.64.171..CSeq:2 REGISTER..Expires:
7200..
  User-Agent:Mitel-5055-SIP-Phone 2.0.1.23 8000F0E8F03..Max-Forwards:70..Con
  tent-Length:0....
#
U 134.190.64.171:5060 -> 134.190.64.164:5060 REGISTER sip:134.190.64.164
SIP/2.0..Via:SIP/2.0/UDP 134.190.64.171:5060..From:"4500"
<sip:4500 at 134.190.64.164>;tag=7-366-5f947b49..To:<sip:4500 at 134.190.64.164>..Contact:<sip:4500 at 134.190.64.171>..Call-ID:70000-5647a0b0 at 134.1
  90.64.171..CSeq:2 REGISTER..Expires: 7200..User-Agent:Mitel-5055-SIP-Phone
  2.0.1.23 08000F0E8F03..Max-Forwards:70..Content-Length:0....
#
I 134.190.64.164 -> 134.190.64.171 3:10
....E.......<..... at ...@......p.HREGISTER sip:134.190.64.164
SIP/2.0..Via:SI
  P/2.0/UDP 134.190.64.171:5060..From:"4500"
sip:4500 at 134.190.64.164>;tag=7- 
366-5f947b49..To:<sip:4500 at 134.190.64.164>..Contact:<sip:4500 at 134.190.64.17
  1>..Call-ID:70000-5647a0b0 at 134.190.64.171..CSeq:2 REGISTER..Expires:
7200.. User-Agent:Mitel-5055-SIP-Phone 2.0.1.23
08000F0E8F03..Max-Forwards:70..Content-Length:0....
#
U 134.190.64.171:5060 -> 134.190.64.164:5060 REGISTER sip:134.190.64.164
SIP/2.0..Via:SIP/2.0/UDP 134.190.64.171:5060..From:"4500"
<sip:4500 at 134.190.64.164>;tag=7-366-5f947b49..To:<sip:4500 at 134.190.64.164>..Contact:<sip:4500 at 134.190.64.171>..Call-ID:70000-5647a0b0 at 134.1
  90.64.171..CSeq:2 REGISTER..Expires: 7200..User-Agent:Mitel-5055-SIP-Phone
  2.0.1.23 08000F0E8F03..Max-Forwards:70..Content-Length:0....
#
I 134.190.64.164 -> 134.190.64.171 3:10 
....E.......<..... at ...@......p.HREGISTER sip:134.190.64.164
SIP/2.0..Via:SI  P/2.0/UDP 134.190.64.171:5060..From:"4500"
<sip:4500 at 134.190.64.164>;tag=7- 
366-5f947b49..To:<sip:4500 at 134.190.64.164>..Contact:<sip:4500 at 134.190.64.17
  1>..Call-ID:70000-5647a0b0 at 134.190.64.171..CSeq:2 REGISTER..Expires:
7200.. User-Agent:Mitel-5055-SIP-Phone 2.0.1.23
08000F0E8F03..Max-Forwards:70..Content-Length:0....
###
U 134.190.64.171:5060 -> 134.190.64.164:5060 REGISTER sip:134.190.64.164
SIP/2.0..Via:SIP/2.0/UDP 134.190.64.171:5060..From:"4500"
<sip:4500 at 134.190.64.164>;tag=7-366-5f947b49..To:<sip:4500 at 134.190.64.164>..Contact:<sip:4500 at 134.190.64.171>..Call-ID:70000-5647a0b0 at 134.1
  90.64.171..CSeq:2 REGISTER..Expires: 7200..User-Agent:Mitel-5055-SIP-Phone
  2.0.1.23 08000F0E8F03..Max-Forwards:70..Content-Length:0....
#
I 134.190.64.164 -> 134.190.64.171 3:10
....E.......<..... at ...@......p.HREGISTER sip:134.190.64.164
SIP/2.0..Via:SI
  P/2.0/UDP 134.190.64.171:5060..From:"4500"
sip:4500 at 134.190.64.164>;tag=7- 
366-5f947b49..To:<sip:4500 at 134.190.64.164>..Contact:<sip:4500 at 134.190.64.17
 1>..Call-ID:70000-5647a0b0 at 134.190.64.171..CSeq:2 REGISTER..Expires:
7200..
  User-Agent:Mitel-5055-SIP-Phone 2.0.1.23
08000F0E8F03..Max-Forwards:70..Content-Length:0....
##############
_______________________________________________________________

Thanks for your help and time,
Yilan




> 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 at bwsys.net
> Customer Service: (877) 976-0711
>
>> -----Original Message-----
>> From: yilan at cs.dal.ca [mailto:yilan at cs.dal.ca]
>> Sent: Tuesday, September 28, 2004 9:30 AM
>> To: Michael Shuler
>> Cc: yilan at cs.dal.ca; serusers at 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 at eplgroup.tara.ca", it shows the following
>> 5(6374) not found:time [Tue Sep 28 11:14:48 2004] method
>> <OPTIONS> r-uri
>> <4500 at 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 at bwsys.net
>> > Customer Service: (877) 976-0711
>> >
>> >
>> >
>> >
>> >
>> >
>> >> -----Original Message-----
>> >> From: serusers-bounces at lists.iptel.org
>> >> [mailto:serusers-bounces at lists.iptel.org] On Behalf Of yilan at cs.dal.ca
>> >> Sent: Monday, September 27, 2004 7:19 PM
>> >> To: serusers at 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 at 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 at 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 at lists.iptel.org
>> >> http://lists.iptel.org/mailman/listinfo/serusers
>> >>
>> >
>> >
>>
>>
>
>





More information about the sr-users mailing list