Functions to encode & decode text based protocol of freeswitch ESL.
Functions to encode & decode text based protocol of freeswitch ESL.
(decode data)
Extract first message from the data. Returns both the decoded message and rest of the data in a vector. If no message could be decoded, message is nil.
Extract first message from the data. Returns both the decoded message and rest of the data in a vector. If no message could be decoded, message is nil.
(decode-all data)
Extract all messages from the given string data. Also returns rest of the data.
Extract all messages from the given string data. Also returns rest of the data.
(decode-envelope-headers data)
Decode an envelope-header section from incoming message into a map.
Decode an envelope-header section from incoming message into a map.
(decode-headers data)
Decode a header section from incoming message into a map.
Decode a header section from incoming message into a map.
(encode cmd-line cmd-hdrs cmd-body)
Encode an outgoing message.
Encode an outgoing message.
(encode-headers hdrs)
Encode a header-map for outgoing message.
Encode a header-map for outgoing message.
(parse-api-response {:keys [envelope-headers envelope-content] :as msg})
Parse an 'api/response' message.
Parse an 'api/response' message.
(parse-bgapi-response {:keys [body] :as event})
Parse result from an event generated by a 'bgapi' request.
Parse result from an event generated by a 'bgapi' request.
(parse-command-reply {:keys [envelope-headers envelope-content] :as msg})
Parse a 'command/reply' message.
Parse a 'command/reply' message.
Extract events from messages with content-type 'text/event-*'.
Extract events from messages with content-type 'text/event-*'.
(url-decode text)
Decode only percent encoded chars from a string.
Decode only percent encoded chars from a string.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close