ChunkPlayer: Difference between revisions

From VoIPmonitor.org
Jump to navigation Jump to search
(Created page with "== General information == * the ChunkPlayer is the sample code for embedding active call's player * the code's directory is in WEBROOT/api/chunkplayer * the code in this dire...")
 
 
(2 intermediate revisions by one other user not shown)
Line 2: Line 2:


* the ChunkPlayer is the sample code for embedding active call's player
* the ChunkPlayer is the sample code for embedding active call's player
* the code's directory is in WEBROOT/api/chunkplayer
* the code's directory is in WEBROOT/api/chunkplayer (example: /var/www/html/api/chunkplayer)
* the code in this directory can be adjusted and embedded into another code
* the code in this directory can be adjusted and embedded into another code


Line 25: Line 25:
== Example of use ==
== Example of use ==


* required access thot sensor's manage port
* enter html page http://VMWEB/api/chunkplayer/index.html
* enter html page http://VMWEB/api/chunkplayer/index.html
* enter callref and sensor id
* enter callref and sensor id
* the player will play the active call
* the player will play the active call
==== how to get callref parameter ====
* from the sensor via manager port
e.g.
echo 'listcalls' | nc SENSOR_IP SENSOR_MANAGE_PORT
See the parameter 'callreference' in the output. (It's hexadecimal number.)

Latest revision as of 20:56, 9 April 2019

General information

  • the ChunkPlayer is the sample code for embedding active call's player
  • the code's directory is in WEBROOT/api/chunkplayer (example: /var/www/html/api/chunkplayer)
  • the code in this directory can be adjusted and embedded into another code

Configuration

  • set appropriate variables in the configuration.php file:
<?php

define('VPMANAGERHOST', '127.0.0.1');
define('VPMANAGERPORT', 5029);

define("MYSQL_HOST", "127.0.0.1");
define("MYSQL_DB", "voipmonitor");
define("MYSQL_USER", "root");
define("MYSQL_PASS", "");

?>
  • the VPMANAGERHOST and VPMANAGERPORT are used if the sensor id is not used in the play request

Example of use

how to get callref parameter

  • from the sensor via manager port
e.g.
echo 'listcalls' | nc SENSOR_IP SENSOR_MANAGE_PORT

See the parameter 'callreference' in the output. (It's hexadecimal number.)