when trying to send INVITE using t_uac_wait, i get back response claiming that Content-Type is missing. why, because it seems to be there?
-- juha
---------------------------------------------------
T 2009/09/22 17:52:37.484316 127.0.0.1:35765 -> 127.0.0.1:6060 [AP] POST /RPC2 HTTP/1.0. Host: 127.0.0.1. Connection: close. User-Agent: XML_RPC Client. Content-Type: text/xml. Content-Length: 972. .
## T 2009/09/22 17:52:37.484745 127.0.0.1:35765 -> 127.0.0.1:6060 [AP] <?xml version="1.0" ?>. <methodCall>. .<methodName>tm.t_uac_wait</methodName>. .<params>. ..<param>. ...<value>. ....<string>INVITE</string>. ...</value>. ..</param>. ..<param>. ...<value>. ....<string>sip:jh_test_fi@192.98.101.10:5074;transport=udp</string>. ...</value>. ..</param>. ..<param>. ...<value>. ....<string>.</string>. ...</value>. ..</param>. ..<param>. ...<value>. ....<string>.</string>. ...</value>. ..</param>. ..<param>. ...<value>. ....<string>From: <sip:click2dial@test.fi>;tag=4ab8e4b575bf1
Call-ID: 4ab8e4b575bf1@test.fi
Contact: <sip:click2dial@!!>
To: <sip:jh@test.fi>
CSeq: 1 INVITE
Reject-Contact: *;automata="YES"
Content-Type: application/sdp
</string>. ...</value>. ..</param>. ..<param>. ...<value>. ....<string>v=0
o=click-to-dial 0 0 IN IP4 0.0.0.0
s=session
c=IN IP4 0.0.0.0
b=CT:1000
t=0 0
m=audio 9 RTP/AVP 0
a=rtpmap:0 PCMU/8000
</string>. ...</value>. ..</param>. .</params>. </methodCall>.
## T 2009/09/22 17:52:37.485616 127.0.0.1:6060 -> 127.0.0.1:35765 [AP] HTTP/1.0 200 OK. Via: SIP/2.0/TCP 127.0.0.1:35765. Server: SIP Router (2.99.0-dev01-serk (i386/linux)). Content-Length: 278. . <?xml version="1.0"?> <methodResponse> <fault> <value> <struct> <member> <name>faultCode</name> <value><int>400</int></value> </member> <member> <name>faultString</name> <value><string>Content-Type missing</string></value> </member> </struct> </value> </fault> </methodResponse>
On Sep 22, 2009 at 17:58, Juha Heinanen jh@tutpro.com wrote:
when trying to send INVITE using t_uac_wait, i get back response claiming that Content-Type is missing. why, because it seems to be there?
I've tried something similar and it work for me (the invite generated by it looks ok):
(perl) my $res=XMLRPC::Lite->proxy("http://127.0.0.1:5060") ->call("tm.t_uac_wait", "INVITE", "sip:andrei@iptel.org", "sip:127.0.0.1:5060;transport=udp", "", "From: sip:andrei\@iptel.org;tag=a\r\nTo: sip:andrei@iptel.org\r\nWarning: !!\r\nCall-ID: 4ab8e4b575bf1\r\nCSeq: 1 INVITE\r\nReject-Contact: *;automata="YES"\r\nContent-Type: application/sdp\r\n", "v=0\r\no=short-test 0 0 IN IP4 0.0.0.0\r\n" ) ->result;
Could you try to dump the sip packet it generates and/or send me a pcap trace of the xmlrpc exchange (so that I can try to replay it)?
Andrei
Andrei Pelinescu-Onciul writes:
Could you try to dump the sip packet it generates and/or send me a pcap trace of the xmlrpc exchange (so that I can try to replay it)?
andrei,
i think that pcap revealed the reason. it turned out that headers were separated by CRCR instead of CRLF. this was a hack in the client that needed to be made because of k xmlrpc server. i'll try to get rid of the hack and try again.
-- juha
andrei,
after fixing header delimiters to CRLF, sr didn't complain about the invite.
however, my script sent REFER before it got xmlrpc reply to INVITE, which failed because there was no To header that the script would take from 200 OK response to INVITE.
if i send xmlrpc tm.t_uac_wait request, will it return before the transaction is completed?
-- juha
On Sep 22, 2009 at 19:36, Juha Heinanen jh@tutpro.com wrote:
andrei,
after fixing header delimiters to CRLF, sr didn't complain about the invite.
however, my script sent REFER before it got xmlrpc reply to INVITE, which failed because there was no To header that the script would take from 200 OK response to INVITE.
if i send xmlrpc tm.t_uac_wait request, will it return before the transaction is completed?
No, it returns only when it gets a final reply.
Andrei