All pastes #179670 Raw Copy code Copy link Edit

callback.agi modules

public ini v1 · immutable
#179670 ·published 2006-09-22 12:04 UTC
rendered paste body
; Asterisk configuration file;; Module Loader configuration file;[modules]autoload=yes;; If you want, load the GTK console right away.  ; Don't load the KDE console since; it's not as sophisticated right now.;noload => pbx_gtkconsole.so;load => pbx_gtkconsole.sonoload => pbx_kdeconsole.so;; Intercom application is obsoleted by; chan_oss.  Don't load it.;noload => app_intercom.so;; Explicitly load the chan_modem.so early on to be sure; it loads before any of the chan_modem_* 's afte rit;load => chan_modem.soload => res_musiconhold.soload => chan_capi.so;; Load either OSS or ALSA, not both; By default, load OSS only (automatically) and do not load ALSA;;noload => chan_alsa.sonoload => chan_oss.so;; Module names listed in "global" section will have symbols globally; exported to modules loaded after them.;[global]chan_modem.so=yeschan_capi.so=yescallback.agi:#!/usr/bin/php -q<?phpob_implicit_flush(true);set_time_limit(0);$err=fopen("php://stderr","w");$in = fopen("php://stdin","r");$out = fopen("php://stout","w");echo("before loop"); /*falls Debug-Ausgaben gewuenscht */while (!feof($in)) {echo("in loop"); /*falls Debug-ausgaben gewuenscht*/$temp = str_replace("\n","",fgets($in,4096));$s = split(":",$temp);$agi[str_replace("agi_","",$s[0])] = trim($s[1]);if(($temp == "") || ($temp == "\n")) {break;}}$cf =fopen("/var/spool/asterisk/outgoing/cb".$agi["callerid"],"w+");fputs($cf,"Channel: CAPI/".$agi["extension"].":da_die_msn_die_asterisk_anrufen_soll\n");fputs($cf,"Context: capidialtone\n");fputs($cf,"Extension: s\n");fputs($cf,"SetVar: CALLERIDNUM=".$agi["extension"]."\n");fputs($cf,"MaxRetries: 2\n");fputs($cf,"RetryTime: 10\n");fclose($cf);fclose($in);fclode($out);fclode($err);?>