Last updated: December 3, 2008
The CALL:STATus[:STATe]? query returns a string indicating the current call processing state.
There are five possible call processing states for GSM.
The query returns one of the following strings:
"IDLE"
Idle is returned when the test set is not on a call, involved with any termination, page, origination, or registration call processing procedures with the mobile station.
"SREQ"
Set Up Request is returned when the test set is in the process of assigning a channel to a mobile station as part of a Page or a mobile station originated call setup.
"ALER"
Alerting is returned when the mobile station is about to receive an Alert message as part of a call setup due to a page.
"CONN"
Connected is returned when the test set and the mobile station are connected on a call.
"DISC"
Disconnected is returned when the test set is in the process of ending a call.
The following command returns the current state of a data connection:
OUTPUT 714;"CALL:STATus:STATe:DATA?"
This query will determine if a call is connected or disconnected by returning an integer value. The value indicates if the call state is idle or connected, not if any call state change has occurred.
Query returns one of the following:
If the call is in the setup request, proceeding, alerting, or disconnecting state, this command will not return a value until the call status proceeds to either connected or idle.
OUTPUT 714;"CALL:CONNECTED:STATE?"
The following example illustrates the use of the connected/idle query for a base station originated call. This code originates a call, then waits for the connected/idle query to return a result.
Note that this code does not include the CALL:CONNECTED:TIME (timeout timer) or the CALL:CONNECTED:ARM (change detector arm) commands. These commands are unnecessary since the change detector is armed automatically by the CALL:ORIGINATE command, and the timeout timer value is never applicable since a base station originated call guarantees a state change.
10 OUTPUT 714;"CALL:ORIGINATE" ! Begin the BS originated call. 20 OUTPUT 714;"CALL:CONNECTED:STATE?" ! The connect/idle query. 30 ENTER 714;Call_connected ! Program will hang here until state 40 ! change or protocol timer expires. 50 !************************************************************ 60 ! If mobile is not set to auto-answer, answer the call. 70 !************************************************************ 80 IF NOT Call_connected THEN 90 DISP "CALL NOT CONNECTED." 100 ELSE 110 DISP "CALL IS CONNECTED." 120 END IF 130 END
This feature provides a method for holding off the Connected/Idle Query results until a change in call processing states is detected. Arming the call state change detector is useful only for mobile station originated calls or disconnects only. It is armed automatically when call processing functions originating from the test set are requested.
The call state change detector becomes disarmed when any of the following conditions have been met:
the call processing state has changed to either connected or idle
the attempt to connect or disconnect a call has failed, and one of the test set's Fixed Timers has timed out
no call processing state changes occurred within the time period specified by the Call State Change Detector Timeout .
The following command arms the call state change detector:
OUTPUT 714;"CALL:CONNECTED:ARM[:IMMEDIATE]"
The following example illustrates the use of the call state change detector along with the connected/idle query to synchronize a controlling application with a call processing state change during a mobile station originated call.
When the CALL:CONNECTED:ARM command is received by the test set, the detector becomes armed and configures the test set to hold off on returning a result for the CALL:CONNECTED:STATE? query until the detector is disarmed by one of the three events described above.
10 OUTPUT 714;"CALL:CONNECTED:TIMEOUT 10S" ! Sets the time out 20 ! time to 10 seconds. 30 OUTPUT 714;"CALL:CONNECTED:ARM" ! Arm the change detector. 40 DISP "Make a mobile station orginated call. Continue when done." 50 PAUSE 60 OUTPUT 714;"CALL:CONNECTED:STATE?" ! The connected/idle query. 70 ENTER 714;Call_connected 80 IF Call_connected=1 THEN 90 DISP "Call is connected." 100 WAIT 2 110 ELSE 120 DISP "Call is not connected." 130 WAIT 2 140 END IF 150 END
If a state change does not occur, the user needs a way to control how long to wait for the change detector. The change detector is disarmed by the timeout timer. After a timeout, the connected/idle query will return a 1 for connected or a 0 for idle. The timeout timer is user settable, but the user setting is only applied during mobile station originated call processing operations. For base station originated call processing operations, the timeout timer is automatically set to 60 seconds by the test set.
The STATus subsystem provides a status register group that allows the user to query call processing states. Call processing state synchronization can be performed using the bit transitions of STATUS:OPERATION:CALL:GSM to generate interrupts to the external controller. Refer to STATus:OPERation:CALL:GSM Condition Register Bit Assignment for status bit definitions and GPIB command syntax. See Call State STATus:OPERation:CALL:GSM Program Example .
The following example illustrates the use of the status subsystem to generate a service request when a call has been dropped.
10 OUTPUT 714;"*CLS" 20 OUTPUT 714;"STATUS:OPERATION:CALL:ENABLE 4" !Enable the 30 !connected bit 40 ! to generate a 50 !summary message. 60 OUTPUT 714;"STATUS:OPERATION:CALL:PTR 0;NTR 4" !Enable the 70 !negative 80 !transition 90 !filter for the 100 !GSM Summary bit. 110 OUTPUT 714;"STATUS:OPERATION:CALL:GSM:PTR 0;NTR 4" !Enable the 120 !negative 130 !transition 140 !filter for the 150 !GSM connected bit. 160 OUTPUT 714;"STATUS:OPERATION:CALL:GSM:ENABLE 4" !Enable the 170 !connected bit for 180 !GSM to generate a 190 !summary message. 200 OUTPUT 714;"STATUS:OPERATION:ENABLE 1024" !Enable the call sumary 210 !bit to generate a summary 220 !message. 230 OUTPUT 714;"*SRE 128" !Enable the service request enable register to 240 !generate an SRQ. 250 ON INTR 7,15 CALL Err !Define the interrupt-initiated branch wiht a 260 !priority of 15, the highest. 270 ENABLE INTR 7;2 !Enable interrupt on interface card 7 with a bit mask 280 !(for the interface's interrupt-enable register) of 2. 290 PRINT "Make a call, type CONT when connected." !Make a Mobile Station 300 !originated call. 310 PAUSE 320 PRINT "End the call from the mobile station and then type CONT." 330 PAUSE 340 LOOP 350 OUTPUT 714;"STATUS:OPERATION:CALL:GSM:EVENT?" !Query the event register. 360 ENTER 714;Eve 370 IF Eve=0 THEN 380 PRINT "The call is still connected, press the end key." 390 END IF 400 END LOOP 410 END 420 SUB Err 430 DISP "The call has ended." 440 Clear_interrupt=SPOLL(714) 450 OUTPUT 714;"*CLS" 460 STOP 470 SUBEND