HT-TAPI Hyper-Text Telephony API and http file format plugin This module provides an HTTP based Telephony API using a standard FreeSWITCH application interface as well as a cached http file format interface. The file format plugin can be used like this: This syntax is valid anywhere a filename parameter is requested in FreeSWITCH. The application is called like this: The target url is expected to be a CGI returning text/xml using the documentation below. The format is roughly as described below (We could use a DTD maybe). someval someval <...> The profile name must be chosen to bind to a preset series of settings and permissions to use as a basis for the client session. It's chosen from the specified params or from the channel variable using the keyname 'httapi_profile' and if not specified will default to 'default' Any params specified in the initial data of the application encased in brackets {} will be parsed into the initial params similar to originate. These params remain set until the call ends and are supplied as form elements on each hit to the HTTP server. If the permissions allow, a tag is parsed from the resulting document and set into this data set and will be mirrored back on subsequqent http posts. Also if the permissions allow a tag is parsed the same way setting channel variables. The tag is required and contains one or more of the supported command tags that generally manipulate the call behaviour. The application will continue to do the task in the work section until an error is encoutered or when an action from the work tag warrants it. If the session exits the httapi app without hanging up it can do other tasks and make another call to httapi and the session data will remain preserved. EXAMPLE: ~\d+# BINDINGS Several of the work tags that indicate they support bindings can contain one of more bind tags that function with similar fashion to bind_digit_action *EXPR* ATTRS: action : a specific url to go to next if the binding is dialed strip : a character to strip from in the result such as # WORK TAGS: *ACTIONS* *EXPR* : Plays a file and optionally collects input. ATTRS: file : The file name : Param name to save result. error-file : Error file to play on invalid input. action : Change the new target url. temp-action : Change url to submit to. just for the next loop. digit-timeout : Timeout waiting for digits after file plays (when input bindings are present) input-timeout : Timeout waiting for more digits in a multi-digit input. loops : max times to play the file when input bindings are present. asr-engine : ASR engine to use asr-grammar : ASR grammar to use *EXPR* : Plays a vm name and optionally collects input. ATTRS: file : The file name : Param name to save result. error-file : Error file to play on invalid input. action : Change the new target url. temp-action : Change url to submit to. just for the next loop. digit-timeout : Timeout waiting for digits after file plays (when input bindings are present) input-timeout : Timeout waiting for more digits in a multi-digit input. loops : max times to play the file when input bindings are present. *EXPR* : Records a file, optionally collects input and posts the file back to the target url. ATTRS: file : The file name : Param name to save result. error-file : Error file to play on invalid input. action : Change the new target url. temp-action : Change url to submit to. just for the next loop. digit-timeout : Timeout waiting for digits after file plays (when input bindings are present) input-timeout : Timeout waiting for more digits in a multi-digit input. *EXPR* : Waits for input for a specific amount of time. ATTRS: milliseconds : Number of milliseconds to pause name : Param name to save result. error-file : Error file to play on invalid input. action : Change the new target url. temp-action : Change url to submit to. just for the next loop. digit-timeout : Timeout waiting for digits after file plays (when input bindings are present) input-timeout : Timeout waiting for more digits in a multi-digit input. loops : max times to play the file when input bindings are present. *EXPR* : Read Text to Speech with optional input. ATTRS: file : The file name : Param name to save result. error-file : Error file to play on invalid input. action : Change the new target url. temp-action : Change url to submit to. just for the next loop. digit-timeout : Timeout waiting for digits after file plays (when input bindings are present) input-timeout : Timeout waiting for more digits in a multi-digit input. loops : max times to play the file when input bindings are present. engine : tts engine to use. voice : tts voice to use. *EXPR* : Use the FS say engine to iterate sounds to similate a human speaker. ATTRS: file : The file name : Param name to save result. error-file : Error file to play on invalid input. action : Change the new target url. temp-action : Change url to submit to. just for the next loop. digit-timeout : Timeout waiting for digits after file plays (when input bindings are present) input-timeout : Timeout waiting for more digits in a multi-digit input. loops : max times to play the file when input bindings are present. language : language type : type (fs param) method : method (fs param) gender : gender (fs param) *DATA* : Execute a FreeSWITCH app. ATTRS: application : The app to run action : Change url to submit to. temp-action : Change url to submit to. just for the next loop. data : Alternate source for app data *DATA* : The app data DATA : Send a SMS message. ATTRS: to : The dest number action : Change url to submit to. temp-action : Change url to submit to. just for the next loop. *DATA* : The message data *DATA* : Place an outbound call or transfer. ATTRS: context : Dialplan context. dialplan : Dialplan dialplan. caller-id-name : Caller ID Name. caller-id-number : Caller ID Number. action : Change url to submit to. temp-action : Change url to submit to. just for the next loop. *DATA* : Number to dial or originate string : begin recording the call. The file will be posted when the call ends. ATTRS: limit : Timeout in seconds. name : Name to use for input values. action : URL action to use. temp-action : Change url to submit to. just for the next loop. : Start a conference call. ATTRS: profile : Conference profile to use. action : Change url to submit to. temp-action : Change url to submit to. just for the next loop. : Answer the call ATTRS: is-conference : true|false (set the conference flag for RFC4579 stuff. : Hangup the call ATTRS: cause : Hangup cause action : Change url to submit to. temp-action : Change url to submit to. just for the next loop. : Exit the httapi application and continue in the dialplan. : Write a log line to fs_cli, console, logs, etc. ATTRS: level : The log level to use. clean : If true do not print log prefix. action : Change url to submit to. temp-action : Change url to submit to. just for the next loop. : Just continue (no-op) ATTRS: action : Change url to submit to. temp-action : Change url to submit to. just for the next loop. : Get a Channel variable (depends on permissions) ATTRS: action : Change url to submit to. temp-action : Change url to submit to. just for the next loop. permanent : Add as a permanent param or just once. : Call the voicemail app without requiring "execute" permissions ATTRS: action : Change url to submit to. temp-action : Change url to submit to. just for the next loop. check : true to check (omit to leave) auth-only : authenticate only and move on profile : profile name to use (omit for "default") domain : domain to use (omit for global domain variable) id : id to use (omit to prompt for id) CONFIGURATION: : debug : false Print debug data file-cache-ttl : 300 How long to wait before checking the server to see if audio file has changed. Whichever is smaller that or the max-age returned by the server (if present). abs-file-cache-ttl : 0 Force the cache time no matter what anything else says. file-not-found-expires : 300 How long to still preserve cached audio files that are not found by the server. : CREATE NEW PROFILE TO REFERENCE BY NAME gateway-url : "" Initial URL to connect to. gateway-credentials : "" HTTP credentials. auth-scheme : basic auth scheme to use. [basic|digest|NTLM|GSS-NEGOTIATE|any] disable-100-continue : true Disable the 100 continue feature. method : "" METHOD name to send. timeout : 0 Timeout waiting for response. enable-cacert-check : false Check CA/CERT. ssl-cert-path : "" path to file. ssl-key-path : "" path to file. ssl-key-password : "" password to use. ssl-version : "" ssl version ssl-cacert-file : "" CA/CERT file. enable-ssl-verifyhost : "" Verify ssl host. cookie-file : "" Path to file to use for cookie. enable-post-var : "" Specify specifc param names ok to send. bind-local : "" Interface to bind to. default-profile : default Profile to use when not specified. user-agent : mod_httapi/1.0 User Agent header value. : * = default *set-params : tag can be parsed for session params. set-vars : tag can be parsed to set channel vars. extended-data : Extended data is sent like full channel event data. execute-apps : tag is enabled to execute apps. expand-vars : Allow expansion of FS ${variables}. (this opens up all FSAPI calls) *dial : tag is enabled allowing outbound dialing. dial-set-context : context attribute is permitted. dial-set-dialplan : dialplan attribute is permitted. dial-set-cid-name : cid_name attribute is permitted. dial-set-cid-number : cid_number attribute is permitted. dial-full-originate : full originate syntax is permitted instead of just a number. *conference : tag is enabled allowing creation of conferences. conference-set-profile : attribure is permitted. all : all permissions are set none : no permissions are set