PhoneMyBot aims at providing the most flexible way to add the voice channel to chatbots, worldwide. A typical scenario is when you want to connect your PBX to PhoneMyBot, so that incoming calls are handled by a voicebot and if needed transferred to other numbers managed by your PBX (agents, queues, etc.), without the need for external calls.
Integrating your PBX with PhoneMyBot requires the configuration of a SIP trunk. Call transfer will be handled, as per the SIP standard, via the REFER method.
PBXs from different vendors require their own specific configuration to be integrated, but a very common case it when the PBX is based on Asterisk (https://www.asterisk.org).
Different PBX implementations based on Asterisk may have their own configuration GUIs and different software versions. Nevertheless you can always configure Asterisk via configuration files and you should be able to adapt the concept described here to your specific case.
First of all your Asterisk PBX should be connected to the Internet, and you should be aware of the IP address / URI used by your Asterisk PBX to send the INVITE requests to PhoneMyBot.
You should contact the PhonemMyBot team and ask them to activate your Asterisk PBX trunk, associated with your PBX address mentioned above. The PhoneMyBot team will provide you with your trunk-id
, needed in the following configuration file.
You need to configure pjsip.conf
in your Asterisk-based PBX to add the new PhoneMyBot trunk.
pjsip.conf
will probably already include many lines of configuration that are specific of your telephony infrastructure. You can find more information about pjsip.conf
on the official Asterisk wiki.
What you need to do is adding to pjsip.conf
a PhoneMyBot section like this:
[phonemybot]
type = aor
contact = sip:<trunk-id>
[phonemybot]
type=endpoint
context=from-external
disallow=all
allow=ulaw
aors=phonemybot
direct_media=no
Please note that <trunk-id>
should be substituted with the trunk-id
you will receive from the PhoneMyBot team.
The file extensions.conf
should already be configured according to your telephony infrastructure, and you should have your own policy to handle incoming calls and connect them with the appropriate endpoints.
We won't consider here all the possible options, and you will be able to find more information about how to configure extension.conf
in the official Asterisk wiki.
In any case, whichever is your configuration, you should be ableto get the gist about how to handle the PhoneMyBot trunk, if you consider that you can call PhoneMyBot as a regular endpoint adding to the extensions.conf
configuration the lines below:
[from-internal]
exten = 1000,1,Dial(PJSIP/phonemybot,20));
The mentioned configuration would let you call PhoneMyBot, from and internal endpoint, dialing 1000
, provided 1000
is not already used for some other service.
These two changes will adapt the configuration to your own needs and let PhoneMyBot handle incoming calls.