[asterisk-users] 'dialer' application to trigger call between hardphone and number
Gordon Henderson
gordon+asterisk at drogon.net
Tue Dec 9 09:35:28 CST 2008
On Tue, 9 Dec 2008, David fire wrote:
> 2008/12/8 Karl Fife <karlfife at gmail.com>
>
>> Does anyone know of a small lightweight windows 'dialer' application I
>> can use to trigger a call (via call file or AMI) from any application? (The
>> call would be placed between the target number, and the preconfigured DN of
>> the hardphone at the user's desk)
>>
>> Ideally a phone number would be 'selected' from within any windows
>> application and the call would be triggered via hotkey, or a right-click
>> menu or by clicking a system tray icon.
>>
>> There are scads of outlook-only options (no thanks), and I've found and
>> tried the Asterisk Dialer 1.0, which I don't like because it depends on
>> Yahoo widgets (heavy) AND it requires nearly as many discreet actions to
>> dial a number as just typing them on the phone itself.
>>
>> Ideal would be something very 'efficient' with at most two or three
>> discreet actions needed to dial-- (i.e. 1:Select, 2:Hotkey--done!)
>>
>> Any ideas? Any Happy customers?
I did something for a customer some time back - however they had a custom
written application for making outgoing sales/support type calls - their
application could reference a URL on a web server in response to an action
on a number, so it was easy to make it reference a url on the asterisk PBX
that did:
// Usage: dx.php?a=1&x=111&y=222&z=333
// Where x is the extension number of the desk phone (111)
// y is the billing extension (222)
// z is the number to dial. (333)
// a is optional, and if set to non-zero then it will attempt
// to make the extension auto-answer.
The code:
<?
$a = $HTTP_GET_VARS ['a'] ;
$x = $HTTP_GET_VARS ['x'] ;
$y = $HTTP_GET_VARS ['y'] ;
$z = $HTTP_GET_VARS ['z'] ;
if (empty ($x) || empty ($y) || empty ($z))
exit ;
if (empty ($a))
$chan = "SIP/$x" ;
else
$chan = "Local/doDial$x at internal" ;
$fd = fopen ("/tmp/dialOut.$x", "w") ;
fwrite ($fd, "Channel: $chan
MaxRetries: 0
WaitTime: 10
Context: internal
Extension: $z
Priority: 1
Callerid: <$y>\n") ;
fclose ($fd) ;
system ("/bin/mv /tmp/dialOut.$x /var/spool/asterisk/outgoing/dx.$x") ;
?>
you might need to make sure the outgoing spool directory is writable by
whatever php is running as...
And a bit on extensions.conf:
; A few lines to work with the dx.php script. This is executed when
; the a=1 parameter is passed to the script and is designed to make the
; target phone answer the call immediately.
exten => _doDialX.,1,Noop(Got to doDial for ${EXTEN:6})
exten => _doDialX.,n,SIPAddHeader(Call-Info: answer-after=0)
exten => _doDialX.,n,Dial(SIP/${EXTEN:6})
; Note: The above works for Grandstream phones.
; For Snom phones, you may need:
; SIPAddHeader(Call-Info: <sip:1.2.3.4>\;answer-after=0)
; where 1.2.3.4 is the IP address of the DSX system
Use it at your own risk ,etc. blah :)
So someone would need to come up with a windows/mac/linux front-end to it
that poked the URL at the asterisk box - I suspect that's the hard part...
And if a push came to a shove, then it would be trivial to write a web
page that just took a number in a box and did the same stuff above to
create the .call file, so it would then be a copy & paste operation...
(actually, this is already in my pbx software, but not many people make
use of it )-:
Gordon
More information about the asterisk-users
mailing list