REST method | Params | Returns | Errors | Description |
---|---|---|---|---|
SIP as RTMP | ||||
/call/startup | callId callee rtmpStream rtmpUrl hasAudio hasVideo sipLogin sipAuthenticationName sipPassword sipDomain sipOutboundProxy sipPort appKey sipRegisterRequired toStream | void | 409 - Conflict 500 - Internal error | This method makes a call to SIP. |
If rtmpUrl is specified, then media traffic received from SIP will be forwarded to the specified rtmpUrl. |
If toStream is specified, /push/startup request can be used to create transponder for the specified stream name to forward media traffic received from SIP. |
If call with the same callId, or the same rtmpUrl already exists, 409 Conflict status will be returned. | ||||
/call/find_all | void | List<Call> | 404 - Call not found 500 - Internal error | Find all SIP calls |
/call/find | callId callee rtmpUrl status | List<Call> | 404 - Call not found 500 - Internal error | Find SIP calls by filter |
/call/terminate | callId | void | 404 - Call not found 500 - Internal error | Hangup and terminate the SIP call |
/call/send_dtmf | callId dtmf type | void | 404 - Call not found 500 - Internal error | Send DTMF within the established SIP call |
/call/inject_stream | callId streamName | void | 404 - Call not found 404 - Stream not found 500 - Internal error | Inject audio from the specified stream |
RTSP | ||||
/rtsp/find | uri status | List<RtspAgent> | 404 - RTSP not found 500 - Internal error | Find RTSP session by filter |
/rtsp/find_all | void | List<RtspAgent> | 500 - Internal error | Find all RTSP sessions |
/rtsp/terminate | uri | void | 404 - RTSP not found 500 - Internal error | Stop and terminate RTSP session |
/rtsp/startup | uri | void | 500 - Internal error | Create a new RTSP session |
Streaming | ||||
/stream/find_all | void | List<Stream> | 404 - Streams not found 500 - Internal error | Find all streams |
/stream/find | name mediaSessionId status published | List<Stream> | 404 - Stream not found 500 - Internal error | Find streams by filter |
/stream/terminate |
mediaSessionId |
void | 404 - Stream not found 500 - Internal error | Terminate stream | ||
Data | ||||
/data/send | nodeId sessionId operationId payload | void | 500 - Internal error | Send data to connected client |
Connection | ||||
/connection/terminate | sessionId | void | 404 - No such connection 500 - Internal error | Disconnect connected client |
/connection/find_all | void | List<Connection> | 404 - No connections found 500 - Internal error | Find all connections |
/connection/find | appKey sessionId clientVersion | List<Connection> | 404 - Not found 500 - Internal error | Find connections by filter |
Republishing as RTMP | ||||
/push/startup | streamName rtmpUrl options | Transponder | 409 - Conflict 500 - Internal error | This method creates transponder, which subscribes to the specified stream and forwards the media traffic to the specified rtmpUrl. |
The steam name specified in the request can be that of a published stream, or reserved for a SIP call (to forward media traffic received from SIP). |
The options can be used to mute audio, or inject audio from file when transponder is created. For example, - "options": {"action": "mute"} - "options": {"action": "sound_on", "soundFile": "sound.wav", "loop": true} |
If transponder for such stream name and rtmpUrl already exist, 409 Conflict status will be returned. | ||||
/push/find | streamName rtmpUrl | List<Transponder> | 404 - Transponder not found 500 - Internal error | Find transponders by filter |
/push/find_all | void | List<Transponder> | 404 - Not found any transponder 500 - Internal error | Find all transponders |
/push/terminate | mediaSessionId | void | 404 - Not found transponder 500 - Internal error | Terminate transponder |
/push/mute | mediaSessionId | void | 404 - Not found transponder 500 - Internal error | Mute audio |
/push/unmute | mediaSessionId | void | 404 - Not found transponder 500 - Internal error | Unmute audio |
/push/sound_on | mediaSessionId soundFile loop | void | 404 - Not found transponder 404 - No such file 500 - Internal error | Inject audio from the specified RIFF WAV file located on WCS server in /usr/local/FlashphonerWebCallServer/media/ directory |
/push/sound_off | mediaSessionId | void | 404 - Not found transponder 500 - Internal error | Stop injecting audio |
Pull RTMP | ||||
/pull/rtmp/pull | uri | void | 409 - Conflict 500 - Internal error | Pull RTMP stream by the specified URL |
/pull/rtmp/find_all | void | List<RtmpAgent> | 404 - Not found 500 - Internal error | Find all pulled RTMP streams |
/pull/rtmp/terminate | uri | void | 404 - Not found 500 - Internal error | Terminate pulled RTMP stream |
Audio mixer | ||||
/mixer/startup | uri localStreamName | void | 409 - Conflict 500 - Internal error | Create audio mixer with the specified stream name |
/mixer/add | uri remoteStreamName | void | 404 - Mixer not found 404 - Stream not found 500 - Internal error | Add RTMP stream audio to mixer |
/mixer/remove | uri remoteStreamName | void | 404 - Mixer not found 404 - Stream not found 500 - Internal error | Remove RTMP stream audio from mixer |
/mixer/find_all | void | List<Mixer> | 404 - Not found 500 - Internal error | Find all audio mixers |
/mixer/terminate | uri | void | 404 - Not found 500 - Internal error | Terminate audio mixer |