We have a problem in authenticating with a SIP server running PortaSIP. first, my exten.conf says:
exten => _396262X.,1,Dial(SIP/${EXTEN:[EMAIL PROTECTED]) exten => _39064040.,1,Dial(SIP/${EXTEN:[EMAIL PROTECTED]) and sip.conf: register=390645416983:[EMAIL PROTECTED]/390645416983 [to-uni] type=peer secret=XXXXXX ; i tried also using md5secret=.... instead of secret=... but it's the same username=390645416983 fromuser=390645416983 host=sip.uni.it nat=yes our asterisk pbx correctly registers on sip.uni.it (it is displayed as "registered" in sip show registry, and if I issue a sip debug I see the answer to the registration, correctly reporting the name of the remote server and our balance: SIP/2.0 200 OK Via: SIP/2.0/UDP 217.18.104.75:5060;branch=z9hG4bK1bd57ff9 From: <sip:[EMAIL PROTECTED]>;tag=as4fb9a73e To: <sip:[EMAIL PROTECTED]>;tag=a4a48d8b20978897d8e0f5c399e6cc29.fbc4 Call-ID: [EMAIL PROTECTED] CSeq: 103 REGISTER PortaBilling: available-funds:5.00 currency:EUR Contact: <sip:[EMAIL PROTECTED]>;q=0.00;expires=115 Server: Sip EXpress router (0.8.14 (i386/freebsd)) Content-Length: 0 The problem is when I try to call a number on the othere side (390640409999): the call is correctly routed, the remote server asks us for the proper credentials, and it seems to me that asterisk answers their challenge: Authorization: Digest username="390645416983", realm="sip.uni.it", algorithm=MD5, uri="sip:[EMAIL PROTECTED]", nonce="419358e858969bef4a5c77326f2b205b97c672bf", response="188824ee848f9ed095990999fb2e3893", opaque="" but for some reason it seems that the remote server does not like the answer. the helpdesk of uni.it says that this is an old bug of asterisk (actually, the account works with an X-Lite softphone ). I'm using CVS-v1-0-11/08/04-10:57:05. I hoped that the latest version corrected this problem as well, but it appears that it is not the case I enclose the sip debug trace of the call -- Executing Dial("IAX2/[EMAIL PROTECTED]/3", "SIP/[EMAIL PROTECTED]") in new stack We're at 217.18.104.75 port 10880 Answering with preferred capability 0x4(ULAW) Answering with non-codec capability 0x1(G723) 12 headers, 10 lines Reliably Transmitting: INVITE sip:[EMAIL PROTECTED] SIP/2.0 Via: SIP/2.0/UDP 217.18.104.75:5060;branch=z9hG4bK2f983a20;rport From: "Roberto Piola" <sip:[EMAIL PROTECTED]>;tag=as2fb0ecc6 To: <sip:[EMAIL PROTECTED]> Contact: <sip:[EMAIL PROTECTED]> Call-ID: [EMAIL PROTECTED] CSeq: 102 INVITE User-Agent: Asterisk PBX Date: Thu, 11 Nov 2004 12:14:52 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER Content-Type: application/sdp Content-Length: 218 v=0 o=root 12361 12361 IN IP4 217.18.104.75 s=session c=IN IP4 217.18.104.75 t=0 0 m=audio 10880 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - (NAT) to 217.72.100.4:5060 -- Called [EMAIL PROTECTED] janis*CLI> Sip read: SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 217.18.104.75:5060;branch=z9hG4bK2f983a20;rport=5060 From: "Roberto Piola" <sip:[EMAIL PROTECTED]>;tag=as2fb0ecc6 To: <sip:[EMAIL PROTECTED]>;tag=a4a48d8b20978897d8e0f5c399e6cc29.b98a Call-ID: [EMAIL PROTECTED] CSeq: 102 INVITE WWW-Authenticate: Digest realm="sip.uni.it", nonce="419358e858969bef4a5c77326f2b205b97c672bf" Server: Sip EXpress router (0.8.14 (i386/freebsd)) Content-Length: 0 9 headers, 0 lines Transmitting: ACK sip:[EMAIL PROTECTED] SIP/2.0 Via: SIP/2.0/UDP 217.18.104.75:5060;branch=z9hG4bK2f983a20;rport From: "Roberto Piola" <sip:[EMAIL PROTECTED]>;tag=as2fb0ecc6 To: <sip:[EMAIL PROTECTED]>;tag=a4a48d8b20978897d8e0f5c399e6cc29.b98a Contact: <sip:[EMAIL PROTECTED]> Call-ID: [EMAIL PROTECTED] CSeq: 102 ACK User-Agent: Asterisk PBX Content-Length: 0 (NAT) to 217.72.100.4:5060 We're at 217.18.104.75 port 10880 Answering with preferred capability 0x4(ULAW) Answering with non-codec capability 0x1(G723) Reliably Transmitting: INVITE sip:[EMAIL PROTECTED] SIP/2.0 Via: SIP/2.0/UDP 217.18.104.75:5060;branch=z9hG4bK588b0624;rport From: "Roberto Piola" <sip:[EMAIL PROTECTED]>;tag=as2fb0ecc6 To: <sip:[EMAIL PROTECTED]> Contact: <sip:[EMAIL PROTECTED]> Call-ID: [EMAIL PROTECTED] CSeq: 103 INVITE User-Agent: Asterisk PBX Authorization: Digest username="390645416983", realm="sip.uni.it", algorithm=MD5, uri="sip:[EMAIL PROTECTED]", nonce="419358e858969bef4a5c77326f2b205b97c672bf", response="188824ee848f9ed095990999fb2e3893", opaque="" Date: Thu, 11 Nov 2004 12:14:52 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER Content-Type: application/sdp Content-Length: 218 v=0 o=root 12361 12362 IN IP4 217.18.104.75 s=session c=IN IP4 217.18.104.75 t=0 0 m=audio 10880 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - (NAT) to 217.72.100.4:5060 janis*CLI> Sip read: SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 217.18.104.75:5060;branch=z9hG4bK588b0624;rport=5060 From: "Roberto Piola" <sip:[EMAIL PROTECTED]>;tag=as2fb0ecc6 To: <sip:[EMAIL PROTECTED]>;tag=a4a48d8b20978897d8e0f5c399e6cc29.5919 Call-ID: [EMAIL PROTECTED] CSeq: 103 INVITE WWW-Authenticate: Digest realm="sip.uni.it", nonce="419358e858969bef4a5c77326f2b205b97c672bf" Server: Sip EXpress router (0.8.14 (i386/freebsd)) Content-Length: 0 9 headers, 0 lines Transmitting: ACK sip:[EMAIL PROTECTED] SIP/2.0 Via: SIP/2.0/UDP 217.18.104.75:5060;branch=z9hG4bK588b0624;rport From: "Roberto Piola" <sip:[EMAIL PROTECTED]>;tag=as2fb0ecc6 To: <sip:[EMAIL PROTECTED]>;tag=a4a48d8b20978897d8e0f5c399e6cc29.5919 Contact: <sip:[EMAIL PROTECTED]> Call-ID: [EMAIL PROTECTED] CSeq: 103 ACK User-Agent: Asterisk PBX Content-Length: 0 (NAT) to 217.72.100.4:5060 We're at 217.18.104.75 port 10880 Answering with preferred capability 0x4(ULAW) Answering with non-codec capability 0x1(G723) Reliably Transmitting: INVITE sip:[EMAIL PROTECTED] SIP/2.0 Via: SIP/2.0/UDP 217.18.104.75:5060;branch=z9hG4bK2dae1f5b;rport From: "Roberto Piola" <sip:[EMAIL PROTECTED]>;tag=as2fb0ecc6 To: <sip:[EMAIL PROTECTED]> Contact: <sip:[EMAIL PROTECTED]> Call-ID: [EMAIL PROTECTED] CSeq: 104 INVITE User-Agent: Asterisk PBX Authorization: Digest username="390645416983", realm="sip.uni.it", algorithm=MD5, uri="sip:[EMAIL PROTECTED]", nonce="419358e858969bef4a5c77326f2b205b97c672bf", response="188824ee848f9ed095990999fb2e3893", opaque="" Date: Thu, 11 Nov 2004 12:14:52 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER Content-Type: application/sdp Content-Length: 218 v=0 o=root 12361 12363 IN IP4 217.18.104.75 s=session c=IN IP4 217.18.104.75 t=0 0 m=audio 10880 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - (NAT) to 217.72.100.4:5060 janis*CLI> Sip read: SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 217.18.104.75:5060;branch=z9hG4bK2dae1f5b;rport=5060 From: "Roberto Piola" <sip:[EMAIL PROTECTED]>;tag=as2fb0ecc6 To: <sip:[EMAIL PROTECTED]>;tag=a4a48d8b20978897d8e0f5c399e6cc29.3ee7 Call-ID: [EMAIL PROTECTED] CSeq: 104 INVITE WWW-Authenticate: Digest realm="sip.uni.it", nonce="419358e858969bef4a5c77326f2b205b97c672bf" Server: Sip EXpress router (0.8.14 (i386/freebsd)) Content-Length: 0 9 headers, 0 lines Transmitting: ACK sip:[EMAIL PROTECTED] SIP/2.0 Via: SIP/2.0/UDP 217.18.104.75:5060;branch=z9hG4bK2dae1f5b;rport From: "Roberto Piola" <sip:[EMAIL PROTECTED]>;tag=as2fb0ecc6 To: <sip:[EMAIL PROTECTED]>;tag=a4a48d8b20978897d8e0f5c399e6cc29.3ee7 Contact: <sip:[EMAIL PROTECTED]> Call-ID: [EMAIL PROTECTED] CSeq: 104 ACK User-Agent: Asterisk PBX Content-Length: 0 (NAT) to 217.72.100.4:5060 Nov 11 13:14:52 NOTICE[12366]: chan_sip.c:6774 handle_response: Failed to authenticate on INVITE to '"Roberto Piola" <sip:[EMAIL PROTECTED]>;tag=as2fb0ecc6' _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users