- Freeswitch version: 1.7.0 64 bit
- Platform OS: Windows
- Internal user client: X-Lite 22.214.171.124 (extension 1001)
- Internal user is connected to the internet behind a router with a fixed IP.
- External user client: Zoiper for Windows Phone 126.96.36.199 (extension 10003)
- External user is connected to the internet via 4G.
What I have done already:
- Setup external user profiles.
- External SIP/RTP IPs have already been updated with global IP.
- In the default.xml dialplan, forward certain extension calls to public dialplan.
- Setup an expression in public dialplan to handle calls to these external extensions (users).
- Internal and External users both successfully register with FS.
- External users successfully makes calls to internal user. Voices from both sides work. A minor glitch is that voice recording via record_session doesn't work.
What doesn't work:
- Internal users cannot call external users. Call will drop a few seconds later after call was made. I have checked logs and confirm that it tried to reach the external user by the internal IP. (which is probably the issue)
In the typical extension call handler I see in default.xml, I can see there are two "bridge" applications before and after the "answer" application. I can see that these are probably where the actual bridging of calls and voice happens. I'm guessing that may be where "sofia/external5090/<caller extension>@x.x.x.x:5090" may have been for in the example I was trying to follow. How to get the external user IP though is beyond my knowledge. Using the original settings from default.xml and just copying it over to public.xml (with modifications to extensions it can handle) will just end up calling the local IP. Since the external user obviously isn't there locally IP wise, the call bridge fails and shutdown the call.
My main question is, how to setup the two "bridge" applications to correctly hand the call to the external user? I'll probably need something that reads the user IP from the registered user list.
Original code look like this. I'll need help changing it so that it can correctly relay to any external user without applying a fixed IP. Thanks.
Note: I didn't just connect the internal dialplan via the default port because, for some reason, no sound will be heard on either side (I'm guessing either NAT or config problem???). Why does this happen for default dialplan but doesn't on the public is beyond me.