===================================================== CHANGES README README.Diva.fax README.Diva.qsig README.media README.qsig ===================================================== ----------------------------------------------------- CHANGES ----------------------------------------------------- CHANGES ======= HEAD ------------------ - corrected check for Info value on CONNECT_B3_CONF - fixed NULL-pointer in cid_name (asterisk 1.6 pickup revealed this) chan_capi-1.1.4 ------------------ - use extended fax if available only and have fine resolution on receive activated by default - fixed chat error on creating third chat-room chan_capi-1.1.3 ------------------ - fixed buffer length error with internal libcapi debug code. - performance optimizations, use debug code when needed only. - added commands for media features supported by Dialogic(R) Diva(R) Media Boards - added variable CAPI_CIP for full access to all bearer capabilities. - fixed CAPI 'chat' for using more than 8 controllers. - fixed CAPI 'chat' for not exceeding maximal size of CAPI message - add color fax - add autodetection of fax file format for sendfax command (SFF, CFF JPEG, CFF T.43, TEXT) - add extension for FAX paper formats and resolutions - adjust NULL PLCI LI path - add resource PLCI - add echocancelpath configuration option - fixed possible race condition while waiting for DISCONNECT_CONF - add static half duplex conference - add dynamic half duplex conference - add clear channel fax - add DTMF detection for NULL PLCI - use direct access to vocoders without RTP framing - play message to conference and music on hold to caller - add commands to remove users from chat - allow to specity the 'ETS 300 102-1' called party number octet 3 - fixed possible buffer overflow in 'deflect' - added 'h' option to chat to auto-hangup caller if alone in conference too long chan_capi-1.1.2 ------------------ - added config setting 'faxdetecttime' to limit the fax detection for a given amount of seconds. - added config option for subscriber prefix. Some lines may show local calls without area code signaled as subscriber-number. Here the complete prefix including area code must be added. - better counting of active B-channels. - make capicommand(progress) "early-B3" usable for non NT-mode incoming channels as well. - support early Line-Interconnect (bridge) as soon as both B-channels are up. This bridges B-channels from beginning of the call-establishment, even before calls are connected and the bridge command is received. The dial() option 'G' is used to activate this feature. - fixed big-endian issue for DATA_B3 messages in internal libcapi code. - fixed NULL-pointer when no digits are signaled in DID mode. - adapt to new Asterisk 1.6.1 changes. - added capicommand to set CAPI application ID into an Asterisk dialplan variable. chan_capi-1.1.1 ------------------ - fixed controller count when creating NULL-PLCI interface. - simplified check for unused controller. chan_capi-1.1.0 ------------------ - send local DATE/TIME with CONNECT when in NT-mode. - added transfergroup config option to set controllers allowed for transfer. - send Sending-Complete if overlap dialing is not used. - fixed numberingplan for 'connected number'. - added devicestate option. - capi-chat can play music-on-hold for first caller. - adapt to new asterisk 1.6 API - fixed reading capi profile on big-endian - increased maximum number of CAPI controllers to 64 (needed for big PBX). - if immediate=yes is set in DID mode, accept calls to empty DNID (needed for Austrian lines). - use own libcapi20 implementation by default (no library for CAPI is needed any more). chan_capi-1.0.2 ------------------ - possibly fixed ECT channel hang - added 'x' option to capicommand(ect) to have real 'explicit call transfer' (needed by some ISDN lines) - support CCBS (call completion on busy subscriber) - added capicommand(chat) for CAPI-based MeetMe/Conference using onboard DSPs. - fixed ton-display in 'show capi channels' on outgoing line. - fix for 64bit support - Asterisk 1.4.4 adaptions - send 'In-band info available' for progress in NT-mode - detect KEYPAD digits in NT-mode and send call to 'K...' extension - fixed possible deadlock when answering a just disconnected call chan_capi-1.0.1 ------------------ - added qsig caller-name patch by Mario Goegel - recognize asterisk 1.4.1 - register at CAPI with needed maxLogicalConnections only - do not send SELECT_B_PROTOCOL more than once - do not send more DATA_B3 messages than allowed by CAPI_MAX_B3_BLOCKS - added 'k' option to capi receivefax command for not deleting bad faxes - added B-channel number to channel name for better identification - added variable setting REDIRECTIONNUMBER on outgoing call - fixed deadlock with ast_async_goto on fax tone detection - listen to CAPI supplementary information QSIG: - added support for different qsig variants - added support for rerouting informations on incoming calls - added implementation of Simple Call Transfer chan_capi-1.0.0 ------------------ - Added preliminary handling of MANUFACTURER_IND. - Check for fax connection when in receivefax mode before writing data to file. - Try to detect for generic jitter buffer patch - Adapted to new Asterisk version 1.4 (Bug PR#20) - Adapted to new ast_channel_alloc from asterisk trunk. - Make capicommand(echocancel) setting non-permanent. Setting is restored after hangup. - Better check for asterisk version 1.4 BUG#23 - Added information and changed example for tx/rx gains. - Read the channel frames during wait for fax finish. - Added progress when in faxmode to wakeup asterisk-1.2. (needed for e.g. auto-hangup on timeout) - Do not error on invalid controller in capi.conf, just ignore it. - Added 3PTY patch by Simon Peter. - Allow echo-cancel even with old CAPI configuration bit for echo-cancel. - Fix compiler warnings. - Fixed callerid on incoming call with Asterisk 1.4 (PR#25) - Remove possible race condition in with hangup and DISCONNECT_IND. - Rixed gain and echosquelch use according to transfercapability. - Do not wait for DISCONNECT_B3_CONF in activehangup. - Reset PLCI on DISCONNECT_IND to avoid race if asterisk is too slow with hangup command. - Added Asterisk 1.4 jitterbuffer usage. - Fixed compiler warning with Asterisk 1.4.0 - Added music-on-hold on HOLD request for Asterisk 1.4 chan_capi-0.7.1 ------------------ - Set FAXREASONTEXT to "OK" instead of empty string. - Disconnect reason 0x3400 is treated as 'successful' in faxmode. - use CIP speech as default if transfercapability is unkown. - set correct channel/cdr status in fax mode too. - Use correct interface to wait on for ECT facility. chan_capi-0.7.0 ------------------ - added amaflags - added pickupgroup (internal pickup with pickupexten) - added capicommand(sendfax) - dropped compatiblity to versions before Asterisk-1.2.0 - added capicommand(echocancel) - added CAPI RTP (Eicon DIVA Server cards can do that) - added new cli 'capi show channels' - a lot of fixes chan_capi-cm-0.6.5 ------------------ - fixed compilation with Asterisk 1.0.7 - fixed call deflect if number is longer - removed function VANITYNUMBER, this does not belong into channel drivers chan_capi-cm-0.6.4 ------------------ - do not do echo-squelch or gain if transfercapability is non-voice - fix deadlock when changing to fax mode - better capi message handling - removed double memset to zero - use safer copy_string function - removed unneeded lockB3q - avoid capi message number zero - added locking rules - fix ECT (use implicit ECT) - fixed setting language for each interface - fix wait for b-channel to go down on ECT. chan_capi-cm-0.6.3 ------------------ - fixed buffer overflow in overlap dial - remove some compiler warnings chan_capi-cm-0.6.2 ------------------ - set some info variables when receiving fax - added language support - prepared devicestate(hint) support - do not change early-B3 setting on conf error for CONNECT_B3 - small fixes in Makefile targets (thanks to Karsten Keil) - do not send audio to local exchange when in TE-mode. - fix missing CONF messages when no interface is found - small transfercap and overlapdial fix - do not forward DTMF if in NT-mode and the line is not yet connected - fixed line interconnect - B-channel handling better - NT-mode progress - removed deadlock in faxreceive. - initialize variable ocid - correct use of timeoutms in native bridge - use more common defines for mutex_lock/unlock and _log() - clean up and OpenPBX portability. - adapted to latest asterisk bridge function prototype. chan_capi-cm-0.6.1 ------------------ - fixed setting of redirecting number rdnis instead of cid. - allow setting a callerid in the dial() command without changing the original channel callerid. - added config 'defaultcid' to set a default caller id which will be used if dial option 'd' is specified. - moved ast_softhangup() out of interface lock - use correct mutex_init call for interface lock - when 'o' option is used for overlap dialing, do not send any digits with the CONNECT_REQ. This gives better progress together with 'b'. - create a pseudo channel for each interface for incoming signalling without B-channel. - added channel locks - fixed CAPI init order (thanks to Hans Petter Selasky) - fixed DID handling - set RDNIS if redirecting number was received. - simplified call to ast_exists_extension() - when check for valid extension, check the callerid as well - changed call-waiting and deflect handling in CONNECT_IND - use 'immediate' config in MSN mode, if PBX shall be started on CONNECT_IND and shall not wait until SETUP/SENDING-COMPLETE was received. Since info like REDIRECTINGNUMBER will come after CONNECT_IND, this may be lost then. But for some drivers/telcos/pbx, this setting is needed. - fix start of line interconnect in old mode. - start early-b3 on PROCEEDING too. - do not send audio data, if in fax receive mode - disconnect on finished fax immediately - do not run through gain list, if gain is 1.0. - use correct A-law idle value. - removed old example from capi.conf chan_capi-cm-0.6 ---------------- - added 'relaxdtmf'. - more BSD compatibility - correct PROGRESS handling - start PBX on SETUP/SENDING-COMPLETE for PtP only. - added verbose text for capi info/reason error messages. - fixed echo-cancel setup structure - use correct facility-selector for echo-cancel - use capi.conf option 'echocancelold' for old facility-selector (6) - changed isdnmode configuration from ptp/ptmp to msn/did - added ntmode configuration - added application capicommand() for CAPI based applications (removed standalone applications) - capicommand(RETRIEVE) can now be called from other channels - support ISDN hold (holdtype in capi.conf) - added HOLD/RETRIEVE for Asterisk indications. - added custom function VANITYNUMBER to convert letters into digits. - added CAPI Line Interconnect (native bridging) - use variable CONNECTEDNUMBER on Answer(). - set variable REDIRECTINGNUMBER on incomming call if it was diverted. - added variable REDIRECTREASON - fixed unload - removed obsolete thread mutex - fixed dnid/exten/immediate handling on PtP. - receive a fax via CAPI is now done with capicommand(receivefax|...) and added stationid... - fixed call-deflection and moved this feature from separate application to capicommand(). - added config option 'immediate' to start PBX if no dnid has been received yet. - endian fixes - compile fixes with newer Asterisk - update channel name on did changes. - support 'type of number' (numbering-plan). - u-Law setting is now done in capi.conf instead of Makefile define. - allow using interface name in Dial(). - on hangup, use hangupcause from other channel or from var PRI_CAUSE. - improved DID handling on PtP connections. - capi.conf structure changes: one own section for each interface, no global 'interfaces' any more. Section name will be interface name. - restructured module loading and init. - dial string changed: parameters like 'b' not as part of number any more. - send alert on alerting only (busy() and congestion() work now). - better overlap sending (new parameter 'o' for dialstring to send only the first two digits with CONNECT_REQ only, the remaining digits and even digits following the dial() command, will be send as INFO_REQ/Overlap). - further fixups ----------------------------------------------------- README ----------------------------------------------------- chan_capi a Common ISDN API 2.0 implementation for Asterisk Copyright (C) 2005-2010 Cytronics & Melware Armin Schindler Reworked, but based on the work of Copyright (C) 2002-2005 Junghanns.NET GmbH Klaus-Peter Junghanns This program is free software and may be modified and distributed under the terms of the GNU Public License. There is _NO_ warranty for this! Thanks go to the debuggers, bugfixers and contributors :) =========================================================================== Lele Forzani Florian Overkamp Gareth Watts Jeff Noxon Petr Michalek Jan Stocker Frank Sautter, levigo group Hans Petter Selasky Simon Peter Mario Goegel (...and all the others that have been forgotten...) :-) No support for Asterisk 1.0.x any more, you need at least Asterisk 1.2.x , 1.4.x or 1.6.x. Note: Eicon DIVA Server cards are now named Dialogic(R) Diva(R) Media Boards. This chan_capi version includes: ===================================================== - Multiple controller support - CID,DNID (callling party, called party) - CLIR/CLIP - Supplementary services: CD (deflect/reroute),HOLD,RETRIEVE,ECT,3PTY - DTMF (dependend on card) + software DTMF support - Early B3 connects (always,success,never) - Digital audio (what did you think?) - Incoming/outgoing calls - Overlap sending (dialtone and additional digits) - E(xplicit) C(all) T(ransfer) (...although it's done implicit-but don't tell!) - Use asterisks internal DSP functions for DTMF - a-Law support - u-Law support! - Dialogic(R) Diva(R) software DSP echo cancellation (echocancel=1) - Reject call waiting (ACO) - DID for Point to Point mode (a.k.a overlap receiving) - Rx/Tx gains using positive linar value (rxgain=1.0, txgain=1.0 means no change) - (Inter)national/subscriber dialing prefix (for callerid) configurable in capi.conf - CLI command "capi info" shows B channel status of chan_capi - Catch all MSN (incomingmsn=*) - Some configuration enhancements (msn=123,124,125) - Added accountcode= - Echo squelching (echosquelch=1) - Callgroup support - report correct DIALSTATUS and HANGUPCAUSE. - Updated to support the new frame->delivery field - Compiles with different Asterisk versions (automatic build configuration) - receive/send faxes for CAPI (see below) - Fixes and compatibility for BSD (Jan Stocker and Hans Petter Selasky) - Support 'type of number'. - ISDN hold. - CAPI Line Interconnect. - CAPI VoIP/RTP - CLI command "capi show channels" shows details on channel status. - Asterisk 1.4 jitterbuffer configuration. - some QSIG extensions (see README.qsig) - CCBS (call completion on busy subscriber) - CAPI CHAT (CAPI MeetMe using onboard DSPs) - KEYPAD digits detection - provide DATE/TIME in NT-mode. The Dial string =============== Example: Dial(CAPI/g/[:][/]) Or: Dial(CAPI/contr/[:][/]) Or: Dial(CAPI//[:][/]) 'group' can be a value, comma separated list of values or a range using '-'. The according interface is found by searching a match with the 'group' specified in the capi.conf for each interface. The optional followed by an ':' can be used to set a caller ID for this dial() command, without changing the original channel's caller ID. 'params' is an optional part to set special settings for this call. The string consists of a list of characters with the following meaning: 'b' : early B3 always. 'B' : early B3 on successful calls only. 'd' : use the default caller ID that is set by defaultcid= in capi.conf 'o' : use overlap sending of number. (Useful if additional digits should be send afterwards or together with 'b' to get the dialtone and then send the number, e.g., if no progress tones are available) 's' : activate 'stay-online': do not disconnect CAPI connection on hangup. This is needed to give additional commands like CCBS after hangup. To really hang up the CAPI connection, use either capicommand(hangup) or wait for chan_capi/network timeout (about 20 seconds). 'G' : early Line-Interconnect / bridge: Use Line-Interconnect as soon as both B-channels are up. Both channels must be of type the CAPI and the incoming call may need 'capicommand(progress)' to enable Early B3 on it as well as the dial option 'b' for the outgoing channel. Before Dial(), the capicommand(peerlink) must be used to signal the dialed channel its peer. If the is used in dialstring, be sure the name (specified in capi.conf) does not start with 'contr' or 'g'. CLIP/CLIR uses the calling presentation of the calling channel, which can be modified using the SetCallerPres() application. Use SetCallerPres(prohib_not_screened) for CLIR. That is why the msn= param in capi.conf has been removed. The callerID is also taken from the calling channel. CLI commands ============ capi info: Show chan_capi version info. Show status of available B-channels. capi debug: Enable CAPI message verbosity. capi no debug: Disable CAPI message verbosity. capi show channels: Display detailed information on CAPI B-channels. (Description see below) capi chatinfo: Show status of CAPI CHAT. CAPI command application ======================================== chan_capi provides an additional Asterisk application capicommand() With this application, special CAPI commands and features can be used. Call Deflection: Forwards an unanswered call to another number. Example: exten => s,1,capicommand(deflect|12345678) Fax receive: Receives a fax using CAPI. Example: exten => s,1,capicommand(receivefax|/tmp/${UNIQUEID}|+49 6137 555123|Asterisk|kX) (more see below) Fax send: Sends a fax using CAPI. Example: exten => s,1,capicommand(sendfax|/path/to/faxfile.sff|+49 6137 555123|Asterisk) (more see below) Enable/Disable echosquelch: Enables or disable a very primitive echo suppressor. Disable this option before you start recording voicemail or your files may get choppy. Example: exten => s,1,capicommand(echosquelch|yes) or exten => s,1,capicommand(echosquelch|no) Enable/Disable echocancel: Enables or disables echo-cancel provided by CAPI driver/hardware. You might need to disable echo-cancel when the data/fax transmission is handled by a non-CAPI application. After hangup, this setting is restored to the value set in capi.conf. Example: exten => s,1,capicommand(echocancel|yes) or exten => s,1,capicommand(echocancel|no) Malicious Call Identification: Reports a call of malicious nature. Example: exten => s,1,capicommand(malicious) Hold: Puts an answered call on hold, this has nothing to do with Asterisk's onhold (music et al). An optional parameter is the name of the variable, which should be set with the reference ID of the call on hold. Example: exten => s,1,capicommand(hold) or exten => s,1,capicommand(hold|MYHOLDVAR) Holdtype: Sets the type of 'hold'. When Asterisk wants to put the call on hold, the specified method will be used. Example: exten => s,1,capicommand(holdtype|local) ;no hold, Asterisk can play MOH or exten => s,1,capicommand(holdtype|hold) ;ISDN-HOLD or ; not yet implemented exten => s,1,capicommand(holdtype|notify) ;notify the peer only, Asterisk can play MOH Retrieve: Gets back the holded call. An optional parameter is the reference ID of the call on hold. Example: exten => s,1,capicommand(retrieve) or exten => s,1,capicommand(retrieve|${MYHOLDVAR}) ECT: Explicit Call Transfer of the call on hold (must put call on hold first!) Example: exten => s,1,capicommand(ect|${MYHOLDVAR}) or [macro-capiect] exten => s,1,capicommand(ect) [default] exten => s,1,capicommand(hold) exten => s,2,Wait(1) exten => s,3,Dial(CAPI/contr1/1234,60,M(capiect)) Note: Normaly a PBX needs 'implicit call transfer', which is done by default with this command. But if the line needs real 'explicit call transfer', use exten => s,1,capicommand(ect|x) instead. 3PTY: Initiates a Three-Party Conference (must have one call on hold and one active call!). Example: exten => s,1,capicommand(3pty_begin|${MYHOLDVAR}) or [macro-capi3pty] exten => s,1,capicommand(3pty_begin) [default] exten => s,1,capicommand(hold) exten => s,2,Dial(CAPI/contr1/1234,,M(capi3pty)) Peer link creation: Creates a reference for chan_capi to know who is the calling channel on Dial(). This is needed if you want to use CCBS/CCNR afterwards. Example: exten => s,1,capicommand(peerlink) Hangup in mode 'stay-online': After hangup in 'stay-online' mode, the line is not really disconnected until timeout or command: exten => s,1,capicommand(hangup) This works after capicommand(peerlink) only. Set local party to 'busy' or 'free': Sets the local phone to the status 'busy' or 'free' when awaiting a callback for CCBS/CCNR. If the network wants to call you back for CCBS/CCNR, chan_capi normaly does not know about the status of the extension who started the callback. By default, chan_capi assumes 'free', but you can change that with: exten => s,1,capicommand(ccpartybusy|${CCLINKAGEID}|yes) or exten => s,1,capicommand(ccpartybusy|${CCLINKAGEID}|no) Call completion on subscriber busy (CCBS): To receive a callback when the dialed and busy party becomes free, aka call completion on subscriber busy, you can do the following: Example: exten => s,1,capicommand(peerlink) ;to let chan_capi know who is the calling channel. exten => s,2,Dial(CAPI/contr1/123456,60,g) ;'g' to go-on with the dialplan on busy. exten => s,3,NoOp(${CCLINKAGEID}) ;if this variable now contains a number, CCBS is possible. ;here you can ask the caller if CCBS shall be activated... exten => s,4,capicommand(ccbs|${CCLINKAGEID}|||) exten => s,5,NoOp(${CCBSSTATUS}) ;if CCBS was successfully enabled, it is set to "ACTIVATED". If the remote party becomes 'non-busy', the network initiates the callback that will be sent to the provided context/exten/priority. Of course, this only happens if your local phone is set to 'free' with capicommand(ccpartybusy), which is the default. In this context/exten/priority you should just setup a callfile to initiate an outgoing call from your extension to exten => s,1,Dial(CAPI/ccbs/${CCLINKAGEID}/) Deactivate CCBS: To deactivate a previously activated CCBS, use the following command: Example: exten => s,1,capicommand(ccbsstop|${CCLINKAGEID}) Chat (MeetMe/Conference): See also README.media for details! If the CAPI card/driver supports it, the caller can be put into a chat-room: (This uses the DSPs onboard a Dialogic(R) Diva(R) Rev.2 Media Board.) exten => s,1,capicommand(chat|||controller) Example: exten => s,1,capicommand(chat|salesmeeting|m|1,3-6) Possible options: 'm' = The first caller will get music-on-hold until second caller arrives. 'h' = Hangup after seconds if caller is alone in conference. 'o' = The caller is operator 'l' = The caller is listener Progress / Early-B3 on incoming calls: Activate Early-B3 on incoming channels to signal progress tones when in NT-mode or if the Telco-line supports this. Example: exten => s,1,capicommand(progress) Get CAPI application ID: To store the CAPI application ID in an Asterisk dialplan variable, use: Example: exten => s,1,capicommand(getid,CAPI_ID) exten => s,2,NoOp(CAPI appl-id is ${CAPI_ID}) Using CLIR ========== Use the SetCallerPres() application before you dial: exten => _X.,1,SetCallerPres(prohib_not_screened) exten => _X.,2,Dial(CAPI/contr1/${EXTEN}) Enjoying Early B3 connects (inband call progress, tones and announcements) ========================================================================== Early B3 is configurable in the dialstring parameters. If you set a 'b', early B3 will always be used, also if the call fails, because the number is unprovisioned, etc ... If you set a 'B', early B3 will only be used on successful calls, giving you ring indication,etc... Do not use indications in the Dial command, your local exchange will do that for you: exten => _X.,1,Dial(CAPI/contr1/${EXTEN}/B,30) (early B3 on success) exten => _X.,1,Dial(CAPI/contr1/${EXTEN}/b,30) (always early B3) exten => _X.,1,Dial(CAPI/contr1/${EXTEN},30,r) (no early B3, fake ring indication) exten => _X.,1,Dial(CAPI/contr1/${EXTEN}/b,30,r) (always early B3, fake indicatons if the exchange does not give us indications) exten => _X.,1,Dial(CAPI/contr1/${EXTEN}/B,30,r) (early B3 on success, fake indicatons if the exchange does not give us indications) For normal PBX usage, you would use the "b" option, always Early B3. Overlap sending (a.k.a. real dialtone) ====================================== When you dial an empty number and have early B3 enabled, with: Dial(CAPI/g1//b) the channel will come up at once and give you the dialtone it gets from the local exchange. At this point the channel is like a legacy phone, now you can send DTMF digits to dial. Example context for incoming calls on MSN 12345678: =================================================== [capi-in] exten => 12345678,1,Dial(SIP/phone1) exten => 12345678,2,Hangup Short HOWTO of capicommand(receivefax...) and capicommand(sendfax...): ======================================================================================== For those of you who have a CAPI card with an on-board DSP (like Dialogic(R) Diva(R) Media Boards), this allows you to receive/send faxes. capicommand(receivefax|[|||]): ------------------------------------------------------------------------- If you want to answer a channel in fax mode, use capicommand(receivefax|...) instead of Answer(). If you use Answer(), you will be in voice mode. If the hardware DSP detects fax tone, you can switch from voice to fax mode by calling capicommand(receivefax|...). The parameter is mandatory and the parameters , and are optional. By default, if fax reception was not successful, the file is deleted. If you want even partly received or broken fax files, use 'k' for "keep bad fax" in the : capicommand(receivefax|/tmp/${UNIQUEID}|+123456789||k) You can activate extended fax support by 'X' in the : capicommand(receivefax|/tmp/${UNIQUEID}|+123456789||X) Please read details on extended fax options in README.Diva.fax. To enable fax tone detection and redirect to extension 'fax', use config variable 'faxdetect' in capi.conf. This can be limited to the first 'n' seconds of a connection using the setting 'faxdetecttime' in capi.conf. Example of use : line number 123, play something, if a fax tone is detected, handle it line number 124, answer directly in fax mode [incoming] exten => 123,1,Answer() exten => 123,2,BackGround(jpop) exten => 124,1,Goto(handle_fax,s,1) exten => fax,1,Goto(handle_fax,s,1) [handle_fax] exten => s,1,capicommand(receivefax|/tmp/${UNIQUEID}[|||]) exten => s,2,Hangup() exten => h,1,deadagi,fax.php // Run sfftobmp and mail it. The output of capicommand(receivefax|...) is a SFF file. Use sfftobmp to convert it. With a Dialogic(R) Diva(R) Media Board, the following features are provided: - fax up to 33600 - high resolution - Color Fax - JPEG Compression is disabled (not tested yet) See README.Diva.fax for more details and description of all options. capicommand(sendfax|[|||]): ------------------------------------------------------------ To send a fax, you can use the same mechanism like with receivefax. Just replace the with the path to the .SFF file to send. You can activate extended fax support by 'X' in the : capicommand(sendfax|/tmp/${UNIQUEID}|+123456789||X) Please read details on extended fax options in README.Diva.fax. After disconnect of a fax connection, the following variables will be set for that channel: FAXSTATUS : 0 = OK, 1 = Error. FAXREASON : Value of B3 disconnect reason. FAXREASONTEXT : Decoded text of FAXREASON value. FAXRATE : The baud rate of the fax connection. FAXRESOLUTION : 0 = standard, 1 = high. FAXFORMAT : 0 = SFF. FAXPAGES : Number of pages received. FAXID : The ID of the remote fax maschine. KEYPAD digits in NT-mode ======================== If the device connected to a NT-mode port sends KEYPAD digits instead of normal digits, this call is then send to extension 'Kxxx'. Where 'xxx' stands for the KEYPAD digits sent. CLI command "capi show channels" ============================================== This CLI command shows detailed info on all CAPI channels. Column description: Line-Name : the name of the interface as defined in capi.conf NTmode : is the line in NT-mode instead fo TE-mode state : the state of the channel, like 'Conn', 'Disc', 'Dial', ... i/o : incoming or outgoing line bproto : protocol on CAPI ('fax', 'trans' or 'rtp') isdnstate : a string which may consists of the following characters * = PBX is active G = Line-Interconnect (CAPI bridge) active B = B-channel is up b = B-channel is requested P = Progress was signaled H = this line is on hold T = this line is in transfer (ECT) mode S = SETUP[_ACK] was signaled ton : type of number value number : the caller number and destination number Asterisk variables used/set by chan_capi ========================================================== BCHANNELINFO On incomming calls, this variable is set with the B-channel information value: '0' : B-channel is used (default) '1' : D-channel is used (not implemented yet) '2' : neither B nor D-channel is used (e.g., call waiting) Call-Waiting: an incoming call with BCHANNELINFO not '0' cannot be accepted. Another connection must be dropped before accepting or use capicommand(deflect|) to initiate call deflection to another destination. CALLEDTON Incoming calls: 'type of number' value of the called number is saved in this variable on incomming call. Outgoing calls: Allows to specity the 'ETS 300 102-1' called party number octet 3 (0x80 is used by default) exten => _X.,1,Answer exten => _X.,n,Set(_CALLEDTON=${CALLEDTON}) ; Use value of incoming call for outgoing call exten => _X.,n,Dial(CAPI/ISDN3/100,10) exten => _X.,1,Answer exten => _X.,n,Set(_CALLEDTON=1) ; Use new value exten => _X.,n,Dial(CAPI/ISDN3/100,10) CALLERTON The 'type of number' value to overwrite for the caller number on outgoing call. _CALLERHOLDID If a call is put on hold (ISDN-HOLD), the reference ID is saved in this variable. This variable is inherited as CALLERHOLDID to the dialed channel and will be used if e.g., capicommand(ect) is used to transfer the held call. CALLINGSUBADDRESS If set on dial(), the calling subaddress will be set to the content. CALLEDSUBADDRESS If set on dial(), the called subaddress will be set to the content. CAPI_CIP The real CIP value, not the transformed 'transfercapability'. Set on incoming call automatically. If set on outgoing call, it is used instead of transfercapability. CCBSSTATUS When using capicommand(ccbs|....), this variable is set to either "ERROR" or "ACTIVATED". CCLINKAGEID If a Call-Linkage-Id is received for CCBS/CCNR, this variable contains this ID. But you need to use capicommand(peerlink) before dialing a CAPI channel, because of a design problem in Asterisk, chan_capi is not able to set channel variables of the calling channel. CONNECTEDNUMBER Can be set before answering and if set, the content is used for IE 'Connected Number' on answering. FAXEXTEN If chan_capi sends the call to extensions 'fax', the original extension number is saved in this variable. PRI_CAUSE If set, this value will be used as hangup cause on hangup. REDIRECTINGNUMBER On incoming calls, if the call was redirected to you by someone, the number of the redirecting party is saved in this variable. RDNIS is set as well. REDIRECTREASON If the incoming call was redirected to you, this variable is set with the reason value. REDIRECTIONNUMBER If an outgoing call is redirected, this variable may be set to the new destination. ----------------------------------------------------- README.Diva.fax ----------------------------------------------------- +===================================================================+ | Diva fax support | +-------------------------------------------------------------------+ | | | Intelligent fax processing | | FoIP/VoIP (Fax/Voice over IP) T.38 fax support | | FoIP/VoIP clear channel fax support | | Color fax | | High resolution fax, non standard paper size | | Use of fax with chan_capi | | | +===================================================================+ +-------------------------------------------------------------------+ | INTELLIGENT FAX PROCESSING | +-------------------------------------------------------------------+ The fax chan_capi command set provides an easy way to access fax-related functionality. If you use fax document processing, you need to be aware of the following problems, that might occur: * It is necessary to maintain a constant data stream between the application and the fax device. Any interruption in this data stream will affect the quality of the fax document. * It is necessary to deal with various low-level T.30 protocol settings like scan line time, compression, error correction, etc. * Not every application or device supports the command-set features provided by T.30 fax protocol. This limits the functionality and may require modification of the existing application. * The usage of fax document compression forces you to deal with compressed data (reception), or to be able to generate compressed data stream on demand, or to provide documents in different compression formats (transmission). * The "classic" fax application is unable to deal with transmission speeds higher than 14400 bps. To be able use V.34 fax transmission speeds of up to 33600 bps, the application needs to be modified. This section explains how the Dialogic(R) Diva(R) Media Board can overcome these drawbacks and allows you to use the chan_capi to process fax documents with a comparable level of reliability and flexibility as a sophisticated high-level fax API. Reliable data transfer between application and Dialogic(R) Diva(R) Media Board ------------------------------------------------------------------------------ Dialogic(R) Diva(R) Media Boards provide a high-performance block-oriented IDI (ISDN Direct Interface) between the board hardware and the host CPU. The data transfer is performed via a BUS master DMA. This enables a reliable data transfer between the host CPU and the Diva Media Board memory that is not affected by the host CPU load. At the same time, using the BUS master DMA reduces the host CPU load. The Dialogic(R) Diva(R) chan_capi/CAPI interface/drivers does not perform data processing. It is only used to forward the data stream between the application and the IDI interface. The entire data processing is performed on the RISC CPU of the Diva Media Board. The reliability of the data stream is ensured by the board hardware through buffering (up to 64 Kbytes for every channel) and block-oriented data transfer (blocks of up to 2 Kbytes) via the BUS master DMA. Automatic T.30 protocol parameter adjustment -------------------------------------------- The chan_capi can ignore low-level T.30 protocol settings. The T.30 protocol stack that runs on the RISC CPU of the Dialogic(R) Diva(R) Media Board is able to perform the required adjustment of transmission parameters to provide reliable and fast document transmission without requiring application intervention. You can overrule the automatic T.30 protocol parameter adjustment with global fax configuration options in the Dialogic(R) Diva(R) WEB configuration interface. ECM (Error Correction Mode) support ----------------------------------- You can control ECM support via global fax configuration options in the Dialogic(R) Diva(R) WEB configuration interface. If you use global Diva configuration options to enable ECM support, the Dialogic(R) Diva(R) Media Board will use ECM mode for document transfer, if supported by the opposite side. Diva Media Boards use their internal memory to store document data. They retrieve data for ECM re-transmissions from this internal buffer (up to 64 Kbytes for every channel). This reduces the host CPU load and increases the reliability of the fax transmission. Document compression support ---------------------------- Dialogic(R) Diva(R) Media Boards use MR, MMR, T.6 fax document compression. In order to reduce transmission time, Diva Media Boards select the best compression algorithm supported by the opposite side. The Diva Media Board's RISC CPU is used to re-compress 1D-coded page data from the application to the format requested by the opposite side (transmission) and to convert received data to 1D-coded page data that is sent to the application (reception). The re-compression process is handled internally by the board's RISC CPU and happens fully transparent to the application that deals only with 1D (MH) coded data. You can adjust the compression-related T.30 protocol settings via Global fax configuration options. Automatic detection of document format -------------------------------------- chan_capi uses the context of the file to determine the format of the document and to apply all necessary for transmission of the document settings. Following media formats are detected: SFF, CFF (Color Fax in JPEG or T.43 format), text file Diva supports media stream consisting from pages with different media types. V.34 (33600 bps) fax support ---------------------------- The V.34 fax support can be controlled via global fax configuration options in the Dialogic(R) Diva(R) Configuration web interface. If the Dialogic(R) Diva(R) Media Board is able to establish a connection with a transmission speed higher than 14400 bps (V.34), it handles this transparent to the application. You can use the "divalogd" accounting utility that uses the Diva Media Board Management interface to get information on the transmission speed and the used compression algorithm. +-------------------------------------------------------------------+ | FoIP/VoIP (Fax/Voice over IP) T.38 FAX SUPPORT | +-------------------------------------------------------------------+ You can use the Dialogic(R) Diva(R) softIP software to access T.38 functionality. There is no need to change your chan_capi configuration. The Dialogic(R) Diva(R) softIP software exposes the CAPI interface towards chan_capi and the SIP interface towards the IP network. All T.38 and SIP-related configurations are handled using Diva WEB configuration interface. This is no limitation of the voice and supplementary services functionality of chan_capi. You can change the call flow between voice and fax or invoke the supplementary services at the CAPI interface and the Diva softIP software handles all necessary media and SIP negotiation. You can use the Diva hardware and the Diva softIP software in parallel on one system. It is possible to use line interconnect (conferencing) features between the Diva hardware and The Diva softIP software without any limitations. You can use the Diva softIP software in virtual environments (VMWare, XEN, ...). +-------------------------------------------------------------------+ | FoIP/VoIP CLEAR CHANNEL FAX SUPPORT | +-------------------------------------------------------------------+ Together with the Diva(R) Dialogic(R) hardware you can use the Dialogic(R) Diva(R) softIP software or chan_capi to access T.38 (only Diva softIP software) and Clear Channel Fax functionality. If you use the Diva softIP software there is no need to change your chan_capi configuration. The Dialogic(R) Diva(R) softIP software exposes the CAPI interface towards chan_capi and the SIP interface towards the IP network. All T.38 and SIP related configurations are handled using the Diva WEB configuration interface. To activate Clear Channel Fax support, the Diva hardware should be switched in Resource Board mode. This is no limitation of the voice and supplementory services functionality of chan_capi. You can change the call flow between voice and fax or invoke the supplementary services at the CAPI interface and the Diva softIP software will handle all necessary media and SIP negotiation. You can use the Diva hardware in TDM (E.1/T.1/S0), in Resource Board mode and the Diva softIP software in parallel on one system. It is possible to use the line interconnect (conferencing) features between the Diva hardware and the Diva softIP software without any limitations. If you use chan_capi, then you can use 'resource' command to assign DSP resources to connected by IP users. Resource PLCI allows to send and to receive fax documents over IP using Clear Channel fax and to use the DSP resources for processing of IP media and for conferencing. It is possible to use the line interconnect (conferencing) features between E.1/T.1/S0/PSTN and IP peers without any limitations. Both the Diva softIP software and chan_capi allow to use G.729, G.723, iLBC, GSM, and other codecs supported by the Diva hardware. You can use the Diva hardware, chan_capi, and Diva softIP software in virtual environments if access by software is supported (XEN). +-------------------------------------------------------------------+ | COLOR FAX | +-------------------------------------------------------------------+ The Dialogic (R) Diva(R) hardware and the Dialogic (R) Diva(R) softIP software support color fax and allow to send/receive fax document using Continuous tone color and gray-scale mode according to T.4 Annex E using JPEG coding Lossless color and gray-scale mode according to T.43 using JBIG coding Color fax documents are processed using CFF. Each of these data formats starts with a unique pattern: 0x53 0x66 - SFF - First bytes of magic number in SFF document header, CAPI 2.0 Annex B 0xFF 0xD8 - T.4 - Annex E SOI marker 0xFF 0xA8 0 T.43 - Start marker 0xFFA8 It is possible to change between different media types in the time of fax transmission. This allows to change media between black and white and color for every page. After completion of transmission or reception of fax CFF (color/greyscale image format) variable FAXFORMAT is set to 8 (native format, CFF image) and variable FAXCFFFORMAT provides information about the image format. +-------------------------------------------------------------------+ | High resolution fax, non standard paper size | +-------------------------------------------------------------------+ The Dialogic (R) Diva(R) hardware and the Dialogic (R) Diva(R) softIP software provide access to following T.30 features: Ultra/Super fine resolution Non standard paper formats The current COMMON-ISDN-API specification defines paper formats ISO A4, ISO B4, and ISO A3 at standard resolution (R8 x 3.85) and high resolution (R8 x 7.7). Support for B4 and A3 is optional. The Dialogic (R) Diva(R) software supports a COMMON-ISDN-API extension that enables FAX document transmission and reception with paper formats ISO A4, ISO B4, and ISO A3 and the following resolutions as specified in T.30: R8 x 3.85 R8 x 7.7 R8 x 15.4 R16 x 15.4 200 x 200 dpi 300 x 300 dpi 400 x 400 dpi 300 x 600 dpi 400 x 800 dpi 600 x 1200 dpi 600 x 600 dpi 1200 x 1200 dpi The page format and resolution information is passed via appropriate fields in the SFF page header. The Dialogic(R) Diva(R) SFF2TIFF utility provides conversion from SFF to TIFF format for all basic and extended resolutions and paper formats. +-------------------------------------------------------------------+ | Use of fax with chan_capi | +-------------------------------------------------------------------+ Based on information from README Reception of fax documents -------------------------- You can use the Dialogic (R) Diva(R) chan_capi configuration to activate fax support ("Fax detection" and "Fax detection time"). The reception of the fax message is started using 'receivefax' capi command: capicommand(receivefax|[|||]) Parameters: 'filename' - Contains the full path and file name for the resulting fax file, mandatory 'stationid' - station ID, optional 'headline' - head line, optional 'options' - fax options, optional 'X' - use fax T.30 extended (default) 'x' - do not use fax T.30 extended 'k' - keep fax document in case of errors (by default document is removed if fax transmission was not completed with success). 'f' - allow Fine resolution (default) 'F' - do not use Fine resolution 'u' - activate support for Super/Ultra fine resolutions and paper formats 'j' - enable JPEG coding 'b' - enable T.43 coding 't' - do not use T.85 'e' - do not use ECM 'm' - do not use MMR (T.6) coding 'd' - do not use MR (2D) coding It is possible to answer the incomming call using 'receivefax' command and start reception of the fax document directly. It is possible to answer a call using 'Answer' in voice mode and change to reception (transmission) of the fax by 'receivefax' later, for example after the detection of the fax calling tone or after the user entered a password using DTMF digits. Using resource ('resource' command) PLCI allows to receive fax documents over IP using Clear Channel fax. The 'resource' command allocates one resource PLCI for IP connections only and does not perform any actions for E.1/T.1/S0/PSTN connections. This allows for safe use of 'resource' command in any context. Example: [isdn-in] exten => _X.,1,Answer() ; Answer in voice mode exten => _X.,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds exten => _X.,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds exten => _X.,n,BackGround(jpop) ; Play message and wait until detection of fax calling tone exten => 124,1,Goto(handle_fax,s,1) ; Extension 124 is dedicated to fax, answer in fax mode exten => fax,1,Goto(handle_fax,s,1) ; Fax calling tone detected, change to fax mode exten => i,1,Hangup() ; Received unexpected event [handle_fax] exten => s,1,capicommand(receivefax|/tmp/${UNIQUEID}[|||]) exten => s,n,Hangup() exten => h,1,deadagi,fax.php ; Run sfftobmp and mail it Example with Clear Channel fax support: [handle_fax] exten => s,1,capicommand(resource|1-4) ; Assign resource PLCI (use controllers 1 to 4) exten => s,n,capicommand(receivefax|/tmp/${UNIQUEID}[|||]) exten => s,n,Hangup() exten => h,1,deadagi,fax.php ; Run sfftobmp and mail it Transmission of fax documents ----------------------------- The transmission of the fax message is started using 'sendfax' capi command: capicommand(sendfax|[|||]) Parameters: 'filename' - Contains the full path and file name to be sent, mandatory sendfax command automatically detects the type of file using the context of file. Supported formats: .sff - SFF file .txt - text file .cff - JPEG/T.43 (color/gray tone) coded file 'stationid' - station ID, optional 'headline' - head line, optional 'options' - fax options, optional 'X' - use fax T.30 extended (default) 'x' - do not use fax T.30 extended 'f' - use Fine resolution 'u' - activate support for Super/Ultra fine resolutions and paper formats 't' - do not use T.85 'e' - do not use ECM 'm' - do not use MMR (T.6) coding 'd' - do not use MR (2D) coding You need to start the call using the 'Dial' command in voice mode and change to transmission (reception) of the fax by 'sendfax'. Optionally, you can wait until the user entered a password using DTMF digits. Using resource ('resource' command) PLCI allows to transmit fax documents over IP using Clear Channel fax. The 'resource' command allocates one resource PLCI for IP connections only and does not perform any actions for E.1/T.1/S0/PSTN connections. This allows for safe use of 'resource' command in any context. Example: [dial_fax] exten => 1,1,Dial(capi/ISDN1/1234512345,20,G(handle_sendfax,s,1)) [handle_sendfax] exten => s,1,capicommand(sendfax|/tmp/sendfax001.sff|1234 1234 1234|Outgoing Fax) exten => s,n,deadagi,faxlog.php ; Log result and schedule restart if necessary exten => s,n,Hangup Example with Clear Channel fax support: [handle_sendfax] exten => s,1,capicommand(resource|1-4) ; Assign resource PLCI exten => s,n,capicommand(sendfax|/tmp/sendfax001.sff|1234 1234 1234|Outgoing Fax) exten => s,n,deadagi,faxlog.php ; Log result and schedule restart if necessary exten => s,n,Hangup Results of fax transmission --------------------------- After chan_capi completed the processing of the 'receivefax' or 'sendfax' commands, following variables are set: FAXSTATUS - Status of fax transmission 0 - OK 1 - Error FAXREASON - Value of B3 disconnect reason FAXREASONTEXT - Decoded text of FAXREASON value FAXRATE - The baud rate of the fax connection FAXRESOLUTION - Resolution of received fax message 0 - standard 1 - high FAXFORMAT - Format of received fax document 0 - SFF (default, description in Annex B) 1 - Plain fax format (modified Huffman coding) 2 - PCX 3 - DCX 4 - TIFF 5 - ASCII 6 - Extended ANSI 7 - Binary-File transfer 8 - Native (CFF continuous-tone color and gray-scale T.4 Annex E using JPEG coding lossless color and gray-scale mode according to T.43) FAXCFFFORMAT - Valid if FAXFORMAT is set to 8 (native) 1 - continuous tone color and gray-scale mode according to T.4 Annex E using JPEG coding 2 - lossless color and gray-scale mode according to T.43 [7] using JBIG coding FAXPAGES - Number of pages received FAXID - The ID of the remote fax maschine ----------------------------------------------------- README.Diva.qsig ----------------------------------------------------- +===================================================================+ | QSIG Abstraction | +===================================================================+ +-------------------------------------------------------------------+ | QSIG supplementary services | +-------------------------------------------------------------------+ The QSIG network differentiates between four different types of call transfers, two unassisted and two assisted. The type of invoked unassisted call transfer depends on the call state. The type of assisted call transfers depends on the type of the switching equipment Dialogic(R) Diva(R) interfaces as well. The coding of the messages and the type of the transfer invoked, depends on the QSIG dialect and on the vendor-specific implementation of QSIG dialect. +-------------------------------------------------------------------+ | QSIG abstraction | +-------------------------------------------------------------------+ Dialogic(R) Diva(R) System Release Software abstraction allows to write QSIG applications independent of the used QSIG dialect. Unassisted call transfer: The application can use CAPI call deflection. The Diva System Release software will automatically translate the call deflection request in the appropriate QSIG primitives. The translation depends on the Diva System Release software configuration and on the call state. You can invoke this feature in any call state, but the request may fail in case the used switching equipment does not support the required service. Assisted call transfer: The application can use CAPI Explicit Call Transfer (ECT). The Diva System Release software will automatically translate ECT in the appropriate QSIG primitive. The translation depends on the Diva System Release configuration. +-------------------------------------------------------------------+ | Conclusion | +-------------------------------------------------------------------+ If reviewed in short form, you can use any ETSI application with QSIG and without the need to change any code to access QSIG call transfers. There is no need to deal with details of the underlying network. The same is true not only for QSIG but for all supported signaling protocols. The same interface can be used to access basic and supplementary services for ETSI, QSIG, SS7 ISUP, 5ESS, R2, RBS/CAS, ... +-------------------------------------------------------------------+ | QSIG path replacement | +-------------------------------------------------------------------+ There are three parties involved in the path replacement procedure; The party that initiated the call (party A), the party that initially received and transferred the call (party B) and the party that finally received the call after the call transfer (party C). The goal of the call replacement procedure is to free switching equipment resources by the replacement of the chain A->B->C with chain A->C. To achieve this, party B will short cut the D-channel link between A and C and let A and C exchange D-channel messages. In most cases, party B will short cut the B-channel between A and C as well and preserve this connection until the path replacement is complete. If the path replacement will not proceed (not supported, ...), party B will preserve the D-channel and B-channel interconnections for the entire duration of the call. After party B completes the call transfer procedure, one transfer complete message will be sent (Diva System Release softwre configuration option) and will invoke the path replacement procedure (Diva System Release configuration option). As part of this procedure, party A will prepare an alternative resource and send information about this resource over the D-channel to C through B. After the information about the alternative resource is received, C will establish a new call directly from C to A and replace A->B->C by C->A (A->B->C still running in parallel). After the new connection is established, A and C will establish a new B-channel connection and will exchange D-channel messages over B and release connections A->B and B->C. After the release is complete, C->A is preserved during the duration of the call. The Diva System Release software supports all three parties A, B, and C in the above mentioned path replacement procedure. +-------------------------------------------------------------------+ | Support at party A and C endpoints | +-------------------------------------------------------------------+ The support at A and C endpoints is transparent to the applications. The Diva System Release software will replace one connection with another in a fully transparent way to the application. The data streaming between the application and the bearer resource will not be interrupted during this operation. Only one notification about the change of the B-channel and about the completion of the path replacement procedure is provided to the application but does not require any action from the application (in certain environments applications will use this notification to issue RESET_B3 REQ and restart the voice message if any. PBX applications do not need to perform any action). Please note that party C responds to the call replacement procedure only if the change of the connection is supported by the underlying protocol. This change is not possible if the fax or modem session is already in progress. In this case, C will ignore the path replacement and the chain A->B->C will be preserved for the entire duration of the call. The same is true if the path replacement procedure fails for any reason. The M-Board is required to provide the path replacement operation at A and B and it is responsible for moving the call between different connections transparently for application. The path replacement can be performed only between Dialogic(R) Diva(R) interfaces that belong to the same M-Board. +-------------------------------------------------------------------+ | Support at the party B endpoint | +-------------------------------------------------------------------+ Party B is the party that uses ECT to perform the assisted QSIG call transfer. The type of call transfer and the messages sent after the call transfer is completed are specified by the Diva System Release software configuration. The software detects if compatible QSIG dialects are used for both parties of ECT and will automatically establish the D-channel bridge. The application is responsible to establish the B-channel bridge. The best practice is to establish the B-channel bridge (using CAPI line interconnect command) before issuing the CAPI ECT command. The Dialogic(R) Diva(R) CAPI will atomatically maintain the D-channel bridge. If the M-Board is used at the party B endpoint, it is possible to activate "ECT Emulation". If active, the M-Board will automatically establish and maintain the B-channel and D-channel bridge once the ECT command is sent by the application. In this case, there is no need to maintain the B-channel bridge by the application. The M-Board will maintain all necessary resources until the path replacement procedure is completed or for the entire duration of the call. This option is available only for calls that belong to the same M-Board. +-------------------------------------------------------------------+ | Call state of involved in the ECT calls | +-------------------------------------------------------------------+ In case of QSIG, it is not necessary to put one of the calls, involved in the ECT, on hold. Moreover, it is possible to invoke the ECT if the consultation call is in alerted state (if supported by the switching equipment). To achieve this, independent from the state of the primary and of the consultation call operation of the ECT, it is necessary to set the CAPIECTPLCI variable to PLCI (getplci commang provides it in CAPIPLCI variable) of the primary call before invoking the ECT. Example: The application accepts one call, creates the consultation call and once the alert is received, the consultation call starts the playback of message on the first call. After an additional command is received, the application proceeds with ECT, independent from the state of the consultation call. It is even possible to play the message to the first call until the path replacement is completed and parties A and C are connected directly. ECT Example: ///////////////////////////////////////////////////////////////////// [macro-capiect] ; Activate suppressor of ambient noise for consultation call exten => s,1,capicommand(noisesuppressor|yes) ; Invoke ECT command exten => s,n,capicommand(ect) [isdn-in] ; Send progress message on incoming call 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 ; Play message to incoming call using early media mode exten => 12345,n,Playback(demo-enterkeywords,noanswer,us) ; Accept incoming call exten => 12345,n,Answer ; Activate suppressor of ambient noises for incoming call exten => 12345,n,capicommand(noisesuppressor|yes) ; Save PLCI of incoming call to CAPIPLCI variable exten => 12345,n,capicommand(getplci) ; Set CAPIECTPLCI variable to PLCI of incoming call ; and allow to export this variable to consultation call exten => 12345,n,Set(_CAPIECTPLCI=${CAPIPLCI}) ; Create consultation call and invoke ECT ; ECT procedure will detect CAPIECTPLCI is set and use saved in this variable value ; to identify the ECT party and invoke ECT independent from the state of the primary call exten => 12345,n,Dial(CAPI/ISDN1/100,10,M(capiect)) exten => 12345,n,Hangup() ///////////////////////////////////////////////////////////////////// ----------------------------------------------------- README.media ----------------------------------------------------- +===================================================================+ | Media control commands | +===================================================================+ +-------------------------------------------------------------------+ | noisesuppressor | +-------------------------------------------------------------------+ Description: Noise Suppressor is used to activate or to deactivate suppression of ambient noise, which can be used to remove noise from speech 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, it can be activated for multiple parties. Supported hardware: Dialogic(R) Diva(R) 4PRI PCI, 2PRI PCI, 4PRI PCIe HS Media Board Other Dialogic(R) Diva(R) Media Boards equipped with DSPs 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: Clamping is 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, it can be activated for multiple parties. Supported hardware: Requires one Dialogic(R) Diva(R) Media Board equipped with DSPs. Syntax: clamping|N N - estimated duration of DTMF tones to be suppressed in ms 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, it can be activated for multiple parties. Supported hardware: Requires one Diva Media Board equipped with DSPs. 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, it can be activated for multiple parties. Supported hardware: Requires one Diva Media Board equipped with DSPs. 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, it can be activated for multiple parties. Supported hardware: Requires one Diva Media Board equipped with DSPs. 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, it can be activated for multiple parties. Supported hardware: Requires one Diva Media Board equipped with DSPs. 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 control in the range from -127 dBm to +6 dBm. Diection: Applies to Tx path only. In case of line interconnect, it can be activated for multiple parties. Supported hardware: Requires one Diva Media Board equipped with DSPs. 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, it can be activated for multiple parties. Supported hardware: Requires one Diva Media Board equipped with DSPs. 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, it is possible to play (record) a voice message faster (rate > 8000 Hz) or slower (rate < 8000 Hz). This is useful if the playback speed of voice mail messages needs to be decreased to achieve better understanding or to increase playback speed to rewind over a certain part of the voice mail message. Diection: Applies to Rx and to Tx path. Can be used only for playback and for recording of voice data. Not available with line interconnect and RTP. Supported hardware: Requires one Diva Media Board equipped with DSPs. 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 the recording (Rx direction) and playback (Tx direction) rate in the range from 1250 ... 51200 Hz. With pitch control it is possible to play (record) a voice message faster (rate > 8000 Hz) or slower (rate < 8000 Hz). This is useful if the playback speed of voice mail messages needs to be decreased to achieve better understanding or to increase playback speed to rewind over a certain part of the 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 Diva Media Board equipped with DSPs. 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, it can be activated for multiple parties. Supported hardware: Requires one Diva Media Board equipped with DSPs. 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, it can be activated for multiple parties. Supported hardware: Requires one Diva Media Board equipped with DSPs. 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 Diva Media Board equipped with DSPs. 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, it can be activated for multiple parties. Supported hardware: Requires one Diva Media Board equipped with DSPs. Not available if RTP is active. Syntax: starttonedetection|N stoptonedetection N - Extension number to be used in case a tone is detected. The reception of appropriate DTMF digits will be simulated after the detection of the tone. At same time, the variable CAPIDETECTEDTONE will be set to identify the detected tone in decimal format and the variable CAPIDETECTEDTONEVISUAL will be set to a user friendly name of the 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 detection of tone s,n,capicommand(stoptonedetection) ; Disable detection of 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: While a voice message is played back, it is useful to be able to apply media control commands to the voice stream without interrupting the playback of the voice stream. The same is true for conference and for connection between two parties. The "vc" command allows to provide this functionality. With this command it is possible to bind arbitrary chan_capi commands to sequences of events (DTMF digits, ...). Once the events are detected, the appropriate command is executed without interrupting the voice stream. "vc" allows to create a menu that is executed in the background and allows to control the voice stream by activation or deactivation of AGC, noise suppression, control the level of the signal, and playback speed. "vc" allows to use any command supported by the channel driver, but please note that commands are not executed in the context of the dial plan. The commands are executed using the context of the detected events parallel to the dialplan and independent from the 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 a key that is already in use, then a new command will overwrite the existing command: 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) It is better to use only one digit as key for commands in menu if using the menu for IVR and voice mailbox. This provides short response time. In case the menu is used for conference or for connection between two parties, it may be useful to use two or three digits for the key. This will prevent an activation by accidentally pressing a key. 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 ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | chat (MeetMe/Conference) | +-------------------------------------------------------------------+ Description: Used to enter (create) chat (conference room). A new conference room is created if necessary. There are three types of conference members: Regular users Operators Listeners Regular users can receive the voice stream from the conference and send the voice stream to the conference. The outgoing (from user to conference) voice stream from regular users can be muted (deactivated) and unmuted (activated) if necessary by 'chat_mute' command. Operators can receive the voice stream from the conference and send the voice stream to the conference. The outgoing (from user to conference) voice stream from operators cannot be muted (deactivated) by 'chat_mute' command. Listeners can only receive the voice stream from the conference. The outgoing (from user to conference) voice stream is muted (decativated) and cannot be unmuted (activated) by the 'chat_mute' command. Direction: Creates one Any-to-Any conference room. Conference AGC (evaluation of active talker) receives active as soon as more then two members are added to the conference. Supported hardware: Diva Syntax: capicommand(chat|||controller) roomname - conference room name options m - The first caller will get music-on-hold until the second caller arrives h - Hangup after seconds if caller is alone in conference. l - The caller is listener (passive) conference member and cannot be unmuted by 'chat_mute' command o - The caller is conference operator and cannot be muted by 'chat_mute' command controller - CAPI controller Syntax example: exten => s,n,capicommand(chat|test|m|1) exten => s,n,capicommand(chat|test|m|1,3) exten => s,n,capicommand(chat|test|m|1-4) exten => s,n,capicommand(chat|test|m|1-4,7) exten => s,n,capicommand(chat|test|m|1-4,7-10) exten => s,n,capicommand(chat|test|mh300|1-4) 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, use to select conference room ; You can create macro to set up vc menu exten => 1,1,capicommand(clamping|100) ; Activate suppression of DTMF tones exten => 1,n,capicommand(vc|incrxdgain|0|1.5) ; Install voice command menu for volume control, '0' to increase volume exten => 1,n,capicommand(vc|incrxdgain|1|-1.5) ; Install voice command menu for volume control, '1' to decrease volume exten => 1,n,capicommand(vc|txdgain|2|-128) ; Install voice command menu for volume control, '2' to mute tx path exten => 1,n,capicommand(vc|txdgain|3|0) ; Install voice command menu for volume control, '3' to activate tx path exten => 1,n,capicommand(chat|test1|m|1-4) ; Create/enter conference room 'test1' exten => 2,1,capicommand(clamping|100) ; Activate suppression of DTMF tones exten => 2,n,capicommand(txdgain|-128) ; Deactivate tx path exten => 2,n,capicommand(vc|incrxdgain|0|1.5) ; Install voice command menu for volume control, '0' to increase volume exten => 2,n,capicommand(vc|incrxdgain|1|-1.5) ; Install voice command menu for volume control, '1' to decrease volume exten => 2,n,capicommand(vc|txdgain|2|-128) ; Install voice command menu for volume control, '2' to mute tx path exten => 2,n,capicommand(vc|txdgain|3|0) ; Install voice command menu for volume control, '3' to activate tx path exten => 2,n,capicommand(chat|test1|m|1-4) ; Create/enter conference room 'test1 exten => 2,n,capicommand(chat|test2|m|1-4) ; Create/enter conference room 'test2' exten => i,1,Playback(invalid) exten => i,n,Goto(s,restart) exten => h,1,Hangup ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | IP Clear Channel fax and chat (MeetMe/Conference) | | with access to DSP resources | +-------------------------------------------------------------------+ Description: Used to assign DSP resources to connected IP users. Assigned DSP resources can be used for: Transmission of Clear Channel fax with up to 33600Bps (V.34), please read 'sendfax' in README.Diva.fax for details. Reception of Clear Channel fax with up to 33600Bps (V.34), please read 'receivefax' in README.Diva.fax for details. Create conference member with media processing capabilities. If the conference member is connected to the IP network using 'chat' chan_capi command, then this peer cannot allocate and use the DSP resources required for media processing. This results in processing of IP partipiants as simple conferencing member without any media processing capabilities except line interconnect (conferencing) and conferencing AGC (active talker evaluation). With the 'resource' chan_capi command it is possible to assign DSP resources to the IP network connection before proceeding with 'chat' chan_capi command. This allows for using the provided DSP resources for media processing for the connected IP network conference members. There are three types of conference members: Regular users Operators Listeners Regular users can receive voice streams from the conference and send voice streams to the conference. The outgoing (from user to conference) voice stream from regular users can be muted (deactivated) and unmuted (activated) if necessary by 'chat_mute' command. Operators can receive voice streams from the conference and send voice streams to the conference. The outgoing (from user to conference) voice stream from operators cannot be muted (deactivated) by 'chat_mute' command. Listeners can only receive the voice stream from the conference. The outgoing (from user to conference) voice stream is muted (decativated) and cannot be unmuted (activated) by 'chat_mute' command. Note: Certain problems may occur if processing sent in-band DTMF events for IP connections. chan_diva can use sent in-band DTMF events to control media processing (chan_capi 'vc' command). This works without problems for E.1/T.1/S0/Analog connections. But in case of IP connections, the media stream is processed by the gateway or is originated by the IP device. Most of the gateways will remove in-band DTMF events from the media stream and forward detected DTMF events as RTP payloads. IP devices will not use in-band DTMF signaling and send DTMF events as RTP payloads. In both cases, DTMF events are not sent in-band and processed by signaling before reaching the chan_capi. The solution is to configure gateways and IP devices to send DTMF events in-band in addition to sending them as RTP payloads or use in-band MF signaling. Supported hardware: Assign DSP resources to connected IP network conference members. This feature is available only for Diva hardware equipped with DSPs. For Diva 2PRI PCI, Diva 4PRI PCI, Diva 1PRI PCIe HS, Diva 2PRI PCIe HS, and Diva 4PRI PCIe HS no restrictions apply for this feature and it is possible to access N x 30 DSP resources (N - amount of interfaces, 1 - 1PRI, 2 - 2PRI, 4 - 4PRI) in addition to used for E.1/T.1 DSP resources. For Diva PRI Rev.3 PCI and Diva PRI Rev.3 PCIe, it is possible to reserve two DSPs for processing of E.1/T.1 without media processing features and share remaining DSPs between E.1/T.1 and IP for connections with media processing features. Using hardware with 30 DSPs and E.1 it is possible to create: From: 2 x E.1 without media processing + 28 x E.1 with media processing To: 30 x E.1 without media processing + 28 x IP with media processing Using hardware with 30 DSPs and T.1 this is possible to create: From: 23 x T.1 with media processing + 7 x IP with media processing To: 23 x T.1 without media processing + 28 x IP with media processing For Diva BRI-2M Rev.2 PCI, Diva BRI-2M PCIe, Diva 4BRI Rev.2 PCI and for Diva 4BRI PCIe it is not possible to reserve DSPs for processing of ISDN connections and to share DSPs between ISDN and IP connection. If DSP resources are assigned to connected IP conference members, then the appropriate DSP resources receive not available for processing of ISDN connections. As result ISDN connections cannot be processed. To resolve this problem please use the Diva configuration to change the configuration of Diva board to resource board mode. In resource board mode, the ISDN interface is deactivated and all available DSP resources (two DSPs for Diva BRI-2M and eight DSPs for Diva 4BRI) can be used for connected IP conference members (two members for Diva BRI-2M and eight members for Diva 4BRI). Syntax: capicommand(ressource|controller) controller - CAPI controller Syntax example: exten => s,n,capicommand(resource|1) exten => s,n,capicommand(resource|1,3) exten => s,n,capicommand(resource|1-4) exten => s,n,capicommand(resource|1-4,7) exten => s,n,capicommand(resource|1-4,7-10) IVR example: ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer ; Answer the line exten => _X.,n,Goto(s,1) exten => s,1,capicommand(resource|1-4) ; Create DSP resource on CAPI controllers 1-4 for IP members, ; ignore command for E.1/T.1/S0/POTS members exten => s,n,capicommand(clamping|100) ; Activate suppression of DTMF tones exten => s,n,capicommand(rxagc|yes) ; Activate Rx AGC exten => s,n,capicommand(noisesuppressor|yes) ; Activate suppression of ambient noises exten => s,n,capicommand(vc|incrxdgain|0|1.5) ; Install voice command menu for volume control, '0' to increase volume exten => s,n,capicommand(vc|incrxdgain|1|-1.5) ; Install voice command menu for volume control, '1' to decrease volume exten => s,n,capicommand(vc|txdgain|2|-128) ; Install voice command menu for volume control, '2' to mute tx path exten => s,n,capicommand(vc|txdgain|3|0) ; Install voice command menu for volume control, '3' to activate tx path exten => s,n,capicommand(chat|test1|m|1-4) ; Craete/enter conference toom 'test1', controller field is ignored if ; media processing resource is assigned by 'resource' command or for ; E.1/T.1/S0/POTS members ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | chat_mute (Manage conference) | +-------------------------------------------------------------------+ Description: Used to manage chat (conference room). There are three types of conference members: Regular users Operators Listeners Regular users can receive the voice stream from the conference and send the voice stream to the conference. The outgoing (from user to conference) voice stream from regular users can be muted (deactivated) and unmuted (activated) if necessary by 'chat_mute' command. Operators can receive the voice stream from the conference and send the voice stream to the conference. The outgoing (from user to conference) voice stream from operators cannot be muted (deactivated) by 'chat_mute' command. Listeners can only receive the voice stream from the conference. The outgoing (from user to conference) voice stream is muted (decativated) and cannot be unmuted (activated) by 'chat_mute' command. 'chat_mute' command allows to manage conference switching of regular users between active (voice stream from user to conference is active and used in conference) and passive (voice stream from user to conference is deactivated and not used in conference) mode. 'chat_mute' command applies to regular users only. The state of operators and listeners is not changed by this commmand. Independent from changes to this command state, conference operators will remain active members and listeners will remain passive members of the conference. Direction: Used to control (deactivate and activate) the voice stream from regular users to the conference. Note: The voice stream of regular users is active by default. If the conference mode was changed to half duplex ('chat_mute|yes'), then new regular users are created with a deactivated voice stream until the conference mode is changed back to full duplex ('chat_mute|no') Supported hardware: Diva Syntax: capicommand(chat_mute|[|]) action - mandatory yes - Change conference mode to half duplex, deactivate voice stream from regular users to conference. no - Change conference mode back to full duplex, activate voice stream from regular users to conference. roomname - Conference room name. This parameter is necessary if a caller is not a member of the conference. It allows the control of the conference by one user, who not member of conference. Using this parameter, one user can control multiple conferences. This allows to implement the functionality of a common conference operator. Syntax example: exten => s,n,capicommand(chat_mute|yes) exten => s,n,capicommand(char_mute|no) exten => s,n,capicommand(chat_mute|yes|test_room) exten => s,n,capicommand(char_mute|no|test_room) Conference example: ///////////////////////////////////////////////////////////////////// [isdn-in] exten => 1291,1,Answer ; Accept call exten => 1291,n,capicommand(resource|1-4) ; assign resource PLCI if call from IP exten => 1291,n,capicommand(clamping|200) ; Activate DTMF suppression exten => 1291,n,capicommand(vc|chat_mute|0|yes) ; Voice command, key 0 - change to half duplex mode exten => 1291,n,capicommand(vc|chat_mute|1|no) ; Voice command, key 0 - change to full duplex mode exten => 1291,n,capicommand(chat|test_chat|mo|1-4) ; Add to conference as operator exten => 1291,n,Hangup() exten => 1292,1,Answer ; Accept call exten => 1292,n,capicommand(resource|1-4) ; Assign resource PLCI if call from IP exten => 1292,n,capicommand(clamping|200) ; Activate DTMF suppression exten => 1292,n,capicommand(chat|test_chat|m|1-4) ; Add to conference as regular user exten => 1292,n,Hangup() exten => 1293,1,Answer ; Accept call exten => 1293,n,capicommand(resource|1-4) ; Assign resource PLCI if call from IP exten => 1293,n,capicommand(clamping|200) ; Activate DTMF suppression exten => 1293,n,capicommand(chat|test_chat|ml|1-4) ; Add to conference as listener exten => 1293,n,Hangup() exten => _X.,1,Answer exten => _X.,n,Goto(s,1) exten => s,1,Wait(1) exten => s,n(restart),Playback(demo-instruct) exten => s,n,Goto(s,restart) exten => s,n,Hangup ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | chat_play (play message to Conference) | +-------------------------------------------------------------------+ Description: Used to play voice message to conference. Optionally music on hold is played to caller while message is played to conference. Direction: Message is played to all members of conference Supported hardware: Diva Syntax: capicommand(chat_play||||controller) roomname - conference room name options m - The caller will get music-on-hold while message is played s - The caller will hear the same message that is played filename - Voice message file name. Should be in aLaw (uLaw) format. controller - CAPI controller Syntax example: exten => s,n,capicommand(chat|test|m|/tmp/file.alaw|1) exten => s,n,capicommand(chat|test||/tmp/file.alaw|1-4,7-10) IVR example: ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer ; Answer the line exten => _X.,n,Goto(s,1) exten => s,1,capicommand(clamping|100) ; Activate suppression of DTMF tones exten => s,n,Playback(record-name) ; Ask for name exten => s,n,capicommand(rxagc|yes) ; Activate Rx AGC exten => s,n,Record(/tmp/${UNIQUEID}-info:alaw) ; Record message exten => s,n,capicommand(rxagc|no) ; Deactivate Rx AGC exten => s,n,capicommand(chat_play|test|m|/tmp/${UNIQUEID}-info.alaw|1-4) ; Play message to conference, ; play music on hold to caller exten => s,n,capicommand(chat|test|m|1-4) ; Create/enter conference room 'test' ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | chat_command (Command) | +-------------------------------------------------------------------+ Description: Used to send command to conference. Supported hardware: Diva Syntax: capicommand(chat_command||) options - mandatory r - Remove newest user from conference. Command does not apply to calling member and be used by operators only. l - Remove all listeners from conference. Command does not apply to calling member and be used by operators only. o - Remove all operators from conference. Command does not apply to calling member and be used by operators only. a - Remove all users from conference. Command does not apply to calling member and be used by operators only. roomname - optional, room caller assigned to is used if not present Syntax example: exten => s,n,capicommand(chat_command|r) exten => s,n,capicommand(chat_command|lo|test) exten => s,n,capicommand(chat_command|a|test) Conference example: ///////////////////////////////////////////////////////////////////// [isdn-in] exten => _X.,1,Answer exten => _X.,n,Authenticate(12345) exten => _X.,n,Playback(vm-rec-name) exten => _X.,n,Record(/tmp/name${UNIQUEID}.alaw,5,15) ; Record name exten => _X.,n,capicommand(chat_play|c1||/tmp/name${UNIQUEID}.alaw|1-4) ; Play name to conference exten => _X.,n,capicommand(resource|1-4) ; Create resource PLCI if call from IP exten => _X.,n,capicommand(clamping|200) ; Activate suppression of DTMF codes exten => _X.,n,capicommand(vc|chat_mute|1|yes) ; Voice command, key 1 - mute all members except operators exten => _X.,n,capicommand(vc|chat_mute|2|no) ; Voice command, key 2 - unmute all members except operators exten => _X.,n,capicommand(vc|chat_command|0|a|c1) ; Voice command, key 0 - remove all members from conference exten => _X.,n,capicommand(vc|noisesuppressor|3|yes) ; Voice command, key 3 - turn noise suppression on exten => _X.,n,capicommand(vc|noisesuppressor|4|no) ; Voice command, key 4 - turn noise suppression off exten => _X.,n,capicommand(chat|c1|mo|1-4) ; Add caller to conference as operator ///////////////////////////////////////////////////////////////////// +-------------------------------------------------------------------+ | echocancel | +-------------------------------------------------------------------+ Description: Used to activate or to deactivate echo cancellation in accordance with G.168. The vast majority of the public telephone system local loop wiring is done using two-wire connections whereby the same pair of wires carries voice signals in both directions. In the telephone company's central office or in an office PBX, a two-to-four wire conversion is done using a hybrid circuit. Hybrid circuits do not perform perfect impedance matches. The imperfection results in echo. The echo canceller's goal is to detect and remove echo as quickly and effectively, thereby minimizing any loss in voice quality due to the echo. The echo canceller must perform this function under all conditions including double-talk (when both parties are speaking at the same time) and in the presence of background noise. Furthermore, the echo canceller must not cause detriment to signaling tones (DTMF etc.) or fax and modem transmissions. Diva supports echo cancellation (in accordance G.168 with NLP) with tail length up to 256 ms. 256 ms tail length is required to ensure the operation in the environments where the signal is carried over the packet network. This is not always the case at customer site and can be done by the transit network, wich does not provide own echo cancellation capabilities. 'echocancelnlp' configuration parameter (capi.conf) is used to activate (deactivate) NLP (Non Linear Processor which removes the residual echo at the output of the echo cancellation unit). You can use Diva chan_capi configuration to change this capi.conf configuration parameter. The Diva software automatically deactivates echo cancellation upon the detection of fax or modem transmission. Direction: Aplies to TDM interface (E.1/T.1/S0) only Supported hardware: Diva Media Boards equipped with DSPs. Syntax: echocancel|yes,no Syntax example: s,n,capicommand(echocancel|yes) s,n,capicommand(echocancel|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(echocancel|yes) exten => 1,n,Goto(s,restart) exten => 2,1,capicommand(echocancel|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-capiechocancel] exten => s,1,capicommand(echocancel|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,capicommand(echocancel|yes) exten => 12345,n,Playback(demo-enterkeywords,noanswer,us) exten => 12345,n,Answer exten => 12345,n,Wait(2) exten => 12345,n,Dial(DIALOGICDIVA/ISDN1/100,10,M(capiechocancel)) exten => 12345,n,Hangup() ///////////////////////////////////////////////////////////////////// ----------------------------------------------------- README.qsig ----------------------------------------------------- chan_capi a Common ISDN API 2.0 implementation for Asterisk QSIG Extension for chan_capi Copyright (C) 2005-2007 Cytronics & Melware Armin Schindler Copyright (C) 2006-2007 Mario Goegel Mario Goegel This program is free software and may be modified and distributed under the terms of the GNU Public License. There is _NO_ warranty for this! Thanks go to the debuggers, bugfixers, and contributors :) =========================================================================== None yet - you will be welcome here :-) (...and all the others that have been forgotten...) :-) No support for Asterisk 1.0.x any more, you need at least Asterisk 1.2.x , 1.4.x or 1.6.x. What is QSIG ============= QSIG is a protocol extension for ISDN. It is mainly used on connecting PBXs of different PBX vendors, which allows better interoperability. As example there can be a name of an extension transferred between different PBXs, which is not possibile with standard ISDN. These extensions will be transmitted as encoded facility information elements. To use QSIG with Asterisk, you willll need a card such as a Dialogic(R) Diva(R) Media Board (BRI like PRI) that supports QSIG. Maybe others do also work, if so, let me now. The QSIG support includes: ========================== - Name presentation on Call SETUP incoming like outgoing - ISDN LEG INFO2 field - a message that delivers information about call diversions on incoming calls to Asterisk Data is stored in Asterisk variables: QSIG_LI2_DIVREASON Reason of divertion: 0 - unknown, 1 - unconditional, 2 - user busy, 3 - user no reply QSIG_LI2_ODIVREASON Reason of original divertion (like above) QSIG_LI2_DIVCOUNT divertion counter - how many divertions QSIG_LI2_DIVNUM diverting number QSIG_LI2_ODIVNUM original diverting number QSIG_LI2_DIVNAME diverting name QSIG_LI2_ODIVNAME original diverting name at the moment only incoming handling is supported - Possibility to inform QSIG switch about a call from the public network If you set the variable QSIG_SETUP=X, then the QSIG switch on the other side will know, that this call source is the public network - you will get a different ring tone, etc. In dialplan use: Set(__QSIG_SETUP=X) command. The leading "__" tells Asterisk, to export this variable to the outgoing channel and its subchannels - Simple Call Transfer With capicommand(qsig_ct|src-id|dst-id), you can transfer an inbound call back to the qsig switch. The B-channel of this call will be relased, so that the line is free for a next call. Unfortunately, the call will be completely released by the switch if the target is busy. If you need to know whether your target is busy, you can use the call transfer feature below. - Call Transfer (outgoing) You can do an outbound call transfer. First, you need the PLCI (logical channel ID) of your first channel. You can obtain it with capicommand(qsig_getplci). This command returns the channel ID in the variable QSIG_PLCI. Now, you can enable the call transfer feature. Simply add "Ct" to QSIG_SETUP (i.e., QSIG_SETUP="X/Ct${QSIG_PLCI}" ). On the next dial command the call will be automatically transferred. The transfer occurs after the CONNECT. If you want a transfer early on ringing, you may use "Ctr". Then the target user will get the information about the originating user, while his phone is ringing. If the external switch offers an path replacement propose, it will be taken automatically in account. The B-channels will be cleared by the switch after the call is conneced. Your channels stay free. - Automatic Call Transfer and Path Replacement (if allowed/possible) on bridge/line interconnect If a line interconnect is set up from Asterisk, chan_capi sends an Call Transfer facility out and waits for an Path Replacement Propose message - if no Path Replacement is received, the line interconnect will proceed. The Call Transfer allows your connected extensions in every case (if the switch supports the Call Transfer feature) to see the name and number of its connected peer. This should be configurable in the next release. - decoding of incoming Call Transfer feature Enables inbound Path Replacement. If received, an automatic Path Replacement with Asterisk internal bridging will be fired. - Support for sending CalledName If in the dialplan a variable CALLEDNAME was set, it will be sent out to the switch, while the Asterisk extension is ringing. - Support for sending ConnectedName If in the dialplan a variable CONNECTEDNAME was set, it will be sent out to the switch AFTER connection is answered by asterisk Future Targets: =============== - check code for buffer overflows - complete path replacement features - Call Rerouting feature [ECMA-174] - CCBS - AOC - sendtext implementation (e.g., display instructions on the connected set) - ... How to use: =========== You will find more documentation at the chan_capi wiki. Please visit: http://www.melware.org/ChanCapiConf Simply enable QSIG with the following line in your capi.conf interface: Here we go with new configuration Set QSIG to one of the following values, which corresponds to your configuration. 0 QSIG turned off 1 Alcatel (4400 & Enterprise - Maybe OXO/4200) ECMA (wrongly named ECMA - it is ETSI) variant 2 Siemens HiPath 4000 ECMAV2 & Alcatel 4400/Enterprise in ISO mode ToDo List: ========== - Support for inbound rerouting - Enhance ASN1-97 Addressing Data Elements support - will save much code - Allow/Disallow Path Replacement within capi.conf - partially done