Calling a Script within a conversation: newbie question

Hi all,

I would like to activate a recording script during a conversation.

E.g. Michael calls Asterisk Server and presses Extension 0022

exten => 0022,1,Dial,SIP/keith|10
exten => 5,1,Agi(gi://localhost/

now, call is successfully routed

Keith can press 5 at anytime during conversation to activate script.

so far, it seems we cannot activate the script during a conversation; i understand the crux should be within the Dial part, but im pretty new to this so please help. Thanks!

I’m not familiar with features, but let me try.

Method 1: Use T option in Dial(), and define in features.conf the blind transfer sequence to what you wanted, and define an extension to play the file and continue with call. This will probably require more key presses than you wish. (At least two.)

Method 2: Use DYNAMIC_FEATURES. See [applicationmap] section of features.conf.

Hope this helps. (O, but why use AGI to play a file? Sounds like an overkill.)

Dear valley,

thanks for ur suggestions. We will try it out; actually the AGi was for doing something with the recorded script. :smile:

Hi all.

Unfortuately, it has not worked.

We are really just looking to do the following:

  1. A calls B
  2. B presses a button to activate recording
  3. B presses a button to stop recording
  4. Immediately, Asterisk runs a script which checks if the recording is loud enough for use.
  5. The script returns the results.

However, we are unable to run both the script and the conversation concurrently, because it seems to be a must to be sequential. Is there a way we can run a script without hanging out a line ? E.g. conference in the script?

In this application, w flag in Dial() is your friend. You can use use MONITOR_EXEC to tell Monitor() to run your own mixing script so when recording stops, it does something.

But if you want the output of your script to be used in the same call, you may need to play with EAGI.