making a call between two different wireless networks with pjsip on ios

645 Views Asked by At

I'm trying to make a call between 2 wireless networks from my iphone using pjsua lib. i'm calling from my iphone to an android running csipsimple. everything worked great while both devices were on the same network. but i can't make the call when the devices are on different networks. i guess i'm having problems with the nat traversal. so i tried to find the nat type using the built in methods in pjsua - "pjsua_detect_nat_type" and the callback method "on_nat_detect" but i keep getting - "Error detecting NAT: Invalid STUN server or server not configured". than i tried setting the stun server with "stun_srv" but it still won't work. can anybody help me with this please? i'm stuck on these issue for the last couple of days and am fairly new to this library so any assistance will be appreciated... thanks in advance

2

There are 2 best solutions below

0
On

Please go through this demo would definitely help you out.

https://code.google.com/p/idoubs/

1
On

About your initial problem, you're right, you should have some translation mechanism that should be interfering in your scenario.

About psip NAT detection mechanims, please note, that, as documentation states, you should have access to a STUN server. Do you've a STUN server in your network? If so, do you have SRV resolution in order to allow pjsip to get it's address?