agi

Asterisk ami/agi - not able to answer call

隐身守侯 提交于 2019-12-24 05:49:08
问题 I have followed the instructions in this thread: Asterisk AMI - pickup call. However, I am still unable to answer calls via AMI. I can make the call to the extension, but corresponding phone for that extension doesn't ring. I can then run the AMI command to answer that call, it does answer, but obviously there isn't any actual response. Dialplan (testing with extension 116): exten => 116,1,AGI(agi:async) Any ideas what I am doing wrong here? 回答1: Use exten => 116,1,Answer exten => 116,2,AGI

AGI script executes without error , but no results generated

懵懂的女人 提交于 2019-12-12 18:26:14
问题 I am trying to run a shell script using asterisk AGI. I have used the tutorial mentioned here http://www.shiffman.net/p5/asterisk/ My extensions.conf is as follows [default] include => clicall [clicall] exten => _X,1,Goto(s,1); exten => _X.,1,Goto(s,1); exten => s,1,Answer(); exten => s,n,EAGI(runEAGI.sh); The script I am trying to run (runEAGI.sh) is as follows #!/bin/bash java /home/sphata001/Downloads/EAGI/JEAGIClient $$ The permissions have been set as 755 and the script is placed in /var

asterisk agi (php) file debugging

被刻印的时光 ゝ 提交于 2019-12-12 12:52:33
问题 does anyone know the steps required to debug the agi secript (a2billing.php) of asterisk . I am able to remote debug php cli if i call it form the linux console. but if it runs from within asterisk , it does not work. any idea how to debug it ? 回答1: To turn debug mode of a2billing you have to go config, and in agi-confX put verbose ->DEBUG(see comments) After that you can check a2billign debug file(specified in /etc/a2billng.conf) or do from console asterisk -r agi set debug on core set

PHPAGI: Exec format error

隐身守侯 提交于 2019-12-12 09:53:10
问题 Encountering a problem when running phpagi: -- Executing [123@DLPN_C:1] AGI("SIP/1000-00000001", "hello_world.php") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/hello_world.php hello_world.php: Failed to execute '/var/lib/asterisk/agi-bin/hello_world.php': Exec format error -- Auto fallthrough, channel 'SIP/1000-00000001' status is 'UNKNOWN' Scheduling destruction of SIP dialog '343930130' in 32000 ms (Method: INVITE) From command line: root@asterisk-test:/var/lib/asterisk

Asterisk - executing agi script if call is not answerd?

為{幸葍}努か 提交于 2019-12-10 17:11:27
问题 Here is context CH1 which i want to call from .call file [CH1] exten=>9367,1,Playback(welcome); same => n,Agi(agi://localhost/openlock.agi) same => n,Background(CH1_WAVE1) same => n,Hangup() my .call file look like this Channel: DAHDI/1/somemumber CallerID:xyz MaxRetries: 3 RetryTime: 40 WaitTime: 25 Context:CH1 Extension: 9367 Priority: 1 So my problem is this if one does not answer the call, my AGI script will not get execute, so is there any way to execute my AGI script if the call is not

Recorded files lost when user hangs up in Asterisk

≯℡__Kan透↙ 提交于 2019-12-10 11:49:55
问题 I have one voice application in which I want to save a recorded sound file. My code is: $record_file= $dir_path . "recordfile_".$file_count; $this->obj_agi->exec("Record","$record_file.wav,5,$maxsecs"); Whenever I hang up during recording, the recording application can not execute and hangup the call. Does anyone have any idea how to manage this record function while hanging up? 回答1: The record application process the record normally even when you hangup. However, inside AGI, the best way to

Asterisk AGI: How to get or set the value of a global variable?

旧时模样 提交于 2019-12-08 02:13:34
问题 I'm using Asterisk 1.8 with PHP for AGI scripting. EDIT: I'm struggling with setting and obtaining the values of global variables from within an AGI PHP script. I can set channel variables but not global variables. Using PHPAGI lib. Tried: Set({$varname}={$value},g) Set({$varname}=\"{$value}\",g) Set(GLOBAL({$varname})={$value}) That does not seem to work at all, when getting the value from within the dial plan, it is empty. Does anyone have a working example of setting and getting global

Asterisk AGI - Originate a call using php agi

拈花ヽ惹草 提交于 2019-12-07 05:31:40
问题 Is anybody knows , how we can Originate an external number call using PHP AGI script ? 回答1: You have got two possible options. One is use the "Originate" command. See http://www.voip-info.org/wiki/view/Asterisk+manager+Example:+Originate for an example. The other one, which is what I favor in my solutions, since it does not require AMI, is using spooled call files. See https://wiki.asterisk.org/wiki/display/AST/Asterisk+Call+Files for how to do them. The trick, and I cannot stress it enough,

Asterisk AGI: How to get or set the value of a global variable?

不羁的心 提交于 2019-12-06 06:16:01
I'm using Asterisk 1.8 with PHP for AGI scripting. EDIT: I'm struggling with setting and obtaining the values of global variables from within an AGI PHP script. I can set channel variables but not global variables. Using PHPAGI lib. Tried: Set({$varname}={$value},g) Set({$varname}=\"{$value}\",g) Set(GLOBAL({$varname})={$value}) That does not seem to work at all, when getting the value from within the dial plan, it is empty. Does anyone have a working example of setting and getting global variables in an AGI script? I found a workaround to make it work. First, the global variable must not be

Asterisk AGI - Originate a call using php agi

谁都会走 提交于 2019-12-05 10:59:54
Is anybody knows , how we can Originate an external number call using PHP AGI script ? MichelV69 You have got two possible options. One is use the "Originate" command. See http://www.voip-info.org/wiki/view/Asterisk+manager+Example:+Originate for an example. The other one, which is what I favor in my solutions, since it does not require AMI, is using spooled call files. See https://wiki.asterisk.org/wiki/display/AST/Asterisk+Call+Files for how to do them. The trick, and I cannot stress it enough, is to create the spool file in /tmp and then "move" the file into the ../spool/asterisk/outgoing