How to send a SIP MESSAGE request ? I have registered 2 user-agents successfully and now i want to send a MESSAGE from one to another. Here is what am doing... I create a CSIPRequestElements objects with the AOR of the recipient, then i retrieve the CSIPMessageElements object from it. After this i set the method and content for the CSIPMessageElements object and then send it using the active connection. The problem is that at runtime its giving me a KErrArgument(-6, Bad Request) error in the SendRequestL(...) call. Can someone please tell me which argument is wrong or if i need to put in any more fields in the CSIPMessageElements object ?
// code starts ...
CSIPAddress* addr = CSIPAddress:ecodeL(_L8("sip:email@example.com"));
CSIPToHeader* aor = CSIPToHeader::NewL(addr);
CSIPRequestElements *elements = CSIPRequestElements::NewL(aor);
CSIPMessageElements& msgElements = elements->MessageElements();
HBufC8* g = HBufC8::NewL(10);
CSIPContentTypeHeader* cType=CSIPContentTypeHeader::NewL(_L8("text"), _L8("plain")); // is this right ?
CSIPClientTransaction* sipClientTransaction = iConnection->SendRequestL(elements);
// code ends.
And.. on the receiving side which callback method will be invoked when the message is received ?
Someone please help, this is really urgent for me..
Thanx in advance,