Open dariomalfatti-centropaghe opened 3 years ago
I'm trying to set the user agent but I cannot figure out how to do that. I tryed to set the header in the makeCall method like this:
const call = await endpoint.makeCall(a, n, { 'X-UA': 'My app (v0.0.6 Android)' });
and in the configuration of the createAccount method like this:
const configuration = { name: accountInfo.account.sipName, username: accountInfo.account.sipUserName, password: accountInfo.account.sipPassword, domain: accountInfo.account.sipDomain, transport: accountInfo.account.sipTransport, proxy: accountInfo.account.sipProxy, regHeaders: { 'user-agent': 'My app (v0.0.6 Android)', }, };
I take a look at the source code where it set the user agent:
if (mServiceConfiguration.isUserAgentNotEmpty()) { epConfig.getUaConfig().setUserAgent(mServiceConfiguration.getUserAgent()); } else { epConfig.getUaConfig().setUserAgent("React Native PjSip ("+ mEndpoint.libVersion().getFull() +")"); }
I cannot configure mServiceConfiguration.getUserAgent() from my react native app. Is there any way to set it up?
Anyone can help me please? Thanks
I'm trying to set the user agent but I cannot figure out how to do that. I tryed to set the header in the makeCall method like this:
and in the configuration of the createAccount method like this:
I take a look at the source code where it set the user agent:
I cannot configure mServiceConfiguration.getUserAgent() from my react native app. Is there any way to set it up?