How to add body to SIP REGISTRATION message in PJSIP using JAVA or C++?

W
wnas
Wed, Jun 7, 2017 1:29 PM

I try to sent to SIP server REGISTRATION message with body. Till now I could add to message only header (like below) but I cannot find any java wrappers allowing me to add a body. AccountConfig accountConfig =AccountConfigFactory.create(); String idUri =String.format("sip:%s@%s", sipAlias,BuildConfig.sipDNS); accountConfig.setIdUri(idUri); accountConfig.getNatConfig().setIceEnabled(true); SipHeader header =newSipHeader(); header.setHName("Content-Type"); header.setHValue("text/plain"); headers.add(header);So how to add body to message?Or how to add body via C++ code?

I try to sent to SIP server REGISTRATION message with body. Till now I could add to message only header (like below) but I cannot find any java wrappers allowing me to add a body. AccountConfig accountConfig =AccountConfigFactory.create(); String idUri =String.format("sip:%s@%s", sipAlias,BuildConfig.sipDNS); accountConfig.setIdUri(idUri); accountConfig.getNatConfig().setIceEnabled(true); SipHeader header =newSipHeader(); header.setHName("Content-Type"); header.setHValue("text/plain"); headers.add(header);So how to add body to message?Or how to add body via C++ code?