wardmundy
Nerd Uno
- Joined
- Oct 12, 2007
- Messages
- 19,170
- 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.
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.
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
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: