pjsip-android icon indicating copy to clipboard operation
pjsip-android copied to clipboard

How do I configure pjsip to use a certain stun server?

Open dilldilldill opened this issue 6 years ago • 4 comments

Currently I can register my sip service with my sip provider but can not make a call. The call state changes immediately from PJSIP_INV_STATE_CALLING to PJSIP_INV_STATE_DISCONNECTED. My guess is that I need to make use of the providers stun server to establish a proper connection. How do I do that?

dilldilldill avatar Feb 28 '18 15:02 dilldilldill

In the startStack() method of the SipService.java file I now added a stun server like so:

epConfig.getUaConfig().getStunServer().add("stun.provider.net"); or epConfig.getUaConfig().getStunServer().add("stun.provider.net:1234"); or epConfig.getUaConfig().getStunServer().add("sip:stun.provider.net:1234");

none of which are working. Am I doing it correctly? Or what else can be the problem, if the call state behaves like I already explained?

dilldilldill avatar Mar 01 '18 11:03 dilldilldill

Myself I do in the same function: StringVector servers = new StringVector(); servers.add("stun.provider.net:1234"); mEndpoint.natUpdateStunServers(servers, true);

georgekav2 avatar May 31 '18 11:05 georgekav2

[Help me urgently, its so urgent please please please] Sir please help me out too. I have downloaded this whole package and built, but it isn't running and I am facing difficulty understanding the code. So please help me out how to make an application based on this. I need to develop just a simple application that could send/receive messages and calls. Please help me.

zackbugti avatar Aug 22 '19 23:08 zackbugti

In the startStack() method of the SipService.java file I now added a stun server like so:

epConfig.getUaConfig().getStunServer().add("stun.provider.net"); or epConfig.getUaConfig().getStunServer().add("stun.provider.net:1234"); or epConfig.getUaConfig().getStunServer().add("sip:stun.provider.net:1234");

none of which are working. Am I doing it correctly? Or what else can be the problem, if the call state behaves like I already explained?

you still facing the problem? Do you see anything wrong in the sip trace?

aenonGit avatar Aug 26 '19 09:08 aenonGit

closing for inactivity

aenonGit avatar Aug 06 '24 06:08 aenonGit