Adium

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#16237 closed defect (fixed)

Possible case sensitivity issue in SIP

Reported by: pete-woods Owned by:
Milestone: Adium 1.5.8 Component: Adium Core
Version: 1.5.4 Severity: normal
Keywords: Cc:
Patch Status:

Description

Summary

Trying to connect Adium to an Ubuntu SIP gateway over UDP.

Steps to reproduce

  1. Add SIP account to Adium with CaseSensitive username. Mine should be PeteWoods.
  2. My account connects over UDP. I don't know if this matters or not.
  3. Connect to account.

Expected results

Successful connection.

Actual results

Error: Unknown server response.

Notes

Adium seems to get a 404 error response. It doesn't handle this properly as far as I can tell.

I'm not certain if the name case sensitivity is the problem, but I can connect with the same details with a number of other clients.

There's no component for Service/SIP, so sorry I've set it wrongly.

Wireshark capture:

REGISTER sip:voip.canonical.com SIP/2.0
Via: SIP/2.0/UDP 185.3.88.209:5060;branch=z9hG4bK0DF40D9E7FD34DF214D7
From: <sip:petewoods@voip.canonical.com>;tag=5502520420;epid=1234567890
To: <sip:petewoods@voip.canonical.com>
Max-Forwards: 10
CSeq: 1 REGISTER
User-Agent: Purple/2.10.5devel
Call-ID: ED5Fg2080a5C71iEB71m4BAFt8D4Fb6E2DxFC1Bx
Contact: <sip:petewoods@185.3.88.209:5060;transport=udp>;methods="MESSAGE, SUBSCRIBE, NOTIFY"
Expires: 900
Content-Length: 0

SIP/2.0 404 Not found
Via: SIP/2.0/UDP 185.3.88.209:5060;branch=z9hG4bK0DF40D9E7FD34DF214D7;received=185.3.88.209
From: <sip:petewoods@voip.canonical.com>;tag=5502520420;epid=1234567890
To: <sip:petewoods@voip.canonical.com>;tag=as16d18e06
Call-ID: ED5Fg2080a5C71iEB71m4BAFt8D4Fb6E2DxFC1Bx
CSeq: 1 REGISTER
Server: Asterisk PBX 1.6.2.5-0ubuntu1.4
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0

REGISTER sip:voip.canonical.com SIP/2.0
Via: SIP/2.0/UDP 185.3.88.209:5060;branch=z9hG4bK1A27E91BCE7E0573A7B3
From: <sip:petewoods@voip.canonical.com>;tag=2477211481;epid=1234567890
To: <sip:petewoods@voip.canonical.com>
Max-Forwards: 10
CSeq: 2 REGISTER
User-Agent: Purple/2.10.5devel
Call-ID: ED5Fg2080a5C71iEB71m4BAFt8D4Fb6E2DxFC1Bx
Contact: <sip:petewoods@185.3.88.209:5060;transport=udp>;methods="MESSAGE, SUBSCRIBE, NOTIFY"
Expires: 900
Content-Length: 0

SIP/2.0 404 Not found
Via: SIP/2.0/UDP 185.3.88.209:5060;branch=z9hG4bK1A27E91BCE7E0573A7B3;received=185.3.88.209
From: <sip:petewoods@voip.canonical.com>;tag=2477211481;epid=1234567890
To: <sip:petewoods@voip.canonical.com>;tag=as16d18e06
Call-ID: ED5Fg2080a5C71iEB71m4BAFt8D4Fb6E2DxFC1Bx
CSeq: 2 REGISTER
Server: Asterisk PBX 1.6.2.5-0ubuntu1.4
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0

REGISTER sip:voip.canonical.com SIP/2.0
Via: SIP/2.0/UDP 185.3.88.209:5060;branch=z9hG4bK56D84295FE3CA0F0B8E8
From: <sip:petewoods@voip.canonical.com>;tag=1070245544;epid=1234567890
To: <sip:petewoods@voip.canonical.com>
Max-Forwards: 10
CSeq: 3 REGISTER
User-Agent: Purple/2.10.5devel
Call-ID: ED5Fg2080a5C71iEB71m4BAFt8D4Fb6E2DxFC1Bx
Contact: <sip:petewoods@185.3.88.209:5060;transport=udp>;methods="MESSAGE, SUBSCRIBE, NOTIFY"
Expires: 900
Content-Length: 0

SIP/2.0 404 Not found
Via: SIP/2.0/UDP 185.3.88.209:5060;branch=z9hG4bK56D84295FE3CA0F0B8E8;received=185.3.88.209
From: <sip:petewoods@voip.canonical.com>;tag=1070245544;epid=1234567890
To: <sip:petewoods@voip.canonical.com>;tag=as16d18e06
Call-ID: ED5Fg2080a5C71iEB71m4BAFt8D4Fb6E2DxFC1Bx
CSeq: 3 REGISTER
Server: Asterisk PBX 1.6.2.5-0ubuntu1.4
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


Change History (7)

comment:1 Changed 4 years ago by pete-woods

From a quick look at the protocol on wikipedia, it does indeed appear that:

404 Not Found (User not found)

The server has definitive information that the user does not exist at the domain specified in the Request-URI. This status is also returned if the domain in the Request-URI does not match any of the domains handled by the recipient of the request.

http://en.wikipedia.org/wiki/List_of_SIP_response_codes

I believe this confirms the two issues, one of which is it not handling a 404 response correctly, and the other which is case sensitivity on the username.

comment:2 Changed 4 years ago by pete-woods

Interestingly, the simple.c implementation in libpurple doesn't do any lower-casing itself. It comes in from a line saying const char *username = purple_account_get_username(account); and is not lower-cased thereafter.
http://hg.pidgin.im/pidgin/main/file/39c2c22bc99f/libpurple/protocols/simple/simple.c#l668

However you can see that only return codes 200 and 401 are handled here:
http://hg.pidgin.im/pidgin/main/file/39c2c22bc99f/libpurple/protocols/simple/simple.c#l1097

comment:3 Changed 4 years ago by pete-woods

I have fixed this issue myself in the following commit:
https://bitbucket.org/pete-woods/adium/commits/6ea13c704021dc44034bbb5fa69b7e110b1ae6aa?at=default

Please review! :)

comment:4 Changed 4 years ago by Robby

  • Milestone set to Adium 1.5.8
  • Resolution set to fixed
  • Status changed from new to closed

Thanks for the patch. It's been reviewed by xnyhps and I've committed it to the 1.5.8 branch: https://hg.adium.im/adium/rev/f808fb8a9f35.

comment:5 Changed 4 years ago by Robby

Would you like be credited with "Pete Woods"?

comment:6 Changed 4 years ago by pete-woods

Seems a bit rich to be credited for a two-line patch! :)

comment:7 Changed 4 years ago by Robby

That's how we roll. :-)

Note: See TracTickets for help on using tickets.