how to receive SIP INFO via PJSUA2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

I'm using PJSIP via the C++ PJSUA2 interface. Now I need to add sending and receiving of proprietary SIP INFO messages (inside a call) to my application.

Sending was easy to implement via pj::Call::sendRequest().

But I couldn't figure out a way to receive (proprietary) SIP INFO messages via PJSUA2. I can observe the received SIP INFO messages inside pj::Call:: onCallTsxState() but I have the following issues:
1) Is onCallTsxState() the best/right place to receive SIP INFO messages via PJSUA2?
2) How can I prevent PJSIP from sending a "500 Unhandled by dialog usages" response automatically from inside onCallTsxState()? Setting param.e.body.tsxState.tsx.statusCode = 200; does not work. I'd need at least to be able to decide in my code if I want to return a "200 OK" or an error response.
3) How can I access the message body from inside onCallTsxState()? I think I might go via param.e.body.tsxState.src.rdata.pjRxData, cast this to a pjsip_rx_data*, then access a pjsip_msg* object. But how do I extract the message body from the pjsip_msg object?

Thanks for any help.

Markus

Wichtiger Hinweis: Diese E-Mail kann Betriebs- oder Gesch?ftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrt?mlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielf?ltigung oder Weitergabe der E-Mail ausdr?cklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank.

Important Note: This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal. Thank you for your cooperation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20151203/1d4e4280/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux