All Downloads are FREE. Search and download functionalities are using the official Maven repository.

api.connectors-api.adoc Maven / Gradle / Ivy

= Restcomm API – Connectors

[[Connectors]]
== Connectors

Connectors represents SIP services. Connectors are bound/unbound all over tagged Network Points.

.Connectors example, one NetworkPoint, multiple Connectors


[ditaa,connectors,png]
--

                     +---------------------+  
                     |eth00 Network Point  |
 ---eth00 5060 UDP  ->                     |
 ---eth00 5060 TCP  ->                     |
 ---eth00 5083 WSS  ->                     |  
                     |                     |
                     +---------------------+
                   
--


NOTE: Connectors have nothing to do with IP Addresses. They are assigned from the NetworkPoint they belong to at run-time.

Connectors have to be plugged to let them become on service.


=== Connectors Resource URI

*/2012-04-24/Connectors/\{Sid}*

=== Resource Properties

[cols=",",options="header",]
|=========================================================================================================================
|Property |Description
|Sid |A string that uniquely identifies this connector entry.
|NetworkPointId |A string that uniquely identifies the NetworkPoint that this connector is attached to.
|IpAddress |IP address guessed at run-time.
|Port |Service port number.
|Transport| A string representing protocol transport (UDP/TCP/SCTP/TLS/WS/WSS).
|State| A string representing service state (UP/DOWN).
|AccountSid | Unique identifier representing the account that tagged the Network point.
|=========================================================================================================================

=== Supported Operations

*HTTP GET.* Returns the representation of an Connector resource, including the properties above.

* Connector Resource URI. */2012-04-24/Connectors/\{Sid}*

**HTTP POST**. Returns the NetworkPoint representation, including the properties above. Below you will find a list of optional parameters.

=== Request Parameters

[cols=",",options="header",]
|==============================================================================================
|Parameter |Description
|Sid |A string that uniquely identifies this connector entry.
|==============================================================================================

**Get information about the Connector.**

....
curl -X GET  http://ACae6e420f425248d6a26948c17a9e2acf:[email protected]:8080/restcomm-sbc/2012-04-24/Connectors
....



....
curl -X GET  http://administrator%40company.com:[email protected]:8080/restcomm-sbc/2012-04-24/Connectors/{Sid}
....

The above commands will print an output similar to the one below:

----

    
       192.168.88.2
       CNedc0bce80638e78ee20d68dc748d905f
       5060
       eth1-1
       UDP
       UP
       ACae6e420f425248d6a26948c17a9e2acf
     
 

----

[[Connectors_List]]
== Connectors List Resource

* Connectors List Resource URI. */2012-04-24/Connectors*

=== Supported Operations

**HTTP GET**. Returns the list representation of all the *Connectors* resources.

**HTTP POST**. Adds a *Connector* resource.

**HTTP POST**. Plug an unplugged *Connector* resource.

**HTTP POST**. UnPlug a plugged *Connector* resource.

**HTTP DELETE**. Deletes a *Connector* resource.

=== Request Parameters

[cols=",",options="header",]
|==============================================================================================================================================================================================================================
|Parameter |Description
|Sid(Required) |The unique identifier.
|==============================================================================================================================================================================================================================


=== Get a list of all current connectors

----
curl -X GET http://[primarySid]:[primaryAuthToken]@127.0.0.1:8080/restcomm-sbc/2012-04-24/Connectors/
----


=== Supported Operations


----


   
    
       192.168.88.2
       CNedc0bce80638e78ee20d68dc748d905f
       5060
       eth1-1
       UDP
       UP
       ACae6e420f425248d6a26948c17a9e2acf
     
     
       192.168.88.3
       CNb65727e434f182b7215ea95105b66ed9
       5060
       eth1-0
       UDP
       UP
       ACae6e420f425248d6a26948c17a9e2acf
     
   
 

----
[[add-connectors]]
=== Add a Connector

.XML Connector adding
----
curl -X POST http://ACae6e420f425248d6a26948c17a9e2acf:[email protected]:8080/restcomm-sbc/2012-04-24/Connectors/ -d "NetworkPointId=eth0-0" -d "Transport=UDP" -d "Port=5060"
----


NOTE: Connectors are first created in DOWN State. You have to plug it to put it on service (UP State).

[[plug-connectors]]
=== Plug a Connector

.XML Connector plugging
----
curl -X POST http://ACae6e420f425248d6a26948c17a9e2acf:[email protected]:8080/restcomm-sbc/2012-04-24/Connectors/CNedc0bce80638e78ee20d68dc748d905f -d "State=UP"
----

[[unplug-connectors]]
=== Unplug a Connector

.XML Connector unplugging
----
curl -X POST http://ACae6e420f425248d6a26948c17a9e2acf:[email protected]:8080/restcomm-sbc/2012-04-24/Connectors/CNedc0bce80638e78ee20d68dc748d905f -d "State=DOWN"
----


[[delete-connectors]]
=== Delete Connector

.XML Connector delete
----
curl -X DELETE http://ACae6e420f425248d6a26948c17a9e2acf:[email protected]:8080/restcomm-sbc/2012-04-24/Connectors/
----





© 2015 - 2025 Weber Informatics LLC | Privacy Policy