Polycom HDX8000 Call Hang Up
edgelitoc
Posts: 160
I have an HDX8000 setup where there is a multipoint license. I am throwing a hang up button to end the call, but this button will end all the call with all the sites, is there any way to disconnect the call one at a time.
0
Comments
'hangup video x'
will do this, where x is the call's ID
how would you define x if the site participant is not on your call list....
callinfo returns:
//not in a call
callinfo all$0A$0D
system is not in a call$0D$0A
//incoming call
callinfo all$0A$0D
callinfo begin$0D$0A
callinfo:37:Chad Coles:192.168.1.162:384:ringing:notmuted:incoming:videocall$0D$0A
callinfo end$0D$0A
//connecting call
callinfo begin$0D$0A
callinfo:37:Chad Coles:192.168.1.162:384:connecting:notmuted:incoming:videocall$0D$0A
callinfo end$0D$0A
//in a call
callinfo all$0A$0D
callinfo begin$0D$0A
callinfo:37:Chad Coles:192.168.1.162:384:connected:muted:incoming:videocall$0D$0A
callinfo end$0D$0A]
//disconnecting
....:disconnecting:....(no example)
In these examples 37 is x. If you are in multiple calls you get an additional 'callinfo:x:...' line for each call.
If you find "callinfo:" you know you have information on a call. The order of information will always be the same - call id, name, IP, status, etc.
Again, "callinfo all" will return data for all calls. If you see this:
callinfo all$0A$0D
callinfo begin$0D$0A
callinfo:37:Chad Coles:192.168.1.162:384:connected:muted:incoming:videocall$0D$0A
callinfo:42:Google:216.239.51.99:384:connected:muted:incoming:videocall$0D$0A
callinfo end$0D$0A
You know you are in two calls. Parse out the call ID for each call (find the data between the first two colons). If you want to hang up the Google call, send "hangup video 42".
I would poll for current call status ("callinfo all").
Based on the feedback I would store (in an array) information about each call.
I would populate my "hang-up" buttons with the name of each call so the user knows which call will be disconnected.
When the user touches a hang-up button I would hang up the specified call ("hangup video x").
And don't forget to add a "hang up all of 'em" button...
- Chip
Heres what I have written:
DEFINE_DEVICE
dV_pol = 5001:1:1 //POLYCOM
DATA_EVENT [dV_POL]
{
ONLINE:
{
SEND_COMMAND dV_POL,'SET BAUD 9600,N,8,1,DISABLE'
}
STRING:
{
LOCAL_VAR ENTRY
LOCAL_VAR END
LOCAL_VAR BEGIN
LOCAL_VAR TEMP [50]
WHILE(find_string (mes1,'callinfo:',1))
{
set_length_string (temp,0)
BEGIN = (FIND_STRING(mes1,':',1))
IF(BEGIN > 0)
{
SET_LENGTH_STRING(TEMP,0)
END = (FIND_STRING(mes1,'connected:',(BEGIN)))
IF (END)
{
END = END - 1
BEGIN = BEGIN + 3
ENTRY = (END - BEGIN)
TEMP = (MID_STRING(mes1,BEGIN,ENTRY))
SEND_COMMAND dv_TP,"'!T',71,mes1"
SEND_COMMAND dV_tp,"'!T',70,TEMP"
REMOVE_STRING(mes1,TEMP,1)
{
CLEAR_BUFFER mes1
SEND_COMMAND dV_tp,"'!T',71,'NO',32,'CONNECT',32,'TION'"
}
}
}
}
}
}
my problem now how can we hangup the call without determining the call id.
Then if this is the data I get from the device:
Parse out each line based on "$0A, $0D" (your line terminator).
If you find "connected:" you know the line has call info you need.
Increment "n" every time you find a connected call.
The data between the first and second colon is your call ID - put that into u_call[n].s_id.
The data between the second and third colon is your call Name - put that into u_call[n].s_name.
UNTESTED code:
Now u_call has all the info on all of your calls. If you have 4 hang up buttons (71, 72, 73, 74), just populate them in order (u_call[1].s_name goes on button number 71, u_call[2].s_name goes on button number 72, etc.). Then when a user hits, say button 73, you can
After a week of testing and debugging i got a positive result,
Thanks for the help..