Let's asssume we've two phone and Phone1 & Phone2 they're both has custom sip header
[Phone1] ----calling----> [Phone2]
(This is onIncomingCallState for Phone2 and it can read header of Phone1)
[Phone1] <----answer---- [Phone2]
(This is answer for Phone2 and it send it's header with it's CallOpParam)
[Phone1] <----OnCallState----> [Phone2]
(This is on call state for both, Phone2 has Phone1's header, now Phone1 need to get Phone2's header.)
I'm writing the code at the level of PjSua2 with C++, i can see the log, Phone1 has access the value of header and when i sniff also with the wireshark i can see as well. But how can i handle it at the level of pjsua2, is there any call back or something else?
Actually, it is already implemented in the pjsua2 level.
virtual void onCallState(OnCallStatePrm &prm){
..
prm.e.body.tsxState.src.rdata.wholeMsg //this is what i want exactly.
..
}