+===================================================================+ | Media control commands | +===================================================================+ +-------------------------------------------------------------------+ | noisesuppressor | +-------------------------------------------------------------------+ Description: Used to activate or to deactivate suppression of ambient noise. Can be used to remove caused by fans, air cooling systems, cars, trains and other sources of ambient noises from speech. Direction: Applies to Rx path only. In case of line interconnect can be activated for multiple parties. Supported hardware: Diva 4PRI PCI, Diva 2PRI PCI, Diva 4PRI PCIe HS Other equipped with DSP Diva hardware can use this feature only together with RTP Syntax: noisesuppressor|yes,no Syntax example: s,n,capicommand(noisesuppressor|yes) s,n,capicommand(noisesuppressor|no) IVR example: ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer ; Answer the line exten => _X.,n,Goto(s,1) exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds exten => s,n(restart),BackGround(demo-instruct) ; Play some instructions exten => s,n,WaitExten ; Wait for an extension to be dialed. exten => 1,1,capicommand(noisesuppressor|yes) exten => 1,n,Goto(s,restart) exten => 2,1,capicommand(noisesuppressor|no) exten => 2,n,Goto(s,restart) exten => 99,1,Echo exten => i,1,Playback(invalid) exten => i,n,Goto(s,restart) exten => h,1,Hangup ///////////////////////////////////////////////////////////////////// PBX Example: ///////////////////////////////////////////////////////////////////// [macro-capinoisesuppressor] exten => s,1,capicommand(noisesuppressor|yes) [isdn-in] exten => 12345,1,Progress() exten => 12345,n,Set(TIMEOUT(digit)=1) ; Set Digit Timeout to 5 seconds exten => 12345,n,Set(TIMEOUT(response)=5) ; Set Response Timeout to 10 seconds exten => 12345,n,Playback(demo-enterkeywords,noanswer,us) exten => 12345,n,Answer exten => 12345,n,Wait(2) exten => 12345,n,capicommand(noisesuppressor|yes) exten => 12345,n,Dial(DIALOGICDIVA/ISDN1/100,10,M(capinoisesuppressor)) exten => 12345,n,Hangup() ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | clamping | +-------------------------------------------------------------------+ Description: Used to activate or to deactivate suppression (removal from voice stream) of DTMF tones. Direction: Applies to Rx path only. In case of line interconnect can be activated for multiple parties. Supported hardware: Requires one equipped with DSP Diva hardware Syntax: clamping|N N - estimated duration of DTMF tones to be suppressed in mSec 0 - deactivate clamping 1 ... 250 - activate clamping Syntax example: s,n,capicommand(clamping|100) s,n,capicommand(clamping|0) IVR example: ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer ; Answer the line exten => _X.,n,Goto(s,1) exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds exten => s,n(restart),BackGround(demo-instruct) ; Play some instructions exten => s,n,WaitExten ; Wait for an extension to be dialed. exten => 1,1,capicommand(clamping|100) exten => 1,n,Goto(s,restart) exten => 2,1,capicommand(clamping|0) exten => 2,n,Goto(s,restart) exten => 99,1,Echo exten => i,1,Playback(invalid) exten => i,n,Goto(s,restart) exten => h,1,Hangup ///////////////////////////////////////////////////////////////////// PBX Example: ///////////////////////////////////////////////////////////////////// [macro-capiclamping] exten => s,1,capicommand(clamping|100) [isdn-in] exten => 12345,1,Progress() exten => 12345,n,Set(TIMEOUT(digit)=1) ; Set Digit Timeout to 5 seconds exten => 12345,n,Set(TIMEOUT(response)=5) ; Set Response Timeout to 10 seconds exten => 12345,n,Playback(demo-enterkeywords,noanswer,us) exten => 12345,n,Answer exten => 12345,n,Wait(2) exten => 12345,n,capicommand(clamping|100) exten => 12345,n,Dial(DIALOGICDIVA/ISDN1/100,10,M(capiclamping)) exten => 12345,n,Hangup() ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | rxagc | +-------------------------------------------------------------------+ Description: Used to activate or to deactivate Automatic Gain Control (AGC) for Rx direction. AGC level is -6dBm. Direction: Applies to Rx path only. In case of line interconnect can be activated for multiple parties. Supported hardware: Requires one equipped with DSP Diva hardware. Syntax: rxagc|yes,no Syntax example: s,n,capicommand(rxagc|yes) s,n,capicommand(rxagc|no) IVR example: ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer ; Answer the line exten => _X.,n,Goto(s,1) exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds exten => s,n(restart),BackGround(demo-instruct) ; Play some instructions exten => s,n,WaitExten ; Wait for an extension to be dialed. exten => 1,1,capicommand(rxagc|yes) exten => 1,n,Goto(s,restart) exten => 2,1,capicommand(rxagc|no) exten => 2,n,Goto(s,restart) exten => 99,1,Echo exten => i,1,Playback(invalid) exten => i,n,Goto(s,restart) exten => h,1,Hangup ///////////////////////////////////////////////////////////////////// PBX Example: ///////////////////////////////////////////////////////////////////// [macro-capirxagc] exten => s,1,capicommand(rxagc|yes) [isdn-in] exten => 12345,1,Progress() exten => 12345,n,Set(TIMEOUT(digit)=1) ; Set Digit Timeout to 5 seconds exten => 12345,n,Set(TIMEOUT(response)=5) ; Set Response Timeout to 10 seconds exten => 12345,n,Playback(demo-enterkeywords,noanswer,us) exten => 12345,n,Answer exten => 12345,n,Wait(2) exten => 12345,n,capicommand(rxagc|yes) exten => 12345,n,Dial(DIALOGICDIVA/ISDN1/100,10,M(capirxagc)) exten => 12345,n,Hangup() ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | txagc | +-------------------------------------------------------------------+ Description: Used to activate or to deactivate Automatic Gain Control (AGC) for Tx direction. AGC level is -6 dBm. Path: Applies to Tx path only. In case of line interconnect can be activated for multiple parties. Supported hardware: Requires one equipped with DSP Diva hardware Syntax: txagc|yes,no Syntax example: s,n,capicommand(txagc|yes) s,n,capicommand(txagc|no) IVR example: See rxagc PBX Example: See rxagc +-------------------------------------------------------------------+ | rxdgain | +-------------------------------------------------------------------+ Description: Used to access Digital Gain Control for Rx direction. Allows to set gain in the range from -127 dBm to +6 dBm. Diection: Applies to Rx path only. In case of line interconnect can be activated for multiple parties. Supported hardware: Requires one equipped with DSP Diva hardware Syntax: rxdgain|N N - gain in dBm, float -127 ... +6 - gain -128 or less - infinite attenuation Syntax example: s,n,capicommand(rxdgain|5.5) s,n,capicommand(rxdgain|-14.2) IVR example: ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer ; Answer the line exten => _X.,n,Goto(s,1) exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds exten => s,n(restart),BackGround(demo-instruct) ; Play some instructions exten => s,n,WaitExten ; Wait for an extension to be dialed. exten => 1,1,capicommand(rxdgain|5.5) exten => 1,n,Goto(s,restart) exten => 2,1,capicommand(rxdgain|-70) exten => 2,n,Goto(s,restart) exten => 99,1,Echo exten => i,1,Playback(invalid) exten => i,n,Goto(s,restart) exten => h,1,Hangup ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | incrxdgain | +-------------------------------------------------------------------+ Description: Used to access Digital Gain Control for Rx direction. Allows to change gain in the range from -127 dBm to +6 dBm Diection: Applies to Rx path only. In case of line interconnect can be activated for multiple parties. Supported hardware: Requires one equipped with DSP Diva hardware incSyntax: rxdgain|N N - gain increment in dBm, float Syntax example: s,n,capicommand(incrxdgain|2.5) // add 2.5 dBm to actiall gain s,n,capicommand(incrxdgain|-2.5) // substract 2.5 dBm from actual gain IVR example: ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer ; Answer the line exten => _X.,n,Goto(s,1) exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds exten => s,n(restart),BackGround(demo-instruct) ; Play some instructions exten => s,n,WaitExten ; Wait for an extension to be dialed. exten => 1,1,capicommand(incrxdgain|2.5) exten => 1,n,Goto(s,restart) exten => 2,1,capicommand(incrxdgain|-2.5) exten => 2,n,Goto(s,restart) exten => 99,1,Echo exten => i,1,Playback(invalid) exten => i,n,Goto(s,restart) exten => h,1,Hangup ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | txdgain | +-------------------------------------------------------------------+ Description: Used to access Digital Gain Control for Tx direction. Allows to set gain in the range from -127 dBm to +6 dBm. Diection: Applies to Tx path only. In case of line interconnect can be activated for multiple parties. Supported hardware: Requires one equipped with DSP Diva hardware Syntax: txdgain|N N - gain in dBm, float -127 ... +6 - gain -128 or less - infinite attenuation Syntax example: s,n,capicommand(txdgain|5.5) s,n,capicommand(txdgain|-14.2) IVR example: ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer ; Answer the line exten => _X.,n,Goto(s,1) exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds exten => s,n(restart),BackGround(demo-instruct) ; Play some instructions exten => s,n,WaitExten ; Wait for an extension to be dialed. exten => 1,1,capicommand(txdgain|5.5) exten => 1,n,Goto(s,restart) exten => 2,1,capicommand(txdgain|-70) exten => 2,n,Goto(s,restart) exten => 99,1,Echo exten => i,1,Playback(invalid) exten => i,n,Goto(s,restart) exten => h,1,Hangup ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | inctxdgain | +-------------------------------------------------------------------+ Description: Used to access Digital Gain Control for Tx direction. Allows to change gain in the range from -127 dBm to +6 dBm Diection: Applies to Tx path only. In case of line interconnect can be activated for multiple parties. Supported hardware: Requires one equipped with DSP Diva hardware incSyntax: rxtgain|N N - gain increment in dBm, float Syntax example: s,n,capicommand(inctxdgain|2.5) // add 2.5 dBm to actiall gain s,n,capicommand(inctxdgain|-2.5) // substract 2.5 dBm from actual gain IVR example: ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer ; Answer the line exten => _X.,n,Goto(s,1) exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds exten => s,n(restart),BackGround(demo-instruct) ; Play some instructions exten => s,n,WaitExten ; Wait for an extension to be dialed. exten => 1,1,capicommand(inctxdgain|2.5) exten => 1,n,Goto(s,restart) exten => 2,1,capicommand(inctxdgain|-2.5) exten => 2,n,Goto(s,restart) exten => 99,1,Echo exten => i,1,Playback(invalid) exten => i,n,Goto(s,restart) exten => h,1,Hangup ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | pitchcontrol | +-------------------------------------------------------------------+ Description: Used to set recording (Rx direction) and playback (Tx direction) rate in the range between 1250 ... 51200 Hz. Using pitch control this is possible to play (record) voice message faster (rate > 8000 Hz) or slower (rate < 8000 Hz). This is useful if playing voice mail messages and this is necessary to decrease the playback speed to achieve better understanding or to increase playback speed to rewind over the part of voice mail message. Diection: Applies to Rx and to Tx path. Can be used only for playback and for recoring of voice data. Not available with line interconnect and RTP. Supported hardware: Requires one equipped with DSP Diva hardware Syntax: pitchcontrol|RxN|TxN - set Rx and Tx rate to different values pitchcontrol|N - set Rx and Tx rate to same value pitchcontrol - deactivate rate control RxN, TxN, N - rate in the range 1250 ... 51200 Hz. Syntax example: s,n,capicommand(pitchcontrol|8200,8100) ; Set Rx rate to 8200 Hz and Tx rate to 8100 Hz s,n,capicommand(pitchcontrol|8400) ; Set Rx and Tx rate to 8400 Hz IVR example: ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer ; Answer the line exten => _X.,n,Goto(s,1) exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds exten => s,n(restart),BackGround(demo-instruct) ; Play some instructions exten => s,n,WaitExten ; Wait for an extension to be dialed. exten => 1,1,capicommand(pitchcontrol|8200) exten => 1,n,Goto(s,restart) exten => 2,1,capicommand(pitchcontrol|8000) exten => 2,n,Goto(s,restart) exten => 99,1,Echo exten => i,1,Playback(invalid) exten => i,n,Goto(s,restart) exten => h,1,Hangup ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | incpitchcontrol | +-------------------------------------------------------------------+ Description: Used to change recording (Rx direction) and playback (Tx direction) rate in the range between 1250 ... 51200 Hz. Using pitch control this is possible to play (record) voice message faster (rate > 8000 Hz) or slower (rate < 8000 Hz). This is useful if playing voice mail messages and this is necessary to decrease the playback speed to achieve better understanding or to increase playback speed to rewind over the part of voice mail message. Diection: Applies to Rx and to Tx path. Can be used only for playback and for recoring of voice data. Not available with line interconnect and RTP. Supported hardware: Requires one equipped with DSP Diva hardware Syntax: incpitchcontrol|RxN|TxN - change Rx and Tx rate using different values incpitchcontrol|N - change Rx and Tx rate using same value RxN, TxN, N - rate change in Hz Syntax example: s,n,capicommand(incpitchcontrol|100) // Increase Rx and Tx rate by 100 Hz s,n,capicommand(incpitchcontrol|-100) // Decrease Rx and Tx rate by 100 Hz IVR example: ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer ; Answer the line exten => _X.,n,Goto(s,1) exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds exten => s,n(restart),BackGround(demo-instruct) ; Play some instructions exten => s,n,WaitExten ; Wait for an extension to be dialed. exten => 1,1,capicommand(incpitchcontrol|100) exten => 1,n,Goto(s,restart) exten => 2,1,capicommand(incpitchcontrol|100) exten => 2,n,Goto(s,restart) exten => 99,1,Echo exten => i,1,Playback(invalid) exten => i,n,Goto(s,restart) exten => h,1,Hangup ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | mftonedetection | +-------------------------------------------------------------------+ Description: Used to activate or to deactivate MF listen on B channel data Detected MF tones are mapped to appropriate DTMF digits. MF digits K1, K2, KP, S1 and ST are mapped to DTMF digits A, B, C, D, and * respectively. Direction: Applies to Rx path only. In case of line interconnect can be activated for multiple parties. Supported hardware: Requires one equipped with DSP Diva hardware Syntax: mftonedetection|yes,no Syntax example: s,n,capicommand(mftonedetection|yes) s,n,capicommand(mftonedetection|no) IVR example: ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer ; Answer the line exten => _X.,n,Goto(s,1) exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds exten => s,n(restart),BackGround(demo-instruct) ; Play some instructions exten => s,n,WaitExten ; Wait for an extension to be dialed. exten => 1,1,capicommand(mftonedetection|yes) exten => 1,n,Goto(s,restart) exten => 2,1,capicommand(mftonedetection|no) exten => 2,n,Goto(s,restart) exten => 99,1,Echo exten => i,1,Playback(invalid) exten => i,n,Goto(s,restart) exten => h,1,Hangup ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | pulsedetection | +-------------------------------------------------------------------+ Description: Used to activate or to deactivate dial pulse detector. Detected dialing pulses are mapped to appropriate DTMF digits. Direction: Applies to Rx path only. In case of line interconnect can be activated for multiple parties. Supported hardware: Requires one equipped with DSP Diva hardware Syntax: pulsedetection|yes,no Syntax example: s,n,capicommand(pulsedetection|yes) s,n,capicommand(pulsedetection|no) IVR example: ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer ; Answer the line exten => _X.,n,Goto(s,1) exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds exten => s,n(restart),BackGround(demo-instruct) ; Play some instructions exten => s,n,WaitExten ; Wait for an extension to be dialed. exten => 1,1,capicommand(pulsedetection|yes) exten => 1,n,Goto(s,restart) exten => 2,1,capicommand(pulsedetection|no) exten => 2,n,Goto(s,restart) exten => 99,1,Echo exten => i,1,Playback(invalid) exten => i,n,Goto(s,restart) exten => h,1,Hangup ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | sendtone and stoptone | +-------------------------------------------------------------------+ Description: Send tone (sendtone) sending of the next tone while one tone is already active will automatically replace the tone to be transmitted with the new one. Sending of the DTMF digits will automatically stop tone transmission. Stop transmission of the tone (stoptone). Path: Applies to Tx path only. Supported hardware: Requires one equipped with DSP Diva hardware. Syntax: sendtone|N stoptone N - tone to be sent 0x82 - Dial tone 0x83 - PABX internal dial tone 0x84 - Special dial tone (stutter dial tone 0x85 - Second dial tone 0x86 - Ringing tone 0x87 - Special ringing tone 0x88 - Busy tone 0x89 - Congestion tone (reorder tone 0x8A - Special information tone 0x8B - Comfort tone 0x8C - Hold tone 0x8D - Record tone 0x8E - Caller waiting tone 0x8F - Call waiting tone 0x90 - Pay tone 0x91 - Positive indication tone 0x92 - Negative indication tone 0x93 - Warning tone 0x94 - Intrusion tone 0x95 - Calling card service tone 0x96 - Payphone recognition tone 0x97 - CPE alerting signal 0x98 - Off hook warning tone 0xA0 - Special information tone 0 0xA1 - Special information tone 1 0xA2 - Special information tone 2 0xA3 - Special information tone 3 0xA4 - Special information tone (operator intercept) 0xA5 - Special information tone (vacant circuit) 0xA6 - Special information tone (reorder) 0xA7 - Special information tone (no circuit found) 0xBF - Intercept tone 0xC0 - Modem calling tone 0xC1 - FAX calling tone 0xC2 - Answer tone 0xC3 - Answer tone with phase reversals 0xC4 - ANSam 0xC5 - ANSam with phase reversals 0xC6 - 2225 Hz (Bell 103 answer mode) 0xC7 - FAX flags 0xC8 - G2 FAX group ID 0xCA - Answering Machine Tone (390 Hz) 0xCB - Tone Alerting Signal (for Caller ID in PSTN) Syntax example: s,n,capicommand(sendtone|0x83) ; Send PABX internal dial tone s,n,capicommand(stoptone) ; stop tone transmission IVR example ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer ; Answer the line exten => _X.,n,Goto(s,1) exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds exten => s,n(restart),BackGround(demo-instruct) ; Play some instructions exten => s,n,WaitExten ; Wait for an extension to be dialed. exten => 1,1,capicommand(sendtone|0x83) exten => 1,n,Goto(s,restart) exten => 2,1,capicommand(stoptone) exten => 2,n,Goto(s,restart) exten => 99,1,Echo exten => i,1,Playback(invalid) exten => i,n,Goto(s,restart) exten => h,1,Hangup ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | starttonedetection and stoptonedetection | +-------------------------------------------------------------------+ Description: Start tone detection (starttonedetection) Stop tone detection (stoptonedetection) Direction: Applies to Rx path only. In case of line interconnect can be activated for multiple parties. Supported hardware: Requires one equipped with DSP Diva hardware Not available if RTP is active Syntax: starttonedetection|N stoptonedetection N - extension number to be used in case tone detected. The reception of appropriate DTMF digits will be simulated after the detection of tone. At same time variable CAPIDETECTEDTONE will be set to identifier of detected tone in decimal format and variable CAPIDETECTEDTONEVISUAL will be set to user friendly name of detected tone. Tone identifier: 0x82 - Dial tone detected 0x83 - PABX internal dial tone detected 0x84 - Special dial tone (stutter dial tone) detected 0x85 - Second dial tone detected 0x86 - Ringing tone detected 0x87 - Special ringing tone detected 0x88 - Busy tone detected 0x89 - Congestion tone (reorder tone) detected 0x8A - Special information tone detected 0x8B - Comfort tone detected 0x8C - Hold tone detected 0x8D - Record tone detected 0x8E - Caller waiting tone detected 0x8F - Call waiting tone detected 0x90 - Pay tone detected 0x91 - Positive indication tone detected 0x92 - Negative indication tone detected 0x93 - Warning tone detected 0x94 - Intrusion tone detected 0x95 - Calling card service tone detected 0x96 - Payphone recognition tone detected 0x97 - CPE alerting signal detected 0x98 - Off hook warning tone detected 0xA0 - Special information tone 0 0xA1 - Special information tone 1 0xA2 - Special information tone 2 0xA3 - Special information tone 3 0xA4 - Special information tone (operator intercept) 0xA5 - Special information tone (vacant circuit) 0xA6 - Special information tone (reorder) 0xA7 - Special information tone (no circuit found) 0xBF - Intercept tone detected 0xC0 - Modem calling tone detected 0xC1 - FAX calling tone detected 0xC2 - Answer tone detected 0xC3 - Answer tone with phase reversals detected 0xC4 - ANSam detected 0xC5 - ANSam with phase reversals detected 0xC6 - 2225 Hz (Bell 103 answer mode) detected 0xC7 - FAX flags detected 0xC8 - G2 FAX group ID detected 0xC9 - Human speech detected 0xCA - Answering Machine Tone (390 Hz) detected 0xCB - Tone Alerting Signal detected (for Caller ID in PSTN) Syntax example: s,n,capicommand(starttonedetection|98) ; Change to extension 98 after the detection of the tone s,n,capicommand(stoptonedetection) ; Disable detection of the tones IVR example: In this example extension 98 is used to process detected tones. ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer ; Answer the line exten => _X.,n,Goto(s,1) exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds exten => s,n(restart),BackGround(demo-instruct) ; Play some instructions exten => s,n,WaitExten ; Wait for an extension to be dialed. exten => 1,1,Set(TIMEOUT(digit)=1) exten => 1,n,Set(TIMEOUT(response)=5) exten => 1,n,capicommand(starttonedetection|98) ; Change to 98 once tone is detected exten => 1,n,Goto(s,restart) ; Continue after detection of the tone exten => 98,1,capicommand(stoptonedetection) ; Stop tone detection exten => 98,n,Set(TESTTONE=${CAPIDETECTEDTONE}) ; Tone identifier exten => 98,n,Set(TESTTONEVISUAL=${CAPIDETECTEDTONEVISUAL}) ; User friendly name exten => 98,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds exten => 98,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds exten => 98,n,Playback(demo-echodone) ; Let them know it's over exten => 98,n,Goto(s,restart) exten => 99,1,Echo exten => i,1,Playback(invalid) exten => i,n,Goto(s,restart) exten => h,1,Hangup ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | vc | +-------------------------------------------------------------------+ Description: In the time voice message played back this is usefule to be able to apply media control commands to voice stream without interrupting the playback of the voice stream. The same is true for the conference and for connection between two parties. The "vc" command allows to provide this functionality. Using this command it is possible to bind arbitrary chan_capi commands to sequences of events (DTMF digits, ...). Once events are detected the appropriate command is executed without interruption of the voice stream. "vc" allows to create menu which is executing in background and allows to control voice stream by activation or deactivation of AGC, noise suppression, control the level of the signal, playback speed. "vc" allows to use any supported by channel driver command, but please note that commands are executed not in the context of the dial plan. The commands are executed using context of detected events parallel to dialplan and independent from dialplan. Syntax: vc|command|key|param|param1|...|paranN Add to menu: on detection of key Execute command using parameters param1|...|paramN vc|command|key Add to menu: on detection of key execute command without parameters vc|command Remove all instances of command from menu vc Cleanup menu In case one command will use key which is already in use then new command will overwrite one already existing: exten => s,n,capicommand(vc|txagc|3|yes) exten => s,n,capicommand(vc|inctxdgain|3|1.5) is equivalent to: exten => s,n,capicommand(vc|inctxdgain|3|1.5) This is better to use only one digit as key for commands in menu if using menu for IVR and voice mailbox. This provides short response time. In case menu is used for conference or for connection between two parties it may be useful to use two or three digits for key. This will prevent one activation by occasional pressing of keys. Syntax example: exten => s,n,capicommand(vc|inctxdgain|5|1.5) ; Execute inctxdgain|1.5 if received DTMF digit 5 exten => s,n,capicommand(vc|txagc|3|yes) ; Execute txagc|yes if received DTMF digit 3 IVR Example: ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer exten => _X.,n,Goto(s,1) exten => s,1,Wait(1) exten => s,n,capicommand(vc|sendtone|1|0x82) exten => s,n,capicommand(vc|stoptone|2) exten => s,n,capicommand(vc|txagc|3|yes) exten => s,n,capicommand(vc|txagc|4|no) exten => s,n,capicommand(vc|inctxdgain|5|1.5) exten => s,n,capicommand(vc|inctxdgain|7|-2.5) exten => s,n,capicommand(vc|incpitchcontrol|8|0|100) exten => s,n,capicommand(vc|incpitchcontrol|9|0|-400) exten => s,n(restart),Playback(demo-instruct) exten => s,n,Goto(s,restart) exten => s,n,Hangup /////////////////////////////////////////////////////////////////////