Dear Jeroen,
I am happy to receive immediate response for my querry from you.
Yes there is a CRLFCRLF before the body(SDP)
this is wht the actual message(INVITE) is like:
INVITE sip:[EMAIL PROTECTED] SIP/2.0^M
Via: SIP/2.0/UDP
10.16.131.107:5060;branch=z9hG4bK-8a20727f-9b0e-431f-94f1-d4217e67d623.1;rport^M
Max-Forwards: 70^M
From: "16508179147"<sip:[EMAIL
PROTECTED]>;tag=12c9fc6e-2e25-4fa9-82ef-5edce0b00c29^M
To: <sip:[EMAIL PROTECTED]>^M
Call-ID: [EMAIL PROTECTED]
CSeq: 1 INVITE^M
Contact: <sip:[EMAIL PROTECTED]:5060;transport=UDP>^M
Privacy: none^M
Subject: no subject^M
Allow: OPTIONS,INVITE,ACK,INFO,BYE^M
Accept: application/sdp^M
Content-Type: application/sdp^M
Content-Disposition: session^M
Content-Length: 120^M
^M
v=0^M
o=-16485 1 IN IP4 10.16.131.107^M
s=-^M
c=IN IP4 10.16.131.107^M
t=0 0^M
m=audio 8500 RTP/AVP 0^M
a=rtpmap:0 PCMU/8000^M
I am doing this on Solaris its IP address is 10.16.131.107 and i am sending the
Invite method to the same server(10.16.131.107).
the response i am getting for above is ..
response received from server
SIP/2.0 100 Trying
From: "16508179147"<sip:[EMAIL
PROTECTED]>;tag=12c9fc6e-2e25-4fa9-82ef-5edce0b00c29
To: <sip:[EMAIL PROTECTED]>
Call-ID: [EMAIL PROTECTED]
CSeq: 1 INVITE
Via: SIP/2.0/UDP
10.16.131.107:5060;rport=52128;branch=z9hG4bK-8a20727f-9b0e-431f-94f1-d4217e67d623.1
Content-Length: 0
response received from server
SIP/2.0 400 Bad Request
From: "16508179147"<sip:[EMAIL
PROTECTED]>;tag=12c9fc6e-2e25-4fa9-82ef-5edce0b00c29
To: <sip:[EMAIL PROTECTED]>
Call-ID: [EMAIL PROTECTED]
CSeq: 1 INVITE
Contact: <sip:10.17.131.86:5060>
Server: SnowShoreMediaServer/1.3.7-050916A
Via: SIP/2.0/UDP
10.16.131.107:5060;rport=52128;branch=z9hG4bK-8a20727f-9b0e-431f-94f1-d4217e67d623.1
Allow: OPTIONS,INVITE,ACK,INFO,BYE
Content-Length: 0
I feel that there qould me any mistake in message(INVITE) format..but i ma not
getting what is it?can u help me in finding this...
here with i am attaching my client socket program which is sending Invite
request...
Regards
Rajesh
Jeroen van Bemmel <[EMAIL PROTECTED]> wrote:
Rajesh,
Is there a double newline (CRLFCRLF) before the body, to indicate the end of
the headers?
Jeroen
---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs. Try it free.#include<sys/socket.h>
#include<netinet/in.h>
#include<string.h>
#include<stdio.h>
#define MYPORT 5060
#define MAXLINE 3000
main(int argc,char **argv)
{
int sockfd,n,i,len;
char sendline[MAXLINE],recvline[MAXLINE+1];
struct sockaddr_in servaddr;
FILE *ff,*fc;
ff=fopen("Invite7.txt","r");
if(ff==NULL)
printf("\n file opening error \n ");
else
printf("\n file opened successfully\n");
if(argc!=2)
printf("provide the server's ip address\n");
bzero(&servaddr,sizeof(servaddr));
servaddr.sin_family = AF_INET;
servaddr.sin_port = htons(MYPORT);
inet_pton(AF_INET,argv[1],&servaddr.sin_addr);
if((sockfd= socket(AF_INET,SOCK_DGRAM,0))>0)
printf("socket created sucessfully\n");
else
printf("socket creation error\n");
printf("enter what u would like to be echoed:\n");
while(len=fread(sendline,1,MAXLINE,ff))
{
sendline[len]='\0';
printf("\n Following data is read from file\n");
printf(sendline);
printf("before sending data\n");
if((sendto(sockfd,sendline,strlen(sendline),0,(struct sockaddr
*)&servaddr,sizeof(servaddr)))>0)
printf("data sent successfully\n");
else
printf("data sending error\n");
for(i=0;i<2;i++)
{
n = recvfrom(sockfd,recvline,MAXLINE,0,NULL,NULL);
if(n>0)
printf("\n response received from server\n");
recvline[n] = 0;
fputs(recvline,stdout);
}
}
close(ff);
close(sockfd);
exit(0);
}
_______________________________________________
Sip-implementors mailing list
[email protected]
http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors