Neat asterisk trick I discovered: You ca ... / 2008-09-17

2008-09-17 Neat asterisk trick I discovered: You ca ... 11 years ago
Neat asterisk trick I discovered: You can play musiconhold while waiting for a script to finish! Just use the Local pseudo channel and set up a call to the extension that can take a while to process. I wanted this for a situation where the phone was already answered but longer processing was happening from an external script.
[metarwaittest]

exten => s,1,Answer()
exten => s,n,Dial(local/s@metarspoken-eham,60,m)

[metarspoken-eham]

; EHAM = Amsterdam Schiphol airport

exten => s,1,Ringing
exten => s,n,System('/usr/lib/asterisk/scripts/getmetarforasterisk EHAM')
exten => s,n,Answer()
The processing in the script can take quite some time, so the music on hold is played while waiting.

Tags: , , ,

, reachable as koos+website@idefix.net. PGP encrypted e-mail preferred.

PGP key 5BA9 368B E6F3 34E4 local copy PGP key 5BA9 368B E6F3 34E4 via keyservers pgp key statistics for 0x5BA9368BE6F334E4 Koos van den Hout
RSS
Other webprojects: Camp Wireless, wireless Internet access at campsites, The Virtual Bookcase, book reviews
This page generated in 0.004613 seconds.