[Serusers] nat problem maybe?

Daryl Williams daryl at weblane.com
Sun Nov 21 22:02:21 CET 2004


hi again. marian. your suggestion worked great! the lookup warning
has gone away. however my client (i am now using sjphone) is still
unable to register. i was able to get an x-lite cient to register, but
the sjphone (and others) are not able to register. one difference i have
noticed is in the check_via statement. the x-lite client (which is able
to login) lists my public ip twice in the check_via whereas the sjphone
client lists my public ip address first and then my private ip address.
could this have anything to do w/my problem? i am incuding the
ser server's output below. the portion i'm including just keeps
looping over and over again...

thanks again,

daryl

 0(84516) SIP Request:
 0(84516)  method:  <REGISTER>
 0(84516)  uri:     <sip:weblane.com>
 0(84516)  version: <SIP/2.0>
 0(84516) parse_headers: flags=1
 0(84516) DEBUG: get_hdr_body : content_length=0
 0(84516) get_hdr_field: cseq <CSeq>: <1> <REGISTER>
 0(84516) end of header reached, state=9
 0(84516) DEBUG: get_hdr_field: <To> [25]; uri=[sip:daryl at weblane.com]
 0(84516) DEBUG: to body [<sip:daryl at weblane.com>
]
 0(84516) Found param type 232, <branch> = 
<z9hG4bKc0a834340131c9b141a0ff740bbc553200000001>; state=16
 0(84516) end of header reached, state=5
 0(84516) parse_headers: Via found, flags=1
 0(84516) parse_headers: this is the first via
 0(84516) After parse_msg...
 0(84516) preparing to run routing scripts...
 0(84516) DEBUG : is_maxfwd_present: max_forward header already found!
 0(84516) DEBUG: is_maxfwd_present: value = 70
 0(84516) parse_headers: flags=256
 0(84516) found end of header
 0(84516) find_first_route(): No Route headers found
 0(84516) loose_route(): There is no Route HF
 0(84516) check_self - checking if host==us: 11==12 &&  [weblane.com] == 
[204.202.9.61]
 0(84516) check_self - checking if port 5060 matches port 5060
 0(84516) check_self - checking if host==us: 11==9 &&  [weblane.com] == 
[127.0.0.1]
 0(84516) check_self - checking if port 5060 matches port 5060
 0(84516) check_self - checking if host==us: 11==12 &&  [weblane.com] == 
[204.202.9.61]
 0(84516) check_self - checking if port 5060 matches port 5060
 0(84516) check_self - checking if host==us: 11==9 &&  [weblane.com] == 
[127.0.0.1]
 0(84516) check_self - checking if port 5060 matches port 5060
 0(84516) parse_headers: flags=-1
 0(84516) parse_headers: flags=-1
 0(84516) check_via_address(64.175.61.138, 192.168.52.52, 0)
 0(84516) receive_msg: cleaning up


Marian Dumitru wrote:

> Hi Daryl,
>
> I would say there is a missing "break" at the end of 
> 'method=="REGISTER"' block. Put a break before the closing bracket of 
> the if statement. See in-line adding.
>
> Best regards,
> Marian
>
> Daryl Williams wrote:
>
>> helo marian. thank you for your reply. indeed i have been playing
>> with the config file, so it does not surprise me.  however i have
>> compared and modified my config with the one you suggested
>> and although a little different, i think the "lookup" calls are outside
>> of the REGISTER. however i am still getting the same log message.
>> i have included the pertinent code from my config file in case you
>> might have the time to look at it.
>>
>> thanks for your help.
>>
>> best regards,
>>
>> daryl
>>
>> from ser.cfg:
>>
>> if (uri==myself) {
>>    if (method=="REGISTER") {
>> /*
>>      if (!www_authorize("weblane.com", "subscriber")) {
>>        www_challenge("weblane.com", "0");
>>        break;
>>      };
>>      # only registered users are allowed
>>      if (!is_user("replicator") & !check_to()) {
>>        log(1, "LOG: unregistered user registration attempt\n");
>>        sl_send_reply("403", "Only registered users are allowed");
>>        break;
>>      };
>> */
>>        # it is an authenticated request, update Contact database now
>>      if (!save("location")) {
>>        sl_reply_error();
>>        break;
>>      };
>
>        break
>       ^^^^^^^
>
>>    };
>>
>>    lookup("aliases");
>>    if (!uri==myself) {
>>      append_hf("P-hint: outbound alias\r\n");
>>      route(1);
>>      break;
>>    };
>>
>>    # native SIP destinations are handled using our USRLOC DB
>>    if (!lookup("location")) {
>>      sl_send_reply("404", "Not Found");
>>      break;
>>    };
>>  };
>>
>>
>> Marian Dumitru wrote:
>>
>>> Hi Daryl,
>>>
>>> I would say there is something wrong with your configuration script 
>>> and it has nothing to do with NAT traversal.
>>> If you look into SER logs you sent, you will notice your script does 
>>> lookup("location") for the REGISTER location - which is wrong:
>>>     0(99885) lookup(): '' Not found in usrloc
>>> REGISTER must be processed via save("location").
>>> You can take a look to a ser.cfg sample at
>>> http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/etc/ser.cfg?rev=1.24&content-type=text/vnd.viewcvs-markup 
>>>
>>>
>>> Best regards,
>>> Marian Dumitru
>>>
>>> Daryl Williams wrote:
>>>
>>>> folks, i think i am having a nat problem. my client is timing out 
>>>> while
>>>> trying to contact the ser server. i am using stun which appears to be
>>>> working ok. i am including the output from my kphone client as well
>>>> as the ser server, hoping someone on the lilst can help me decipher 
>>>> what
>>>> is going on here. i dont know if the "No Route headers found" is
>>>> the problem or what...
>>>>
>>>> tia,
>>>>
>>>> daryl
>>>>
>>>>
>>>> kphone client:
>>>>
>>>> % kphone
>>>> Found 2 interfaces.
>>>> SipClient: Listening UDP on port: 5062
>>>> SipClient: Our address: 192.168.52.150
>>>> SipClient: STUN request
>>>> SipClient: Receiving message...
>>>> SipClient: STUN response
>>>>   address_port:   60192
>>>>   address:        64.175.61.138
>>>> SipRegister: Auth is '(null)'
>>>> SipRegister: Proxy Auth is '(null)'
>>>>
>>>> SipClient: Sending: 16:10:04.906
>>>> --------------------------------
>>>> REGISTER sip:weblane.com SIP/2.0
>>>> Via: SIP/2.0/UDP 64.175.61.138:60192
>>>> CSeq: 4765 REGISTER
>>>> To: "Daryl Williams" <sip:daryl at weblane.com>
>>>> Expires: 900
>>>> From: "Daryl Williams" <sip:daryl at weblane.com>
>>>> Call-ID: 1134872665 at 192.168.52.150
>>>> Content-Length: 0
>>>> User-Agent: kphone/4.0.3
>>>> Event: registration
>>>> Allow-Events: presence
>>>> Contact: "Daryl Williams" 
>>>> <sip:daryl at 64.175.61.138:60192;transport=udp>;methods="INVITE, 
>>>> MESSAGE, INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK, REFER"
>>>>
>>>> ser server:
>>>>
>>>> 0(99885) SIP Request:
>>>> 0(99885)  method:  <REGISTER>
>>>> 0(99885)  uri:     <sip:weblane.com>
>>>> 0(99885)  version: <SIP/2.0>
>>>> 0(99885) parse_headers: flags=1
>>>> 0(99885) end of header reached, state=5
>>>> 0(99885) parse_headers: Via found, flags=1
>>>> 0(99885) parse_headers: this is the first via
>>>> 0(99885) After parse_msg...
>>>> 0(99885) preparing to run routing scripts...
>>>> 0(99885) DEBUG : is_maxfwd_present: searching for max_forwards header
>>>> 0(99885) parse_headers: flags=128
>>>> 0(99885) get_hdr_field: cseq <CSeq>: <4044> <REGISTER>
>>>> 0(99885) end of header reached, state=9
>>>> 0(99885) DEBUG: get_hdr_field: <To> [42]; uri=[sip:daryl at weblane.com]
>>>> 0(99885) DEBUG: to body ["Daryl Williams" <sip:daryl at weblane.com>
>>>> ]
>>>> 0(99885) DEBUG: get_hdr_body : content_length=0
>>>> 0(99885) found end of header
>>>> 0(99885) DEBUG: is_maxfwd_present: max_forwards header not found!
>>>> 0(99885) end of header reached, state=9
>>>> 0(99885) parse_headers: flags=256
>>>> 0(99885) find_first_route(): No Route headers found
>>>> 0(99885) loose_route(): There is no Route HF
>>>> 0(99885) parse_headers: flags=-1
>>>> 0(99885) parse_headers: flags=-1
>>>> 0(99885) check_via_address(64.175.61.138, 64.175.61.138, 0)
>>>> 0(99885) lookup(): '' Not found in usrloc
>>>> 0(99885) parse_headers: flags=-1
>>>> 0(99885) check_via_address(64.175.61.138, 64.175.61.138, 0)
>>>> 0(99885) receive_msg: cleaning up
>>>> 0(99885) SIP Request:
>>>> 0(99885)  method:  <REGISTER>
>>>> 0(99885)  uri:     <sip:weblane.com>
>>>> 0(99885)  version: <SIP/2.0>
>>>> 0(99885) parse_headers: flags=1
>>>> 0(99885) end of header reached, state=5
>>>> 0(99885) parse_headers: Via found, flags=1
>>>> 0(99885) parse_headers: this is the first via
>>>> 0(99885) After parse_msg...
>>>> 0(99885) preparing to run routing scripts...
>>>> 0(99885) DEBUG : is_maxfwd_present: searching for max_forwards header
>>>> 0(99885) parse_headers: flags=128
>>>> 0(99885) get_hdr_field: cseq <CSeq>: <4044> <REGISTER>
>>>> 0(99885) end of header reached, state=9
>>>> 0(99885) DEBUG: get_hdr_field: <To> [42]; uri=[sip:daryl at weblane.com]
>>>> 0(99885) DEBUG: to body ["Daryl Williams" <sip:daryl at weblane.com>
>>>> ]
>>>> 0(99885) DEBUG: get_hdr_body : content_length=0
>>>> 0(99885) found end of header
>>>> 0(99885) DEBUG: is_maxfwd_present: max_forwards header not found!
>>>> 0(99885) end of header reached, state=9
>>>> 0(99885) parse_headers: flags=256
>>>> 0(99885) find_first_route(): No Route headers found
>>>> 0(99885) loose_route(): There is no Route HF
>>>> 0(99885) parse_headers: flags=-1
>>>> 0(99885) parse_headers: flags=-1
>>>> 0(99885) check_via_address(64.175.61.138, 64.175.61.138, 0)
>>>> 0(99885) lookup(): '' Not found in usrloc
>>>> 0(99885) parse_headers: flags=-1
>>>> 0(99885) check_via_address(64.175.61.138, 64.175.61.138, 0)
>>>> 0(99885) receive_msg: cleaning up
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Serusers mailing list
>>>> serusers at lists.iptel.org
>>>> http://lists.iptel.org/mailman/listinfo/serusers
>>>
>>>
>>>
>>>
>>>
>>
>
>




More information about the sr-users mailing list