Is your app on swift or objective c? if swift then which version?On Wed, Feb 21, 2018 at 5:55 PM, Igor Nazarov <igor.nazarov@greenfieldtech.net > wrote:______________________________Apple requires that applications should support IPv6 DNS64/NAT64 networks. PJSIP recommends to enable ICE and use a dual stack TURN server (https://trac.pjsip.org/repos/wiki/IPv6#NAT64 ). I've set up such a server and configured it in my iOS application in the next way:bool enableTurn = SIPConfig::getInstance()->getE
nableTurn(); if (enableTurn)
{
mPjsuaMediaConfig.enable_turn = PJ_TRUE;
turnServer = SIPConfig::getInstance()->getT
urnServer(); int turnPort = SIPConfig::getInstance()->getT
urnPort ();bool useTcpForTurn = SIPConfig::getInstance()->getT
cpForTURN ();turnRealm = SIPConfig::getInstance()->getT
urnRealm(); turnUser = SIPConfig::getInstance()->getT
urnUser(); turnPassword = SIPConfig::getInstance()->getT
urnPassword();
LOG_INFO("PJSIP", " Setting TURN with server address: %s, port: %d, realm: %s, username: %s, use TCP: %d", turnServer.c_str(), turnPort, turnRealm.c_str(), turnUser.c_str(), useTcpForTurn);
char turn_server_and_port[4096];
sprintf(turn_server_and_port, "%s:%d", turnServer.c_str(), turnPort);
pj_str_t turn_server = pj_str((char *)turn_server_and_port);
pj_strdup_with_null(PJSIPResou
rces::getInstance()->getPool() , & mPjsuaMediaConfig.turn_server, &turn_server);
if (useTcpForTurn)
{
mPjsuaMediaConfig.turn_conn_ty
pe = PJ_TURN_TP_TCP; }
mPjsuaMediaConfig.turn_auth_cr
ed.type = PJ_STUN_AUTH_CRED_STATIC; mPjsuaMediaConfig.turn_auth_cr
ed.data.static_cred.realm = pj_str((char *)turnRealm.c_str()); mPjsuaMediaConfig.turn_auth_cr
ed.data.static_cred.username = pj_str((char *)turnUser.c_str()); mPjsuaMediaConfig.turn_auth_cr
ed.data.static_cred.data_type = PJ_STUN_PASSWD_PLAIN; mPjsuaMediaConfig.turn_auth_cr
ed.data.static_cred.data = pj_str((char *)turnPassword.c_str()); }
My app is able to register on NAT64 network. When I'm trying to make a call it sends an INVITE message a few times, but the server doesn't respond for this INVITE at all. The INVITE contains an IPv4 address (which is my iPhone public IP address) in its "Via" and "Contact" fields in message headers. The SDP contains a relayed IPv4 address 172.31.8.187 in its "Connection Information" and "Media Attribute" fields and if I understand correctly this is a reserved IP address and thus any ISP will drop a packet sent to such and address. Am I right? Could this be a reason of my problem that the server is not responding to my INVITE?Any answer is highly appreciated. Thanks!With Best Regards,Igor Nazarov_________________
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip. org
_______________________________________________
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists. pjsip.org
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org