Enabling one person to call into BBB conference by phone (via Freeswitch and a SIP provider)

1,476 views
Skip to first unread message

insightcollector

unread,
Sep 30, 2014, 2:15:19 PM9/30/14
to bigbluebu...@googlegroups.com
Hi,

I've seen in the BBB FAQ some help on how to link Freeswitch to Asterix but I'm looking for something simpler: I want to enable one single person to call the phone number I have with a SIP-provider and to have the caller end up in the BBB conference voice conference.

I've found some help on the freeswitch-wiki on how to set up the "up-link" from Freeswitch to my provider. For that I placed the following:


<include>
  <gateway name="sipgate.de">
    <param name="proxy" value="sipgate.de"/>
    <param name="username" value="my-sip-provider-userid"/>
    <param name="password" value="my-sip-provider-password"/>
    <param name="extension" value="5-digit-room-extension-assigned-in-bbb-goes-here"/>
  </gateway>
</include>


into /opt/freeswitch/conf/directory/default/myprovider.xml

But I'm not quite show how to actually get it to work. Has anybody configured freeswitch in this way so that it calls into the SIP-provider and then answers incoming calls by connecting them into the BBB conference room?

Thanks for any hints on what else needs to be done here...

Best regards
Oliver

HostBBB.com

unread,
Sep 30, 2014, 3:03:44 PM9/30/14
to bigbluebu...@googlegroups.com
Oliver,

to call inbound, your going to have to have freeswitch listen on external interface as a first start.   The setup is different depending on .81 or .90 beta version.

Its possible with some ISTP's to route inbound DIDs directly by IP address only. This is the preferred way since no way a hacker can originate calls back thru your provider and ring up toll charges.  In this case there is no need to setup a gateway like below (which basically has freeswitch register your itsp switch)

However with GATEWAY , if everything is setup correct, after you add gateway and reboot, you should see some messages in fs_cli that you successfully registered.  There are some fs_cli commands to list the active gateways etc... the freeswitch wiki details these.

So dial the DID number from your phone, and watch the fs_cli console realtime, and you should see the call hit the dialplan.... albeit it will not answer quite yet.  But this needs to happen before proceeding to next step.

The last step is modifying the dialplan so a call that come in is routed to the right BBB voice bridge.

You can prompt them for vbridge and route dynamically, or just hardcode a caller-id-number to always bridge to one particular conference.

Anytime you make a change to .xml  you need to restart freeswitch, or just run reloadxml in fs_cli

regards,
Stephen

insightcollector

unread,
Sep 30, 2014, 3:44:18 PM9/30/14
to bigbluebu...@googlegroups.com
Hi Stephen,

thanks for taking the time to reply. I have to admit I'm not at all familiar with Freeswitch but you said I have to make Freeswitch listen on some incoming port and I dont think that is what I actually want, because I dont want a person using some SIP software to call into Freeswitch but I want a person using a regular phone to call a phone number I have with a SIP provider. From what I have learned sofar I can get Freeswitch to register as a SIP client at my SIP provider similar to my VoIP router would register to the same SIP provider and then if the phone number gets called the call is forwarded to the registered client.

This would not require opening any ports at all since the connection from Freeswitch to the SIP provider is an outgoing connection only... I hope you understand where I'm coming from...I guess I have to do more reading but I have the outgoing connection registering to the SIP provider already I just have to figure out how I get Freeswitch to forward incoming calls into the BBB conference...

Best regards
Oliver

HostBBB.com

unread,
Sep 30, 2014, 4:28:29 PM9/30/14
to bigbluebu...@googlegroups.com
Either way you set it up, the server will need both rtp ports exposed to outside so media can connect
You can use iptables, to  restrict just the ISTP in .81. and stop sip attacks.

If your successfully registering, then just need to add some logic in public.xml to match on your incoming number and route call.   here replace xxxxxxx with your did.  and this will route callers direct to vbridge 72015

<extension name="bbb_direct">
      <condition field="destination_number" expression="^(xxxxxxxxxxx)$">
          <action application="answer"/>
          <action application="conference" data="72015@wideband"/>
      </condition>
    </extension>

its also possible to prompt for pin, and route to any conference with a little more work.

regards,
Stephen

insightcollector

unread,
Sep 30, 2014, 6:02:13 PM9/30/14
to bigbluebu...@googlegroups.com
Hi Stephen,

ok I got it to work but I still need to learn more about the dialplan filtering options because the only way I got it to work right now is by setting

<condition field="destination_number" expression=".*">

which pretty much causes a mess with BBB because it routes everything even the echo test into that dialplan. So I removed it again but at least I was able to call in via phone and log into BBB and have a conversation between both people. I also need to figure out why I saw the phone callin 4 times in the conference room but only one had an active microphone. I think the usage of a pin would make a lot of sense because when activated anybody calling the number ends up in the conference room and if thats not the person we expect to call, having a pin asked to enter the room is a good firewall from strangers. Actually using the pin as the selector which conference room to enter would probably be the easiest way. So if BBB conference uses 72015 the person calling in has to enter that "pin" and if he enters another one, he simply ends up in the wrong room. Probably the easiest way to do it...

Anyway, thanks for now, I'll continue experimenting tomorrow...

Best regards
Oliver

insightcollector

unread,
Oct 1, 2014, 5:18:09 AM10/1/14
to bigbluebu...@googlegroups.com
Ok I've found a simple solution: I'm simply filtering for the caller-id (ani) of the incoming call. Since I know the persons number only he will be forwarded to the conference room any other number gets rejected. So only 2 new files needed to be added to Freeswitch to make it work


1st file: /opt/freeswitch/conf/dialplan/public/bbb_dialin.xml:

<include>
    <extension name="bbb_dialin">
      <condition field="ani" expression="^(03...incoming-caller-id-goes-here...567)$">

        <action application="answer"/>
        <action application="conference" data="72015@wideband"/>
      </condition>
    </extension>
</include>

with 72015 being the same 5-digit number set e.g. in demo3.jsp in tomcat7:
meeting.put("voiceBridge",      "72015");



2nd file: /opt/freeswitch/conf/sip_profiles/external/sipgate.de.xml

<include>
  <gateway name="sipgate.de">
    <param name="proxy" value="sipgate.de"/>
    <param name="username" value="my-sip-provider-userid"/>
    <param name="password" value="my-sip-provider-password"/>
  </gateway>
</include>

For different SIP providers you find sample configurations here:

http://wiki.freeswitch.org/wiki/SIP_Provider_Examples


Now I have 2 problems left I dont know yet how to fix:

1) I want to set the username of the incoming caller in BBB, because right now it only shows the phone number instead of a name. I tried with

        <action application="set" data="caller_id_name=Joseph"/>

but that didnt work. Which variable to I have to set in Freeswitch so BBB displays it as username?


2) Every time I do a test call in, I see multiple phone-callin-users in the conference. All have the same name (the caller-id of the incoming caller) but only one has an active microphone. When the person hangs up, only one user actually leaves (the one with active mic), the others remain in the conference as dummies. This only happens if I already have one internet user logged into the conference room. If the phone-call-in user starts the conference himself and later an internet user logs into the room there is only one phone-call-in user visible as it should be. If the phone-call-in user joins after the first internet user I have 6 dummies and 1 actual user with active microphone. If I hang up and call in a second time without restarting Freeswitch I end up with 12 dummies and one real active user. (This is all on BBB 0.9-beta, I've not tried it with 0.81)

So if anybody has ideas how to resolve these two issues, let me know...

Best regards
Oliver

HostBBB.com

unread,
Oct 1, 2014, 10:02:01 AM10/1/14
to bigbluebu...@googlegroups.com
On number #2

Can you do bbb-conf --clean and see if the duplicate usernames disappear.

This happens occasionally in .81, and server reboot fixes.

we have done some troubleshooting, and for sure only 1 add member event is ESL is sent from freeswitch when it occurs  but the java esl lib or bbb-apps is sending multiple to client.  

Have not been able to replicate as it is rare.

I have seen 2, and 3 for every add,  but never 6 yet.

regards,
Stephen
Reply all
Reply to author
Forward
0 new messages