Skip to content

Instantly share code, notes, and snippets.

@multitel
Last active March 5, 2019 00:57
Show Gist options
  • Save multitel/1366a4b3ce7f672f843b to your computer and use it in GitHub Desktop.
Save multitel/1366a4b3ce7f672f843b to your computer and use it in GitHub Desktop.
JSON functions
F: json/getcountries
D: obtains list of available countries for DID service
P:
- UserName
- Password
M:
- POST : json/getcountries
- GET : json/getcountries/UserName/Password
==============================================================================================================================
F: json/getareas
D: obtains list of areas for the selected country
P:
- UserName
- Password
- ISOCODE (two digit isocode - example CA for Canada, GB for England, etc - obtain the isocodes from getcountries
M:
- POST json/getareas
- GET json/getareas/UserName/Password/ISOCODE
==============================================================================================================================
F: json/getdidinfo
D: obtain information about a DID number in your account
P:
- UserName
- Password
- Number
M:
- POST json/getdidinfo
- GET json/getdidinfo/UserName/Password/Number
==============================================================================================================================
F: json/getdidlogsinfo
D: obtain details about a number not in your inventory and not yet sold (hint: obtain list of DIDs first with getdids)
P:
- UserName
- Password
- Number
M:
- POST json/getdidlogsinfo
- GET json/getdidlogsinfo/UserName/Password/Number
==============================================================================================================================
F: json/getnumberinfo
S: function is retired
==============================================================================================================================
F: json/getdids
D: obtain list of available DID numbers for a specific prefix (hint: obtain prefixes from getareas)
P:
- UserName
- Password
- CountryCode (example 1888)
- Voip (not required, defaults to '' - used for filtering, values 0 or 1)
- SMS (not required, defaults to '' - used for filtering, values 0 or 1)
- MMS (not required , defaults to '' - used for filtering , values 0 or 1)
- Quantity
M:
- POST json/getdids
- GET json/getdids/UserName/Password/CountryCode/VoIP/SMS/MMS/Quantity (or just json/getdids/UserName/Password/CountryCode )
==============================================================================================================================
F: json/buynumbers
D: purchase specific DID number
P:
- UserName
- Password
- Number
- URI (not required if your account already has a default URI set) -- can use {E164} as shortcut for number: {E164}@sipserver
- URI2 (not required if your account already has a default URI set) -- same {E164} info as above
- URI3 (not required if your account already has a default URI set) -- same {E164} info as above
- Description
- Channels - specify number of channels you are purchasing (note : if not specified, default value will be used)
- ForceDTMF ('rfc2833','sipinfo')
- ForceCodec ('ulaw','alaw','g729')
- SMSURI (email or http uri)
- SMSRingType (1 for email, 2 for http POST)
M:
- POST json/buynumbers
==============================================================================================================================
F: json/getpurchasednumbers
D: retrieve list of all purchased numbers in your account
P:
- UserName
- Password
M:
- POST json/getpurchasednumbers
- GET json/getpurchasednumbers/UserName/Password
- POST xml/getpurchasednumbers
- GET xml/getpurchasednumbers/UserName/Password
- POST csv/getpurchasednumbers
- GET csv/getpurchasednumbers/UserName/Password
Additional parameters for CSV:
?header=1 - display a header for the CSV file
?download=1 - force file download
Additional parameters can be combined, as shown in below sample:
http://api.multitel.net/csv/getpurchasednumbers/UserName/Password?download=1&header=1
==============================================================================================================================
F: json/geturiprofiles
D: obtain list of URI profiles for later use (note that uri profiles must be defined in the web interface)
P:
- UserName
- Password
M:
- POST json/geturiprofiles
- GET json/geturiprofiles/UserName/Password
- POST xml/geturiprofiles
- GET xml/geturiprofiles/UserName/Password
- POST csv/geturiprofiles
- GET csv/geturiprofiles/UserName/Password
Additional parameters for CSV:
?header=1 - display a header for the CSV file
?download=1 - force file download
Additional parameters can be combined, as shown in below sample:
http://api.multitel.net/csv/geturiprofiles/UserName/Password?download=1&header=1
==============================================================================================================================
F: json/releasenumbers
D: release a phone number from your account
P:
- UserName
- Password
- Number
M:
- POST json/releasenumbers
- GET json/releasenumbers/UserName/Password/Number
==============================================================================================================================
F: json/getringto
D: get ringto for a specific DID number
P:
- UserName
- Password
- Number
M:
- POST json/getringto
- GET json/getringto/UserName/Password/Number
==============================================================================================================================
F: json/modifyringto
D: modify ring-to settings for a specific number
P:
- UserName
- Password
- Number
- NewRingto - {E164}@sipserver.com
- NewRingto2 - {E164}@anothersipserver.com
- NewRingto3 - {E164}@thirdsipserver.com
- NewRingType - (1 for SIP, 2 for Dial, 9 for DTMF test)
- SMSUri - email or http
- SMSRingType (1 for e-mail, 2 for http POST)
M:
- POST json/modifyringto
==============================================================================================================================
F: json/getdidcoverage
D: obtain a DID coverage list (note: slow, out-dated and function is to be retired soon)
P:
- UserName
- Password
- Format (optional - 'compact', 'full' , 'strictfull', 'multicap')
- Style (optional - 'compact', 'full' , 'voip', 'sms' )
M:
- POST json/getdidcoverage
==============================================================================================================================F: json/createmeeting
D: create a/v web based conference/meeting
==============================================================================================================================
F: json/getjoinmeetingurlattendee
D: get join URL for selected conference/meeting
==============================================================================================================================
F: json/getbalance
D: get own balance
P:
- UserName
- Password
M:
- POST json/getbalance
- GET json/getbalance/UserName/Password
==============================================================================================================================
F: json/sendsms
D: send SMS message
P:
- UserName
- Password
- From (number - full country code required)
- To (number - full country code required)
- Text
- Media (please note MMS messages can only be sent to US/CA numbers and require a "From" number to be purchased from us)
- NotifyUrl (http://url/where/we/will/notify/you/of/the/sms/status/change)
==============================================================================================================================
F: json/portnumber
D: function to be retired
==============================================================================================================================
F: json/queryportnumber
D: function to be retired
==============================================================================================================================F: json/cnam
D: obtain CNAM information - US/CA/Australia only
P:
- UserName
- Password
- Region (cnam_northamerica, cnam_australia)
- Number (for best results , try first without country code - at least for US)
M:
- POST json/cnam
- GET json/cnam/UserName/Password/Region/Number
==============================================================================================================================
F: json/modifynumber
D: modifies number details
P:
- UserName
- Password
- Number
- FaxDetect - 0/1
- FaxEmail
- FaxRing - (integer, number of seconds)
- Cnam - 0/1
- Vm - retired
- Vmring - retired
- Vms2t - retired
- Vmemail - retired
- Uri
- Uri2
- Uri3
- RingType
- Ringstyle
- Type
- SMSRingType
- SMSURI
- Record
M:
- POST json/modifynumber
A: you are strongly advised to use modifyringto function
==============================================================================================================================
F: json/getsentsms
D: obtain list of sent SMS messages for a specific From number
P:
- UserName
- Password
- Number
M:
- POST json/getsms
- GET json/getsms/UserName/Password/Number
==============================================================================================================================
F: json/getreceivedsms
D: obtain list of receive SMS messages for specific number
P:
- UserName
- Password
- Number
M:
- POST json/getreceivedsms
- GET json/getreceivedsms/UserName/Password/Number
==============================================================================================================================
F: json/getsmsprice
D: obtain SMS pricing for a specific destination number
P:
- UserName
- Password
- Number
M:
- POST json/getsmsprice
- GET json/getsmsprice/UserName/Password/Number
==============================================================================================================================
F: json/getnumberofchannels
D: obtain number of assigned vs number of total available channels for a specific DID number
P:
- UserName
- Password
- Number
M:
- POST json/getnumberofchannels
- GET json/getnumberofchannels/UserName/Password/Number
==============================================================================================================================
F: json/getterminationcalls
D: obtain CDR records for all your outbound calls
P:
- UserName
- Password
- Calling (optional)
- Called (optional)
- FromDate (optional)
- ToDate (optional)
M:
- POST json/getterminationcalls
==============================================================================================================================
F: json/getsmscountries
D: obtain list of countries where we provide SMS enabled numbers
P:
- UserName
- Password
M:
- POST json/getsmscountries
- GET json/getsmscountries/UserName/Password
==============================================================================================================================
F: json/getcoverage
D: obtain list of DID coverage (slow, triggers CSV download)
P:
- UserName
- Password
M:
- POST json/getcoverage
- GET json/getcoverage/UserName/Password
==============================================================================================================================
#E911
json/verifyaddress
json/checke911provision
json/provisiondetails
json/provisionaddress
json/removerecord
json/queryall
json/queryrecord
@svarunan
Copy link

svarunan commented Jun 4, 2015

This is really help full :)

@alexlcdee
Copy link

Is json/getterminationcalls currently available? Trying to fetch CDRs, but have an empty array in return. Other methods work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment