[Asterisk-Dev] problems registering asterisk to cirpack

Hugo Trippaers htrippaers at enertel.nl
Thu Dec 9 06:52:42 MST 2004


Hey developers,

At my company we are currently implementing a cirpack solution for the
interconnects with our PSTN network. We want to use asterisk both as a
lowcost solution for our customers and as a testing platform.

I'm trying to make my test asterisk server connect to the cirpack
server. I added the correct registration information in the sip
configfile. But it refused to work. I checked the logfiles generated by
both cirpack and asterisk and i could not see any fault in the messages
that were sent by asterisk and cirpack. But it gave me a 481 Dialog does
not exist message.

I verified the authorisation data by connecting a cisco ATA using the
same account details. I created two logfiles from both the
asterisk-cirpack session and the ata-cirpack session. I sent all to
cirpack and below is the response i got.

What do you guys think of this?

Regards,

Hugo

> Problem detected. It's a known issue on the asterisk SIP device:
> 
> in sipbrick.1 "481 Dialog does not exist"
> 
> 
> The asterik has a bug on the management of the proxy authentication in the register.
> 
> * it sends a register, 
> 	call id CID
> 	tag in the from TFROM
> 	no tag in the to.
> * we respond 401
> 	call id CID
> 	tag in the from TFROM
> 	tag in the to TTO.
> => All this is in conformance with the RFC. However, the asterik should normally send another REGISTER, with a new call id. 
> It doesn't do that and in fact reuses the call ID used in the previous exchange.
>  
> We had made modifications to support that case 
> BUT
> * the asterisk sends a register with an authentication
> 	call id CID
> 	tag in the from TFROM
> 	tag in the to TTO !  Which is invalid since the dialog doesn't exist anymore.
> 
> => This causes justified error 481.
>  
> regards,
> 
> marc

-------------- next part --------------
(14:51:44.57) W0 in<- 394 bytes,
"REGISTER sip:10.166.64.70 SIP/2.0
Via: SIP/2.0/UDP 195.7.140.28:5060;branch=z9hG4bK312405b5
From: <sip:asterisk-pbx-01 at 10.166.64.70>;tag=as53d25b6c
To: <sip:asterisk-pbx-01 at 10.166.64.70>
Call-ID: 327b23c6643c98696633487374b0dc51 at 195.7.140.28
CSeq: 106 REGISTER
User-Agent: Asterisk PBX
Expires: 120
Contact: <sip:asterisk-pbx-01 at 195.7.140.28>
Event: registration
Content-Length: 0

"

(14:51:44.57) W0 SIP[00,04095] Receiving SIP_REGISTER_IN <327b23c6643c98696633487374b0dc51@[195.7.140.28]>
(14:51:44.57) W0 SIP[00,04095] Receiving SM_REPORT_IN (Event) state=18(SIP_STATE_REGISTER_IN)
(14:51:44.57) W0 SIP[00,04095] Sending SIP_REGISTER_RS <401>
(14:51:44.57) W0 SIP[00,04095] Receiving SM_REPORT_IN (Event) state=1(SIP_STATE_IDLE)
(14:51:44.57) W0 out ->474 bytes,
"SIP/2.0 401 Unauthorized
Call-ID: 327b23c6643c98696633487374b0dc51 at 195.7.140.28
CSeq: 106 REGISTER
From: <sip:asterisk-pbx-01 at 10.166.64.70>;tag=as53d25b6c
To: <sip:asterisk-pbx-01 at 10.166.64.70>;tag=000000000000000000000f398881
Via: SIP/2.0/UDP 195.7.140.28:5060;received=195.7.140.28;branch=z9hG4bK312405b5
WWW-Authenticate: Digest realm="corp.cirpack.com",nonce="000000000000000000000f398838",opaque="000000000f398839",stale=false,algorithm=MD5
Content-Length: 0

"

(14:51:44.57) W0 in<- 652 bytes,
"REGISTER sip:10.166.64.70 SIP/2.0
Via: SIP/2.0/UDP 195.7.140.28:5060;branch=z9hG4bK4eea4a98
From: <sip:asterisk-pbx-01 at 10.166.64.70>;tag=as53d25b6c
To: <sip:asterisk-pbx-01 at 10.166.64.70>;tag=000000000000000000000f398881
Call-ID: 327b23c6643c98696633487374b0dc51 at 195.7.140.28
CSeq: 107 REGISTER
User-Agent: Asterisk PBX
Authorization: Digest username="asterisk-pbx-01", realm="corp.cirpack.com", algorithm=MD5, uri="sip:10.166.64.70", nonce="000000000000000000000f398838", response="51caf5437ada45262b1d43b5a177d430", opaque="000000000f398839"
Expires: 120
Contact: <sip:asterisk-pbx-01 at 195.7.140.28>
Event: registration
Content-Length: 0

"

(14:51:44.57) W0 out ->321 bytes,
"SIP/2.0 481 Dialog does not exist
Call-ID: 327b23c6643c98696633487374b0dc51 at 195.7.140.28
CSeq: 107 REGISTER
From: <sip:asterisk-pbx-01 at 10.166.64.70>;tag=as53d25b6c
To: <sip:asterisk-pbx-01 at 10.166.64.70>;tag=000000000000000000000f398881
Via: SIP/2.0/UDP 195.7.140.28:5060;branch=z9hG4bK4eea4a98
Content-Length: 0

"
-------------- next part --------------
(15:00:43.25) W0 in<- 366 bytes,
"REGISTER sip:10.166.64.70 SIP/2.0
Via: SIP/2.0/UDP 195.7.140.24:5060
From: sip:asterisk-pbx-01 at 10.166.64.70;tag=2397961173
To: sip:asterisk-pbx-01 at 10.166.64.70
Call-ID: 2105110304 at 195.7.140.24
CSeq: 1 REGISTER
Contact: <sip:asterisk-pbx-01 at 195.7.140.24:5060;transport=udp>;expires=3600
User-Agent: Cisco ATA 188  v3.1.1 atasip (040629A)
Content-Length: 0

"

(15:00:43.25) W0 SIP[00,04095] Receiving SIP_REGISTER_IN <2105110304@[195.7.140.24]>
(15:00:43.25) W0 SIP[00,65535] Receiving SM_REPORT_IN (Error) error=20(Invalid number of repetitions) param=53
(15:00:43.25) W0 SIP[00,04095] Receiving SM_REPORT_IN (Event) state=18(SIP_STATE_REGISTER_IN)
(15:00:43.25) W0 SIP[00,04095] Sending SIP_REGISTER_RS <401>
(15:00:43.25) W0 SIP[00,04095] Receiving SM_REPORT_IN (Event) state=1(SIP_STATE_IDLE)
(15:00:43.25) W0 out ->427 bytes,
"SIP/2.0 401 Unauthorized
Call-ID: 2105110304 at 195.7.140.24
CSeq: 1 REGISTER
From: <sip:asterisk-pbx-01 at 10.166.64.70>;tag=2397961173
To: <sip:asterisk-pbx-01 at 10.166.64.70>;tag=000000000000000000000f39889b
Via: SIP/2.0/UDP 195.7.140.24:5060;received=195.7.140.24
WWW-Authenticate: Digest realm="corp.cirpack.com",nonce="000000000000000000000f398838",opaque="000000000f398839",stale=false,algorithm=MD5
Content-Length: 0

"

(15:00:43.29) W0 in<- 571 bytes,
"REGISTER sip:10.166.64.70 SIP/2.0
Via: SIP/2.0/UDP 195.7.140.24:5060
From: sip:asterisk-pbx-01 at 10.166.64.70;tag=2397961173
To: sip:asterisk-pbx-01 at 10.166.64.70
Call-ID: 2105110304 at 195.7.140.24
CSeq: 2 REGISTER
Contact: <sip:asterisk-pbx-01 at 195.7.140.24:5060;transport=udp>;expires=3600
User-Agent: Cisco ATA 188  v3.1.1 atasip (040629A)
Authorization: Digest username="asterisk-pbx-01",realm="corp.cirpack.com",nonce="000000000000000000000f398838",uri="sip:10.166.64.70",response="51caf5437ada45262b1d43b5a177d430",opaque="000000000f398839"
Content-Length: 0

"

(15:00:43.29) W0 SIP[00,04095] Receiving SIP_REGISTER_IN <2105110304@[195.7.140.24]>
(15:00:43.29) W0 SIP[00,65535] Receiving SM_REPORT_IN (Error) error=20(Invalid number of repetitions) param=53
(15:00:43.29) W0 SIP[00,04095] Receiving SM_REPORT_IN (Event) state=18(SIP_STATE_REGISTER_IN)
(15:00:43.29) W0 SIP[00,04095] Sending SIP_REGISTER_RS <100>
(15:00:43.29) W0 out ->248 bytes,
"SIP/2.0 100 Trying
Call-ID: 2105110304 at 195.7.140.24
CSeq: 2 REGISTER
From: <sip:asterisk-pbx-01 at 10.166.64.70>;tag=2397961173
To: <sip:asterisk-pbx-01 at 10.166.64.70>
Via: SIP/2.0/UDP 195.7.140.24:5060;received=195.7.140.24
Content-Length: 0

"

(15:00:43.32) W0 SIP[00,04095] Sending SIP_REGISTER_RS <200>
(15:00:43.32) W0 SIP[00,04095] Receiving SM_REPORT_IN (Event) state=1(SIP_STATE_IDLE)
(15:00:43.32) W0 out ->354 bytes,
"SIP/2.0 200 OK
Call-ID: 2105110304 at 195.7.140.24
Contact: <sip:asterisk-pbx-01 at 195.7.140.24:5060;transport=udp>;expires=3600
CSeq: 2 REGISTER
From: <sip:asterisk-pbx-01 at 10.166.64.70>;tag=2397961173
To: <sip:asterisk-pbx-01 at 10.166.64.70>;tag=000000000000000000000f39889c
Via: SIP/2.0/UDP 195.7.140.24:5060;received=195.7.140.24
Content-Length: 0

"


More information about the asterisk-dev mailing list