Hints to debugging this issue: Just for your own use, I'd suggest using the "tethereal -V port 5060" incantation of ethereal to see a more detailed packet-level debug "from the wire". Look at the REGISTER packets (if N2P indeed does use REGISTERs) since that may be less complex, and may give you the same errors. Compare a packet trace from your ATA-186 with that of Asterisk and see where the differences are. JT>I've been trying to use net2phone's sip service at sip.net2phone.com >with * but keep getting >SIP/2.0 401 Unauthorized. Do you know if this should be possible? > >So far: >I can use an ata186 to connected directly to n2p through >sip.net2phone.com without any special settings. >I can connect from * to iconnecthere, but, whatever I try from * to n2p >produces "SIP/2.0 401 Unauthorized" >(Can forward the full * sip log and ata186 log if it would help) > >Many thanks > >Mark > >-------------------------- > >INVITE sip:18002479297@sip.net2phone.com SIP/2.0 >Via: SIP/2.0/UDP 10.0.0.55:5060;branch=z9hG4bK7d701e63 >From: "112" <sip:2763072144@10.0.0.55>;tag=as16e11aa8 >To: <sip:18002479297@sip.net2phone.com> >Contact: <sip:2763072144@10.0.0.55> >Call-ID: 7d2fd41f7e897e54712371ae0f782262@10.0.0.55 >CSeq: 102 INVITE >User-Agent: Asterisk PBX >Content-Type: application/sdp >Content-Length: 149 > >v=0 >o=root 9698 9698 IN IP4 10.0.0.55 >s=session >c=IN IP4 10.0.0.55 >t=0 0 >m=audio 19622 RTP/AVP 8 0 >a=rtpmap:8 PCMA/8000 >a=rtpmap:0 PCMU/8000 > (no NAT) to 66.33.146.12:5060 > -- Called 18002479297@n2p >Sip read: >SIP/2.0 401 Unauthorized >Via: SIP/2.0/UDP 10.0.0.55:5060;branch=z9hG4bK7d701e63 >From: "112" <sip:2763072144@10.0.0.55>;tag=as16e11aa8 >To: <sip:18002479297@sip.net2phone.com>;tag=3ed78add-12013 >Call-ID: 7d2fd41f7e897e54712371ae0f782262@10.0.0.55 >CSeq: 102 INVITE >Contact: "net2phone" <sip:66.33.146.12:5060> >User-Agent: Asterisk PBX >Content-Length: 0 >_______________________________________________ >Asterisk-Users mailing list >Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users
I've been trying to use net2phone's sip service at sip.net2phone.com
with * but keep getting 
SIP/2.0 401 Unauthorized. Do you know if this should be possible?
So far:
I can use an ata186 to connected directly to n2p through
sip.net2phone.com without any special settings.
I can connect from * to iconnecthere, but, whatever I try from * to n2p
produces "SIP/2.0 401 Unauthorized" 
(Can forward the full * sip log and ata186 log if it would help)
Many thanks
Mark
--------------------------
INVITE sip:18002479297@sip.net2phone.com SIP/2.0
Via: SIP/2.0/UDP 10.0.0.55:5060;branch=z9hG4bK7d701e63
From: "112" <sip:2763072144@10.0.0.55>;tag=as16e11aa8
To: <sip:18002479297@sip.net2phone.com>
Contact: <sip:2763072144@10.0.0.55>
Call-ID: 7d2fd41f7e897e54712371ae0f782262@10.0.0.55
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Content-Type: application/sdp
Content-Length: 149
v=0
o=root 9698 9698 IN IP4 10.0.0.55
s=session
c=IN IP4 10.0.0.55
t=0 0
m=audio 19622 RTP/AVP 8 0
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
 (no NAT) to 66.33.146.12:5060
    -- Called 18002479297@n2p
Sip read:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.0.55:5060;branch=z9hG4bK7d701e63
From: "112" <sip:2763072144@10.0.0.55>;tag=as16e11aa8
To: <sip:18002479297@sip.net2phone.com>;tag=3ed78add-12013
Call-ID: 7d2fd41f7e897e54712371ae0f782262@10.0.0.55
CSeq: 102 INVITE
Contact: "net2phone" <sip:66.33.146.12:5060>
User-Agent: Asterisk PBX
Content-Length: 0
On Mon, 2 Jun 2003, Mark Thompson wrote:> I can use an ata186 to connected directly to n2p through > sip.net2phone.com without any special settings. > I can connect from * to iconnecthere, but, whatever I try from * to n2p > produces "SIP/2.0 401 Unauthorized" > (Can forward the full * sip log and ata186 log if it would help)It is normal for n2p to send back an Unauthorised if you send an unauthenticated INVITE. Asterisk should re-send the INVITE but this time authenticated. For that to work, the entry in sip.conf needs a username and secret. Steve
Stephen Davies wrote:>> On Mon, 2 Jun 2003, Mark Thompson wrote: > > >>I can use an ata186 to connected directly to n2p through >>sip.net2phone.com without any special settings. >>I can connect from * to iconnecthere, but, whatever I try from * to n2p >>produces "SIP/2.0 401 Unauthorized" >>(Can forward the full * sip log and ata186 log if it would help) > > > It is normal for n2p to send back an Unauthorised if you send an > unauthenticated INVITE. Asterisk should re-send the INVITE but this > time authenticated. For that to work, the entry in sip.conf needs a > username and secret. >Do you (or does anyone) have an example sip.conf entry for net2phone to use as a template? I played around with that extensively a month or two ago without success. Perhaps now things are going to work. Thx. B.
Just to say that I've now managed to get this going by pretending to be
an ATA 186.
change the User-Agent string in chan_sip.c from "Asterisk" to
"Cisco ATA
186" and the Net2Phone Sip service works with *
Would it be possible to pick this up from sip.conf in a future release?
Regards
Mark
-----Original Message-----
From: Mark Thompson 
Sent: 02 June 2003 21:11
To: asterisk-users@lists.digium.com
Subject: [Asterisk-Users] Net2Phone SIP
I've been trying to use net2phone's sip service at sip.net2phone.com
with * but keep getting 
SIP/2.0 401 Unauthorized. Do you know if this should be possible?
So far:
I can use an ata186 to connected directly to n2p through
sip.net2phone.com without any special settings. I can connect from * to
iconnecthere, but, whatever I try from * to n2p produces "SIP/2.0 401
Unauthorized" 
(Can forward the full * sip log and ata186 log if it would help)
Many thanks
Mark
--------------------------
INVITE sip:18002479297@sip.net2phone.com SIP/2.0
Via: SIP/2.0/UDP 10.0.0.55:5060;branch=z9hG4bK7d701e63
From: "112" <sip:2763072144@10.0.0.55>;tag=as16e11aa8
To: <sip:18002479297@sip.net2phone.com>
Contact: <sip:2763072144@10.0.0.55>
Call-ID: 7d2fd41f7e897e54712371ae0f782262@10.0.0.55
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Content-Type: application/sdp
Content-Length: 149
v=0
o=root 9698 9698 IN IP4 10.0.0.55
s=session
c=IN IP4 10.0.0.55
t=0 0
m=audio 19622 RTP/AVP 8 0
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
 (no NAT) to 66.33.146.12:5060
    -- Called 18002479297@n2p
Sip read:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.0.55:5060;branch=z9hG4bK7d701e63
From: "112" <sip:2763072144@10.0.0.55>;tag=as16e11aa8
To: <sip:18002479297@sip.net2phone.com>;tag=3ed78add-12013
Call-ID: 7d2fd41f7e897e54712371ae0f782262@10.0.0.55
CSeq: 102 INVITE
Contact: "net2phone" <sip:66.33.146.12:5060>
User-Agent: Asterisk PBX
Content-Length: 0 _______________________________________________
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users