Setting up freeswitch to accept landline calls from external sip truck provider.

1,961 views
Skip to first unread message

Paul Belcher

unread,
May 17, 2015, 8:22:11 PM5/17/15
to bigblueb...@googlegroups.com
I would like to have people from landlines call into my BBB server, enter the voice-bridge number corresponding to the conference room and enter the conference with with an user ID that helps indicate who they are to the other web users in the conference. 

Notes:


IPKall is providing the DID.  IPKall does not require authentication (IP only)

Freeswitch docs. for IPkall suggest IP:port IP:6080.
  • We do not register, they just send right to the public dialplan

  • In their web config you must point to your server, port 5080

  • domain: freeswitch.org:5080 (your server, If you did not change vars.xml this will be IP:PORT)


I. Configuration Files

My dailplan is as follows: /opt/freeswitch/conf/dialplan/public.xml

<include>
  <extension name="IPKALL">
    <condition field="destination_number" expression="^4259981556$">
      <action application="set" data="domain_name=freeswitch.org"/>
      <action application="transfer" data="1001 XML default"/>
    </condition>
  </extension>

  <context name="public">

    <extension name="unloop">
      <condition field="${unroll_loops}" expression="^true$"/>
      <condition field="${sip_looped_call}" expression="^true$">
        <action application="deflect" data="${destination_number}"/>
      </condition>
    </extension>

    <X-PRE-PROCESS cmd="include" data="public/*.xml"/>
  </context>
</include>

/opt/freeswitch/conf/dialplan/default.xml file is:

<include>
  <context name="default">

    <extension name="unloop">
      <condition field="${unroll_loops}" expression="^true$"/>
      <condition field="${sip_looped_call}" expression="^true$">
        <action application="deflect" data="${destination_number}"/>
      </condition>
    </extension>

    <extension name="phone conference">
      <condition field="destination_number" expression="^(SEND_TO_CONFERENCE)$">
        <action application="conference" data="${pin}@wideband"/>
      </condition>
    </extension>
    <X-PRE-PROCESS cmd="include" data="default/*.xml"/>
  </context>
</include>

MY ACL file is: /freeswitch/conf/autoload_configs/acl.conf.xml

<configuration name="acl.conf" description="Network Lists">
  <network-lists>

    <list name="localhost" default="allow">
      <node type="allow" cidr="127.0.0.1/255"/>
    </list>

    <list name="strict" default="deny">
 <node type="allow" cidr="96.57.209.200/29"/>
</list>

    <list name="domains" default="deny">
      <node type="allow" domain="96.57.209.200/29"/>
    </list>

  </network-lists>
</configuration>

II.  Security changes are as follows:

/usr/share/red5/webapps/bigbluebutton/WEB-INF/bigbluebutton.properties


freeswitch.esl.host=127.0.0.1
freeswitch.esl.port=8021
freeswitch.esl.password=ClueCon

1) Change freeswitch.esl.host to external ip and changed to password X.

/opt/freeswitch/conf/autoload_configs/event_socket.conf.xml

<configuration name="event_socket.conf" description="Socket Client">
<settings>
<param name="nat-map" value="false"/>
<param name="listen-ip" value="127.0.0.1"/>
<param name="listen-port" value="8021"/>
<param name="password" value="ClueCon"/>
<!-- param name="apply-inbound-acl" value="localnet.auto"/ -->
</settings>
</configuration>

2) Changed "listen-p" to external IP and password to "X"

/usr/share/red5/webapps/sip/WEB-INF/bigbluebutton-sip.properties

bbb.sip.app.ip=96.57.209.205
bbb.sip.app.port=5070

sip.server.username=bbbuser
sip.server.password=secret

freeswitch.ip=96.57.209.205
freeswitch.port=5060

3) Changed sip.server.password to "XX"

/opt/freeswitch/conf/directory/default/bbbuser.xml

<user id="bbbuser">
    <params>
      <!-- omit password for authless registration -->
      <param name="password" value="secret"/>
      <!-- What this user is allowed to access -->
      <!--<param name="http-allowed-api" value="jsapi,voicemail,status"/> -->
    </params>

4) Change password to "XX"

Server Firewall settings (IPtables)

-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 1935 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 9123 -j ACCEPT
-A INPUT -p udp -m udp --dport 16384:32768 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 5066 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 5060 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 5080 -j ACCEPT

Output: sudo bbb-conf --check


BigBlueButton Server 0.9.0 (745)
                    Kernel version: 3.13.0-52-generic
                      Distribution: Ubuntu 14.04.2 LTS (64-bit)
                            Memory: 7984 MB

/var/www/bigbluebutton/client/conf/config.xml (bbb-client)
          Port test (tunnel): luminosa1.dynu.com
                              Red5: luminosa1.dynu.com
              useWebrtcIfAvailable: true

/opt/freeswitch/conf/sip_profiles/external.xml (FreeSWITCH)
                    websocket port: 5066
                    WebRTC enabled: true

/etc/nginx/sites-available/bigbluebutton (nginx)
                       server name: luminosa1.dynu.com
                              port: 80
                    bbb-client dir: /var/www/bigbluebutton

/var/lib/tomcat7/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties (bbb-web)
                      bbb-web host: luminosa1.dynu.com

/var/lib/tomcat7/webapps/demo/bbb_api_conf.jsp (API demos)
                           api url: luminosa1.dynu.com

/var/www/bigbluebutton/check/conf/config.xml (client check)
                      client check: luminosa1.dynu.com

/usr/share/red5/webapps/bigbluebutton/WEB-INF/red5-web.xml (red5)
                  voice conference: FreeSWITCH
                     capture video: true
                   capture desktop: true

/usr/local/bigbluebutton/core/scripts/bigbluebutton.yml (record and playback)
                     playback host: luminosa1.dynu.com


** Potential problems described below **
# Warning: API URL IPs do not match host:
#
#                                IP from ifconfig: 96.57.209.205
#  /var/lib/tomcat7/webapps/demo/bbb_api_conf.jsp: luminosa1.dynu.com

# Warning: The API demos are installed and accessible from:
#
#    http://luminosa1.dynu.com/
#
# These API demos allow anyone to access your server without authentication
# to create/manage meetings and recordings. They are for testing purposes only.
# If you are running a production system, remove them by running:
#
#    sudo apt-get purge bbb-demo

# Warning: The client self check is installed and accessible from:
#
#    http://luminosa1.dynu.com/check
#

*) Any suggested as to why it is not picking up when I call into the conference, would be greatly appriciated for I have been struggling with this for long time now.

Thanks,
Paul

HostBBB.com

unread,
May 18, 2015, 5:36:25 AM5/18/15
to bigblueb...@googlegroups.com
Paul,  change the IPKALL extension in public.xml to something like this, so you prompt for the pin (bbb voicebridge) and send it to the default plan to route.

<include>
    <extension name="bbb_did_call" continue="true">
      <condition field="destination_number" expression=""^4259981556$" break="on-false">
        <action application="set" data="bbb_authorized=true"/>
<action application="answer"/>
    <action application="sleep" data="1500"/>
    <action application="play_and_get_digits" data="4 5 3 6000 # conference/conf-pin.wav ivr/ivr-that_was_an_invalid_entry.wav pin \d+ 2000 'NO_PIN XML default'"/>
    <action application="log" data="INFO The value of pin ${pin}"/>
    <action application="transfer" data="SEND_TO_CONFERENCE XML default"/>
      </condition>
    </extension>
</include>

regards,
Stephen

Paul Belcher

unread,
May 18, 2015, 9:14:03 AM5/18/15
to bigblueb...@googlegroups.com
After putting this into the public.xml file, when I login a web conference and click allow for my microphone it asks me for the conference pin number. After it times out I get WebRTC error 1005.

It also still doesn't answer when calling the number! 

P.S.  Could it be the port number 5060?

Paul

--
You received this message because you are subscribed to a topic in the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bigbluebutton-dev/7GH4w5AhW-o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bigbluebutton-...@googlegroups.com.
To post to this group, send email to bigblueb...@googlegroups.com.
Visit this group at http://groups.google.com/group/bigbluebutton-dev.
For more options, visit https://groups.google.com/d/optout.

Paul Belcher

unread,
May 18, 2015, 10:13:00 AM5/18/15
to bigblueb...@googlegroups.com
The Extension for this incoming traffic was not including in the context name"public".  When I put your text within the public context this is what happened.

Paul Belcher

unread,
May 18, 2015, 11:29:37 AM5/18/15
to bigblueb...@googlegroups.com
I Understand that port 5080 is used for Unauthenticated SIP.  Do I need to Install bluebox on my BBS server?  I thought I could just call in with IPKALL: 42599...@96.57.209.205:5080.


Regards,
Paul

Paul Belcher

unread,
May 25, 2015, 6:18:00 PM5/25/15
to bigblueb...@googlegroups.com
Hi Stephen,

You were missing one important line in the code suggestion you sent me:

<action application="transfer" data="${destination_number} XML default"/>

After I added this line everything worked just fine.  Thanks, Paul

Paul Belcher

unread,
Oct 23, 2015, 5:12:27 PM10/23/15
to BigBlueButton-dev
Hi,

The following is the configuration of the my server on May 17, 2015.  I did a system update on Ubuntu and it updates everything on the computer including freeswitch which ended up erasing most of my configuration files.  I ended up reinstalling everything, just to find myself back in the same place I was just before a fixed this problem.  I did not have all the config files, but I think I have things very close.

BBB is working fine, except the DID.  I am using IPKALL. I setup the DID to point to the static IP address on of the server on port 5080.  Using the DID as the username, and the voiper.ipkall.com as the sip.proxy as IPKALL suggest it should dial in, pickup and ask me for my conference number as it did before.  IPKall does not require authentication, neither username or password.  So, I added a Sip.Profile as follows:

/opt/freeswitch/conf/sip_profiles/external/IPKALL.xml

<include>
    <gateway name="IPKALL">
      <param name="proxy" value="voiper.ipkall.com"/>
      <param name="context" value="public"/>
    </gateway>
</include>

*) Any suggestions as to why it is not picking up when I call into the conference, would be greatly appreciated for I have been struggling with this for long time now.

Thanks,
Paul


On Sunday, May 17, 2015 at 8:22:11 PM UTC-4, Paul Belcher wrote:
BigBlueButton Server 0.9.1 (399)
                    Kernel version: 3.13.0-66-generic
                      Distribution: Ubuntu 14.04.3 LTS (64-bit)

Richard Alam

unread,
Oct 23, 2015, 5:35:16 PM10/23/15
to BigBlueButton-dev
On Fri, Oct 23, 2015 at 5:12 PM, Paul Belcher <paulbe...@gmail.com> wrote:
Hi,

The following is the configuration of the my server on May 17, 2015.  I did a system update on Ubuntu and it updates everything on the computer including freeswitch which ended up erasing most of my configuration files.  I ended up reinstalling everything, just to find myself back in the same place I was just before a fixed this problem.  I did not have all the config files, but I think I have things very close.

BBB is working fine, except the DID.  I am using IPKALL. I setup the DID to point to the static IP address on of the server on port 5080.  Using the DID as the username, and the voiper.ipkall.com as the sip.proxy as IPKALL suggest it should dial in, pickup and ask me for my conference number as it did before.  IPKall does not require authentication, neither username or password.  So, I added a Sip.Profile as follows:

/opt/freeswitch/conf/sip_profiles/external/IPKALL.xml

<include>
    <gateway name="IPKALL">
      <param name="proxy" value="voiper.ipkall.com"/>
      <param name="context" value="public"/>
    </gateway>
</include>

Perhaps the dialplan in /opt/freeswitch/conf/dialplan/public/ should handle IPKALL. There are dialplans in there to handle call calls from webrtc and from bbb-sip which sets
  <action application="set" data="bbb_authorized=true"/>

You could try creating a file called ipkall.xml with 

<include>
        <extension name="ipcall" continue="true">

                        <action application="set" data="bbb_authorized=true"/>
                        <action application="transfer" data="${destination_number} XML default"/>

        </extension>
</include>

Richard
 

--
You received this message because you are subscribed to the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-...@googlegroups.com.

To post to this group, send email to bigblueb...@googlegroups.com.
Visit this group at http://groups.google.com/group/bigbluebutton-dev.
For more options, visit https://groups.google.com/d/optout.

Paul Belcher

unread,
Oct 24, 2015, 4:29:22 PM10/24/15
to BigBlueButton-dev
Before I try your suggestion, I want to ask you were in the would I put the following line, as I remember this line was missing in the original code you sent to me for the public.xml file?

<action application="transfer" data="${destination_number} XML default"/>

Regards,
Paul

On Sunday, May 17, 2015 at 8:22:11 PM UTC-4, Paul Belcher wrote:

Paul Belcher

unread,
Oct 24, 2015, 4:34:40 PM10/24/15
to BigBlueButton-dev
Below is my public.xml file:

<include>

<context name="public">

    <extension name="bbb_did_call" continue="true">
      <condition field="destination_number" expression=""^2062036660$" break="on-false">

        <action application="set" data="bbb_authorized=true"/>
        <action application="answer"/>
        <action application="sleep" data="1500"/>
        <action application="play_and_get_digits" data="4 5 3 6000 # conference/conf-pin.wav ivr/ivr-that_was_an_invalid_entry.wav pin \d+ 2000 'NO_PIN XML default'"/>
        <action application="log" data="INFO The value of pin ${pin}"/>
        <action application="transfer" data="SEND_TO_CONFERENCE XML default"/>
        <action application="transfer" data="${destination_number} XML default"/>
      </condition>
    </extension>

    <extension name="unloop">
      <condition field="${unroll_loops}" expression="^true$"/>
      <condition field="${sip_looped_call}" expression="^true$">
        <action application="deflect" data="${destination_number}"/>
      </condition>
    </extension>

    <X-PRE-PROCESS cmd="include" data="public/*.xml"/>

</context>
</include>

On Sunday, May 17, 2015 at 8:22:11 PM UTC-4, Paul Belcher wrote:

Paul Belcher

unread,
Oct 24, 2015, 4:54:29 PM10/24/15
to BigBlueButton-dev
Why does it continue to prompt for my conference pin number when I go to setup my microphone on my BBB server?  This happened to me last time.  It has something to do with the placement <context name="public">  and transfer to the destination number as I mentioned in my last post.  Please advise, this is very frustration.  Tnx Paul


On Sunday, May 17, 2015 at 8:22:11 PM UTC-4, Paul Belcher wrote:

Paul Belcher

unread,
Oct 26, 2015, 6:34:49 PM10/26/15
to bigblueb...@googlegroups.com
Got it working.  It was the double quotes in the following line before phonenumber:

 <condition field="destination_number" expression=""^phonenumber$" 

Thanks, Paul

--
You received this message because you are subscribed to a topic in the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bigbluebutton-dev/7GH4w5AhW-o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bigbluebutton-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages