Pjsua-2 Android- How to add custom header to INVITE request while making a call?

Viewed 1137

I need to add a Subject header to the invite request while making a call. I am using the PJSUA library.

I found this question. But I couldn't implement it. Please help.

Thanks in advance

2 Answers

with PJSUA2, try this:

SipHeader sipHeader = SipHeader();
sipHeader.hName = "Subject";
sipHeader.hValue = "34020000001320000001:0,34020000002000000001:0";

SipHeaderVector sipHeaderVector = SipHeaderVector();
sipHeaderVector.push_back(sipHeader);
SipTxOption sipTxOption = SipTxOption();
sipTxOption.headers = sipHeaderVector;
prm.txOption = sipTxOption;
Related