SIP/SIMPLE not workin, any ideas on a fix?

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
xommen
Harmless
Posts: 6
Joined: Sun Apr 27, 2008 3:08 pm

SIP/SIMPLE not workin, any ideas on a fix?

Postby xommen » Mon Apr 28, 2008 4:52 pm

I'm trying to use the sip simple plugin but I am getting an error, I looked in the debug log and found that the plugin tries a register with 330192.168.10.104 @ null where it should send 330@192.168.10.104.

I see that it is written incorrect in the accounts.xml of libpurple allready.

I looked in the source for ESPurpleSimpleAccount.m where I found the following lines but have no idear if and how I could fix it there (if it can be fixed there ;-)).

NSString *userNameWithHost;

/*
* Purple stores the username in the format username@server. We need to pass it a username in this format.
*/
if ([UID rangeOfString:@"@"].location != NSNotFound) {
userNameWithHost = UID;
} else {
userNameWithHost = [UID stringByAppendingString:[self host]];
}

return [userNameWithHost UTF8String];

If anyone has a clue that would be great

xommen
Harmless
Posts: 6
Joined: Sun Apr 27, 2008 3:08 pm

Re: SIP/SIMPLE not workin, any ideas on a fix?

Postby xommen » Mon Apr 28, 2008 5:35 pm

Ok I looked in the trac.adiumx.com and found a really old ticket that shows this also it's Ticket #5937, so it is a known issue which is not showing up in pidgin, and as I said seems to be because the wrong information is written to libpurple's accounts.xml.

xommen
Harmless
Posts: 6
Joined: Sun Apr 27, 2008 3:08 pm

Re: SIP/SIMPLE not workin, any ideas on a fix?

Postby xommen » Mon Apr 28, 2008 9:07 pm

Ok I found a way to fix the @ problem I replaced:
if ([UID rangeOfString:@"@"].location != NSNotFound) {
userNameWithHost = UID;
} else {
userNameWithHost = [UID stringByAppendingString:[self host]];
}

with:

if ([UID rangeOfString:@"@"].location != NSNotFound) {
userNameWithHost = UID;
} else {
userNameWithHost = [NSString stringWithFormat:@"%@@%@",UID,[self host]];
}

which I found in the Jabber code, the connection is now being made but authentication fails, if anybody has an idea on that it would be nice (I'm trying this with pbxnsip as a server by the way).

User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Re: SIP/SIMPLE not workin, any ideas on a fix?

Postby evands » Tue Apr 29, 2008 2:21 am

I'm not sure why authentication fails; you might get more information by looking in the Adium Debug Window under the Adium menu. I'll apply your fix for the user ID, which looks good.
The duck still burns.
--
My company: Saltatory Software. Check it out :)

xommen
Harmless
Posts: 6
Joined: Sun Apr 27, 2008 3:08 pm

Re: SIP/SIMPLE not workin, any ideas on a fix?

Postby xommen » Tue Apr 29, 2008 1:53 pm

If I look in the log I see a 401 response to my register request and that keeps repeating, I've attached the log below, my macbook is in 192.168.2.x behind Nat to my normal wired network which is the 192.168.27.x, I've also tried connecting to my server at the office which is in 192.168.10.x and get the same kind of results. Any ideas are welcome

15:43:22: -[AIAccount(Abstract) retrievePasswordThenConnect]: Retrieving <ESPurpleSimpleAccount:6e62780 22>:1503's password (promptOption 1)
15:43:22: <ESPurpleSimpleAccount:6e62780 22>:1503: Updating status for key: Online
15:43:22: <ESPurpleSimpleAccount:6e62780 22>:1503: Updating status for key: Enabled
15:43:22: <ESPurpleSimpleAccount:6e62780 22>:1503: Updating status for key: FullNameAttr
15:43:22: handleConnectivityForAccount: <ESPurpleSimpleAccount:6e62780 22>:1503 reachable: 1
15:43:24: <ESPurpleSimpleAccount:6e62780 22>:1503: Updating status for key: User Icon
15:43:24: Original image of size 120.000000 120.000000
15:43:24: Adium: Connect: 1503 initiating connection using status state <AIStatus: 6e14360 [Available]> ((null)).
15:43:24: Setting status on 948edd0 (1503@192.168.27.2): ID available, isActive 1, attributes {
}
15:43:24: (Libpurple: account) Connecting to account 1503@192.168.27.2
15:43:24: (Libpurple: connection) Connecting. gc = 0x94b2230
15:43:24: Connecting: gc=0x94b2230 (Connecting) 1 / 2
15:43:24: (Libpurple: dnssrv) querying SRV record for _sip._tcp.192.168.27.2
15:43:24: ************ 1503 --step-- 1
15:43:24: (Libpurple: dnssrv) found 0 SRV entries
15:43:24: (Libpurple: network) Listening on port: 5061
15:43:24: (Libpurple: nat-pmp) Found a default gateway
15:43:24: (Libpurple: nat-pmp) Attempting to create a NAT-PMP mapping the private port 5061, and the public port 5061
15:43:24: (Libpurple: nat-pmp) Timeout: 0s 250000us
15:43:24: (Libpurple: nat-pmp) The opcode for the response from the NAT device (0) does not match the request opcode (2 + 128 = 130)!
15:43:24: Called write with no write_tag (read_tag 210 write_tag 0) for 9427510
15:43:25: (Libpurple: util) requested to fetch (http://192.168.2.1:80/IGDDeviceDescription.xml), full=1, user_agent=((null)), http11=1
15:43:25: (Libpurple: dns) DNS query for '192.168.2.1' queued
15:43:25: Performing DNS resolve: 192.168.2.1:80
15:43:25: DNS resolve complete for 192.168.2.1:80
15:43:25: (Libpurple: dnsquery) IP resolved for 192.168.2.1
15:43:25: (Libpurple: proxy) Attempting connection to 192.168.2.1
15:43:25: (Libpurple: proxy) Connecting to 192.168.2.1:80 with no proxy
15:43:25: (Libpurple: proxy) Connection in progress
15:43:25: (Libpurple: proxy) Connected to 192.168.2.1:80.
15:43:25: (Libpurple: util) Request: 'GET /IGDDeviceDescription.xml HTTP/1.1
Connection: close
Host: 192.168.2.1:80

'
15:43:25: (Libpurple: util) Response headers: 'HTTP/1.1 200 OK
Content-Type: text/xml
DATE: Mon, 03 Jan 2000 19:36:23 GMT
Pragma: no-cache,no-store
Cache-control: no-cache,no-store,must-revalidate,max-age=-1
Expires: -1
Connection: close

'
15:43:25: Called write with no write_tag (read_tag 214 write_tag 0) for 9ae8dc0
15:43:25: (Libpurple: upnp) purple_upnp_set_port_mapping(): couldn't get local ip
15:43:25: (Libpurple: network) Couldn't create UPnP mapping
15:43:25: (Libpurple: util) requested to fetch (http://192.168.2.1/UD/?4), full=0, user_agent=((null)), http11=1
15:43:25: (Libpurple: dns) DNS query for '192.168.2.1' queued
15:43:25: (Libpurple: util) requested to fetch (http://192.168.2.1/UD/?4), full=0, user_agent=((null)), http11=1
15:43:25: (Libpurple: dns) DNS query for '192.168.2.1' queued
15:43:25: (Libpurple: dns) DNS query for '192.168.2.1' queued
15:43:25: Performing DNS resolve: 192.168.2.1:80
15:43:25: DNS resolve complete for 192.168.2.1:80
15:43:25: (Libpurple: dnsquery) IP resolved for 192.168.2.1
15:43:25: (Libpurple: proxy) Attempting connection to 192.168.2.1
15:43:25: (Libpurple: proxy) Connecting to 192.168.2.1:80 with no proxy
15:43:25: (Libpurple: proxy) Connection in progress
15:43:25: (Libpurple: proxy) Connected to 192.168.2.1:80.
15:43:25: (Libpurple: upnp) Local IP: 192.168.2.100
15:43:25: Performing DNS resolve: 192.168.2.1:80
15:43:25: DNS resolve complete for 192.168.2.1:80
15:43:25: (Libpurple: dnsquery) IP resolved for 192.168.2.1
15:43:25: (Libpurple: proxy) Attempting connection to 192.168.2.1
15:43:25: (Libpurple: proxy) Connecting to 192.168.2.1:80 with no proxy
15:43:25: (Libpurple: proxy) Connection in progress
15:43:25: Performing DNS resolve: 192.168.2.1:80
15:43:25: DNS resolve complete for 192.168.2.1:80
15:43:25: (Libpurple: dnsquery) IP resolved for 192.168.2.1
15:43:25: (Libpurple: proxy) Attempting connection to 192.168.2.1
15:43:25: (Libpurple: proxy) Connecting to 192.168.2.1:80 with no proxy
15:43:25: (Libpurple: proxy) Connection in progress
15:43:25: (Libpurple: proxy) Connected to 192.168.2.1:80.
15:43:25: (Libpurple: util) Request: 'POST /UD/?4 HTTP/1.1
HOST: 192.168.2.1:80
SOAPACTION: "urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress"
CONTENT-TYPE: text/xml ; charset="utf-8"
CONTENT-LENGTH: 310

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:GetExternalIPAddress xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1">
</u:GetExternalIPAddress>
</s:Body>
</s:Envelope>'
15:43:25: Called write with no write_tag (read_tag 222 write_tag 0) for 9490ef0
15:43:25: (Libpurple: proxy) Connected to 192.168.2.1:80.
15:43:25: (Libpurple: util) Request: 'POST /UD/?4 HTTP/1.1
HOST: 192.168.2.1:80
SOAPACTION: "urn:schemas-upnp-org:service:WANIPConnection:1#DeletePortMapping"
CONTENT-TYPE: text/xml ; charset="utf-8"
CONTENT-LENGTH: 410

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:DeletePortMapping xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1">
<NewRemoteHost></NewRemoteHost>
<NewExternalPort>5061</NewExternalPort>
<NewProtocol>TCP</NewProtocol>
</u:DeletePortMapping>
</s:Body>
</s:Envelope>'
15:43:25: Called write with no write_tag (read_tag 224 write_tag 0) for 9af1530
15:43:25: (Libpurple: util) Response headers: 'HTTP/1.1 200 OK
Content-Type: text/xml; charset="utf-8"
DATE: Mon, 03 Jan 2000 19:36:23 GMT
Content-Length: 349

'
15:43:25: (Libpurple: util) parsed 349
15:43:25: (Libpurple: util) Response headers: 'HTTP/1.1 200 OK
Content-Type: text/xml; charset="utf-8"
DATE: Mon, 03 Jan 2000 19:36:23 GMT
Content-Length: 283

'
15:43:25: (Libpurple: util) parsed 283
15:43:25: (Libpurple: upnp) Successfully completed port mapping operation
15:43:25: (Libpurple: util) requested to fetch (http://192.168.2.1/UD/?4), full=0, user_agent=((null)), http11=1
15:43:25: (Libpurple: dns) DNS query for '192.168.2.1' queued
15:43:25: Performing DNS resolve: 192.168.2.1:80
15:43:25: DNS resolve complete for 192.168.2.1:80
15:43:25: (Libpurple: dnsquery) IP resolved for 192.168.2.1
15:43:25: (Libpurple: proxy) Attempting connection to 192.168.2.1
15:43:25: (Libpurple: proxy) Connecting to 192.168.2.1:80 with no proxy
15:43:25: (Libpurple: proxy) Connection in progress
15:43:25: (Libpurple: proxy) Connected to 192.168.2.1:80.
15:43:25: (Libpurple: util) Request: 'POST /UD/?4 HTTP/1.1
HOST: 192.168.2.1:80
SOAPACTION: "urn:schemas-upnp-org:service:WANIPConnection:1#AddPortMapping"
CONTENT-TYPE: text/xml ; charset="utf-8"
CONTENT-LENGTH: 648

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:AddPortMapping xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1">
<NewRemoteHost></NewRemoteHost>
<NewExternalPort>5061</NewExternalPort>
<NewProtocol>TCP</NewProtocol>
<NewInternalPort>5061</NewInternalPort>
<NewInternalClient>192.168.2.100</NewInternalClient>
<NewEnabled>1</NewEnabled>
<NewPortMappingDescription>PURPLE_UPNP_PORT_FORWARD</NewPortMappingDescription>
<NewLeaseDuration>0</NewLeaseDuration>
</u:AddPortMapping>
</s:Body>
</s:Envelope>'
15:43:25: Called write with no write_tag (read_tag 228 write_tag 0) for 9ae8dc0
15:43:25: (Libpurple: util) Response headers: 'HTTP/1.1 200 OK
Content-Type: text/xml; charset="utf-8"
DATE: Mon, 03 Jan 2000 19:36:23 GMT
Content-Length: 277

'
15:43:25: (Libpurple: util) parsed 277
15:43:25: (Libpurple: upnp) Successfully completed port mapping operation
15:43:25: (Libpurple: simple) listenfd: 13
15:43:25: (Libpurple: simple) connecting to 192.168.27.2 port 5060
15:43:25: (Libpurple: dns) DNS query for '192.168.27.2' queued
15:43:25: Performing DNS resolve: 192.168.27.2:5060
15:43:25: DNS resolve complete for 192.168.27.2:5060
15:43:25: (Libpurple: dnsquery) IP resolved for 192.168.27.2
15:43:25: (Libpurple: proxy) Attempting connection to 192.168.27.2
15:43:25: (Libpurple: proxy) Connecting to 192.168.27.2:5060 with no proxy
15:43:25: (Libpurple: proxy) Connection in progress
15:43:25: (Libpurple: proxy) Connected to 192.168.27.2:5060.
15:43:25: (Libpurple: stun) using server
15:43:25: (Libpurple: nat-pmp) Found a default gateway
15:43:25: (Libpurple: nat-pmp) Attempting to retrieve the public ip address for the NAT device at: 192.168.2.1
15:43:25: (Libpurple: nat-pmp) Timeout: 0s 250000us
15:43:25: (Libpurple: nat-pmp) Response was not received from our gateway! Instead from: 240.195.238.7
15:43:25: (Libpurple: stun) using server
15:43:25: (Libpurple: simple)

sending - Tue Apr 29 15:43:25 2008

######
REGISTER sip:192.168.27.2 SIP/2.0
Via: SIP/2.0/TCP 192.168.2.100:5061;branch=z9hG4bKE4472C5EA4D7C7072A62
From: <sip:1503@192.168.27.2>;tag=185206817;epid=1234567890
To: <sip:1503@192.168.27.2>
Max-Forwards: 10
CSeq: 1 REGISTER
User-Agent: Purple/2.4.2devel
Call-ID: 5A34gA50EaAD97i9997m2678t778EbF100xA161x
Contact: <sip:1503@192.168.2.100:5061;transport=tcp>;methods="MESSAGE, SUBSCRIBE, NOTIFY"
Expires: 900
Content-Length: 0


######

15:43:25: (Libpurple: simple)

received - Tue Apr 29 15:43:25 2008

######
SIP/2.0 401 Authentication Required
Via: SIP/2.0/TCP 192.168.2.100:5061;branch=z9hG4bKE4472C5EA4D7C7072A62;rport=49238;received=192.168.27.8
From: <sip:1503@192.168.27.2>;epid=1234567890;tag=185206817
To: <sip:1503@192.168.27.2>;tag=e57cc8e1d0
Call-ID: 5A34gA50EaAD97i9997m2678t778EbF100xA161x
CSeq: 1 REGISTER
User-Agent: pbxnsip-PBX/2.1.1.2210
WWW-Authenticate: Digest realm="192.168.27.2",nonce="5ab81674d2309efc5ab81674d2309efc",domain="sip:192.168.27.2",algorithm=MD5
Content-Length: 0

#######

15:43:25: (Libpurple: simple) in process response response: 401
15:43:25: (Libpurple: simple) in process register response response: 401
15:43:25: (Libpurple: simple) REGISTER retries 1
15:43:25: (Libpurple: simple) nonce: (null) realm: 192.168.27.2
15:43:25: (Libpurple: stun) using server
15:43:25: (Libpurple: simple) response (null)
15:43:25: (Libpurple: simple) header Authorization: Digest username="1503", realm="192.168.27.2", nonce="(null)", uri="sip:192.168.27.2", nc="00000001", response="(null)"
15:43:25: (Libpurple: stun) using server
15:43:25: (Libpurple: simple)

sending - Tue Apr 29 15:43:25 2008

######
REGISTER sip:192.168.27.2 SIP/2.0
Via: SIP/2.0/TCP 192.168.2.100:5061;branch=z9hG4bKC92A23363F2EBEC4779C
From: <sip:1503@192.168.27.2>;tag=2264360674;epid=1234567890
To: <sip:1503@192.168.27.2>
Max-Forwards: 10
CSeq: 2 REGISTER
User-Agent: Purple/2.4.2devel
Call-ID: 5A34gA50EaAD97i9997m2678t778EbF100xA161x
Authorization: Digest username="1503", realm="192.168.27.2", nonce="(null)", uri="sip:192.168.27.2", nc="00000001", response="(null)"
Contact: <sip:1503@192.168.2.100:5061;transport=tcp>;methods="MESSAGE, SUBSCRIBE, NOTIFY"
Expires: 900
Content-Length: 0


######

15:43:25: (Libpurple: simple)

received - Tue Apr 29 15:43:25 2008

######
SIP/2.0 401 Authentication Required
Via: SIP/2.0/TCP 192.168.2.100:5061;branch=z9hG4bKC92A23363F2EBEC4779C;rport=49238;received=192.168.27.8
From: <sip:1503@192.168.27.2>;epid=1234567890;tag=2264360674
To: <sip:1503@192.168.27.2>;tag=e57cc8e1d0
Call-ID: 5A34gA50EaAD97i9997m2678t778EbF100xA161x
CSeq: 2 REGISTER
User-Agent: pbxnsip-PBX/2.1.1.2210
WWW-Authenticate: Digest realm="192.168.27.2",nonce="5ab81674d2309efc5ab81674d2309efc",domain="sip:192.168.27.2",algorithm=MD5
Content-Length: 0

#######

15:43:25: (Libpurple: simple) in process response response: 401
15:43:25: (Libpurple: simple) in process register response response: 401
15:43:25: (Libpurple: simple) REGISTER retries 2
15:43:25: (Libpurple: simple) nonce: (null) realm: 192.168.27.2
15:43:25: (Libpurple: stun) using server
15:43:25: (Libpurple: simple) response (null)
15:43:25: (Libpurple: simple) header Authorization: Digest username="1503", realm="192.168.27.2", nonce="(null)", uri="sip:192.168.27.2", nc="00000001", response="(null)"
15:43:25: (Libpurple: stun) using server
15:43:25: (Libpurple: simple)

sending - Tue Apr 29 15:43:25 2008

superfula
Harmless
Posts: 11
Joined: Mon Mar 07, 2005 7:28 am

Re: SIP/SIMPLE not workin, any ideas on a fix?

Postby superfula » Thu Jul 24, 2008 4:58 pm

Any updates on this? I get the same authentication failure. One thing that I noticed is I cannot use any special characters for the username. For me to sign in to our Messenger service with the MS client, it requires the entire email address (user@domain.com)

Is anyone successfully connecting to their company's corp messenger service?

User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Re: SIP/SIMPLE not workin, any ideas on a fix?

Postby evands » Thu Jul 24, 2008 6:49 pm

So you need to be able to enter an @ symbol?
The duck still burns.

--

My company: Saltatory Software. Check it out :)

superfula
Harmless
Posts: 11
Joined: Mon Mar 07, 2005 7:28 am

Re: SIP/SIMPLE not workin, any ideas on a fix?

Postby superfula » Thu Jul 24, 2008 7:01 pm

evands wrote:So you need to be able to enter an @ symbol?


Yeah it looks that way.

I'm not sure how universal username@domain.com is, but I'd imagine having the ability to input an @ symbol is required for many.

superfula
Harmless
Posts: 11
Joined: Mon Mar 07, 2005 7:28 am

Re: SIP/SIMPLE not workin, any ideas on a fix?

Postby superfula » Wed Aug 27, 2008 3:33 am

I noticed the ability to use the @ symbol was added to Adium. After testing a bit more (finally), it looks like the \ is required and not the @ symbol. I had thought the Messenger server needed an email address, however it actually looks for domain\username.

User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Re: SIP/SIMPLE not workin, any ideas on a fix?

Postby evands » Wed Aug 27, 2008 3:41 am

Cure. will add.
The duck still burns.

--

My company: Saltatory Software. Check it out :)

superfula
Harmless
Posts: 11
Joined: Mon Mar 07, 2005 7:28 am

Re: SIP/SIMPLE not workin, any ideas on a fix?

Postby superfula » Wed Aug 27, 2008 12:45 pm

Thanks evands. Appreciate it.


Return to “Adium”

Who is online

Users browsing this forum: Google [Bot]