Hi Anthony,

All the ports were open, but I didn't have the external IP and the settings listed in the Amazon EC2 documentation set. After setting them and restarting Freeswitch, I made 20 successful calls in a row with 2 way audio from Chrome to the PSTN!

Thank you for your help!
James



James

"Every Call, Every Time!"

How did I do?

HappySatisfiedUnhappy

Click on a face to provide feedback on my performance!


Synclio Extension:  110627
Phone:  866-707-4590
Skype: No! Call me on Synclio! :)


On Fri, Sep 13, 2013 at 1:42 PM, Anthony Minessale <anthony.minessale@gmail.com> wrote:
did you do all the things in https://wiki.freeswitch.org/wiki/Amazon_EC2

Also are you using the external or internal profile (port 5065 is the default unauthenticated port)
if you want to use internal you have to comment out the auth-calls and the inbound acl lines. 

Most of this should be available in our various books and wiki articles.



On Fri, Sep 13, 2013 at 3:31 PM, James Mortensen <james.mortensen@synclio.com> wrote:
Hi Anothony,

Inbound calling is proving to be more challenging.  Here's what I've tried from https://wiki.freeswitch.org/wiki/Auto_NAT:

1.  Verified the following params were set in my sip profiles (these were already set by default):



  <param name="ext-rtp-ip" value="auto-nat"/>
    <param name="ext-sip-ip" value="auto-nat"/>

2.  Ran sofia status, which shows this:


                     Name   Type                                      Data State
=================================================================================================
           10.166.245.111  alias                                  internal ALIASED
            internal-ipv6 profile                  sip:mod_sofia@[::1]:5060 RUNNING (0)
                 external profile         sip:mod_sofia@10.166.245.111:5080 RUNNING (0)
    external::example.com gateway                   sip:joeuser@example.com NOREG
                 internal profile         sip:mod_sofia@10.166.245.111:5060 RUNNING (0)
  internal::bandwidth.com gateway           sip:your user name@67.231.8.195 NOREG
=================================================================================================
3 profiles 1 alias


3. Ran sofia status profile internal expecting to see ext-rtp-ip and ext-sip-ip set, but they're missing:

Name             internal
Domain Name       N/A
Auto-NAT         false
DBName           sofia_reg_internal
Pres Hosts       10.166.245.111,10.166.245.111
Dialplan         XML
Context           public
Challenge Realm   auto_from
RTP-IP           10.166.245.111
SIP-IP           10.166.245.111
URL               sip:mod_sofia@10.166.245.111:5060
BIND-URL         sip:mod_sofia@10.166.245.111:5060;transport=udp,tcp
HOLD-MUSIC       local_stream://moh
OUTBOUND-PROXY   N/A
CODECS IN         G722,PCMU,PCMA,GSM
CODECS OUT       G722,PCMU,PCMA,GSM
TEL-EVENT         101
DTMF-MODE         rfc2833
CNG               13
SESSION-TO       0
MAX-DIALOG       0
NOMEDIA           false
LATE-NEG         true
PROXY-MEDIA       false
ZRTP-PASSTHRU     true
AGGRESSIVENAT     false
CALLS-IN         86
FAILED-CALLS-IN   86
CALLS-OUT         0
FAILED-CALLS-OUT 0
REGISTRATIONS     1


So regarding NAT issues, it seems Freeswitch isn't able to get the server's public IP perhaps, despite auto-nat being the correct setting?  This is just an EC2 server behind Amazon NAT.

Also, I ran:
nat_map status

Nat Type: UNKNOWN, ExtIP: 
NAT port mapping enabled.

0 total.


I did perform an echo test from user 1000 to 9196 from Chrome to Freeswitch, which works as expected, but getting Bandwidth incoming calls to be processed correctly is a challenge. It just loops over and over again with this in the DEBUG console:

2013-09-13 20:27:31.255055 [NOTICE] switch_channel.c:1030 New Channel sofia/internal/+19712383780@192.168.37.68 [80196f26-febf-4363-b48c-ee88022c6b9c]
2013-09-13 20:27:31.255055 [DEBUG] switch_core_session.c:1006 Send signal sofia/internal/+19712383780@192.168.37.68 [BREAK]
2013-09-13 20:27:31.255055 [DEBUG] switch_core_session.c:1006 Send signal sofia/internal/+19712383780@192.168.37.68 [BREAK]
2013-09-13 20:27:31.255055 [DEBUG] switch_core_state_machine.c:418 (sofia/internal/+19712383780@192.168.37.68) Running State Change CS_NEW
2013-09-13 20:27:31.255055 [DEBUG] switch_core_state_machine.c:436 (sofia/internal/+19712383780@192.168.37.68) State NEW
2013-09-13 20:27:31.275057 [DEBUG] sofia.c:8003 IP 67.231.4.195 Rejected by acl "domains". Falling back to Digest auth.
2013-09-13 20:27:31.275057 [DEBUG] switch_core_session.c:1006 Send signal sofia/internal/+19712383780@192.168.37.68 [BREAK]
2013-09-13 20:27:31.275057 [DEBUG] sofia.c:1787 detaching session 80196f26-febf-4363-b48c-ee88022c6b9c


So in summary, the WebRTC seems good but not the PSTN. I can do Chrome to FS to Chrome, Chrome to FS Echo, I can call from Chrome to FS to Bandwidth (NO AUDIO) but calling inbound loops.  I'm assuming all of the routing is done using the Bandwidth DID I've pointed to the server, not the 971xxxxxxx number that I'm calling from on Verizon/Google Voice.

Thank you for your help!
James


On Fri, Sep 13, 2013 at 11:51 AM, Anthony Minessale <anthony.minessale@gmail.com> wrote:
That should not matter.  It will be taken care of.

Verify you can just use bandwidth to call the server and run an echo test or something.
Then try a sip phone registered.  Then on to the webrtc instance.

You probably have some nat problems to bandwidth regardless of WebRTC.


On Fri, Sep 13, 2013 at 1:42 PM, James Mortensen <james.mortensen@synclio.com> wrote:
Here is my follow up to this issue.  It seems something happened to the server where it stopped sending Binding responses to Chrome.  This is a known issue that I've seen before that Google says was an Asterisk issue.  However, the same thing happens to Freeswitch as well, indicating the problem is the network/server, not the software.

I booted up another server from a snapshot, verified two way audio with Asterisk, then reinstalled Freeswitch, uncommented the ws-binding parameter to enable WS on port 5066, then registered user 1000 and 1002 from the tryit.jssip.net demo using the following configuration:

Name: James
SIP URI:  sip:1000@54.X.X.X   <-- public IP of server
password: 1234
WS URI: ws://54.X.X.X:5066  <--- same public IP

and I substituted 1002 in place of 1000 for another user on another network.  I verified audio flows both ways with audio flowing through Freeswitch.

I made no other changes to the configuration.  This was a lot easier to get started with than Asterisk WebRTC.  I just made it out to be a lot harder than it was by assuming I needed to manually add in my server's IP address in the configuration files.  This happens automatically, even on a NAT'd server.  Amazing! :)


Now, for the PSTN part, I configured my BANDWIDTH.com provider as an internal context and as an outbound and inbound dialplan.  I can connect a call between my cellphone and Chrome, but there's no audio flowing to/from Bandwidth.  I suspect the problem has something to do with bridging AVP and SAVPF, since the carriers don't support SRTP.

I've grepped the configuration files, and I don't see how I would configure the system to bridge AVP and SAVPF and do transcoding.  Any ideas?

Thank you!!

James



On Wed, Sep 11, 2013 at 12:01 PM, James Mortensen <james.mortensen@synclio.com> wrote:
Installing ibncursesw5 and libncursesw5-dev did resolve the issue.  I can now connect to the WebSocket server.  Seems the cluechoo module is just something that was added in to separate the help vampires from the people with legitimate issues. :D

I got 405 Method Not Allowed errors, and I resolved them by making sure the IP address in the SIP URI matches the IP address in the WS field.  

At this time, I've successfully registered and am getting back 200 OK's and have now moved onto tweaking the settings so I can get audio going both ways. The candidates appear to be only showing the public IP, so I'll have to figure that out. I'll provide more updates, or questions, as I move forward.

James


On Wed, Sep 11, 2013 at 11:32 AM, James Mortensen <james.mortensen@synclio.com> wrote:
Okay, I added in the dependencies and still get those errors.  Do I need to file a bug in JIRA for this or am I just missing something?  

I'm happy to try a different OS if there's one that's been tried and tested.

Of course, more googling reveals that mod_cluechoo is just a joke?  http://wiki.freeswitch.org/wiki/Mod_cluechoo

> SL (Steam Locomotive) runs across your terminal when you type "sl" as you meant to type "ls". It's just a joke command, and not usefull at all. Put the binary to /usr/local/bin.

I hope I'm not chasing a problem that has absolutely no impact on my ability to get WebRTC working here. :D


Thanks for any additional help you can provide,
James



On Wed, Sep 11, 2013 at 11:19 AM, James Mortensen <james.mortensen@synclio.com> wrote:
I ran the netstat command, and it doesn't appear to be listening. It doesn't appear to be listening on anything.  I do have this error in the console when starting:

2013-09-11 18:16:14.445921 [ERR] switch_nat.c:201 Error checking for PMP [general error]

AND

2013-09-11 18:09:30.233568 [CRIT] switch_loadable_module.c:1383 Error Loading module /opt/freeswitch-1.4b/mod/mod_cluechoo.so
**/opt/freeswitch-1.4b/mod/mod_cluechoo.so: undefined symbol: waddch**

I  believe I overlooked these earlier. But it's possible I'm missing a dependency.  I'm going to install the libncurses packages as described here http://jira.freeswitch.org/browse/FS-3689 and then rebuild to see if that helps.  I'm running Ubuntu 12.10.

James



On Wed, Sep 11, 2013 at 11:07 AM, Anthony Minessale <anthony.minessale@gmail.com> wrote:
Did you open all the necessary firewall ports?
Playing around on amazon as your first try complicates thing a bit for you.

You should be able to verify its listening on the port with netstat -an | grep 5066



On Wed, Sep 11, 2013 at 12:55 PM, James Mortensen <james.mortensen@synclio.com> wrote:
Here's another update to my adventures in Freeswitch WebRTC.  I assume from the getting started documentation that there are users created by default with the password 1234, so I'm trying to create the ws 5066 connection from the TryIt JsSIP demo:  http://tryit.jssip.net

Name: James
SIP URI: 1000@Y.Y.Y.Y   <--- Local IP of EC2 server
SIP password: 1234
WS URI:  ws://X.X.X.X:5066   <--- Public IP of EC2 server

Hope this helps!
James








_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
googletalk:conf+888@conference.freeswitch.org
pstn:+19193869900

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org