Simple dialer

I need a simple windows program that:

  • quickly selects an extension by the user typing in part of a name
  • dials that number when clicked or press ‘enter’
  • find this information from the FreePBX databases

The previous system had a program that did this, and more, but this functionality is really all that’s needed. The UCP is functional, but not as quick to use and the users are accustomed to, and the directory on the phone is ok but also too cumbersome. Quick, simple, and hopefully free.

Anyone know of something suitable?
I think Zulu may be over featured for what I’m looking for.

Thanks

yes, you can try zulu.

Actually, I can buy zulu. I cannot try it, there is no trial available.

Well, I was a little surprised to find nothing suitable either from a response here or a solid search of various terms in google.

So I wrote my own.
Based on the idea that the users need to be able to find the program on their computer easily, that is to say, perhaps it would live in the task bar next to the clock or something, instead of UCP in a tab with a dozen other tabs, I decided to use a Chrome Extension.

All our desktops have Chrome, and all the users always have a browser open, either for email or other things, and an extension can be accessed with one click regardless of what page is currently visible.

There’s a screenshot below, basically you click the phonebook icon, then click the name and your phone rings. The list of extensions is all of them on the switch, and typing part of a name filters the list to make finding the right name a matter of a second or two.

I’ll be using group policy to distribute this extension to all users, and I don’t think it’s accessible from outside the organisation, but if anyone wants it I’ll happily provide the source. (In fact I should just get it to github so I don’t lose it myself!)

2 Likes

This looks like a very good & simple idea, let us know when you post it to github.

Thanks, gary

thank you.
I’ve made a few adjustment to it today, so that it supports multiple contact numbers per name. Going to finish it off tomorrow in work.

The idea if for it to show and dial: Groups, Extensions, Personal Contacts.

I’m handling personal contacts in an interesting way. Have the user make a contact group in UCP and name that group with their extension number. So John on xtn 101 makes a group called “101”. The code knows your extension already, so it just checks the database for name and numbers that match. I do it already for the directory on the handset. Should make the extension quite a bit better.

Should be on github tomorrow, comments and criticism welcome :wink:

Well, it’s up.

I’ll be pushing this to our test users in the morning, I hope they like it!

1 Like

I looked briefly at your code. I am guessing you aren’t aware that FreePBX itself has an Asterisk Manager connection. You didn’t need to start up a whole new one.

To get the Asterisk Manager variable you can either do:

global $astman;

or

FreePBX::$astman;

Thanks Andrew, that does help.
So, this would mean an AGI user is not needed, and I don’t need hardcoded user/pass in the php file? I did wonder if this could be done.

I’ll work out how to modify the file and get that done, thanks for the tip.

Exactly. Basically

$astman->originate();

A crude example (d’oh, Andrew beat me by a minute):

2 Likes

Thanks so much, both! I found Lorne’s sample to be simpler to understand and have modified the php file to use the FreePBX connection and now I don’t need to keep checking to remove the password before committing the code!

It would be better if the local extension answered immediately so that the ring the user hears isn’t their phone saying “pick me up!” but is instead the sound of the destination phone ringing; but I’m using Cisco’s and I’ve had no luck yet with auto answer, so while it no doubt would work with every other phone, I can’t really test for it right now. If I solve auto answer on the Cisco’s I’ll add that change in the future. For now, the users should be happy enough, and happy users = happy admins :slight_smile:

1 Like

There is some information in the Chan-SCCP-B Wiki FreePBX page about getting the Cisco phones to auto-answer when under Skinny control. I don’t know if that information is pertinent to the SIP load, but it’s out there.

; Underchin paging for SCCP Phones [macro-underchin-paging-sccp] exten => s,1(check),ChanIsAvail(SCCP/${ARG1},sj) exten => s,n,Dial(SCCP/${ARG1}/aa=2wb,5,A(tt-weasels)) exten => s,GoTo(102) exten => s,check+101,Busy(20) exten => s,n,Macro(hangupcall,)

Hello,
I like the idea of a chrome addon so I gave it a try. I got a question:

Why do you use header ("content-type: text/xml"); instead of header('Content-type: application/json'); ?

Since you are returing JSON and not XML.

@esarant, good catch. I guess the answer is that the javascript didn’t seem to mind and I didn’t seem to notice :wink:

I’ve adjusted it and it works fine with the correct setting, as I’m sure you know. I’ll commit the change.

I also noticed that searching by number no longer works since I added the ability to show additional numbers found for a contact, so I’ll get that fixed up too.

I’m considering adding detected-number-dialling to it, so if there is a webpage with a phone number, the number will be clickable (or inject a phone icon by the side or something) and it will dial using the same ‘engine’ but… priorities !

@cynjut not sure if that’ll translate to sip too well, but it’s not causing much of a pain-point right now so I don’t mind not fixing it just yet :slight_smile:

1 Like

I installed as per instructions, but when I click the icon it just sits at “connecting to server” in the options I have entered http://192.168.99.101/var/www/html/phonebookDialer.php which is the asterisk server and location of file, the pc is on the same internal network.
I am running FreePBX 13 + Asterisk 13

Gary.

you’d want http://192.168.99.101/phonebookDialer.php for the address, as it’s making a web call rather than a filesystem one.

Thanks, that did the trick.

I use Yealink phones so auto answer works fine so I added *80 to the dial command and it works great. would this be the appropriate place to make the change.

if ($mode == “dial”) {
global $astman;
$destination = array_key_exists(‘destination’, $_GET) ? $_GET[‘destination’] : “”;
$strContext = “from-internal”;
$strChannel = “local/*[email protected]$strContext”;
$strWaitTime = “5000”;
$strPriority = “1”;
$strMaxRetry = “1”;
$strAsync = ‘no’;

Gary.

Each time I start my browser it complains that this is in developer mode and I have to hit cancel, is there a way to stop this from happening.

Gary.