diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-10-12 12:14:27 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-10-12 12:14:27 +0000 |
commit | b0f62471ea72f5767d859f18e41d4326f57b85c5 (patch) | |
tree | 5be22dd454663b8e8daee9e322ed794ccf54e8c4 /pjsip/include/pjsua-lib/pjsua.h | |
parent | 9ca491d9d373e4f9114b429bcd61b72b1ff97048 (diff) |
Ticket #399: Initial implementation of tool to perform NAT type detection/classification
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1495 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsua-lib/pjsua.h')
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 91856d2c..ea16d6b9 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -40,6 +40,9 @@ /* Include all PJSIP-SIMPLE headers */ #include <pjsip_simple.h> +/* Include all PJNATH headers */ +#include <pjnath.h> + /* Include all PJLIB-UTIL headers. */ #include <pjlib-util.h> @@ -1310,6 +1313,24 @@ PJ_DECL(pj_pool_factory*) pjsua_get_pool_factory(void); */ /** + * This is a utility function to detect NAT type in front of this + * endpoint. Once invoked successfully, this function will complete + * asynchronously and report the result in the callback. + * + * @param srv_port Optional STUN server and port, in "SERVER[:PORT]" + * format. If this option is NULL, the function will use + * the STUN server that has been set in the pjsua + * configuration. + * @param user_data User data to be returned back in the callback. + * @param cb Optional callback to report the detection result. + * + * @return PJ_SUCCESS if detection is started successfully. + */ +PJ_DECL(pj_status_t) pjsua_detect_nat_type(void *user_data, + pj_stun_nat_detect_cb *cb); + + +/** * This is a utility function to verify that valid SIP url is given. If the * URL is valid, PJ_SUCCESS will be returned. * |