![]() ![]() You place Answer as the first part, and end with 'hangup'. So its fairly close to what you were looking for, and doesn't involve external mechanisms like a call file. That being said, the actual call between SIP/Y and the application in extension originated occurs on its own thread, so once the state of SIP/Y is known, 337 will be hung up. For example, write the following example into the JAVA file. Write a JAVA file called HelloIVRScript.java where you will write you IVR steps. Get the JAR file named asterisk-java.jar built and copy it to your test folder where you will place your AGI script. In our example, you can dial the extension 100, after the beep you can start recording your message. For this purpose you should add an extension for the recording in the nf file. You can record your own sound files using the Asterisk. ![]() ![]() For your IVR configuration you will need first to record some sound messages. This is an easy way to implement time-based call files. If the change time is in the future, Asterisk ignores the call file. When executing a call file, Asterisk compares the change time with the current time. Here is the context that the above example is using: exten. In order to tell asterisk to read and use this call file it needs to be placed into the. However, if AMI does not support the dial-and-playback-file operation we require, we’ll try the call file way. Something like the following: exten => 337,1,NoOp() same => n,Originate(SIP/Y,exten,default,originated,1) same => n,Hangup() exten => originated,1,NoOp() same => n,Playback(tt-monkeys) same => n,Hangup() The difference, of course, is that the Originate blocks the pbx_thread executing extension 337 until SIP/Y answers or otherwise fails.Ĭall files is a very rough alternative to the AMI way. play a sound on sipY When running the #2 action (completing the caller's session) and letting the rest of the process complete afterward, can we use something like the? You could do this with the application.run a macro even though there is no call in queue.complete my call, that is, hang up the original caller.Another way to consider it is, how can I do this: Say I want to be able to push 337 on the phone, and have a sound played over the speakerphone of another phone, say, as an alarm. The trick is that I want to dial 337 on my phone, and then my phone goes out of the picture, then sipX calls sipY. How can I dial a number and have Asterisk originate a call from extension sipX to sipY? Both sipX and sipY appear in nf of my dialplan. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |