Download - RestComm Architecture Design
![Page 1: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/1.jpg)
Restcomm Architecture & Designfor new developers
![Page 2: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/2.jpg)
Contents
● About the project
● RCML (Restcomm Markup Language)
● RVD (Restcomm Visual Designer)
● Restcomm REST APIs
● Restcomm Core
○ Service plugins
○ Extensions
○ Interpreters
![Page 3: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/3.jpg)
What is Restcomm?
" Restcomm is a next generation cloud communications platform to rapidly build voice, video, and messaging applications, using mainstream development skills. "
![Page 4: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/4.jpg)
About the project
Management and distribution technologies
GitHub Link
CloudBees Link
Docker Link
![Page 5: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/5.jpg)
Restcomm's ecosystem
Uses Restcomm
Used by Restcomm
![Page 6: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/6.jpg)
RCML
The Restcomm Markup Language (RCML) is composed of a set of XML tags that can be used to instruct Restcomm on how to handle an on-going phone call.
How?
The tags that composes the RCML are named as verbs and nouns, the combination between these elements form the path followed by Restcomm during the call.
![Page 7: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/7.jpg)
RCML
Examples:
<Response><Say>Hello World</Say>
</Response>
<Response><Dial>
<Client>bob</Client></Dial>
</Response>
verbs: Sayverbs: Dial
nouns: Client
![Page 8: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/8.jpg)
RCML
Examples:
<Response><Gather action="handle-user-input.php" numDigits="1">
<Say>Welcome to TPS.</Say><Say>For store hours, press 1.</Say><Say>To speak to an agent, press 2.</Say><Say>To check your package status, press
3.</Say></Gather><!-- If customer doesn't input anything, prompt and try again.
--><Say>Sorry, I didn't get your response.</Say>
<Redirect>handle-incoming-call.xml</Redirect> </Response>
For more info about RCML: http://docs.telestax.com/restcomm-pages/
![Page 9: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/9.jpg)
RVD
RVD (Restcomm Visual Designer) is a Restcomm resource that allows us to create and edit RCML applications using graphical user interface components.
Features:
● drag & drop verbs and nouns to build RCML applications;
● manage audio resources and modules;
● provide the RCML on demand to Restcomm;
● import and export projects, and more.
![Page 10: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/10.jpg)
RVD
<Response><Say>Hello World</Say>
</Response>
Corresponding RCMLApplication created using RVD
![Page 11: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/11.jpg)
RVD
<Response><Dial>
<Client>bob</Client></Dial>
</Response>
Application created using RVD Corresponding RCML
![Page 12: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/12.jpg)
RVD
Example of a call flow to an application
![Page 13: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/13.jpg)
Restcomm REST APIs
Restcomm Restful APIs is a set of web service endpoints that allows us to manage and use Restcomm resources through the standard HTTP methods.
Features:
● create, read, update and delete accounts, phone numbers, calls, text messages, recordings, etc;
● create and control Voice, SMS and USSD sessions (start a new call, send a new sms message, etc);
● access secured by authentication, HTTPS protocol and Multi-tenancy control
![Page 14: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/14.jpg)
Restcomm REST APIs
Some of the available endpoints
AccountAvailablePhoneNumbersCallsClientsGatewayIncomingPhoneNumbersNotifications
OutboundProxyRecordingsSMS MessagesTranscriptionsUsage RecordsUssdPush
For more info about available endpoints: http://docs.telestax.com/restcomm-pages/
![Page 15: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/15.jpg)
Restcomm REST APIs
Accessing Accounts list endpoint, using HTTP GET method
URL description: http://127.0.0.1:8080/restcomm/2012-04-24/Accounts.json
Browser access: use login credentials (email / password)
cURL access: use Account SID and Auth Token
Server address
Context name
API version Endpoint name
Response format (default XML if omitted)
![Page 16: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/16.jpg)
Restcomm REST APIs
Accessing Accounts list endpoint, using HTTP GET method
JSON XML
![Page 17: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/17.jpg)
Restcomm REST APIs
Simple access diagram
![Page 18: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/18.jpg)
Restcomm REST APIs
Multi-tenancy
Primary Account can view and manage Application P, DID P, DID A and DID B only.Subaccount A can view and manage Application A and DID A only.Subaccount B can view and manage Application B and DID B only.Secondary Account can view and manage Application S, DID S, DID C and DID D only.Subaccount C can view and manage Application C and DID C only.Subaccount D can view and manage Application D and DID D only.
![Page 19: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/19.jpg)
Restcomm REST APIs
Hints for the development of a new endpoint
● consult an existing endpoint (like ClientsEndpoint) and use it as reference;● always check the need of authentication and multi-tenancy;● create unit / integration tests to finish with development.
![Page 20: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/20.jpg)
Restcomm REST APIs
Guidelines to the development of a new endpoint
![Page 21: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/21.jpg)
Description about previous slide
AbstractEndpoint: holds the common structure used by all endpointsClientsEndpoint: implementation of the endpoint logicClientsXmlEndpoint: link the HTTP methods with endpoint logic through XMLClientsJsonEndpoint: link the HTTP methods with endpoint logic through JSONAbstractConverter: holds the common structure to build all responsesClientConverter: implementation to create specific JSON and XML responsesClientsDao: interface to access and interact with MyBatis database layer
Restcomm REST APIs
![Page 22: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/22.jpg)
Restcomm Core: Service Plugins
Service plugins are the way to implement services for the Restcomm core.
How?
● Restcomm core defines HOW a service is used inside the platform
● the service represents, in a generic way, the scope and domain of a resource
● the API defines the contract to be implemented.
● the plugin implements a specific derivation of the service known by Restcomm core
![Page 23: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/23.jpg)
Restcomm Core: Service Plugins
Example
Service: TTS (Text-to-speech)
API: restcomm.tts.api (name of the Maven module that represents the API)
Plugin: restcomm.tts.voicerss (name of the Maven module that represents the VoiceRSS TTS plugin)
![Page 24: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/24.jpg)
Restcomm Core: Service Plugins
![Page 25: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/25.jpg)
Restcomm Core: Service Plugins
Guidelines to the development of a new Plugin
● understand how the service works (its scope and domain inside Restcomm);
● know the resources available through the API;
● create a new Maven module (name pattern: restcomm.{servicename}.{pluginname});
● have fun developing;
● create unit / integration tests to finish development.
![Page 26: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/26.jpg)
Restcomm Core: Extensions
Extend restcomm functionality without the need to know Restcomm core internals.Restcomm will dynamically load available extensions in the classpath and execute them on a pre defined injection points.
Examples of extensions:● Traffic throttling● Least cost routing● Applications update● Dial plan
● Abbreviated dialing● Charging
![Page 27: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/27.jpg)
Restcomm Core: Extensions
![Page 28: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/28.jpg)
Restcomm Core: Interpreters
Interpreter is the component that translates RCML into telecom protocols. Interpreters will get the RCML for a given application, interpret it and execute it.
Features:
● different interpreter according to the session (Call, SMS, USSD);
● allow users to focus on the business logic using RCML instead of spending time with telco protocols;
![Page 29: RestComm Architecture Design](https://reader036.vdocument.in/reader036/viewer/2022062522/588a413e1a28abc6168b749b/html5/thumbnails/29.jpg)
Restcomm Core: Interpreters
Examples:
● Voice Interpreter
● SMS Interpreter
● USSD Interpreter
<Response><Say>Hello World</Say>
</Response>
Voice Interpreter
"Hello World"