[Home]

Summary:ASTERISK-05266: SIP REGISTER fails with unknown domain when no domain have been specified
Reporter:Roy Sigurd Karlsbakk (rkarlsba)Labels:
Date Opened:2005-10-09 05:29:05Date Closed:2008-01-15 15:50:48.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Registration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 0005412.patch
Description:SIP REGISTER fails with 'Not a local SIP domain', although SIP domain support is not enabled

voicemail1*CLI> sip show domains
SIP Domain support not enabled.

see SIP DEBUG below


****** ADDITIONAL INFORMATION ******

<-- SIP read from x.x.x.84:5060:
REGISTER sip:x.x.x.140 SIP/2.0
From: <sip:1001@x.x.x.140>;tag=c0a80404-13c4-4348ef85-8040bb1-6726
To: <sip:1001@x.x.x.140>
Call-ID: c0a80404-13c4-4348ef85-8040bac-2668
CSeq: 1 REGISTER
Via: SIP/2.0/UDP x.x.x.4:5060;branch=z9hG4bK-4348ef85-8040bb1-2f67
Max-Forwards: 70
Supported: replaces
User-Agent: FXS_GW (4asipfxs.108a)
Contact: <sip:1001@x.x.x.4:5060>;expires=60
Content-Length: 0

--- (11 headers 0 lines)---
Using latest REGISTER request as basis request
Sending to x.x.x.4 : 5060 (non-NAT)
Transmitting (no NAT) to x.x.x.4:5060:
SIP/2.0 404 Not found
Via: SIP/2.0/UDP x.x.x.4:5060;branch=z9hG4bK-4348ef85-8040bb1-2f67;received=x.x.x.84
From: <sip:1001@x.x.x.140>;tag=c0a80404-13c4-4348ef85-8040bb1-6726
To: <sip:1001@x.x.x.140>;tag=as15bdfbab
Call-ID: c0a80404-13c4-4348ef85-8040bac-2668
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:1001@x.x.x.140>
Content-Length: 0


---
Oct  9 12:22:24 NOTICE[11455]: chan_sip.c:10685 handle_request_register: Registration from '<sip:1001@x.x.x.140>' failed for 'x.x.x.84' - Not a local SIP domain
Scheduling destruction of call 'c0a80404-13c4-4348ef85-8040bac-2668' in 15000 ms
Comments:By: Olle Johansson (oej) 2005-10-09 17:00:16

Interesting...

By: Roy Sigurd Karlsbakk (rkarlsba) 2005-10-10 04:55:32

well
how can i debug this further?
it used to work a few days ago.......

roy

By: Roy Sigurd Karlsbakk (rkarlsba) 2005-10-10 05:22:35

I tried rolling back a couple of weeks, and the error message then shows

Oct 10 12:20:40 NOTICE[14784]: chan_sip.c:10385 handle_request_register: Registration from '<sip:1001@x.x.x.140>' failed for 'x.x.x.84' - Username/auth name mismatch

By: Olle Johansson (oej) 2005-10-10 15:54:02

I am working with Astricon, so bug tracker is a bit de-prioritized for a few days... Sorry.

By: BJ Weschke (bweschke) 2005-10-11 00:11:04

Can you send your sip.conf and the environment in use here to reproduce this?

I've just tried to reproduce with CVS-HEAD and cannot. It registers every time succesfully even though I've verified my SIP Domain support is not enabled.

By: Roy Sigurd Karlsbakk (rkarlsba) 2005-10-11 03:32:12

I beleive the bug is merely HEAD reporting 'not a local sip domain' where it should report invalid user/pass...

By: BJ Weschke (bweschke) 2005-10-11 07:14:49

Specifying right username/wrong password seems to report correctly.
<-- SIP read from 10.1.0.1:5060:
REGISTER sip:172.30.1.252 SIP/2.0
Via: SIP/2.0/UDP 10.1.0.1:5060;branch=z9hG4bK49c5e2b3
From: <sip:1001@172.30.1.252>;tag=as27c2db08
To: <sip:1001@172.30.1.252>
Call-ID: 31d439412374be2d148b259d4b5fa36d@69.44.153.174
CSeq: 103 REGISTER
User-Agent: Asterisk PBX
Authorization: Digest username="1001", realm="asterisk", algorithm=MD5, uri="sip:1001@172.30.1.252", nonce="083e12b4", response="59b5cc51dc0e5627a1736d7dee0013fc", opaque="
"
Expires: 120
Contact: <sip:s@10.1.0.1>
Event: registration
Content-Length: 0


--- (12 headers 0 lines)---
Using latest REGISTER request as basis request
Sending to 10.1.0.1 : 5060 (non-NAT)
Transmitting (no NAT) to 10.1.0.1:5060:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.1.0.1:5060;branch=z9hG4bK49c5e2b3;received=10.1.0.1
From: <sip:1001@172.30.1.252>;tag=as27c2db08
To: <sip:1001@172.30.1.252>
Call-ID: 31d439412374be2d148b259d4b5fa36d@69.44.153.174
CSeq: 103 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:1001@172.30.1.252>
Content-Length: 0


---
Transmitting (no NAT) to 10.1.0.1:5060:
SIP/2.0 403 Forbidden (Bad auth)
Via: SIP/2.0/UDP 10.1.0.1:5060;branch=z9hG4bK49c5e2b3;received=10.1.0.1
From: <sip:1001@172.30.1.252>;tag=as27c2db08
To: <sip:1001@172.30.1.252>;tag=as7d627c8c
Call-ID: 31d439412374be2d148b259d4b5fa36d@69.44.153.174
CSeq: 103 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:1001@172.30.1.252>
Content-Length: 0


---
Oct 11 16:14:11 NOTICE[5222]: chan_sip.c:10685 handle_request_register: Registration from '<sip:1001@172.30.1.252>' failed for '10.1.0.1' - Wrong password
Scheduling destruction of call '31d439412374be2d148b259d4b5fa36d@69.44.153.174' in 15000 ms
Destroying call '31d439412374be2d148b259d4b5fa36d@69.44.153.174'

By: BJ Weschke (bweschke) 2005-10-11 07:17:25

wrong username does produce that error msg. OK.

astrand-1*CLI>
<-- SIP read from 10.1.0.1:5060:
REGISTER sip:172.30.1.252 SIP/2.0
Via: SIP/2.0/UDP 10.1.0.1:5060;branch=z9hG4bK0efb134a
From: <sip:no1001@172.30.1.252>;tag=as5a8f7cfe
To: <sip:no1001@172.30.1.252>
Call-ID: 10ef1b7f359cc51c2587d3ed75b917d2@69.44.153.174
CSeq: 102 REGISTER
User-Agent: Asterisk PBX
Expires: 120
Contact: <sip:s@10.1.0.1>
Event: registration
Content-Length: 0


--- (11 headers 0 lines)---
Using latest REGISTER request as basis request
Sending to 10.1.0.1 : 5060 (non-NAT)
Transmitting (no NAT) to 10.1.0.1:5060:
SIP/2.0 404 Not found
Via: SIP/2.0/UDP 10.1.0.1:5060;branch=z9hG4bK0efb134a;received=10.1.0.1
From: <sip:no1001@172.30.1.252>;tag=as5a8f7cfe
To: <sip:no1001@172.30.1.252>;tag=as786b10ac
Call-ID: 10ef1b7f359cc51c2587d3ed75b917d2@69.44.153.174
CSeq: 102 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:no1001@172.30.1.252>
Content-Length: 0


---
Oct 11 16:19:15 NOTICE[5352]: chan_sip.c:10685 handle_request_register: Registration from '<sip:no1001@172.30.1.252>' failed for '10.1.0.1' - Not a local SIP domain
Scheduling destruction of call '10ef1b7f359cc51c2587d3ed75b917d2@69.44.153.174' in 15000 ms
Destroying call '10ef1b7f359cc51c2587d3ed75b917d2@69.44.153.174'

By: BJ Weschke (bweschke) 2005-10-11 08:01:24

Try this patch. I think it's OK to do this since the explicit checking of whether or not the domain is valid is happening earlier in the register_verify function and returning -3 there if the domain functionality is enabled and the domain specified isn't valid. Olle would be the one to confirm whether or not this is "the right way" to fix this though.

By: Serge Vecher (serge-v) 2005-10-11 08:55:10

AFAIK, this is still an unresolved buglette from bug ASTERISK-4352 (SIP Domain Support)See my comments on 09-06-05 19:33 to that bug.

bweschke, please post SIP traces as attachments not inline notes as per Bug Guidelines. Thanks!



By: BJ Weschke (bweschke) 2005-10-11 09:07:36

You're right. The issue is one in the same. Please try the patch and see if it works for you. We need to also verify that it doesn't break new domain functionality (I don't think it will).

By: Mark Spencer (markster) 2005-10-13 16:49:05

Fixed in CVS head.

By: Digium Subversion (svnbot) 2008-01-15 15:50:48.000-0600

Repository: asterisk
Revision: 6764

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r6764 | markster | 2008-01-15 15:50:47 -0600 (Tue, 15 Jan 2008) | 2 lines

Display proper error for matching domain registers (bug ASTERISK-5266)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=6764