[Freeswitch-users] Call fail from Internal user to External user

grtys yuri at grtek.com.tw
Fri Sep 23 13:23:45 MSD 2016


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 https://wiki.freeswitch.org/wiki/External_Profile

Below is more information about my problem.

Test setup:
- Freeswitch version: 1.7.0 64 bit
- Platform OS: Windows
- Internal user client: X-Lite 4.9.5.1 (extension 1001)
- Internal user is connected to the internet behind a router with a fixed
IP.
- External user client: Zoiper for Windows Phone 1.0.4.4 (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
<http://freeswitch-users.2379917.n2.nabble.com/file/n7596241/external.xml>  
- External SIP profile.
default.xml
<http://freeswitch-users.2379917.n2.nabble.com/file/n7596241/default.xml>  
- Internal dialplan.
public.xml
<http://freeswitch-users.2379917.n2.nabble.com/file/n7596241/public.xml>   -
Public dialplan.



--
View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Call-fail-from-Internal-user-to-External-user-tp7596241.html
Sent from the freeswitch-users mailing list archive at Nabble.com.



Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list