Name | Description |
---|---|
Action | wfc.voice.PHONE_STATE |
extras | |
registration_state | PBX registration state ACTIVE|ACTIVE_DND|CONNECTING|INACTIVE |
state | Voice call state IDLE|CALLING|RINGING|ACTIVE |
number | Phone number for the current session that is reported when the voice call state changes (optional). |
line_id | Line number that is reported when one of the line registers (optional). |
line_extension | Line extension that is reported when one of the lines registers (optional). |
line_registered | Boolean expression that is reported when one of the lines registers (optional). |
suspended | Boolean expression that is reported when the state is IDLE because one of the sessions is suspended or on hold (optional) |
// create broadcast receiver BroadcastReceiver mMessageReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Log.i(TAG, "Received PHONE_STATE from WFCVoice “ + " registration_state=" + intent.getStringExtra("registration_state") + “ call state=" + intent.getStringExtra("state") + " number=" + intent.getStringExtra("number") + " line_id=" + intent.getStringExtra("line_id") + " line_extension=" + intent.getStringExtra("line_extension") + " line_registered=" + intent.getBooleanExtra("line_registered", false) ); } }; // register broadcast receiver in the Activity IntentFilter mMessageReceiver = new IntentFilter(); requestFilter.addAction(“wfc.voice.PHONE_STATE”); registerReceiver(mMessageReceiver, requestFilter);