I wanna get stream from camera:
DESCRIBE rtsp://192.168.1.200:554/ RTSP/1.0
CSeq: 1
Accept: application/sdpAuthorization: Basic YWRtaW46YWRtaW4=
RTSP/1.0 200 OK
CSeq: 1
Date: Wed, Feb 16 2011 10:17:47 GMT
Content-Base: rtsp://192.168.1.200:554/
Content-Type: application/sdp
Content-Length: 358
v=0
o=RTSP 1297842675200000 1 IN IP4 192.168.1.200
s=RTSP Server
t=0 0
a=range:npt=0-
a=control:*
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
a=rtpmap:96 MP4V-ES/90000
a=framerate:20
a=fmtp:96 profile-level-id=1;config=000001B001000001B50900000100000001200086C4004F0C14103C518F
a=control:track1
m=audio 0 RTP/AVP 0
c=IN IP4 0.0.0.0
a=control:track2
SETUP rtsp://192.168.1.200:554/trackID=1 RTSP/1.0
CSeq: 2
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
Authorization: Basic YWRtaW46YWRtaW4=
**RTSP/1.0 404 Stream Not Found**
CSeq: 2
Date: Wed, Feb 16 2011 10:17:48 GMT
If use the VLC it can work but why do i get the 404?
In the SDP a=control:track1 and a=control:track2, whereas in the RTSP setup request you are using trackID=1. VLC is probably then doing this correctly?
Related
When i send a GET request to Hearthstone website, and once i've concatenated all the sent frames, i still get a compressed string
My request:
GET /hearthstone/en/ HTTP/1.1
Host: eu.battle.net
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Referer: https://www.google.fr/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8,fr;q=0.6
Cookie: eu-cookie-compliance-agreed=1; _ga=GA1.3.780909635.1489783325; _gat_bnetgtm=1
My logs:
[Socket] > Connected !
Connected to 185.60.115.40
[Socket - Data] > Received data !
--- Header ---
HTTP/1.1 200 OK
Date: Sat, 18 Mar 2017 10:56:12 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Retry-After: 600
Content-Language: en-GB
Vary: Accept-Encoding
Content-Encoding: gzip
Keep-Alive: timeout=5, max=4000
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html;charset=UTF-8
4331
▼ ♥��{�∟W�'��
�1�4_`�4→������s㑑�*V��H��(�2����s�=��8w��▼v���▲�3���d���[�k��N�rw�_U��������↔��xd�q<zIe♠T�Ƅe�݁��1▼졲b��|#▼w���l8U���ɠ�L�z�(�?�6��b♠e���y�bw�N�XUy>��↑↑"�*�U���MJ50F♦�Z�_�_�6���↓�R>Q�j☼��*9V;b�ȧj�nZ��j��~�XQ��U�)��$IE�&�'l��'i�n��R[�&iv`¶j☻�����/TRcT☻��E+&�♥6e��∟f�→i\�◄�☻��♣=������+]�Ŗ�|)�§)���r<e�v⸉♀}���Ȳm�EI�Ca{�u_�♫z,���↑���:,[��X�T6J�����§�����♂"?◄▲w�g♣Q �(♠Fu4S
l�-��l�
������~K�>*�Leu�T�(�↓�ָ-p ���q��'j(����▲$M�9����*tz►d`����T↔��[=�?Le��+§ȯL��c�YZ���R�
♀�zY�DYBL��♦�� ‼��n�y������gh�x²r�f����ady1e�&�P������Y�ͭ�►7�y1��}
v�����,�◄‼-��
,�X�$n∟Z>�=�$��1���k���'*rc�☼bK��§$�r�ͅ�����+�X�§♂/f�↔s♂§mΤ�#ԳC�ZV↑� g☺�l7�<♠f��$t���*����H►��'�Jҗ��z�����hU*i↕��
��w�f�↕�FA�8,f�=�4QQ�]�♫-� �#8♥��V■♂� �ȋ�������g♥♣▼�!�B˶D↕A↑E<H,♂� dQ1�N ��sm'♫�L☻m()� f��<I֯����\♠Y�H�TH�8�\�Cԡ7cGz�↔p x Ӄ,��P��k�>wb�8�#� i�‼~∟+t�▼♦�+"W��‼:��#�Z�Q� �0r�↔8"�↔?N<��aU�Q��������8�↓w��B��VB�Z♫�☺↨◄�9���l��§��P▼H1?☻Nv¶J.l
[Socket - Data] > Received data !
[Socket - Data] > Received data !
[Socket - Data] > Received data !
[Socket - Data] > Received data !
[Socket - Data] > Received data !
[Socket - Data] > Received data !
[Socket - Data] > Received data !
[Socket - Data] > Received data !
[Socket - Data] > Received data !
[Socket - Data] > Received data !
[Socket - Data] > Received data !
[Socket - Data] > Received data !
[Socket - Data] > Received data !
[Socket - Data] > Received data !
[Socket] > End message received !
--- HTML ---
<Buffer 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d 0a 44 61 74 65 3a 20 53 61 74 2c 20 31 38 20 4d 61 72 20 32 30 31 37 20 31 30 3a 35 36 3a 31 32 20 47 ... >
My code:
send ()
{
let chuncks = []
this.client.socket.once('data', data =>
{
/* Header */
chuncks.push(data)
console.log('--- Header ---')
console.log(data.toString())
this.client.socket.on('data', data =>
{
chuncks.push(data)
})
})
this.client.socket.on('end', () =>
{
let html = Buffer.concat(chuncks)
console.log('--- HTML ---')
console.log(html)
let decoded = require('zlib').gunzipSync(html)
})
this.client.write( this.request ) // Above request
}
And, what i don't understand, is why things goes wrong, Am i make this properly ?
Thanks !
I have an int-http:outbound-gateway to a rest service with a custom http header but this header is not mapped to the SI message headers although is set on the mapped-response-headers config
here's my config:
<int-http:outbound-gateway
request-channel="inChannel" reply-channel="outChannel"
url-expression="http://localhost:8080/rest" mapped-request-headers="HTTP_REQUEST_HEADERS"
http-method-expression="GET" expected-response-type="java.lang.String"
charset="UTF-8"
mapped-response-headers="HTTP_RESPONSE_HEADERS,mySpecificHeader"/>
Here's the raw response from the rest service:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Expires: Fri, 28 Oct 2016 02:05:34 GMT
mySpecificHeader: headerInfo
Content-Type: application/json
Transfer-Encoding: chunked
Date: Fri, 28 Oct 2016 02:05:34 GMT
{"surname":"Constantine","phone":"+33 555 666 777","name":"John","id":12345}
I'm trying to send an HTTP GET request and authenticate using digest method upon receiving the authentication header. I keep getting 401 Unauthorized response even though my code generates identical authentication response to Firefox and curl given the same authentication request. I have tried the popular Nodejs module "request" with the same results. Here's the tcpdump output of two requests. The first is from Firefox which succeeds:
15:18:03.615255 IP 192.168.18.1.33966 > 192.168.20.220.30005: tcp 0
....E..<..#.#.............u5K3........9..\.........
"`..........
15:18:03.634223 IP 192.168.20.220.30005 > 192.168.18.1.33966: tcp 0
....E..<..#.=...........u5......K3.................
.g.t"`......
15:18:03.634269 IP 192.168.18.1.33966 > 192.168.20.220.30005: tcp 0
....E..4..#.#.............u5K3.........s.T.....
"`...g.t
15:18:03.735485 IP 192.168.18.1.33966 > 192.168.20.220.30005: tcp 290
....E..V..#.#.............u5K3.........s.v.....
"`...g.tGET / HTTP/1.1
Host: 192.168.20.220:30005
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
15:18:03.753943 IP 192.168.20.220.30005 > 192.168.18.1.33966: tcp 0
X........c#.=..2........u5......K3.1..
.g.."`..
15:18:03.762129 IP 192.168.20.220.30005 > 192.168.18.1.33966: tcp 228
X........d#.=..M........u5......K3.1..
.g.."`..HTTP/1.1 401 Unauthorized
Content-Length: 0
WWW-Authenticate: Digest realm="IgdAuthentication", domain="/", nonce="ZDE4NTY3ZmM6NmYyMzA3NjM6YmQ5NGY3YTA=", qop="auth", algorithm=MD5, opaque="5ccc09c403ebaf9f0171e9517f40e41"
15:18:03.762172 IP 192.168.18.1.33966 > 192.168.20.220.30005: tcp 0
....E..4..#.#.............u5K3.1.......{.T.....
"`...g..
15:18:06.215945 IP 192.168.18.1.33966 > 192.168.20.220.30005: tcp 564
....E..h..#.#.............u5K3.1.......{.......
"`...g..GET / HTTP/1.1
Host: 192.168.20.220:30005
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Authorization: Digest username="admin", realm="IgdAuthentication", nonce="ZDE4NTY3ZmM6NmYyMzA3NjM6YmQ5NGY3YTA=", uri="/", algorithm=MD5, response="ae43f4fcaf71340f9c360877dad87c66", opaque="5ccc09c403ebaf9f0171e9517f40e41", qop=auth, nc=00000001, cnonce="9d1ea29022ec08d6"
15:18:06.244925 IP 192.168.20.220.30005 > 192.168.18.1.33966: tcp 38
....E..Z.e#.=..
........u5......K3.e.....Q.....
.g.."`..HTTP/1.1 200 OK
Content-Length: 0
The second is from my code which fails:
15:19:08.589647 IP 192.168.18.1.33972 > 192.168.20.220.30005: tcp 0
....E..<..#.#.............u5a.........9..\.........
"`A.........
15:19:08.608304 IP 192.168.20.220.30005 > 192.168.18.1.33972: tcp 0
....E..<..#.=...........u5....#<a.......aN.........
.h.<"`A.....
15:19:08.608333 IP 192.168.18.1.33972 > 192.168.20.220.30005: tcp 0
....E..4..#.#.............u5a.....#=...s.T.....
"`A..h.<
15:19:08.608872 IP 192.168.18.1.33972 > 192.168.20.220.30005: tcp 70
....E..z..#.#.............u5a.....#=...s.......
"`A..h.<GET / HTTP/1.1
Host: 192.168.20.220:30005
Connection: keep-alive
15:19:08.626556 IP 192.168.20.220.30005 > 192.168.18.1.33972: tcp 0
....E..4.r#.=..#........u5....#=a......#.......
.h.O"`A.
15:19:08.631951 IP 192.168.20.220.30005 > 192.168.18.1.33972: tcp 228
....E....s#.=..>........u5....#=a......#A......
.h.Q"`A.HTTP/1.1 401 Unauthorized
Content-Length: 0
WWW-Authenticate: Digest realm="IgdAuthentication", domain="/", nonce="YmM4ZWY0YjE6MWY4ZjVkMmQ6IGIwNjdkZWI=", qop="auth", algorithm=MD5, opaque="5ccc09c403ebaf9f0171e9517f40e41"
15:19:08.631966 IP 192.168.18.1.33972 > 192.168.20.220.30005: tcp 0
....E..4..#.#.............u5a.....$!...{.T.....
"`A".h.Q
15:19:08.634442 IP 192.168.18.1.33973 > 192.168.20.220.30005: tcp 0
....E..<..#.#.
...........u5...$......9..\.........
"`A#........
15:19:08.653166 IP 192.168.20.220.30005 > 192.168.18.1.33973: tcp 0
....E..<..#.=...........u5....~w...%....3..........
.h.i"`A#....
15:19:08.653201 IP 192.168.18.1.33973 > 192.168.20.220.30005: tcp 0
....E..4..#.#.
...........u5...%..~x...s.T.....
"`A'.h.i
15:19:08.653534 IP 192.168.18.1.33973 > 192.168.20.220.30005: tcp 524
....E..#. #.#.............u5...%..~x...s.`.....
"`A(.h.iGET / HTTP/1.1
Authorization: Digest username="admin", realm="IgdAuthentication", nonce="YmM4ZWY0YjE6MWY4ZjVkMmQ6IGIwNjdkZWI=", uri="/", algorithm=MD5, response="1d0539755e0e2ca204a9821027041e8b", qop=auth, nc=00000001, cnonce="MjMwMjkw", opaque="5ccc09c403ebaf9f0171e9517f40e41"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Host: 192.168.20.220:30005
Connection: keep-alive
15:19:08.672345 IP 192.168.20.220.30005 > 192.168.18.1.33973: tcp 0
Xi........#.=...........u5....~x...1..
.h.|"`A(
15:19:10.633047 IP 192.168.18.1.33972 > 192.168.20.220.30005: tcp 0
....E..4..#.#.............u5a.....$!...{.T.....
"`C..h.Q
15:19:10.651962 IP 192.168.20.220.30005 > 192.168.18.1.33972: tcp 0
....E..4.t#.=..!........u5....$!a......#.&.....
.h.8"`C.
15:19:10.651998 IP 192.168.18.1.33972 > 192.168.20.220.30005: tcp 0
....E..4..#.#.............u5a.....$"...{.T.....
"`C..h.8
15:19:10.653565 IP 192.168.18.1.33973 > 192.168.20.220.30005: tcp 0
....E..4.
#.#.
...........u5...1..~x...s.T.....
"`C..h.|
15:19:10.711119 IP 192.168.20.220.30005 > 192.168.18.1.33973: tcp 0
X_........#.=...........u5....~x...2..
.h.s"`C.
15:19:12.674799 IP 192.168.20.220.30005 > 192.168.18.1.33973: tcp 228
X.........#.=...........u5....~x...2..
.h.."`C.HTTP/1.1 401 Unauthorized
Content-Length: 0
WWW-Authenticate: Digest realm="IgdAuthentication", domain="/", nonce="YWU1ZjhkMWM6MzFmZjllMDA6YzAxNjY4MGM=", qop="auth", algorithm=MD5, opaque="5ccc09c403ebaf9f0171e9517f40e41"
What could be different between the two requests that's causing this?
The problem was caused by the authentication challenge response being sent on a separate connection, rendering the authentication challenge invalid. The solution is to use an agent with maxSockets set to 1 (to avoid opening a new connection) and making sure the socket doesn't get closed before the second request is queued.
I have deleted my previous question and post this updated:
I have a an issue with my SIP UAC, once I received a ringing from the B2BUA on both the caller and callee, and the caller hangs up the call while the call is ringing (I send cancel request and receive "request terminated" on the caller side), the callee does not get any notification that the call has been terminated by the caller.
But when the callee declines the call, the caller gets a busy here.
Here is the Callee side:
/----------------------- MEDIA SESSION ------------------------/
--- Multimedia-Session: Composed Audio ---
1. Media Session: "Audio" enabled=true
States:
[Disconnected]
Capturers: (1 in total)
Stream 1: audio device - DirectSoundCapture
Formats:
[PCMU/8000]
Connection Details:
My address: 10.0.0.2:52044
Participants: (1 in total)
Address 1: HostAddress:17364
/-------------------- END OF MEDIA SESSION --------------------/
/------------------------- BEGINNING --------------------------/
-------------------------------- Request: Test 2-->Me: INVITE#102 --------------------------------
INVITE sip:430#Host SIP/2.0
Via: SIP/2.0/UDP HostAddress:5060;branch=z9hG4bK1fd06834;rport=5060;received=HostAddress
From: "Test 2" <sip:410#HostAddress>;tag=as2b22eddf
To: <sip:430#Host>
Contact: <sip:410#HostAddress>
Call-ID: 35e0e8655b20ad886f137a0c0e563809#HostAddress
CSeq: 102 INVITE
User-Agent: Freeswitch 1.2.3
Max-Forwards: 70
Date: Sun, 11 Jul 2010 02:44:43 GMT
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO
Supported: replaces
Content-Type: application/sdp
Content-Length: 264
v=0
o=root 27669 27669 IN IP4 HostAddress
s=session
c=IN IP4 HostAddress
t=0 0
m=audio 17364 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
------------------------ Response: Me ==> Test 2: INVITE#102: 180 Ringing ------------------------
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP HostAddress:5060;branch=z9hG4bK1fd06834;rport=5060;received=HostAddress
From: "Test 2" <sip:410#HostAddress>;tag=as2b22eddf
To: <sip:430#Host>;tag=e125be76
Call-ID: 35e0e8655b20ad886f137a0c0e563809#HostAddress
CSeq: 102 INVITE
Content-Length: 0
------------------------ Response: Me ==> Test 2: INVITE#102: 603 Decline ------------------------
SIP/2.0 603 Decline
Via: SIP/2.0/UDP HostAddress:5060;branch=z9hG4bK1fd06834;rport=5060;received=HostAddress
From: "Test 2" <sip:410#HostAddress>;tag=as2b22eddf
To: <sip:430#Host>;tag=e125be76
Call-ID: 35e0e8655b20ad886f137a0c0e563809#HostAddress
CSeq: 102 INVITE
Content-Length: 0
/---------------------------- END -----------------------------/
I must decline at the callee end, because if I don't respond to the request, the callee account get stuck in a loop and then the client returns busy forever, and requests does not reach that client, or at least until the account is deleted.
And there is another thing, the B2BUA does not send anything back to the decline response, shouldn't I get an ACK from the server?
And here is the Caller side:
/----------------------- MEDIA SESSION ------------------------/
--- Multimedia-Session: Audio ---
1. Media Session: "Audio" enabled=true
States:
[Disconnected]
Capturers: (1 in total)
Stream 1: audio device - DirectSoundCapture
Formats:
[PCMU/8000]
[GSM/8000]
[G723/8000]
[DVI4/8000]
[MPA/-1]
[DVI4/11025]
[DVI4/22050]
Connection Details:
My address:
Participants: (0 in total)
/-------------------- END OF MEDIA SESSION --------------------/
/------------------------- BEGINNING --------------------------/
-------------------------- Request: Client 410-->Client 430: INVITE#81 --------------------------
INVITE sip:430#host SIP/2.0
Subject: Session Name: Nu-Art Software
Via: SIP/2.0/UDP host:5060;branch=z9hG4bK4dd6bdf707a85fb5a73faec9ff648f703236
Contact: "Client 410" <sip:410#host>
From: "Client 410" <sip:410#host>;tag=8f7b94cb
To: "Client 430" <sip:430#host>
Organization: Future Earth
Max-Forwards: 32
CSeq: 81 INVITE
Call-ID: 97ee019923d6a6d11a9476d71880e289#10.0.0.1
Allow: INVITE,ACK,CANCEL,BYE,OPTIONS
Expires: 60
Content-Type: application/sdp
Content-Length: 324
v=0
o=Client 410 699719 699719 IN IP4 MyAddress
s=Audio
i=Made by: Nu-Art Software 07-2010
c=IN IP4 MyAddress
t=0 0
m=audio 2871 RTP/AVP 0 3 4 5 14 16 17
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:4 G723/8000
a=rtpmap:5 DVI4/8000
a=rtpmap:14 MPA/-1
a=rtpmap:16 DVI4/11025
a=rtpmap:17 DVI4/22050
------- Response: Client 430 ==> Client 410: INVITE#81: 407 Proxy Authentication Required -------
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP host:5060;branch=z9hG4bK4dd6bdf707a85fb5a73faec9ff648f703236;received=MyAddress
From: "Client 410" <sip:410#host>;tag=8f7b94cb
To: "Client 430" <sip:430#host>;tag=as78e28f4d
Call-ID: 97ee019923d6a6d11a9476d71880e289#10.0.0.1
CSeq: 81 INVITE
User-Agent: Freeswitch 1.2.3
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO
Supported: replaces
Proxy-Authenticate: Digest algorithm=MD5,realm="asterisk",nonce="574b3d49"
Content-Length: 0
---------------------------- Request: Client 410-->Client 430: ACK#81 ----------------------------
ACK sip:430#host SIP/2.0
Via: SIP/2.0/UDP host:5060;branch=z9hG4bK4dd6bdf707a85fb5a73faec9ff648f703236
From: "Client 410" <sip:410#host>;tag=8f7b94cb
To: "Client 430" <sip:430#host>
Max-Forwards: 32
CSeq: 81 ACK
Call-ID: 97ee019923d6a6d11a9476d71880e289#10.0.0.1
Content-Length: 0
-------------------------- Request: Client 410-->Client 430: INVITE#82 --------------------------
INVITE sip:430#host SIP/2.0
Subject: Session Name: Nu-Art Software
Via: SIP/2.0/UDP host:5060;branch=z9hG4bK34c52041066f24c6ac4499af25a948b63236
Contact: "Client 410" <sip:410#host>
From: "Client 410" <sip:410#host>;tag=8f7b94cb
To: "Client 430" <sip:430#host>;tag=as78e28f4d
Organization: Future Earth
Max-Forwards: 32
CSeq: 82 INVITE
Call-ID: 97ee019923d6a6d11a9476d71880e289#10.0.0.1
Allow: INVITE,ACK,CANCEL,BYE,OPTIONS
Expires: 60
Content-Type: application/sdp
Proxy-Authorization: Digest username="410",nonce="574b3d49",realm="asterisk",uri="sip:410#host",algorithm=MD5,response="e674e15de7b6dd05c7fe6da6c155befd"
Content-Length: 324
v=0
o=Client 410 699719 699719 IN IP4 MyAddress
s=Audio
i=Made by: Nu-Art Software 07-2010
c=IN IP4 MyAddress
t=0 0
m=audio 2871 RTP/AVP 0 3 4 5 14 16 17
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:4 G723/8000
a=rtpmap:5 DVI4/8000
a=rtpmap:14 MPA/-1
a=rtpmap:16 DVI4/11025
a=rtpmap:17 DVI4/22050
------------------- Response: Client 430 ==> Client 410: INVITE#82: 100 Trying -------------------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP host:5060;branch=z9hG4bK34c52041066f24c6ac4499af25a948b63236;received=MyAddress
From: "Client 410" <sip:410#host>;tag=8f7b94cb
To: "Client 430" <sip:430#host>;tag=as78e28f4d
Call-ID: 97ee019923d6a6d11a9476d71880e289#10.0.0.1
CSeq: 82 INVITE
User-Agent: Freeswitch 1.2.3
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO
Supported: replaces
Contact: <sip:430#HostAddress>
Content-Length: 0
------------------ Response: Client 430 ==> Client 410: INVITE#82: 180 Ringing ------------------
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP host:5060;branch=z9hG4bK34c52041066f24c6ac4499af25a948b63236;received=MyAddress
From: "Client 410" <sip:410#host>;tag=8f7b94cb
To: "Client 430" <sip:430#host>;tag=as78e28f4d
Call-ID: 97ee019923d6a6d11a9476d71880e289#10.0.0.1
CSeq: 82 INVITE
User-Agent: Freeswitch 1.2.3
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO
Supported: replaces
Contact: <sip:430#HostAddress>
Content-Length: 0
-------------------------- Request: Client 410-->Client 430: CANCEL#82 --------------------------
CANCEL sip:430#host SIP/2.0
Call-ID: 97ee019923d6a6d11a9476d71880e289#10.0.0.1
To: "Client 430" <sip:430#host>;tag=as78e28f4d
CSeq: 82 CANCEL
From: "Client 410" <sip:410#host>;tag=8f7b94cb
Via: SIP/2.0/UDP host:5060;branch=z9hG4bK34c52041066f24c6ac4499af25a948b63236
Max-Forwards: 32
Content-Length: 0
--------------------- Response: Client 430 ==> Client 410: CANCEL#82: 200 OK ---------------------
SIP/2.0 200 OK
Via: SIP/2.0/UDP host:5060;branch=z9hG4bK34c52041066f24c6ac4499af25a948b63236;received=MyAddress
From: "Client 410" <sip:410#host>;tag=8f7b94cb
To: "Client 430" <sip:430#host>;tag=as78e28f4d
Call-ID: 97ee019923d6a6d11a9476d71880e289#10.0.0.1
CSeq: 82 CANCEL
User-Agent: Freeswitch 1.2.3
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO
Supported: replaces
Content-Length: 0
------------- Response: Client 430 ==> Client 410: INVITE#82: 487 Request Terminated -------------
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP host:5060;branch=z9hG4bK34c52041066f24c6ac4499af25a948b63236;received=MyAddress
From: "Client 410" <sip:410#host>;tag=8f7b94cb
To: "Client 430" <sip:430#host>;tag=as78e28f4d
Call-ID: 97ee019923d6a6d11a9476d71880e289#10.0.0.1
CSeq: 82 INVITE
User-Agent: Freeswitch 1.2.3
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO
Supported: replaces
Content-Length: 0
---------------------------- Request: Client 410-->Client 430: ACK#82 ----------------------------
ACK sip:430#host SIP/2.0
Via: SIP/2.0/UDP host:5060;branch=z9hG4bK34c52041066f24c6ac4499af25a948b63236
From: "Client 410" <sip:410#host>;tag=8f7b94cb
To: "Client 430" <sip:430#host>
Max-Forwards: 32
CSeq: 82 ACK
Call-ID: 97ee019923d6a6d11a9476d71880e289#10.0.0.1
Content-Length: 0
/---------------------------- END -----------------------------/
Frank, I tried to pay attention to your details, perhaps I missed something, since the other side still does not receives notification on an early hang up.
Any idea why?
Thanks in advance,
Adam.
1) 6xx is unusual; normally rejecting a call is done with a 4xx (usually "Busy Here")
2) The lack of cancel to the destination is a bug in the sip server. (Ok, they're not required to send a CANCEL if you cancel, but they really should.)
I am hooking firefox's send and WSARecv. Send should remove the gzip header (=> Accept-Encoding: none) and WSARecv hook shall edit the data.
At the moment the WSARecv function doesn't change any data, but only prints it out for the debug log. Many sites work, but sometimes images do not get loaded or the page doesn't.
I could find the following server response (Error 400 Bad Request) in bing.com's answer in the WSARecv function:
Hooked Send
GET /fd/ls/l?IG=c5c4c27da26c4c5db3e1ed6adbfafc0d&TYPE=Event.ClientInst&DATA=%5B%7B%22T%22:%22CI.Init%22,%22FID%22:%22CI%22,%22Name%22:%22Base%22,%22TS%22:1253465714457%7D,%7B%22W%22%3A1670%2C%22H%22%3A701%2C%22T%22:%22CI.Dims%22,%22FID%22:%22HP%22,%22Name%22:%22br%22,%22TS%22:1253465714457%7D,%7B%22Data%22%3A-1%2C%22T%22:%22CI.Test%22,%22FID%22:%22HP%22,%22Name%22:%22IsLive%22,%22TS%22:1253465714457%7D,%7B%22Time%22%3A489%2C%22T%22:%22CI.Load%22,%22FID%22:%22HP%22,%22Name%22:%22bg%22,%22TS%22:1253465714946%7D%5D HTTP/1.1
00001138 3.75038576 [4024] Host: a4.bing.com
00001139 3.75038576 [4024] User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.3) Gecko/20090824 YFF35 Firefox/3.5.3 (.NET CLR 3.5.30729)
00001140 3.75038576 [4024] Accept: image/png,image/;q=0.8,/;q=0.5
00001141 3.75038576 [4024] Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
00001142 3.75038576 [4024] Accept-Encoding: none
00001143 3.75038576 [4024] Accept-Charset: ISO-8859-1,utf-8;q=0.7,;q=0.7
00001144 3.75038576 [4024] Keep-Alive: 300
00001145 3.75038576 [4024] Connection: keep-alive
00001146 3.75038576 [4024] Referer: http://www.bing.com/
00001147 3.75038576 [4024] Cookie: MUID=D22A51BCBBD54DD3BE74682327101C0A; SRCHD=MS=904338&D=792606&AF=IE8SRC; SRCHUSR=AUTOREDIR=0&GEOVAR=&DOB=20090704; SRCHUID=V=2&GUID=2069ECD3092B453ABFCB9C4762409ACD; _HOP=; _FS=mkt=de-DE&ui=de-DE
(end of header)
Hooked WSARecv
00001152 4.03753757 [4024] HTTP/1.1 204 No Content
00001153 4.03753757 [4024] Cache-Control: private
00001154 4.03753757 [4024] Content-Length: 0
00001155 4.03753757 [4024] P3P: CP="NON UNI COM NAV STA LOC CURa DEVa PSAa PSDa OUR IND", policyref="http://privacy.msn.com/w3c/p3p.xml"
00001156 4.03753757 [4024] Date: Sun, 20 Sep 2009 16:55:17 GMT
00001157 4.03753757 [4024] Connection: keep-alive
00001158 4.03753757 [4024]
00001159 4.03753757 [4024] HTTP/1.0 400 Bad Request
00001160 4.03753757 [4024] Server: AkamaiGHost
00001161 4.03753757 [4024] Mime-Version: 1.0
00001162 4.03753757 [4024] Content-Type: text/html
00001163 4.03753757 [4024] Content-Length: 216
00001164 4.03753757 [4024] Expires: Sun, 20 Sep 2009 16:55:17 GMT
00001165 4.03753757 [4024] Date: Sun, 20 Sep 2009 16:55:17 GMT
00001166 4.03753757 [4024] Connection: close
00001167 4.03753757 [4024]
00001168 4.03753757 [4024]
00001169 4.03753757 [4024] Bad Request
00001170 4.03753757 [4024]
00001171 4.03753757 [4024] Bad Request
00001172 4.03753757 [4024] Your browser sent a request that this server could not understand.
00001173 4.03753757 [4024] Reference #7.cea432c3.1253465717.0
00001174 4.03753757 [4024]
00001175 4.03753757 [4024]
My question is: What is wrong with my HTTP headers? Why do some pages come up with a 400 error. Is it the Accept-Encoding:none?
Thanks for reading :)
"none" is not an acceptable value for the "Accept-Encoding" header. Not all servers look at that header, but those that do will usually validate it before using it. To make the server send uncompressed data, omit the header altogether, or set it to "identity" instead.