The voipms Reference Manual

This is the voipms Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 15:51:22 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 voipms

Common Lisp HTTP api client to the voip.ms api.

Author

Ernesto Alfonso <>

License

BSD

Dependencies
  • erjoalgo-webutil (system).
  • local-time (system).
  • cl-date-time-parser (system).
Source

voipms.asd.

Child Component

voipms.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 voipms/voipms.asd

Source

voipms.asd.

Parent Component

voipms (system).

ASDF Systems

voipms.


3.1.2 voipms/voipms.lisp

Source

voipms.asd.

Parent Component

voipms (system).

Packages

voipms.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 voipms

Source

voipms.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *auth*
Package

voipms.

Source

voipms.lisp.

Special Variable: *fordbidden-phone-numbers*
Package

voipms.

Source

voipms.lisp.

Special Variable: +local-time-timestring-format+

The LOCAL-TIME::FORMAT-TIMESTRING format that the voip.ms API expects in date parameters.

Package

voipms.

Source

voipms.lisp.


5.1.2 Ordinary functions

Function: current-did-for-account (account-name)
Package

voipms.

Source

voipms.lisp.

Function: date-n-days-ago (days)

Returns a date string n DAYS in the past.

Useful as the FROM (date) parameter in various api, e.g. getSMS which defaults FROM to today.

Package

voipms.

Source

voipms.lisp.

Function: get-dids-info (auth &key client did)

voip.ms api call for getDIDsInfo. Supports the query parameters: (CLIENT DID).

Package

voipms.

Source

voipms.lisp.

Function: get-sms (auth &key from to contact did limit type sms)

voip.ms api call for getSMS. Supports the query parameters: (FROM TO CONTACT DID LIMIT TYPE SMS).

Package

voipms.

Source

voipms.lisp.

Function: get-sms-messages (phone &key max-days-ago)
Package

voipms.

Source

voipms.lisp.

Function: init-auth-from-env ()
Package

voipms.

Source

voipms.lisp.

Function: make-voipms-auth (&key username password)
Package

voipms.

Source

voipms.lisp.

Function: request (auth method &optional qparams no-error allowed-statuses)

Makes an HTTP request to the voip.ms API.

AUTH is an VOIPMS-AUTH struct specifying credentials.
METHOD is the voip.ms api method.
QPARAMS is an alist of query parameters.

If NO-ERROR is non-nil, no error is raised on non-success statuses. If ALLOWED-STATUSES is non-nil, no error is raised on any non-success statuses contained in this list.

For API docs, see https://voip.ms/m/apidocs.php.

Package

voipms.

Source

voipms.lisp.

Function: sanitize-phone-number (phone)
Package

voipms.

Source

voipms.lisp.

Function: send-sms (auth &key did dst message)

voip.ms api call for sendSMS. Supports the query parameters: (DID DST MESSAGE).

Package

voipms.

Source

voipms.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: base-url
Package

voipms.

Source

voipms.lisp.


5.2.2 Macros

Macro: def-endpoint (name method params &key allowed-statuses)

Define a function NAME which makes a request to the voip.ms api

with the given METHOD and query parameters.

ALLOWED-STATUSES
specifies a list of non-success statuses returned by the API to be considered non-errors.

Package

voipms.

Source

voipms.lisp.


5.2.3 Ordinary functions

Function: alist-get (key alist)
Package

voipms.

Source

voipms.lisp.

Function: cancel-did (auth &key did cancelcomment portout test)

voip.ms api call for cancelDID. Supports the query parameters: (DID CANCELCOMMENT PORTOUT TEST).

Package

voipms.

Source

voipms.lisp.

Function: copy-sms (instance)
Package

voipms.

Source

voipms.lisp.

Function: copy-voipms-auth (instance)
Package

voipms.

Source

voipms.lisp.

Function: create-sub-account (auth &key username protocol description auth_type password device_type lock_international international_route music_on_hold dtmf_mode nat ip callerid_number canada_routing allow225 language record_calls allowed_codecs sip_traffic max_expiry rtp_timeout rtp_hold_timeout ip_restriction enable_ip_restriction pop_restriction enable_pop_restriction send_bye transcribe transcription_locale transcription_email internal_extension internal_voicemail internal_dialtime reseller_client reseller_package reseller_nextbilling reseller_chargesetup parking_lot)

voip.ms api call for createSubAccount. Supports the query parameters: (USERNAME PROTOCOL DESCRIPTION AUTH_TYPE PASSWORD DEVICE_TYPE LOCK_INTERNATIONAL INTERNATIONAL_ROUTE MUSIC_ON_HOLD DTMF_MODE
NAT IP CALLERID_NUMBER CANADA_ROUTING ALLOW225 LANGUAGE RECORD_CALLS ALLOWED_CODECS SIP_TRAFFIC MAX_EXPIRY RTP_TIMEOUT RTP_HOLD_TIMEOUT IP_RESTRICTION ENABLE_IP_RESTRICTION POP_RESTRICTION ENABLE_POP_RESTRICTION SEND_BYE TRANSCRIBE TRANSCRIPTION_LOCALE TRANSCRIPTION_EMAIL INTERNAL_EXTENSION INTERNAL_VOICEMAIL INTERNAL_DIALTIME RESELLER_CLIENT RESELLER_PACKAGE RESELLER_NEXTBILLING RESELLER_CHARGESETUP PARKING_LOT).

Package

voipms.

Source

voipms.lisp.

Function: get-allowed-codecs (auth &key)

voip.ms api call for getAllowedCodecs. Supports the query parameters: NIL.

Package

voipms.

Source

voipms.lisp.

Function: get-auth-types (auth &key)

voip.ms api call for getAuthTypes. Supports the query parameters: NIL.

Package

voipms.

Source

voipms.lisp.

Function: get-device-types (auth &key)

voip.ms api call for getDeviceTypes. Supports the query parameters: NIL.

Package

voipms.

Source

voipms.lisp.

Function: get-dids-usa (auth &key state ratecenter)

voip.ms api call for getDIDsUSA. Supports the query parameters: (STATE RATECENTER).

Package

voipms.

Source

voipms.lisp.

Function: get-dtmf-modes (auth &key)

voip.ms api call for getDTMFModes. Supports the query parameters: NIL.

Package

voipms.

Source

voipms.lisp.

Function: get-lock-international (auth &key)

voip.ms api call for getLockInternational. Supports the query parameters: NIL.

Package

voipms.

Source

voipms.lisp.

Function: get-music-on-hold (auth &key)

voip.ms api call for getMusicOnHold. Supports the query parameters: NIL.

Package

voipms.

Source

voipms.lisp.

Function: get-nat (auth &key)

voip.ms api call for getNAT. Supports the query parameters: NIL.

Package

voipms.

Source

voipms.lisp.

Function: get-protocols (auth &key)

voip.ms api call for getProtocols. Supports the query parameters: NIL.

Package

voipms.

Source

voipms.lisp.

Function: get-rate-centers-usa (auth &key state)

voip.ms api call for getRateCentersUSA. Supports the query parameters: (STATE).

Package

voipms.

Source

voipms.lisp.

Function: get-ring-groups (auth &key ring_group)

voip.ms api call for getRingGroups. Supports the query parameters: (RING_GROUP).

Package

voipms.

Source

voipms.lisp.

Function: get-routes (auth &key)

voip.ms api call for getRoutes. Supports the query parameters: NIL.

Package

voipms.

Source

voipms.lisp.

Function: get-servers-info (auth &key server_pop)

voip.ms api call for getServersInfo. Supports the query parameters: (SERVER_POP).

Package

voipms.

Source

voipms.lisp.

Function: get-sub-accounts (auth &key account)

voip.ms api call for getSubAccounts. Supports the query parameters: (ACCOUNT).

Package

voipms.

Source

voipms.lisp.

Function: make-sms (&key message from to timestamp id)
Package

voipms.

Source

voipms.lisp.

Function: order-did (auth &key did routing failover_busy failover_unreachable failover_noanswer voicemail pop dialtime cnam callerid_prefix note billing_type account monthly setup minute test)

voip.ms api call for orderDID. Supports the query parameters: (DID ROUTING FAILOVER_BUSY FAILOVER_UNREACHABLE FAILOVER_NOANSWER VOICEMAIL POP DIALTIME CNAM CALLERID_PREFIX NOTE BILLING_TYPE ACCOUNT MONTHLY SETUP MINUTE TEST).

Package

voipms.

Source

voipms.lisp.

Function: send-mms (auth &key did dst message media1 media2 media3)

voip.ms api call for sendMMS. Supports the query parameters: (DID DST MESSAGE MEDIA1 MEDIA2 MEDIA3).

Package

voipms.

Source

voipms.lisp.

Function: set-sms (auth &key did enable email_enabled email_address sms_forward_enable sms_forward url_callback_enable url_callback_retry url_callback smpp_enabled smpp_url smpp_user smpp_pass)

voip.ms api call for setSMS. Supports the query parameters: (DID ENABLE EMAIL_ENABLED EMAIL_ADDRESS SMS_FORWARD_ENABLE SMS_FORWARD URL_CALLBACK_ENABLE URL_CALLBACK_RETRY URL_CALLBACK SMPP_ENABLED SMPP_URL SMPP_USER SMPP_PASS).

Package

voipms.

Source

voipms.lisp.

Function: set-sub-account (auth &key id description auth_type password ip device_type callerid_number canada_routing lock_international international_route music_on_hold language record_calls allowed_codecs dtmf_mode nat sip_traffic max_expiry rtp_timeout rtp_hold_timeout ip_restriction enable_ip_restriction pop_restriction enable_pop_restriction send_bye internal_extension internal_voicemail internal_dialtime reseller_client reseller_package reseller_nextbilling reseller_chargesetup)

voip.ms api call for setSubAccount. Supports the query parameters: (ID DESCRIPTION AUTH_TYPE
PASSWORD IP DEVICE_TYPE CALLERID_NUMBER CANADA_ROUTING LOCK_INTERNATIONAL INTERNATIONAL_ROUTE MUSIC_ON_HOLD LANGUAGE RECORD_CALLS ALLOWED_CODECS DTMF_MODE NAT SIP_TRAFFIC MAX_EXPIRY RTP_TIMEOUT RTP_HOLD_TIMEOUT IP_RESTRICTION ENABLE_IP_RESTRICTION POP_RESTRICTION ENABLE_POP_RESTRICTION SEND_BYE INTERNAL_EXTENSION INTERNAL_VOICEMAIL INTERNAL_DIALTIME RESELLER_CLIENT RESELLER_PACKAGE RESELLER_NEXTBILLING RESELLER_CHARGESETUP).

Package

voipms.

Source

voipms.lisp.

Function: set-sub-account-sparse (auth account-name &rest args &key id description auth-type password ip device-type callerid-number canada-routing lock-international international-route music-on-hold language record-calls allowed-codecs dtmf-mode nat sip-traffic max-expiry rtp-timeout rtp-hold-timeout ip-restriction enable-ip-restriction pop-restriction enable-pop-restriction send-bye internal-extension internal-voicemail internal-dialtime reseller-client reseller-package reseller-nextbilling reseller-chargesetup)
Package

voipms.

Source

voipms.lisp.

Reader: sms-from (instance)
Writer: (setf sms-from) (instance)
Package

voipms.

Source

voipms.lisp.

Target Slot

from.

Reader: sms-id (instance)
Writer: (setf sms-id) (instance)
Package

voipms.

Source

voipms.lisp.

Target Slot

id.

Reader: sms-message (instance)
Writer: (setf sms-message) (instance)
Package

voipms.

Source

voipms.lisp.

Target Slot

message.

Function: sms-p (object)
Package

voipms.

Source

voipms.lisp.

Reader: sms-timestamp (instance)
Writer: (setf sms-timestamp) (instance)
Package

voipms.

Source

voipms.lisp.

Target Slot

timestamp.

Reader: sms-to (instance)
Writer: (setf sms-to) (instance)
Package

voipms.

Source

voipms.lisp.

Target Slot

to.

Function: voipms-auth-p (object)
Package

voipms.

Source

voipms.lisp.

Reader: voipms-auth-password (instance)
Writer: (setf voipms-auth-password) (instance)
Package

voipms.

Source

voipms.lisp.

Target Slot

password.

Reader: voipms-auth-username (instance)
Writer: (setf voipms-auth-username) (instance)
Package

voipms.

Source

voipms.lisp.

Target Slot

username.


5.2.4 Structures

Structure: sms
Package

voipms.

Source

voipms.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: message
Readers

sms-message.

Writers

(setf sms-message).

Slot: from
Readers

sms-from.

Writers

(setf sms-from).

Slot: to
Readers

sms-to.

Writers

(setf sms-to).

Slot: timestamp
Readers

sms-timestamp.

Writers

(setf sms-timestamp).

Slot: id
Readers

sms-id.

Writers

(setf sms-id).

Structure: voipms-auth
Package

voipms.

Source

voipms.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: username
Readers

voipms-auth-username.

Writers

(setf voipms-auth-username).

Slot: password
Readers

voipms-auth-password.

Writers

(setf voipms-auth-password).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   C   D   F   G   I   M   O   R   S   V  
Index Entry  Section

(
(setf sms-from): Private ordinary functions
(setf sms-id): Private ordinary functions
(setf sms-message): Private ordinary functions
(setf sms-timestamp): Private ordinary functions
(setf sms-to): Private ordinary functions
(setf voipms-auth-password): Private ordinary functions
(setf voipms-auth-username): Private ordinary functions

A
alist-get: Private ordinary functions

C
cancel-did: Private ordinary functions
copy-sms: Private ordinary functions
copy-voipms-auth: Private ordinary functions
create-sub-account: Private ordinary functions
current-did-for-account: Public ordinary functions

D
date-n-days-ago: Public ordinary functions
def-endpoint: Private macros

F
Function, (setf sms-from): Private ordinary functions
Function, (setf sms-id): Private ordinary functions
Function, (setf sms-message): Private ordinary functions
Function, (setf sms-timestamp): Private ordinary functions
Function, (setf sms-to): Private ordinary functions
Function, (setf voipms-auth-password): Private ordinary functions
Function, (setf voipms-auth-username): Private ordinary functions
Function, alist-get: Private ordinary functions
Function, cancel-did: Private ordinary functions
Function, copy-sms: Private ordinary functions
Function, copy-voipms-auth: Private ordinary functions
Function, create-sub-account: Private ordinary functions
Function, current-did-for-account: Public ordinary functions
Function, date-n-days-ago: Public ordinary functions
Function, get-allowed-codecs: Private ordinary functions
Function, get-auth-types: Private ordinary functions
Function, get-device-types: Private ordinary functions
Function, get-dids-info: Public ordinary functions
Function, get-dids-usa: Private ordinary functions
Function, get-dtmf-modes: Private ordinary functions
Function, get-lock-international: Private ordinary functions
Function, get-music-on-hold: Private ordinary functions
Function, get-nat: Private ordinary functions
Function, get-protocols: Private ordinary functions
Function, get-rate-centers-usa: Private ordinary functions
Function, get-ring-groups: Private ordinary functions
Function, get-routes: Private ordinary functions
Function, get-servers-info: Private ordinary functions
Function, get-sms: Public ordinary functions
Function, get-sms-messages: Public ordinary functions
Function, get-sub-accounts: Private ordinary functions
Function, init-auth-from-env: Public ordinary functions
Function, make-sms: Private ordinary functions
Function, make-voipms-auth: Public ordinary functions
Function, order-did: Private ordinary functions
Function, request: Public ordinary functions
Function, sanitize-phone-number: Public ordinary functions
Function, send-mms: Private ordinary functions
Function, send-sms: Public ordinary functions
Function, set-sms: Private ordinary functions
Function, set-sub-account: Private ordinary functions
Function, set-sub-account-sparse: Private ordinary functions
Function, sms-from: Private ordinary functions
Function, sms-id: Private ordinary functions
Function, sms-message: Private ordinary functions
Function, sms-p: Private ordinary functions
Function, sms-timestamp: Private ordinary functions
Function, sms-to: Private ordinary functions
Function, voipms-auth-p: Private ordinary functions
Function, voipms-auth-password: Private ordinary functions
Function, voipms-auth-username: Private ordinary functions

G
get-allowed-codecs: Private ordinary functions
get-auth-types: Private ordinary functions
get-device-types: Private ordinary functions
get-dids-info: Public ordinary functions
get-dids-usa: Private ordinary functions
get-dtmf-modes: Private ordinary functions
get-lock-international: Private ordinary functions
get-music-on-hold: Private ordinary functions
get-nat: Private ordinary functions
get-protocols: Private ordinary functions
get-rate-centers-usa: Private ordinary functions
get-ring-groups: Private ordinary functions
get-routes: Private ordinary functions
get-servers-info: Private ordinary functions
get-sms: Public ordinary functions
get-sms-messages: Public ordinary functions
get-sub-accounts: Private ordinary functions

I
init-auth-from-env: Public ordinary functions

M
Macro, def-endpoint: Private macros
make-sms: Private ordinary functions
make-voipms-auth: Public ordinary functions

O
order-did: Private ordinary functions

R
request: Public ordinary functions

S
sanitize-phone-number: Public ordinary functions
send-mms: Private ordinary functions
send-sms: Public ordinary functions
set-sms: Private ordinary functions
set-sub-account: Private ordinary functions
set-sub-account-sparse: Private ordinary functions
sms-from: Private ordinary functions
sms-id: Private ordinary functions
sms-message: Private ordinary functions
sms-p: Private ordinary functions
sms-timestamp: Private ordinary functions
sms-to: Private ordinary functions

V
voipms-auth-p: Private ordinary functions
voipms-auth-password: Private ordinary functions
voipms-auth-username: Private ordinary functions