< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] resiprocate NOTIFY Request



Hi all,

I'm try to create the NOTIFY request in response to SUBSCRIBE using resiprocate

Here is the sample code

      SipMessage *response =new SipMessage;
       response=dynamic_cast<SipMessage*>(recv);
       SipMessage *request=dynamic_cast<SipMessage*>(recv);

        HeaderFieldValue* hfv=NULL;
        Pidf *pidf=NULL;
        Data *msg=NULL ;

        msg=new Data("<?xml version=\"1.0\"?>\r\n"
                "<reginfo xmlns=\"urn:ietf:params:xml:ns:reginfo\" version=\"0\" state=\"full\">\r\n"
                "<registration aor=\"ajay@xxxxxxxxxxxxx\" id=\"a7\" state=\"init\" />\r\n"
                "</reginfo>\r\n"
                "\r\n");
        }

        if(hfv!=NULL)
        {
                delete hfv;
                hfv=NULL;
                cout<<"hfv Deleted "<<endl;
        }
        else
        {
                 hfv = new HeaderFieldValue(msg->data(), msg->size());
        }

        if(pidf!=NULL)
        {
                delete pidf;
                pidf=NULL;
                 cout<<"pidf Deleted "<<endl;

        }
        else
        {
                Mime type("application","reginfo+xml");
                pidf = new Pidf(hfv, type);
        }


response->setContents(pidf);

 if(msg!=NULL)
 {
                delete msg;
                msg=NULL;
  }

But if i chk the etheral log contents are not the same as i had set in the msg.

can anybody help in this regard

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