[Asterisk-Users] SIP registration error, lost packets with asterisk

Florian Lefeuvre florian.lefeuvre at actinium-corp.com
Thu Jan 13 11:46:34 MST 2005


Hi all,


I encounter an annoying problem using Asterisk.
I 'm using SIP. I try to register an Asterisk as a SIP end user with 
another Asterisk.
If I put both asterisk in the same local network, no problem to do it.
The asterisk end user registered perfectly with the other (let's call it 
the registrar).
Authentication is enable and works fine.
The problem occurs when I put the registrar outside my private network 
(in a datacenter).
If I don't use authentication, no problem at all. the end user is able 
to register itself.
but if I use authentication, registration is impossible.

here is my understanding of the registration:

in the case no password is requiered:

first packet:   from end user to registrar:   REGISTER
second packet:   from registrar to end user:   100 Trying
third packet:    from registrar to end user:  200 OK



in the case a password is requiered:

1st packet:   from end user to registrar:           REGISTER
2nd packet:   from registrar to end user:          100 Trying
3rd packet:    from registrar to end user:          Status 401 Unauthorized
                          Send a challenge to the end user  nonce="abcde..."
4th packet: from end user to registrar:           REGISTER, with the 
reponse to the challenge
5th packet:     from registrar to end user:        100 Trying
6th packet:    from registrar to enc user:         200 OK  if the 
password is correct
                                                                         
    403 Forbidden is the password is bad.

as I said, if I don't use any passwork, everything is fine.
If I use a password, it does not work.
I enabled SIP debug under asterisk and I can see that only the three 
first packets are received.
The end user sends the 4th packet but it never reach the registrar! so 
asterisk resend it  6 times, then failed.
I also check with ethereal:  I can see packets going out but they never 
reach the registrar.

First I was thinking my network was bad, so I did a test with another 
client:
I used Kphone to try to register... and it works fine. I can see all the 
packets going out and arrive
in my asterisk registrar.

I was wondering if registration use only port 5060?
and is anyone has heard about this problem, is it an asterisk problem or 
a network/nat problem?

if you have any clues....


Florian





























More information about the asterisk-users mailing list