Call fail from Internal user to External user

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Call fail from Internal user to External user

This post has NOT been accepted by the mailing list yet.
Hi. I'm testing FS to make a call from an internal user to an external user. Right now the call fails. I kind of knows where the problem is but lack the knowledge to fix it.

What I have been trying to do is basically "Switch with External SoftPhone" from

Below is more information about my problem.

Test setup:
- Freeswitch version: 1.7.0 64 bit
- Platform OS: Windows
- Internal user client: X-Lite (extension 1001)
- Internal user is connected to the internet behind a router with a fixed IP.
- External user client: Zoiper for Windows Phone (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).

What works:
- 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.

Some of my config files can be found as attachment.
external.xml - External SIP profile.
default.xml - Internal dialplan.
public.xml - Public dialplan.