[reSIProcate] SUBSCRIBE and NOTIFY
Hi all,
I'm using resiprocate stack and developed
a sip server.
I'm using MSN messangers to test my
code.
My problen is that which i send NOTIFY
back in response to SUBSCRIBE program crashes in createContents() function
of Contents.cxx
This is how i'm creating NOTIFY
Contents *cont;
Mime type("application","pidf+xml");
Data contents =(
"<?xml
version=\"1.0\" encoding=\"UTF-8\"?>\r\n"
"<presence xmlns:impp=\"urn:ietf:params:xml:ns:pidf\"
entity=\"pres:preeti@xxxxxxxxxxxxxx\">\r\n"
"<tuple id=\"765\">\r\n"
"<status>\r\n"
"<basic>open</basic>\r\n"
"</status>\r\n"
"</tuple>\r\n"
"</presence\r\n"
"\r\n");
cout<<"Type is :"<<type<<endl;
cout<<"Contents are :"<<contents<<endl;
NameAddr target;
target.uri().scheme() = "sip";
target.uri().user() = p_name_to;
target.uri().host() = p_to_host;
target.uri().port() = p_port;
target.uri()=p_uri_To;
target.uri().param(p_transport) = p_Via_Transport;
NameAddr
from;
from.uri().scheme() = "sip";
from.uri().user() = p_name_from;
from.uri().host() = p_from_host;
from.uri().port() = p_port;
from.uri()=p_uri_From;
from.uri().param(p_transport) = p_Via_Transport;
response=Helper::makeRequest(target, from,NOTIFY);
response->header(h_Contacts)=recv->header(h_Contacts);
response->header(h_Vias).front().transport() =p_Via_Transport;
response->header(h_Vias).front().sentHost() = "172.21.111.166";
response->header(h_Vias).front().sentPort() = p_port;
response->header(h_CallId).value()=recv->header(h_CallId).value();
response->header(h_From).param(p_tag)=recv->header(h_From).param(p_tag);
response->header(h_ContentType).type()="application/pidf+xml,text/xml+msrtc.pidf,application/xpidf+xml";
cont->createContents(type,contents);
response->setContents(cont);
response->header(h_Expires).value()=3600;
set_host(p_contact_host);
Can any body guide why its crashing
at createContents
Thanks in advance
Ajay Kaushik
Tata Consultancy Services Limited
Mailto: ajay.kaushik@xxxxxxx
Website: http://www.tcs.com=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you