Hi,
I am struggling to get GJTAPI's SIP provider to work with SipX and I ran
into a strange scenario (registrar and SIP message log attached, the SIP
message log is copied after the registrar log excerpt).
The client tries to register but GJTAPI SIP provider constructs a
somewhat complicated user name:
From:
<sip:[EMAIL PROTECTED]:5064;transport=udp>;tag=15290002
The proxy challenges but the credentials are not accepted. Going into
the registrar log, the following problem can be identified:
Unable to get credentials for '[EMAIL PROTECTED]:5064'
It seems that the registrar uses the From (or To) header to extract the
principal and then it does not cut the port part. Therefore the GJTAPI
registration request is rejected.
Whose fault is it? It seems illogical for me to use the From/To header
for identifying the principal when there is the "username" field in the
Authorization header. On the other hand, the user name in the From field
does seem unusual.
Regards,
Gabor
"2008-07-09T08:39:16.840719Z":482:INCOMING:INFO:asterisk:SipClientTcp-28:B57EAB90:SipRegistrar:"Read
SIP message:\n----Remote Host:10.1.9.101---- Port: 54441----\nREGISTER
sip:asterisk.test.onrelay.local:5060;transport=udp SIP/2.0\r\nCall-Id: [EMAIL
PROTECTED]: 23 REGISTER\r\nMax-Forwards: 20\r\nVia: SIP/2.0/TCP
10.1.9.101;branch=z9hG4bK-sipXecs-0017364aef89fda505e44b2b14c6b19935f6\r\nVia:
SIP/2.0/UDP
10.1.7.67:5064;branch=z9hG4bK29614d2fbd877d1bb9e42cfc96a1dfaa\r\nAuthorization:
Digest
response=\"b2e954bb575db7896f165282dcf34fa2\",username=\"200\",nonce=\"5548650e09551579ca84f9574020962148747934\",realm=\"test.onrelay.local\",uri=\"sip:asterisk.test.onrelay.local:5060;transport=udp\"\r\nFrom:
<sip:[EMAIL PROTECTED]:5064;transport=udp>;tag=15290002\r\nTo: <sip:[EMAIL
PROTECTED]:5064;transport=udp>\r\nContent-Length: 0\r\nDate: Wed, 09 Jul 2008
08:39:16 GMT\r\nX-Sipx-Spiral: true\r\nRoute:
<sip:10.1.9.101:5070;transport=tcp;lr>\r\n\r\n====================END====================\n"
"2008-07-09T08:39:16.841067Z":483:SIP:DEBUG:asterisk:SipClientTcp-28:B57EAB90:SipRegistrar:"SipUserAgent[SipUserAgent-4]::dispatch
transaction = (nil), relationship = 0"
"2008-07-09T08:39:16.841560Z":484:SIP:DEBUG:asterisk:SipClientTcp-28:B57EAB90:SipRegistrar:"SipTransaction::handleIncoming
0xb6d2e3d0 relationship REQUEST"
"2008-07-09T08:39:16.841667Z":485:SIP:DEBUG:asterisk:SipClientTcp-28:B57EAB90:SipRegistrar:"SipTransaction::handleChildIncoming
0xb6d2e3d0 relationship REQUEST parent (nil)"
"2008-07-09T08:39:16.841925Z":486:SIP:DEBUG:asterisk:SipRegistrar:B6CFFB90:SipRegistrar:"SipRegistrar::handleMessage()
Start processing SIP message"
"2008-07-09T08:39:16.842205Z":487:SIP:DEBUG:asterisk:SipRegistrarServer:B64F7B90:SipRegistrar:"SipRegistrarServer::handleMessage()
- Start processing REGISTER Message"
"2008-07-09T08:39:16.842310Z":488:AUTH:DEBUG:asterisk:SipRegistrarServer:B64F7B90:SipRegistrar:"SipRegistrar::isValidDomain(asterisk.test.onrelay.local:5060)
VALID"
"2008-07-09T08:39:16.842579Z":489:AUTH:DEBUG:asterisk:SipRegistrarServer:B64F7B90:SipRegistrar:"SipRegistrarServer::isAuthorized
fromNameAddr='<sip:[EMAIL PROTECTED]:5064;transport=udp>;tag=15290002',
toUri='<sip:[EMAIL PROTECTED]:5064;transport=udp>', realm='test.onrelay.local' "
"2008-07-09T08:39:16.842706Z":490:AUTH:DEBUG:asterisk:SipRegistrarServer:B64F7B90:SipRegistrar:"Message
Authorization received: reqRealm='test.onrelay.local', reqUser='200'"
"2008-07-09T08:39:16.842748Z":491:AUTH:DEBUG:asterisk:SipRegistrarServer:B64F7B90:SipRegistrar:"SipRegistrarServer::isAuthorized
Realm Matches"
"2008-07-09T08:39:16.842820Z":492:SIP:DEBUG:asterisk:SipRegistrarServer:B64F7B90:SipRegistrar:"SipNonceDb::nonceSignature:
callId='[EMAIL PROTECTED]' fromTag='15290002' realm='test.onrelay.local'
timestamp='48747934' secret='>z(ãÞvf!³N9å'"
"2008-07-09T08:39:16.842955Z":493:AUTH:ERR:asterisk:SipRegistrarServer:B64F7B90:SipRegistrar:"Unable
to get credentials for '[EMAIL PROTECTED]:5064', realm='test.onrelay.local',
user='200'"
"2008-07-09T08:39:16.843036Z":494:SIP:DEBUG:asterisk:SipRegistrarServer:B64F7B90:SipRegistrar:"SipNonceDb::nonceSignature:
callId='[EMAIL PROTECTED]' fromTag='15290002' realm='test.onrelay.local'
timestamp='48747934' secret='>z(ãÞvf!³N9å'"
"2008-07-09T08:39:16.843377Z":495:SIP:DEBUG:asterisk:SipRegistrarServer:B64F7B90:SipRegistrar:"\n----------------------------------\nSending
final response\nSIP/2.0 401 Unauthorized\r\nFrom: <sip:[EMAIL
PROTECTED]:5064;transport=udp>;tag=15290002\r\nTo: <sip:[EMAIL
PROTECTED]:5064;transport=udp>\r\nCall-Id: [EMAIL PROTECTED]: 23
REGISTER\r\nVia: SIP/2.0/TCP
10.1.9.101;branch=z9hG4bK-sipXecs-0017364aef89fda505e44b2b14c6b19935f6\r\nVia:
SIP/2.0/UDP
10.1.7.67:5064;branch=z9hG4bK29614d2fbd877d1bb9e42cfc96a1dfaa\r\nWww-Authenticate:
Digest realm=\"test.onrelay.local\",
nonce=\"5548650e09551579ca84f9574020962148747934\"\r\nUser-Agent:
sipXecs/3.10.0 sipXecs/registry (Linux)\r\nContent-Length: 0\r\n\r\n"
"2008-07-09T08:39:16.843969Z":496:SIP:DEBUG:asterisk:SipRegistrarServer:B64F7B90:SipRegistrar:"SipClient[SipClientTcp-28]::isAcceptableForDestination
matches 10.1.9.101:5060 but is not trusted"
"2008-07-09T08:39:16.844003Z":497:SIP:DEBUG:asterisk:SipRegistrarServer:B64F7B90:SipRegistrar:"SipProcolServerBase[SipTcpServer-5]::send
0xb6d15d70, remote host: 10.1.9.101:5060 remote IP: 10.1.9.101:5060 remote
Via address: :-1 received address: :-1"
"2008-07-09T08:39:16.844566Z":498:OUTGOING:INFO:asterisk:SipRegistrarServer:B64F7B90:SipRegistrar:"SipUserAgent::sendTcp
TCP SIP User Agent sent message:\n----Remote Host:10.1.9.101---- Port:
5060----\nSIP/2.0 401 Unauthorized\r\nFrom: <sip:[EMAIL
PROTECTED]:5064;transport=udp>;tag=15290002\r\nTo: <sip:[EMAIL
PROTECTED]:5064;transport=udp>\r\nCall-Id: [EMAIL PROTECTED]: 23
REGISTER\r\nVia: SIP/2.0/TCP
10.1.9.101;branch=z9hG4bK-sipXecs-0017364aef89fda505e44b2b14c6b19935f6\r\nVia:
SIP/2.0/UDP
10.1.7.67:5064;branch=z9hG4bK29614d2fbd877d1bb9e42cfc96a1dfaa\r\nWww-Authenticate:
Digest realm=\"test.onrelay.local\",
nonce=\"5548650e09551579ca84f9574020962148747934\"\r\nUser-Agent:
sipXecs/3.10.0 sipXecs/registry (Linux)\r\nDate: Wed, 09 Jul 2008 08:39:16
GMT\r\nAllow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, REGISTER,
SUBSCRIBE\r\nAccept-Language: en\r\nSupported: gruu\r\nContent-Length:
0\r\n\r\n--------------------END--------------------\n"
09:39:16.337052 IP (tos 0x0, ttl 127, id 534, offset 0, flags [none], proto:
UDP (17), length: 508) 10.1.7.67.ca-1 > asterisk.test.onrelay.local.sip: SIP,
length: 480
REGISTER sip:asterisk.test.onrelay.local:5060;transport=udp SIP/2.0
Call-ID: [EMAIL PROTECTED]
CSeq: 1 REGISTER
From: <sip:[EMAIL PROTECTED]:5064;transport=udp>;tag=15290002
To: <sip:[EMAIL PROTECTED]:5064;transport=udp>
Via: SIP/2.0/UDP
10.1.7.67:5064;branch=z9hG4bK9b10dcb52d126f66e26438a83c3b2a1d
Max-Forwards: 70
Expires: 3600
Contact: <sip:[EMAIL PROTECTED]:5064;transport=udp>
Content-Length: 0
09:39:16.361288 IP (tos 0x0, ttl 64, id 10772, offset 0, flags [none], proto:
UDP (17), length: 666) asterisk.test.onrelay.local.sip > 10.1.7.67.ca-1: SIP,
length: 638
SIP/2.0 401 Unauthorized
From: <sip:[EMAIL PROTECTED]:5064;transport=udp>;tag=15290002
To: <sip:[EMAIL PROTECTED]:5064;transport=udp>
Call-Id: [EMAIL PROTECTED]
Cseq: 1 REGISTER
Via: SIP/2.0/UDP
10.1.7.67:5064;branch=z9hG4bK9b10dcb52d126f66e26438a83c3b2a1d
Www-Authenticate: Digest realm="test.onrelay.local",
nonce="5548650e09551579ca84f9574020962148747934"
User-Agent: sipXecs/3.10.0 sipXecs/registry (Linux)
Date: Wed, 09 Jul 2008 08:39:16 GMT
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, REGISTER, SUBSCRIBE
Accept-Language: en
Supported: gruu
Content-Length: 0
09:39:16.455711 IP (tos 0x0, ttl 127, id 535, offset 0, flags [none], proto:
UDP (17), length: 641) 10.1.7.67.ca-1 > asterisk.test.onrelay.local.sip: SIP,
length: 613
REGISTER sip:asterisk.test.onrelay.local:5060;transport=udp SIP/2.0
Call-ID: [EMAIL PROTECTED]
CSeq: 3 REGISTER
Max-Forwards: 70
Via: SIP/2.0/UDP
10.1.7.67:5064;branch=z9hG4bKcd147213d3d7cafea0a799d306241d45
Authorization: Digest
response="b2e954bb575db7896f165282dcf34fa2",username="200",nonce="5548650e09551579ca84f9574020962148747934",realm="test.onrelay.local",uri="sip:asterisk.test.onrelay.local:5060;transport=udp"
From: <sip:[EMAIL PROTECTED]:5064;transport=udp>;tag=15290002
To: <sip:[EMAIL PROTECTED]:5064;transport=udp>
Content-Length: 0
09:39:16.465306 IP (tos 0x0, ttl 64, id 10773, offset 0, flags [none], proto:
UDP (17), length: 666) asterisk.test.onrelay.local.sip > 10.1.7.67.ca-1: SIP,
length: 638
SIP/2.0 401 Unauthorized
From: <sip:[EMAIL PROTECTED]:5064;transport=udp>;tag=15290002
To: <sip:[EMAIL PROTECTED]:5064;transport=udp>
Call-Id: [EMAIL PROTECTED]
Cseq: 3 REGISTER
Via: SIP/2.0/UDP
10.1.7.67:5064;branch=z9hG4bKcd147213d3d7cafea0a799d306241d45
Www-Authenticate: Digest realm="test.onrelay.local",
nonce="5548650e09551579ca84f9574020962148747934"
User-Agent: sipXecs/3.10.0 sipXecs/registry (Linux)
Date: Wed, 09 Jul 2008 08:39:16 GMT
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, REGISTER, SUBSCRIBE
Accept-Language: en
Supported: gruu
Content-Length: 0
_______________________________________________
sipx-users mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-users
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-users