JPT Icon

Dialing through Asterisk

Asterisk is an incredibly powerful and flexible open source PBX server. It allows you to set up a sophisticated telephony system on your Mac (or PC) with multi-line extensions, voice mail, conferencing, call forwarding, and tons more. You can use softphones (literally software phones) or traditional hardware phones connected to your LAN. On its own, Asterisk can be configured to connect your entire internal telephony systems including remote locations. If you need to connect to outside lines, you will need to use the services of a third-party telecommunications provider.

Asterisk is not a trivial server to set up but there are some tools and sites to make it more user-friendly. Sunrise Telephone Systems Ltd. provides a Mac OS X installer and other tools to ease an Asterisk installation. You should also see the main Asterisk website at www.asterisk.org and the Macintosh-specific Asterisk site www.astmasters.net.

Dial Method AsteriskDial Method Asterisk

You do not need to have an Asterisk server running on your own Mac to use JPT with Asterisk, JPT can be used with an Asterisk server running on a remote machine as long as you have an account on that Asterisk server (your username and password must be included as a known user in the Asterisk server’s manager.conf file) and you can access the server via the internet or LAN. Once configured, when dialing through Asterisk with JPT, your phone (as specified in the “Your Number/Ext.” field) will ring. Please see the Asterisk documentation or consult your Asterisk administrator for more information about the context you should use when dialing through Asterisk. When you answer, the Asterisk server will then connect your line to the number you dialed from JPT.

As of version 1.0.10, Asterisk servers can be configured to automatically publish dial services and more using the Zeroconf (Bonjour) specification. Using this feature, JPT can find all available Asterisk dial services currently published on your network automatically without needing anything but your username and password. Please see the Asterisk documentation for more information on this feature. If the Asterisk service to which you connect broadcasts its service via Bonjour, then use the Automatic Configuration section of the Asterisk Dial Method settings. If not, use the Manual Configuration pane to input your extension, device type, caller ID, context, and other information.

If you are having problems, make sure that the required ports are opened on both your Mac and the Asterisk server and that your manager.conf file has been properly edited to include your information (you need to restart your Asterisk server after making changes to the manager.conf file for the changes to be implemented). To help troubleshoot, you may want to enable the “Verbose Logging” option. When enabled, you can then open the Console application on your local machine and monitor the log when you try to connect. Please rest assured that JPT uses encryption when sending your authentication information.

By default, JPT connects to Asterisk via Telnet on port 5038 and uses your login name and password as entered in Asterisk’s manager.conf file. Your /etc/asterisk/manager.conf file should look something like this:

; === manager.conf =======================================
;
[general]
enabled=yes
port=5038
binaddr=0.0.0.0 ; to restrict access to localhost, change to 127.0.0.1

[adminuser]
secret=password
read=system,call,log,verbose,command,agent,user
write=system,call,log,verbose,command,agent,user
;
; === END OF FILE =======================================

Using this example, your manager account user name is “adminuser” and your password is “password” — use this in the Asterisk section in JPT (without quotes, of course). While Asterisk is running, in Terminal on the machine running Asterisk you can reload Asterisk then open a Console session:

sudo /usr/sbin/asterisk -rx reload
sudo /usr/sbin/asterisk -vvvvvvvvvr

Now, watch the output that is streamed in the Terminal application as you try to dial from JPT.

Copyright © 2004 - 2017 JNSoftware LLC. All Rights Reserved.
All other products mentioned are copyright of their respective owners.
No endorsement of or affiliation with any third-party product or service is implied.