PIONEERS Facebook Messenger Webhooks

DO YOU HAVE FACEBOOK MESSENGER INSTALLED ON YOUR MOBILE DEVICE?

  • YES

  • NO


Results are only viewable after voting.

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Making Calls with Facebook Messenger and Wazo

Preparatory Steps: You already should have created a web directory for the Facebook WebHook and loaded the index.php from here. You also should have whitelisted all of the Facebook IP addresses and disabled port 443 in IPtables as documented here.

Calls now working on Wazo platform with .cli-call file in your Facebook Messaging directory on your Wazo server where 701 is a valid WebRTC or SIP extension on your Wazo server. index.php modified above to support it. The filename of .cli-call is important since .filenames cannot be accessed using a browser. Remember to make the file executable: chmod +x .cli-call.

To make a call from Facebook Messenger: call 8435551212. Extension 701 will ring. When you pick it up, the destination number 8435551212 will be dialed and connected to 701.

Code:
echo "Channel: Local/701@default" > /tmp/cli.call
echo "MaxRetries: 1" >> /tmp/cli.call
echo "RetryTime: 90" >> /tmp/cli.call
echo "WaitTime: 40" >> /tmp/cli.call
echo "Extension: $1" >> /tmp/cli.call
echo "Priority: 1" >> /tmp/cli.call

mv /tmp/cli.call /var/spool/asterisk/outgoing

sleep 5

Making Calls with Facebook Messenger and Issabel

There's an apparent bug in the Asterisk 11 version distributed with Issabel so this calling trick apparently won't work reliably. You get multiple calls to the destination number before the local number even answers. :(

Preparatory Steps: You already should have created a web directory for the Facebook WebHook and loaded the index.php from here. You also should have whitelisted all of the Facebook IP addresses and disabled port 443 in IPtables as documented here.

It's been so long since I used Asterisk 11 that I'd forgotten about its quirks. So here's the .cli-call file to place in your Facebook Messaging directory. It will work with Issabel and Asterisk 11. Change 701 to match a SIP extension on your PBX. And remember to make the file executable: chmod +x .cli-call. Don't forget the leading period in the file name for security's sake!

To make a call from Facebook Messenger: call 8435551212. Extension 701 will ring. When you pick it up, the destination number 8435551212 will be dialed and connected to 701.

Code:
echo "Channel: SIP/701" > /tmp/cli.call
echo "MaxRetries: 1" >> /tmp/cli.call
echo "RetryTime: 90" >> /tmp/cli.call
echo "WaitTime: 40" >> /tmp/cli.call
echo "Context: from-internal" >> /tmp/cli.call
echo "Extension: $1" >> /tmp/cli.call
echo "Priority: 1" >> /tmp/cli.call

mv /tmp/cli.call /var/spool/asterisk/outgoing

sleep 5
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Hooking Up with Facebook (not as dirty as it sounds)

Preparatory Steps: You should have HTTPS implemented on your PBX (Tutorial here). You already should have created a web directory for the Facebook WebHook and loaded the Incredible PBX scripts as documented here. You also should have whitelisted all of the Facebook IP addresses and disabled port 443 in IPtables as documented here.

Begin by visiting the Facebook Developer's page and click Add a New App.

Give your app a Display Name and provide your Contact Email. Match the letters in the box to get past the Security Check to display the Facebook Product List. Click Messenger and choose Setup.

In the Token Generation section, Create a new Facebook Business Page if you don't already have one tied to your account. Company, Organization, or Institution is good choice because there's a Telecom Company category. Give your page a Descriptive Name: incrediblepbx-podunk.

Now return to the Token Generation section and Select the Page you just created or one you already have (see image below). Click Continue and OK to accept the default settings. Facebook then will generate a Page Access Token. Copy it to your clipboard and paste it into the $access_token variable in your config.inc.php template on your server. Also write it down. This is the important link to talk to your Facebook Webhooks.

In the Webhooks section, click Setup Webhooks. In the Page Subscription form, enter the callback URL for your page. This is the https address to access your Facebook directory with a browser, e.g. https://YOUR-FQDN/fb. Make up a very secure Verify Token and enter it on the form and in the $verify_token variable in your config.inc.php template. This is the code Facebook will send to initially shake hands with your web page. The two entries must match to successfully set up your webhooks linkage. For Subscription Fields, check the Messages box. Then click Verify and Save. If all went well, you will get a Complete checkmark in the Webhooks section. The last step is to again Select your Page in the Webhooks section to interconnect Facebook with your PBX. After choosing your page, be sure to click Subscribe or nothing will work.

DKfAiQxWsAEe9dU.jpg


To test things out, open Facebook Messenger on a desktop PC or Mac or smartphone. Search Messenger for the Facebook page you linked to above.

DKfH8Q0W0AAn1i5.jpg

When the Messenger dialog for your page opens, send a message: howdy. You should get a response from your PBX. The Sender ID is what we'll use later on to initiate messages from your PBX to Facebook Messenger (a.k.a. screenpops) when new calls arrive on your PBX. Enter this Sender ID and your Page Access Token in cli-message.php.
Code:
Hi there and welcome to BotWorld. SenderID:  13824837489535983
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
index.php template has undergone a major update. This original design is intended for admins to manage their own PBXs via a Facebook private page. It is not designed for public access to your PBX unless you want to have strangers making calls on your nickel or allowing anonymous individuals the keys to the castle sufficient to enable total destruction of your PBX.

You can remove the calling capability from Facebook webhooks by deleting the .cli-call script from your web directory.

You can remove the shell script capability to run Linux and Asterisk commands by deleting the following section of code from index.php:
Code:
elseif ( substr($messageText,0,1) == "!" ) :
    $cmd = substr($messageText,1);
    $CLI = shell_exec($cmd);
    $CLI = str_replace(chr(10),"\n",$CLI);
    $CLI = str_replace(chr(13),"\n",$CLI);
    $answer = "$CLI";
    $response = [

        'recipient' => [ 'id' => $senderId ],
        'message' => [ 'text' => $answer ]
    ];

    $ch = curl_init('https://graph.facebook.com/v2.6/me/messages?access_token='.$access_token);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($response));
    curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
    curl_exec($ch);
    curl_close($ch);
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Sending Messages to Your Messenger Facebook Page

Thus far we have only received messages/commands from Facebook Messenger. But part of the beauty of the Facebook Messenger solution is the ability to generate messages from your PBX that will pop up in FB Messenger whether it's running on your PC, Mac, Smartphone, Apple Watch, or all of the above. For example, we can use this to deliver alerts for incoming calls, new voicemails, new faxes, or even results of database queries when new calls arrive and the CallerID is searched in a company database of some sort. In short, it's the ultimate screenpop solution because it works effortlessly on almost any platform or even multiple platforms.

DKf23AhVoAACDFe.jpg


To get started, you'll need the Sender ID from your FB Messenger Page. The easy way to obtain it is to send the word "howdy" (without quotes) from your FB Messenger Page. Your server will reply with your Sender ID. Every Facebook page has a unique ID.
Code:
Hi there and welcome to BotWorld. SenderID:  13824837489535983
The other piece you need is your FB Page Access Token which we've already plugged into the top of index.php. You can get it from there or cut-and-paste it from your notes when you set up your Facebook Webhooks connection to your server. The final piece is to create a cli-message.php script and store it somewhere on your server. It does not need to be in the FB directory.

To send messages to FB Messenger from your PBX, the syntax looks like this:
Code:
php cli-message.php "You have a new fax from 8005551212."

Here is the cli-message.php script:
Code:
<?php

// CLI Syntax: php cli-message.php "A new test"

// Obtain $senderID by sending the word "howdy" (without quotes) from your Facebook Messenger page
// Obtain $access_token from the top of your existing index.php file

$senderId = "YOUR-FB-MESSENGER-SENDER-ID;
$access_token = "YOUR-FB-GENERATED-ACCESS-TOKEN";

if (!empty($argv[1])) :
  $message = $argv[1];
else :
 exit;
endif;

// send a message
    $response = [
 
        'recipient' => [ 'id' => $senderId ],
        'message' => [ 'text' => $message ]
    ];

    $ch = curl_init('https://graph.facebook.com/v2.6/me/messages?access_token='.$access_token);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($response));
    curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
    curl_exec($ch);
    curl_close($ch);

?>
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
FB Messenger Alerts in Wazo for Incoming Calls

Edit /etc/asterisk/extensions_extra.d/cid-superfecta.conf. In the [xivo-subrgbl-did] context just below the n(keepon),Gosub(cid-superfecta,s,1) line, insert the following and save the file:
Code:
same = n,System(/usr/bin/php /var/www/html/fb/cli-message.php "Incoming call: ${XIVO_SRCNUM} - ${CALLERID(name)}.")

This assumes you placed the cli-message.php script in /var/www/html/fb. Adjust to show location of the file. /etc/asterisk would be a good, safe place.

Reload your dialplan and you're good to go: asterisk -rx "dialplan reload"

See message thread below for Incredible PBX for Issabel and Incredible PBX 13 solutions.
 
Last edited:

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
This is going to solve a lot of problems. Ever have a client that wants the secretary's phone to ring, but still wants to know who's calling in case they want to answer, but don't want to be bothered with their phone ringing? This will do it !!
 

ABSGINC

You can call me Scott.
Joined
Oct 1, 2014
Messages
59
Reaction score
31
This is going to solve a lot of problems. Ever have a client that wants the secretary's phone to ring, but still wants to know who's calling in case they want to answer, but don't want to be bothered with their phone ringing? This will do it !!

Yes! @krzykat I blogged about that exact problem and it's beautiful solution as it came to life on this fourm. Check it out!

https://absg.tech/blogged/

Tell a friend and encourage shared open source developments over additional 3rd party commercial API layers that also add an extra layer for security concerns, and someone help sponsor my Astricon admission. Whewww.
 

Sylvain Boily

Active Member
Joined
Apr 30, 2016
Messages
259
Reaction score
144
Hello,

I did a small plugin to help for the integration!

https://github.com/sboily/wazo-facebook-notification

I think it's not yet finish to use in our market, but you could make some tests. The first step works in my installation ;)

Code:
git clone https://github.com/sboily/wazo-facebook-notification
cd wazo-facebook-notification
pip install -r requirements.txt
pip3 install -r requirements.txt
python setup.py install
python3 setup.py install
cp -a etc/facebook /etc
chown wazo-admin-ui.wazo-admin-ui /etc/facebook/*
cp etc/wazo-admin-ui/conf.d/* /etc/wazo-admin-ui/conf.d
cp etc/wazo-webhookd/conf.d/* /etc/wazo-webhookd/conf.d
systemctl restart wazo-admin-ui
systemctl restart wazo-webhookd

Go to the admin panel in facebook section. (the new admin /admin)

DKkt7hYUEAEZPvw.jpg
 
Last edited by a moderator:

Sylvain Boily

Active Member
Joined
Apr 30, 2016
Messages
259
Reaction score
144
Ok so i created a webhook on the interface when an event call_created is fired and i received my notification. So it seems it works. Maybe now, it's not really complicated to create funny scenarii.

DKkuVNlUQAAxFCy.jpg
 
Last edited by a moderator:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
FB Messenger Alerts in Incredible PBX 13 or Issabel for Incoming Calls

This is a little trickier on FreePBX platforms than it was for Wazo (documented above). This includes both the Incredible PBX 13 and Incredible PBX for Issabel platforms. You basically have to copy out a FreePBX context in order to make changes/additions to it. In Incredible PBX 13, you copy the [cidlookup] context from extensions_additional.conf to extensions_override_freepbx.conf. In Issabel, you copy the same context to extensions_override_issabel.conf.

For Issabel, here is what you'd add to the bottom of extensions_override_issabel.conf assuming your cli-message.php file is saved in /var/www/html/fb. Otherwise, adjust the file path accordingly. Then reload your Asterisk dialplan: asterisk -rx "dialplan reload"
Code:
[cidlookup]
include => cidlookup-custom
exten => cidlookup_5,1,Set(CURLOPT(httptimeout)=7)
exten => cidlookup_5,n,Set(CALLERID(name)=${CURL(https://api.opencnam.com/v2/phone/${CALLERID(num)}?format=pbx&ref=issabelpbx)})
exten => cidlookup_5,n,Set(current_hour=${STRFTIME(,,%Y-%m-%d %H)})
exten => cidlookup_5,n,Set(last_query_hour=${DB(cidlookup/opencnam_last_query_hour)})
exten => cidlookup_5,n,Set(total_hourly_queries=${DB(cidlookup/opencnam_total_hourly_queries)})
exten => cidlookup_5,n,ExecIf($["${last_query_hour}" != "${current_hour}"]?Set(DB(cidlookup/opencnam_total_hourly_queries)=0))
exten => cidlookup_5,n,ExecIf($["${total_hourly_queries}" = ""]?Set(DB(cidlookup/opencnam_total_hourly_queries)=0))
exten => cidlookup_5,n,Set(DB(cidlookup/opencnam_total_hourly_queries)=${MATH(${DB(cidlookup/opencnam_total_hourly_queries)}+1,i)})
exten => cidlookup_5,n,ExecIf($[${DB(cidlookup/opencnam_total_hourly_queries)} >= 60]?System(${ASTVARLIBDIR}/bin/opencnam-alert.php))
exten => cidlookup_5,n,Set(DB(cidlookup/opencnam_last_query_hour)=${current_hour})
exten => cidlookup_5,n,System(/usr/bin/php /var/www/html/fb/cli-message.php "Incoming call: ${CALLERID(number)} - ${CALLERID(name)}.")
exten => cidlookup_5,n,Return()

exten => cidlookup_return,1,ExecIf($["${DB(cidname/${CALLERID(num)})}" != ""]?Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})}))
exten => cidlookup_return,n,Return()

;--== end of [cidlookup] ==--;

For Incredible PBX 13, here is what you'd add to the bottom of extensions_override_freepbx.conf assuming your cli-message.php file is saved in /var/www/html/fb. Otherwise, adjust the file path accordingly. Then reload the Asterisk dialplan: asterisk -rx "dialplan reload"
Code:
[cidlookup]
include => cidlookup-custom
exten => cidlookup_1,1,Set(CURLOPT(httptimeout)=7)
exten => cidlookup_1,n,Set(CALLERID(name)=${CURL(https://api.opencnam.com/v2/phone/${CALLERID(num)}?format=pbx&ref=freepbx)})
exten => cidlookup_1,n,Set(current_hour=${STRFTIME(,,%Y-%m-%d %H)})
exten => cidlookup_1,n,Set(last_query_hour=${DB(cidlookup/opencnam_last_query_hour)})
exten => cidlookup_1,n,Set(total_hourly_queries=${DB(cidlookup/opencnam_total_hourly_queries)})
exten => cidlookup_1,n,ExecIf($["${last_query_hour}" != "${current_hour}"]?Set(DB(cidlookup/opencnam_total_hourly_queries)=0))
exten => cidlookup_1,n,ExecIf($["${total_hourly_queries}" = ""]?Set(DB(cidlookup/opencnam_total_hourly_queries)=0))
exten => cidlookup_1,n,Set(DB(cidlookup/opencnam_total_hourly_queries)=${MATH(${DB(cidlookup/opencnam_total_hourly_queries)}+1,i)})
exten => cidlookup_1,n,ExecIf($[${DB(cidlookup/opencnam_total_hourly_queries)} >= 60]?System(${ASTVARLIBDIR}/bin/opencnam-alert.php))
exten => cidlookup_1,n,Set(DB(cidlookup/opencnam_last_query_hour)=${current_hour})
exten => cidlookup_1,n,System(/usr/bin/php /var/www/html/fb/cli-message.php "Incoming call: ${CALLERID(number)} - ${CALLERID(name)}.")
exten => cidlookup_1,n,Return()

exten => cidlookup_return,1,ExecIf($["${DB(cidname/${CALLERID(num)})}" != ""]?Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})}))
exten => cidlookup_return,n,Return()

;--== end of [cidlookup] ==--;

For those always complaining that Wazo is more difficult to use than FreePBX, here's a good example of why that is not necessarily the case. If you just want a canned solution and never want to make customizations, FreePBX is probably easier. But, if you want to make dialplan code changes, Wazo is much easier to customize: one line of code versus more than a dozen, not to mention the convoluted procedure required on FreePBX platforms.
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Proof of Concept: Database Lookups from AsteriDex

Seems to work just fine. Wildcard matches also work so "lookup Del" will still find Delta Airlines. Will add these updates to the index.php script tomorrow. Call by Name coming soon.

DKmX2DtUQAAlkR3.jpg


FYI: AsteriDex on Wazo platform uses SQLite 3 while Incredible PBX and Issabel platforms have MySQL and MariaDB, respectively. That made things interesting because we want to keep a generic index.php platform for all of the platforms to share.
 
Last edited:

Sylvain Boily

Active Member
Joined
Apr 30, 2016
Messages
259
Reaction score
144
Last edited by a moderator:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
And now we have buttons (a.k.a Quick Replies in Facebook Lingo)...

DKqKFT5WAAEUsat.jpg

DKqP0lfWAAAAXPL.jpg
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Incredible PBX for FB Webhooks Installation Procedure

We've taken a first crack at a comprehensive installation methodology for running Facebook Webhooks on three of the Incredible PBX platforms: Incredible PBX 13 for CentOS 6, Incredible PBX for Issabel with CentOS 7, and Incredible PBX for Wazo with Debian 8. This is still a work in progress. All code is GPL2, open source, and free!

Step 1. Get HTTPS port 443 with your own SSL Certificate working on your PBX. A Nerd Vittles tutorial was released this week to walk you through the process.

Step 2. Before you can configure Webhooks on the Facebook Developer site, you need to do a few things on your PBX. First, you need to lock down port 443 access in your existing IPtables whitelist. We want Facebook's servers to be able to talk to your PBX. But the rest of the world should be blocked unless you have specifically authorized an IP address. This preliminary tutorial will walk you through the process.

Step 3. You need a directory on your PBX to process HTTPS requests from Facebook Messenger. We recommend /var/www/html/fb, but it can be anything you like. Be sure to set the permissions on the directory and the files within it properly. For Incredible PBX 13 and Issabel: chown -R asterisk:asterisk /var/www/html/fb. For Wazo, issue these commands:

chown -R asterisk:www-data /var/www/html/fb && chmod -R 775 /var/www/html/fb


Step 4. With Incredible PBX 13 and Issabel, no web server changes are required to use the webhooks directory you created. With Wazo, it's a pain. We've documented the procedure here.

Step 5. Now let's be sure you can access your webhooks site securely. Issue the command below to create a "Hello World" script in your webhooks directory. Then use a browser to access the index2.php web site, e.g. https://YOUR-FQDN/fb/index2.php. Don't proceed until you get this working with a browser notice that your site is SECURE.
Code:
echo "Hello World" > /var/www/html/fb/index2.php

Step 6. Now it's time to install the Incredible PBX webhooks scripts on your PBX:
Code:
cd /var/www/html/fb
wget http://incrediblepbx.com/incrediblewebhooks.tar.gz
tar zxvf incrediblewebhooks.tar.gz
rm incrediblewebhooks.tar.gz

Step 7. Next you need to hookup with Facebook. Just follow our tutorial here.

Step 8. Finally, you need to designate a phone to take outbound calls initiated from Messenger. Once you answer the call, your PBX will place a second call to the destination number you specified in Messenger with the dial or call command. To set up your extension, edit .cli-call and choose from the examples.

Step 9. To set up Facebook Messenger alerts for incoming calls in Wazo, go here. To set up alerts for incoming calls with Incredible PBX 13 and Issabel, go here.

Step 10. If you installed this app in a directory other than /var/www/html/fb, be sure to edit .update and insert the correct directory, or future updates will cause a mess.

Step 11. Now you're ready to take Messenger for a spin. See the README file in /var/www/html/fb for details and syntax examples as well as an IMPORTANT SECURITY WARNING! To remove the shell script capabilities from the script, see this thread.

See post below for how to customize "help" phone link in index.php.


WARNING: This original design is intended for admins to manage their own PBXs via a Facebook private page. It is not designed for public access to your PBX via a public Facebook page unless you want to have strangers making calls on your nickel or allowing anonymous individuals the keys to the castle sufficient to enable total destruction of your PBX. YOU AGREE TO ASSUME ALL RISKS, KNOWN AND UNKNOWN, BY DOWNLOADING OR USING THIS SOFTWARE.

Current list of supported commands:
Code:
     dial 8005551212  - connects to your designated extension and then calls 8005551212 or any other number
     call Delta       - looks up Delta or any other name in AsteriDex and gives you the option of placing a call
     lookup Delta     - looks up Delta or any other name in AsteriDex and gives you the option of placing a call
     !some-command    - executes any Linux command or any Asterisk command of the form !asterisk -rx "sip show registry"
     howdy            - returns a greeting and the SENDER ID of your FB page (see item #2, above)
     help             - provides links to phone help and web resource sites like the PIAF and Asterisk forums
     sms              - sms 10-digit-SMS-number "Some message" sends SMS message through working Google Voice account
     update           - updates your FB Messenger platform for Incredible PBX to the latest and greatest
     anything else    - returns whatever you typed as a response (a good way to be sure things are working)
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199

This is Acer's new $250 Chromebook Flip with full support for Android apps and Google Play Store. We've installed the Android Facebook Messenger and 3CX phone clients. Currently, entering a "call Delta" command in Messenger triggers a MySQL query webhook to retrieve Delta's phone number. Once you confirm the search result, Messenger sends a second Webhook to Incredible PBX which will place two calls. First, an intermediate Google Voice call is sent to a Google Voice trunk on our (free) 3CX PBX. 3CX routes that call to a ring group with a dozen 3CX clients including the one running on the Chromebook. No VoIP trunks required for these client calls. When we answer that call on the Chromebook's 3CX client, the Incredible PBX server then places a second call to Delta and joins the two Google Voice calls together. Pure WiFi, no voice degradation. This would work anywhere in the world so long as you had a WiFi connection for the Chromebook. Incidentally, this works exactly the same way on our $2,000 Surface Pro 4 running Messenger and 3CX client without changing a single setting. So, for example, you could have lots of agents scattered around the globe, and any one of them could answer on their 3CX phone client and be connected to Delta or an actual customer. It obviously wouldn't take much to adjust this code for call center deployment. And Messenger could actually display customer background or issues to assist employees in choosing calls that match their expertise. One of these days you may not even need Incredible PBX in the middle to pull off the magic. :santa:

For those considering a Chromebook with Android and the 3CX client, be advised that there is a wrinkle. Typically, you activate a 3CX phone client by clicking on the config attachment in a welcome email. The Gmail app usually handles the association transparently. However, on this platform, Gmail is actually a Chromium app, not an Android app like the 3CX client so... it doesn't make the necessary association and the attachment won't open. This 3CX tutorial explains the workaround. We had good luck using the ES File Explorer for Android which lets you find the attachment in your download directory and then do the association to 3CX on the fly.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Yet another reason for those that earn a living off of VoIP to get excited about Messenger integration...

DKGdqaWWAAAhgAW.jpg
 

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
FB Messenger Alerts in Incredible PBX 13 or Issabel for Incoming Calls
For those always complaining that Wazo is more difficult to use than FreePBX, here's a good example of why that is not necessarily the case. If you just want a canned solution and never want to make customizations, FreePBX is probably easier. But, if you want to make dialplan code changes, Wazo is much easier to customize: one line of code versus more than a dozen, not to mention the convoluted procedure required on FreePBX platforms.

Ward, couldn't you integrate this in with CID Superfecta?
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Ward, couldn't you integrate this in with CID Superfecta?

CID Superfecta is not yet supported on all of our platforms which is why we went a different route. But, yes, the alerts certainly could be incorporated into Superfecta.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
We've added a new "help" option to today's build. Using php, it documents how to incorporate BUTTONS into Facebook Messenger for calling and web access. The calling component requires FaceTime (Mac or iPhone) or an app like Skype* (PC) or Google Hangouts Dialer (Android/Chromebook) to actually make the calls without reliance on a PBX.

DKv_BoSUIAAlXTo.jpg


If you want to replace the "Talk to Lenny" option with your own number for a cellphone, office phone, or something else, here's how once you've downloaded and installed today's build from Step 6 above.
Code:
sed -i 's|Talk to Lenny|Phone Home|' index.php
sed -i 's|8436060444|8005551212|' index.php

Substitute your info for Phone Home and 8005551212 entries above.

* Unlike the other apps mentioned, Skype costs money to place calls. While there is a Google Hangouts extension for the Chrome browser that lets you make free calls in the U.S. and Canada, it is not integrated into Facebook's Webhooks, and choosing the Chrome app to place the calls does not activate the Hangouts extension since Google has not implemented the industry standard tel: extension to activate calls using Hangouts.
 
Last edited:

Members online

No members online now.

Forum statistics

Threads
25,779
Messages
167,505
Members
19,199
Latest member
leocipriano
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top