joelf68 / imsdroid

Automatically exported from code.google.com/p/imsdroid
0 stars 0 forks source link

Garbled(?) Contact header IP address #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
IMSdroid is really great!

it appears, though to produce somewhat garbled Contact headers.

The following is a captured request.

The client is behind NAT and configured to use stun from stunserver.org.
The Via header carries the correct outbound IP address, but the Contact headers 
IP address is wrong. It looks like a parsing error of some sort, since the 
first to digits of the correct IP address (84.) appear in the garbled on 
(8.0.4.0).

I'll try to investigate this further. please tell me if you have a good idea as 
to what i could try next.

Possibly this bug should be reported against the doubango project instead?!

thanks
kind regards
Thilo

REGISTER sip:ims.bangert.dk SIP/2.0
Via: SIP/2.0/UDP 84.238.115.140:44532;branch=z9hG4bK1281598842868;rport
From: <sip:droid@ims.bangert.dk>;tag=1280350500534
To: <sip:droid@ims.bangert.dk>
Contact: 
<sip:droid@8.0.4.0:44532;transport=udp>;expires=600000;+g.oma.sip-im;language="e
n,fr";+g.3gpp.smsip;+g.oma.sip-im.large-message;audio;+g.3gpp.icsi-ref="urn%3Aur
n-7%3A3gpp-application.ims.iari.gsma-vs";+g.3gpp.cs-voice
Call-ID: 6006fe4d-d9aa-1176-7235-89ab50219b90
CSeq: 202943964 REGISTER
Content-Length: 0
Max-Forwards: 70
Authorization: Digest 
username="droid@ims.bangert.dk",realm="ims.bangert.dk",nonce="",uri="sip:ims.ban
gert.dk",response=""
Allow: INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER
Privacy: none
P-Access-Network-Info: ADSL;utran-cell-id-3gpp=00000000
User-Agent: IM-client/OMA1.0 IMSDroid/v1.0.180 (doubango r470)
P-Preferred-Identity: <sip:droid@ims.bangert.dk>
Supported: path

Original issue reported on code.google.com by thilo.ba...@gmail.com on 5 Aug 2010 at 12:11

GoogleCodeExporter commented 9 years ago
hhm, getting closer! when i use the default STUN server: numb.viagenie.ca the 
problem does not happen...

Original comment by thilo.ba...@gmail.com on 5 Aug 2010 at 8:10

GoogleCodeExporter commented 9 years ago
Resolved. And will be part of the next release. Will be closed after commit.
FYI: It's the parsing of STUN1 "MAPPED-ADDRESS" attribute which fails 
(endianness problem).
You should use a server which supports STUN2 (RFC 5769) like "numb.viagenie.ca" 
(http://www.voip-info.org/wiki/view/STUN).
"MAPPED-ADDRESS" has been deprecated by "XOR-MAPPED-ADDRESS" because some 
network nodes rewrite this attribute.

Original comment by boss...@yahoo.fr on 5 Aug 2010 at 9:46

GoogleCodeExporter commented 9 years ago
awesome. thanks. also for the additional info.

Original comment by thilo.ba...@gmail.com on 5 Aug 2010 at 10:03

GoogleCodeExporter commented 9 years ago
Fixed in revision 234.

Original comment by boss...@yahoo.fr on 9 Aug 2010 at 5:22