doracknz foi mais uma
2003-Nov-11 20:09 UTC
[Asterisk-Users] sip: 401 unauthorized with xlite
Hi there,
I have tried very hard to setup the x-lite with asterisk, but until now i
didn't get sucess. When i start the asterisk in debug mode, i see the
message: sip/2.0 401 unauthorized. I know that this problem with
authentication. I put in my sip.conf as below.
[2203]
type=friend
username=2203
auth=md5
secret=1234
reinvite=no
canreinvite=no
dissallow=all
allow=gsm
context= sip
host= 192.168.10.149 -> my machine that have xlite
extension.conf
[sip]
exten => 2203,1,Dial(${Phone1})
I have read and read many message in list but i could found anyone that explain
in details how to setup this correct. My sip.conf i got from a example in pdf
how to setup x-lite with sip, but this think doesn't work in my server.
Please, could someone help me how to do that...
thanks a lot,
Romulo
---------------------------------
Yahoo! Mail - 6MB, anti-spam e antiv?rus gratuito. Crie sua conta agora!
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20031111/93943756/attachment.htm
your entry should look like this: [2203] type=3Dfriend secret=3D1234 reinvite=3Dno canreinvite=3Dno disallow=3Dall allow=3Dgsm allow=3Dulaw host=3Ddynamic exten =3D> 2203,1,Dial(SIP/2203) http://www.zebraroaming.com/stuff/X-Lite-and-Asterisk.pdf bkw On Wed, 12 Nov 2003, [iso-8859-1] doracknz foi mais uma wrote:> Hi there, > > I have tried very hard to setup the x-lite with asterisk, but until now i didn't get sucess. When i start the asterisk in debug mode, i see the message: sip/2.0 401 unauthorized. I know that this problem with authentication. I put in my sip.conf as below. > > [2203] > type=3Dfriend > username=3D2203 > auth=3Dmd5 > secret=3D1234 > reinvite=3Dno > canreinvite=3Dno > dissallow=3Dall > allow=3Dgsm > context=3D sip > host=3D 192.168.10.149 -> my machine that have xlite > > extension.conf > [sip] > exten =3D> 2203,1,Dial(${Phone1}) > > I have read and read many message in list but i could found anyone that explain in details how to setup this correct. My sip.conf i got from a example in pdf how to setup x-lite with sip, but this think doesn't work in my server. > Please, could someone help me how to do that... > > thanks a lot, > > Romulo > > > > --------------------------------- > Yahoo! Mail - 6MB, anti-spam e antiv=EDrus gratuito. Crie sua conta agora!
Romulo,
Without a little more information this is not so easy to solve. So let me see
if I can go through a couple of scenarios and see if we can figure out your
particular problem.
If you have X-Lite behind a NAT router AND you are not connecting to an * server
or your * server is outside of that same NAT router then your configuration
should look like this.
[2203]
type=friend
username=2203
auth=md5
secret=1234
host=dynamic
nat=yes
reinvite=no
canreinvite=no
dissallow=all
allow=gsm
context=sip
If you are connecting to a * box and it is behind the same NAT router ie on the
same network. You configuration is a workable configuration.
[2203]
type=friend
username=2203
auth=md5
secret=1234
host=192.168.10.149 ; my machine that has xlite
reinvite=no
canreinvite=no
dissallow=all
allow=gsm
context=sip
Now here is were it gets a little tricky. If you have your X-Lite and * behind
the same NAT router and you think you can make this work with
externip=???.???.???.??? then good luck. I was not able to get this to work
with any SIP configuration. I tried every possible combination I could think of
at that point with no luck at all. Unless someone else in this group has been
able to make this work then to the best of my knowledge it will not work.
Now on a completely different side note here. I have done this where I can get
X-Lite or X-Pro either one to connect okay sometimes and not others (totally
random) with success. Sometimes it would auth ok and sometimes it would fail.
No configuration change or anything and nothing I could link to the issue.
During a SIP debug session I would simply get SIP/2.0 401 Unauthorized messages
sent to my client. I even went so far as to change the chan_sip.c to print out
the two compared md5 hashes that should have looked exactly the same and they
were not. I would have reported this as a bug but I could find no one else to
have this same issue that I was having. So my suggestion to you is this. If
you think your sip configuration is correct then temporarily remove your secret
with ;secret=1234 or remove the line altogether then restart your * box and then
see if it will log in. If it does then you know you are having some sort of
other problem whether it be the same authentication issue I was having or
something else altogether.
-Robert
----- Original Message -----
From: doracknz foi mais uma
To: asterisk-users@lists.digium.com
Sent: Tuesday, November 11, 2003 7:09 PM
Subject: [Asterisk-Users] sip: 401 unauthorized with xlite
Hi there,
I have tried very hard to setup the x-lite with asterisk, but until now i
didn't get sucess. When i start the asterisk in debug mode, i see the
message: sip/2.0 401 unauthorized. I know that this problem with
authentication. I put in my sip.conf as below.
[2203]
type=friend
username=2203
auth=md5
secret=1234
reinvite=no
canreinvite=no
dissallow=all
allow=gsm
context= sip
host= 192.168.10.149 -> my machine that have xlite
extension.conf
[sip]
exten => 2203,1,Dial(${Phone1})
I have read and read many message in list but i could found anyone that explain
in details how to setup this correct. My sip.conf i got from a example in pdf
how to setup x-lite with sip, but this think doesn't work in my server.
Please, could someone help me how to do that...
thanks a lot,
Romulo
--------------------------------------------------------------------------------
Yahoo! Mail - 6MB, anti-spam e antiv?rus gratuito. Crie sua conta agora!
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20031112/da986825/attachment.htm