úÎ2M/m'      !"#$%&7 '  DTMF digits ()*+,-./ convert a   to its ASCII representation convert a list of  s into a quoted string. 7 The quoted string format is used by many AGI commands convert a list of  s to an 0. 1 Will fail if the list is empty or contains * or # /Top-level wrapper for single-shot AGI scripts.  Example:  main = run yourAGI Ignore(Top-level for long running AGI scripts.  Example:   main = fastAGI Nothing yourAGI8You should be sure to compile with -threaded. Note that yourAGI E may be running simultaneously in multiple threads, so you will need + some concurrency control for shared data.  TODO: support a hang-up handler 2 TODO: ability to listen on a specific IP address PrunInternal - run an AGI script using the supplied Handles for input and output You probably want  or . This function is exposed so C that 3rd party libraries such as HAppS can easily add support for  FastAGI support. bTODO: support general method of handling extra arguments (query_string vs command-line arguments) 1-send an AGI Command, and return the Response )this function provides the low-level send/receive functionality. ( channel if not already in answer state "True on success, False on failure hangUp the specified channel 7channel to hangup, or current channel if not specified !*play a file and return and digits pressed  See also: % file to stream /timout in ms after keypress (default: 2000 ms) max 6Nothing on failure, Just (digits, timeout) on success "record channel to a file record to this file |GSM | WAV| 1stop recording if one of these digits is entered 7maximum record time in milliseconds, -1 for no timeout offset samples %beep to indicate recording has begun 6stop recording if this many seconds of silence passes exit condition, endpos=offset #say the given digit string digits to say digits which can stop playback 6Nothing on error, Just Nothing on success. Just (Just  digit) if interrupted. $$ says the specified number number to say 1return early if any of these digits are received 8Nothing on failure, Just Nothing on success, Just (Just  digit) if key is pressed %Dplayback the specified file, can be interupted by the given digits.  See also: ! file to stream escape digits sample offset On failure: Left  endpos". On success: Right (Maybe Digit,  endpos) &+wait for channel to receive a DTMF digit.  See also: ! for multiple digits 2timeout in milliseconds, -1 to block indefinitely ;|Nothing| on error, |Just Nothing| on timeout, |Just (Just  digit)| on success 2parse 0 as True, -1 as failure 3parse ' 200 result=' 4parse a block of zero or more ' ' and '\t' characters (but not '\n') 567'  !"#$%&'    !#$%&"'    !"#$%&8      !"#$%&'()*+,,-./0123456789:AGI-1.3 Network.AGI RecordResult RandomErrorTimeout InterruptedHangUpFailureOnWaitForFailureToWrite SoundTypeGSMWAVDigitNineEightSevenSixFiveFourThreeTwoOneZeroStarPoundAGIppDigitppEscapeDigitsdigitsToIntegerrunfastAGI runInternalsendRecvanswerhangUpgetDatarecord sayDigits sayNumber streamFile waitForDigitCommandAGITrunAGITAGIEnvagiVarsagiInHagiOutH integer-gmpGHC.Integer.TypeInteger readAgiVarspSuccessFailurepResultpSpacepDigit pAsciiDigitpEndPos