I have been searching around but I can't seem to find the answer. I want to see if what I want to do is possible:
I want to playback music on hold to my caller when my phpagi script is executed. Is there anyway I can grab any DTMF that is being pressed during the musiconhold? I want the music to play continuously....
Any kind of insight I can get on this is greatly appreciated.
You can use $AGI->stream_file($filename, $digits) (voip-info)
or something like:
while ($digit ne "0") {
$digit = $AGI->get_data("path/to/your/file", 1, 1);
do your staff
...
}
I used it in Perl, but probably same thing for phpagi.
Hope it helps :)
I think it's too late to answer but this may help someone. Background music will keep on playing until you stop it.
// start background music
$agi->set_music(true);
//code....do your stuff
// stop background music
$agi->set_music(false);
Related
I'm working on a daily planner project for my school.
and i wanna use background process to start processing when the app opened.
I googled something and i found QProcess class but i did't really realized how it works and how to use it.
And also i read documentation many times but my main problem is at arguments.
Does anyone can help me?
Any reply appreciated, Thanks!
Is there any way to run an AutoIt script on a window while it's not on top?
Example : Browsing Facebook, while the script is running on a game that's just behind the browser.
Could I do something like that?
If the game is running in Windowed mode you should be able to get a handle a specific window using it's title with the command WinGetHandle. Using the returned handle you can then use ControlSend to send various text and keys to the window.
It's hard to help you more than that, you question is very vague. If you provide more details on what exactly you want to accomplish we might be able to help you more.
I'm going to have to agree with Bibz answer. This question needs to be revised to provide a little more detail on what you're trying to do. The answer to this would really depend on the game and how it's running. For example: A web-based game such as one at coolmath-games.com. These games seem to be mostly Adobe FLASH based games that operate in the web browser. Another example would be Minecraft. This game is operating via it's own window. My last example would be a game like World of Warcraft which operates in a full-screen window. Using AutoIt to automate any processes would vary greatly in all of these situations.
If you want to use AutoIt on a game in the background while you browse the web or perform any other functions, your best bet would be to use WinGetHandle and ControlSend like Bibz recommended. Be sure to avoid using the Send(), MouseClick(), or similar functions as this would disrupt your browsing.
Check out this example below. It opens an instance of Internet Explore, navigates to Google, then searches for a term, all in the background. At the end of the script, I set it to make the browser visible so you can see that the search was in fact completed.
#CS
This example opens up a webpage in the background, navigates to Google,
and searches something.
#CE
#include <GUIConstants.au3>
#Include <IE.au3>
$a = "THIS IS WHAT I'M GOOGLING"
Preview($a)
Func Preview($Submit = "")
$oIE = _IECreate ("http://www.google.com", 0, 0)
$oForm = _IEFormGetObjByName ($oIE, "f")
$oQuery = _IEFormElementGetObjByName ($oForm, "q")
_IEFormElementSetValue ($oQuery, $Submit)
_IEFormSubmit ($oForm)
Sleep(3000)
MsgBox(0,"Showing IE","Now making IE visible",3)
_IEAction($oIE,"visible")
EndFunc
#CS
Notice, the browser is being used to Google something, then it's becoming visible AFTER the search was done.
#CE
I hope this help!
Thanks,
Tim
I am using asterisk with phpagi - I want create a variable $pressedsomething = TRUE; if the called party pressed something while they are talking. I've been looking around and do not know where to start. Please keep in mind, I want the DTMF from the callee side not from my end...
Any kind of help I can have with this is greatly appreciated!
You can't do that from AGI. But you can do that using features.conf
http://www.voip-info.org/wiki/view/Asterisk+config+features.conf
When you run an Adobe product in a trial, a window appears each time asking if you have have a serial number yet or if you would like to continue with the trial. Next to that is a lovely 'number ticker', like the ones they used to have at airports (see image).
Does anyone know where I can get one of these, preferably gratis, to use as a component in a flex application?
As promised an version of the flip clock, ready to use on github free of charge. If anyone has request. By all means - ask.
https://github.com/StrangeMother/Flash-AS3-Flip-Clock-display
edit: Sorry aboutt he broken link. Some how the .git at the end of the URL buggered.
I made an app that uses such a feature. Download the air app and take a look. Its just a super simple poker game timer, but it has the feature you require.
if you like it, then I'll sift the code out.
http://pokerblind.strangemother.com/app/data/application/versions/0.1/air/PokerBlind.air
Its a heady mixture of OOP class code and front end. The numerals are a Numeric item in the library of which are managed by a timer class and number counting class. Extendable enough and the graphics should be easy enough to rip apart.
A while back I started working on a component like this. It's not super sexy yet. Check out the code on github:
https://github.com/jamesward/FlipClock
There are a few decent components available for close to free that I've found at activeden.net. They generally include source code so you can change them to meet your exact need. Here's a good example of what you can find there: http://activeden.net/item/flip-numbers/104628
Hope that helps.
A very good looking component can be found here:
http://www.flashcomponents.net/component/sense_flip_clock_3d.html
It does cost 8$, though. :)
I'm told to write a program in 'C' to print the contents of the 'super block'. Can anybody tell me how to read the contents of the super block. Which system call can be used to do so?
Thanks.
I guess what they want you to do is precisely to find this.
Hint: Googling "superblock linux" and pressing "I'm feeling lucky" got me straight to the first links to the answers. (Yes, there are several :) )!
Hint hint: If the fs is extN, there is a catch!