Home AMX User Forum AMX General Discussion
Options

Polycom HDX8000 Call Hang Up

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.

Comments

  • Options
    ColzieColzie Posts: 470
    I believe
    'hangup video x'
    will do this, where x is the call's ID
  • Options
    if you're using Polycom API "button callhangup" command, the OSD will display a dialogue allowing the user to select the call they want to hangup.
  • Options
    edgelitocedgelitoc Posts: 160
    Colzie wrote: »
    I believe
    '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....
  • Options
    ColzieColzie Posts: 470
    'callinfo all' will return data for all current calls.

    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.
  • Options
    Colzie wrote: »
    'callinfo all' will return data for all current calls.

    with this API command how can you parse the data whenever i end up the call and select only the site I want
  • Options
    ColzieColzie Posts: 470
    "$0D, $0A" is your line terminator, the colon ":" is your delimiter.

    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".
  • Options
    thanks again for the reply, I would begin first buffering the data and put a statement that will find the string, then put and event.. Is this the way to approach
  • Options
    ColzieColzie Posts: 470
    It somewhat depends on how your touch panel is designed. If you are going to give the user a button for each active call (to hang up individual calls) you need to know what these buttons will do before the user touches one.

    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").
  • Options
    You could make it a bit "more cleverer" even. Have a single "hang up" button on the VTC page - if the user hits it and there's only a single active call, hang it up. If there are multiple calls connected, have the press on that button cause a sub-page come up - you can populate that sub page with a button for each active call, letting the user indicate which one they want to kill.

    And don't forget to add a "hang up all of 'em" button... :)

    - Chip
  • Options
    thanks for your response,, I am working it out for the possibilities but still its confusing to me how will be the data populated on a page.. I try to parse the data when its on a call, but the call id is not fix to a certain site, it keeps changing, How will the system know it is SITE A with Call ID "36",, where after you hang up then dial again, SITE A will have call id "37".
  • Options
    ColzieColzie Posts: 470
    "Site A" will always have the same IP address (and probably the same Name). Search for your known value (IP address) to determine the ID for the current call.
  • Options
    Hi Colzie,
    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.
  • Options
    ColzieColzie Posts: 470
    I would use a structure to hold my data.
    struct _call
    {
    	char		s_id[10]
    	char		s_name[50]
    }
    
    .....
    
    volatile		_call		u_call[4]		//4 calls max
    

    Then if this is the data I get from the device:
    Colzie wrote: »
    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

    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:
    while (find_string (sBuffer, "$0A, $0D", 1))
    {
    	n = 0
    	sBufferTemp = remove_string (sBuffer, "$0A, $0D", 1)
    
    	select
    	{
    		active (find_string (sBufferTemp, "callinfo:", 1) && find_string (sBufferTemp, "connected:", 1)):
    		{
    			n++
    
    			iPos1 = find_string (sBufferTemp, ":", 1) + 1
    			iPos2 = find_string (sBufferTemp, ":", iPos1)
    			iLen = iPos2 - iPos1
    			u_call[n].s_id = mid_string (sBufferTemp, iPos1, iLen)
    
    			iPos1 = iPos2 + 1
    			iPos2 = find_string (sBufferTemp, ":", iPos1)
    			iLen = iPos2 - iPos1
    			u_call[n].s_name = mid_string (sBufferTemp, iPos1, iLen)
    		}
    	}
    }
    

    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
    send_string dv_VCONF_232, "'hangup video ', u_call[3].s_id"
    
  • Options
    Hi Colzie,
    After a week of testing and debugging i got a positive result,
    Thanks for the help..
  • Options
    ColzieColzie Posts: 470
    I'm glad you were able to get it working! :)
Sign In or Register to comment.