Phone
Connect Asterisk
Let the AI answer calls from Asterisk (PJSIP configuration files) and transfer them back to your team. Connect your phone system with these steps.
First create a trunk on Phone numbers → PBX / SIP and choose Asterisk. In the steps below, SIP_SERVER, USERNAME and TRUNK_PASSWORD are the values shown on your trunk page, which also shows this snippet with your values filled in.
#Steps
Add the snippet below to
pjsip.conf, or a file it includes, and runpjsip reload.Route calls to the AI with
Dial(PJSIP/7777@bluepenguin)from any dialplan context.Transfers from the AI come back over the same trunk to the extension you set as a transfer target.
pjsip.conf
[bluepenguin]
type=registration
outbound_auth=bluepenguin-auth
server_uri=sip:SIP_SERVER:5060
client_uri=sip:USERNAME@SIP_SERVER
retry_interval=60
[bluepenguin-auth]
type=auth
auth_type=userpass
username=USERNAME
password=TRUNK_PASSWORD
[bluepenguin]
type=aor
contact=sip:SIP_SERVER:5060
[bluepenguin]
type=endpoint
context=from-bluepenguin
disallow=all
allow=ulaw,alaw
outbound_auth=bluepenguin-auth
aors=bluepenguin
from_user=USERNAME
direct_media=no
[bluepenguin]
type=identify
endpoint=bluepenguin
match=SIP_SERVER_IP#Check it works
- The trunk page shows Registered (for username and password trunks).
- Dial
7777from an internal extension. The AI should answer. - Ask to be transferred to a person, and check the call reaches the extension you set.
Problems? See Troubleshoot SIP.