[pjsip] Trying to get the public ip adress, solved by STUN

Tanguy Floc'h electrocut at gmail.com
Mon May 19 11:12:03 EDT 2008

Hi (again) !

I want to get the public ip adress value, just to display this adress to the
user, when the STUN resolution is done.

For the moment, I've add theses lines in pjsua "on_nat_detect" callback :

        // Get pjsua instance
        pjsua_var = pjsua_get_var();

        // Get public IP
        char* ip_string = pjsua_var->tpdata[0].local_name.host.ptr;

but it isn't a clean way to do it, since I have to link
<pjsua-lib/pjsua_internal.h> (And we are not supposed to do this)

Is there another way to get this value ?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080519/0dc4e2f8/attachment.html>

More information about the pjsip mailing list