Search code examples
androidpjsippjsua2

How to remove ob parameter in contact in pjsip Android?


In my sip register messages from Android dialer app which uses pjsip stack seems to send ob parameter in contact. How to remove this parameter in Android?

This is contact header from my register message send by my Android dialer.

Contact: <sip:[email protected]:38167;ob>

I found this link from pjsip website which tells me setting

If pjsua_acc_config.use_rfc5626 is set to PJ_FALSE, we shouldn't add the "ob" parameter in the Contact header.

https://trac.pjsip.org/repos/ticket/1256

But unfortunately I can't find the equivalent in pjsip Android which helps to do that setting in Java code.


Solution

  • accCfg.getNatConfig().setSipOutboundUse(0);
    


    Used that above code while adding my account using the account config class.

    accCfg is of class type AccountConfig