NAT type detection failed: Invalid STUN server or server not configured (PJNATH_ESTUNINSERVER)

515 views
Skip to first unread message

kaka

unread,
Mar 8, 2012, 1:47:22 AM3/8/12
to CSipSimple Development
Hi guys.

I debugged the csip source code in Eclipse, and then i got error. as
show this:
-----------------------
pjsua_media.c ..NAT type detection failed: Invalid STUN server or
server not configured (PJNATH_ESTUNINSERVER)
-----------------------

step in step:

pjsua.create() that's ok
|
csipsimple_init() that's ok
|
pjsua.start(); then, app was crashed! LogCat showed this error.

I checked pjsua_media.c ,found :

/* Perform NAT detection */
status = pjsua_detect_nat_type();
if (status != PJ_SUCCESS) {
PJ_PERROR(1,(THIS_FILE, status, "NAT type detection failed"));
}

I don't know why the app crash. I think it's just a return value.

Régis Montoya

unread,
Mar 8, 2012, 4:57:25 AM3/8/12
to csipsim...@googlegroups.com
Hi,

Is that really a crash ???
There error log about the fact STUN is not configured is "normal" if you didn't configured STUN ;).
Pjsip logs this as an error because in 80% of mainstream users case (when you are NATed) the fact that there is no STUN server configured implies that media will probably not get correctly established.
However, normally that's just a log ! If you run my builds of CSipSimple, you'll also see exactly the same log, but everything still go fine even after this log.
Reply all
Reply to author
Forward
0 new messages