krunal09 / sample

Automatically exported from code.google.com/p/csipsimple
0 stars 0 forks source link

Missing STUN server configuration #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently there does not seem to be any way to configure a STUN server and 
port. There are options for ICE and TURN but none for STUN. I think pjsip 
supports this as a configuration option.

Original issue reported on code.google.com by michael....@gmail.com on 23 Jun 2010 at 9:06

GoogleCodeExporter commented 9 years ago
Is not yet implemented since the interface is a little bit complicated for that 
(we have to be able to handle multiple servers so multiple list). 

So was just postponed. But will be done.

Original comment by r3gis...@gmail.com on 23 Jun 2010 at 9:29

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I was desperate for STUN as it's needed for my WiFi which is behind a NAT 
router from the SIP switch, and for several frequently called SIP to SIP (other 
end has NAT). So I co-opted the TURN settings. In SipService.java:

if(isTurnEnabled == 1) {
    //media_cfg.setEnable_turn(isTurnEnabled); 
    //media_cfg.setTurn_server(pjsua.pj_str_copy(prefsWrapper.getTurnServer()));
    // TODO - Change pref from TURN to STUN
    cfg.setStun_host(pjsua.pj_str_copy(prefsWrapper.getTurnServer())); // (deprecated)
}

Voila! I now can use CSipSimple routinely, allowing me to find more bugs and 
enhancements :-)

Please consider at least a single STUN server (yes, use the array, I was lazy, 
but just allow onw server in the list). Does anyone use TURN anyway? I've never 
seen it in any other SIP phone or proxy. By some simple rename/refactoring and 
resource editing you'd have single STUN server support and help a LOT of people.

Original comment by dc3de...@gmail.com on 9 Jul 2010 at 4:15

GoogleCodeExporter commented 9 years ago
Ok.
I integrate this right now.
I'll add stun option for only one server. That's ok for now you're right.

Original comment by r3gis...@gmail.com on 9 Jul 2010 at 11:39

GoogleCodeExporter commented 9 years ago
Simply setting the STUN host name within PJSIP (and optionally enabling ICE) is 
all you need. I'd like to see this option too vs. TURN.

Original comment by robert.c...@gmail.com on 9 Jul 2010 at 12:02

GoogleCodeExporter commented 9 years ago
Option added in last pre build :

http://code.google.com/p/csipsimple/downloads/detail?name=CSipSimple_pre5.apk

Original comment by r3gis...@gmail.com on 9 Jul 2010 at 1:00

GoogleCodeExporter commented 9 years ago
Available in last 0.00-12

Original comment by r3gis...@gmail.com on 10 Jul 2010 at 4:38

GoogleCodeExporter commented 9 years ago
This works 100%. Fixed -> Verified

Original comment by dc3de...@gmail.com on 14 Jul 2010 at 12:31