1 AP侧
通话主要是针对拨出的电话。想要在接通的时候给出震动提示那么就需要知道通话何时是被接通的,这样才能在进入该状态后给出提示。但SDK中并没有直接获得这种状态的方式。SDK中的TelephonyManager类提供了3种电话的状态.
CALL_STATE_IDLE 空闲状态
CALL_STATE_OFFHOOK 摘机状态
CALL_STATE_RINGING 响铃状态
拨出电话的时候,会输入这么几条log,拨号->提醒->活动
拨号:GET_CURRENT_CALLS id=1,DIALING
提醒:GET_CURRENT_CALLS id=1,ALERTING
活动:GET_CURRENT_CALLS id=1,ACTIVE
电话接通时会进入活动状态,并会输出:GET_CURRENT_CALLS id=1,ACTIVE 这条log。
在拨号开始到电话接通这段时间内会经过多次的拨号->提醒->活动,仅当话筒中嘟声响起后GET_CURRENT_CALLS这条日志会锁定在ALERTING,在通话接通之前会出现多次的GET_CURRENT_CALLS ACTIVE 这样的日志,而仅有一次是电话接通产生的。不能只是单纯的抓取GET_CURRENT_CALLS ACTIVE 这样的信息来判断。
1.1 主动打电话,主动挂断
//处于4G制式Line 10337: 08-13 18:16:49.865 2310 2560 D RILJ : [5233]> VOICE_REGISTRATION_STATE [SUB0]Line 10409: 08-13 18:16:49.935 2310 2396 D RILJ : [5233]< VOICE_REGISTRATION_STATE {.regState = REG_HOME, .rat = 14, .cssSupported = false, .roamingIndicator = 1, .systemIsInPrl = -1, .defaultRoamingIndicator = -1, .reasonForDenial = 0, .cellIdentity = {.cellInfoType = LTE, .cellIdentityGsm = [], .cellIdentityWcdma = [], .cellIdentityCdma = [], .cellIdentityLte = [{.base = {.mcc = 460, .mnc = 01, .ci = 196186673, .pci = 186, .tac = 37147, .earfcn = 1650}, .operatorNames = {.alphaLong = CHN-UNICOM, .alphaShort = UNICOM}, .bandwidth = 2147483647}], .cellIdentityTdscdma = []}} [SUB0]//modem主动上报状态Line 10494: 08-13 18:17:23.938 2310 2396 D RILJ : [UNSL]< UNSOL_DATA_CALL_LIST_CHANGED [{.status = NONE, .suggestedRetryTime = -1, .cid = 0, .active = 1, .type = IPV4V6, .ifname = rmnet_data1, .addresses = 10.62.170.136/28, .dnses = 221.11.1.67 221.11.1.68, .gateways = 10.62.170.137, .pcscf = , .mtu = 1500}] [SUB0]Line 10659: 08-13 18:17:31.808 2310 2310 D GsmCdmaCallTracker: [0] update phone state, old=IDLE new=IDLELine 10667: 08-13 18:17:31.809 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] acquireWakeLock//拨号Line 10669: 08-13 18:17:31.811 2310 2310 D RILJ : [5241]> DIAL [SUB0]Line 10670: 08-13 18:17:31.811 2310 2310 D GsmCdmaCallTracker: [0] update phone state, old=IDLE new=OFFHOOKLine 10685: 08-13 18:17:31.821 2310 2396 D RILJ : [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED [SUB0]Line 10700: 08-13 18:17:31.843 2310 2396 D RILJ : [5241]< DIAL [SUB0]Line 10701: 08-13 18:17:31.844 2310 2310 D RILJ : [5244]> GET_CURRENT_CALLS [SUB0]Line 10703: 08-13 18:17:31.845 2310 2396 D RILJ : [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED [SUB0]Line 10707: 08-13 18:17:32.085 2310 2396 D RILJ : [5244]< GET_CURRENT_CALLS {[id=1,DIALING,toa=129,norm,mo,0,voc,noevp,,cli=1,,3,audioQuality=0] } [SUB0]Line 10708: 08-13 18:17:32.085 2310 2310 D GsmCdmaCallTracker: Event EVENT_POLL_CALLS_RESULT ReceivedLine 10713: 08-13 18:17:32.090 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] parent= DIALING, newParent= DIALINGLine 10716: 08-13 18:17:32.090 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] update: parent=DIALING, hasNewParent=false, wasConnectingInOrOut=true, wasHolding=false, isConnectingInOrOut=true, changed=trueLine 10717: 08-13 18:17:32.091 2310 2310 D GsmCdmaCallTracker: [0] update phone state, old=OFFHOOK new=OFFHOOK//变为制式回落Line 11048: 08-13 18:17:33.184 2310 2560 D RILJ : [5273]> VOICE_REGISTRATION_STATE [SUB0]Line 11052: 08-13 18:17:33.195 2310 2396 D RILJ : [5273]< VOICE_REGISTRATION_STATE {.regState = REG_HOME, .rat = 3, .cssSupported = false, .roamingIndicator = 1, .systemIsInPrl = -1, .defaultRoamingIndicator = -1, .reasonForDenial = 0, .cellIdentity = {.cellInfoType = WCDMA, .cellIdentityGsm = [], .cellIdentityWcdma = [{.base = {.mcc = 460, .mnc = 01, .lac = 47901, .cid = 203242279, .psc = 510, .uarfcn = 10663}, .operatorNames = {.alphaLong = CHN-UNICOM, .alphaShort = UNICOM}}], .cellIdentityCdma = [], .cellIdentityLte = [], .cellIdentityTdscdma = []}} [SUB0]//DIALINGLine 11061: 08-13 18:17:33.836 2310 2396 D RILJ : [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED [SUB0]Line 11062: 08-13 18:17:33.837 2310 2310 D RILJ : [5275]> GET_CURRENT_CALLS [SUB0]Line 11065: 08-13 18:17:33.839 2310 2396 D RILJ : [5275]< GET_CURRENT_CALLS {[id=1,DIALING,toa=129,norm,mo,0,voc,noevp,,cli=1,,3,audioQuality=1] } [SUB0]Line 11066: 08-13 18:17:33.839 2310 2310 D GsmCdmaCallTracker: Event EVENT_POLL_CALLS_RESULT ReceivedLine 11067: 08-13 18:17:33.839 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] parent= DIALING, newParent= DIALINGLine 11069: 08-13 18:17:33.839 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] update: parent=DIALING, hasNewParent=false, wasConnectingInOrOut=true, wasHolding=false, isConnectingInOrOut=true, changed=falseLine 11070: 08-13 18:17:33.839 2310 2310 D GsmCdmaCallTracker: [0] update phone state, old=OFFHOOK new=OFFHOOK//ALERTINGLine 11117: 08-13 18:17:39.473 2310 2396 D RILJ : [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED [SUB0]Line 11118: 08-13 18:17:39.476 2310 2310 D RILJ : [5282]> GET_CURRENT_CALLS [SUB0]Line 11124: 08-13 18:17:39.495 2310 2396 D RILJ : [5282]< GET_CURRENT_CALLS {[id=1,ALERTING,toa=129,norm,mo,0,voc,noevp,,cli=1,,3,audioQuality=1] } [SUB0]Line 11125: 08-13 18:17:39.495 2310 2310 D GsmCdmaCallTracker: Event EVENT_POLL_CALLS_RESULT ReceivedLine 11130: 08-13 18:17:39.497 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] parent= DIALING, newParent= DIALINGLine 11132: 08-13 18:17:39.497 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] update: parent=ALERTING, hasNewParent=false, wasConnectingInOrOut=true, wasHolding=false, isConnectingInOrOut=true, changed=trueLine 11133: 08-13 18:17:39.497 2310 2310 D GsmCdmaCallTracker: [0] update phone state, old=OFFHOOK new=OFFHOOK//ACTIVELine 11363: 08-13 18:17:42.439 2310 2396 D RILJ : [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED [SUB0]Line 11364: 08-13 18:17:42.440 2310 2310 D RILJ : [5297]> GET_CURRENT_CALLS [SUB0]Line 11367: 08-13 18:17:42.458 2310 2396 D RILJ : [5297]< GET_CURRENT_CALLS {[id=1,ACTIVE,toa=129,norm,mo,0,voc,noevp,,cli=1,,3,audioQuality=1] } [SUB0]Line 11368: 08-13 18:17:42.458 2310 2310 D GsmCdmaCallTracker: Event EVENT_POLL_CALLS_RESULT ReceivedLine 11369: 08-13 18:17:42.458 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] parent= ALERTING, newParent= ALERTINGLine 11371: 08-13 18:17:42.458 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] update: parent=ACTIVE, hasNewParent=false, wasConnectingInOrOut=true, wasHolding=false, isConnectingInOrOut=false, changed=trueLine 11372: 08-13 18:17:42.458 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] onConnectedInOrOut: connectTime=1565691462458Line 11373: 08-13 18:17:42.458 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] releaseWakeLockLine 11374: 08-13 18:17:42.460 2310 2310 D GsmCdmaCallTracker: [0] update phone state, old=OFFHOOK new=OFFHOOK//DisconnectLine 11420: 08-13 18:17:45.641 2310 2396 D RILJ : [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED [SUB0]Line 11421: 08-13 18:17:45.642 2310 2310 D RILJ : [5306]> GET_CURRENT_CALLS [SUB0]Line 11426: 08-13 18:17:45.759 2310 2310 D GsmCdmaCallTracker: Event EVENT_POLL_CALLS_RESULT ReceivedLine 11438: 08-13 18:17:45.812 2310 2396 D RILJ : [5306]< GET_CURRENT_CALLS {} [SUB0]Line 11439: 08-13 18:17:45.812 2310 2310 D GsmCdmaConnection: onDisconnect: cause=3Line 11441: 08-13 18:17:45.813 2310 2310 D GsmCdmaCallTracker: [0] update phone state, old=OFFHOOK new=IDLE//恢复4GLine 11671: 08-13 18:17:47.131 2310 2396 D RILJ : [UNSL]< UNSOL_RESPONSE_NETWORK_STATE_CHANGED [SUB0]Line 11679: 08-13 18:17:47.135 2310 2560 D RILJ : [5338]> VOICE_REGISTRATION_STATE [SUB0]Line 11693: 08-13 18:17:47.176 2310 2396 D RILJ : [5328]< VOICE_REGISTRATION_STATE {.regState = REG_HOME, .rat = 14, .cssSupported = false, .roamingIndicator = 1, .systemIsInPrl = -1, .defaultRoamingIndicator = -1, .reasonForDenial = 0, .cellIdentity = {.cellInfoType = LTE, .cellIdentityGsm = [], .cellIdentityWcdma = [], .cellIdentityCdma = [], .cellIdentityLte = [{.base = {.mcc = 460, .mnc = 01, .ci = 196186673, .pci = 186, .tac = 37147, .earfcn = 1650}, .operatorNames = {.alphaLong = CHN-UNICOM, .alphaShort = UNICOM}, .bandwidth = 2147483647}], .cellIdentityTdscdma = []}} [SUB0]
1.2 接电话主动挂电话
//modem主动上报状态,CALL RINGINGLine 13906: 08-13 18:18:17.217 2310 2396 D RILJ : [UNSL]< UNSOL_CALL_RING [SUB0]//制式回落Line 13932: 08-13 18:18:17.379 2310 2396 D RILJ : [UNSL]< UNSOL_RESPONSE_NETWORK_STATE_CHANGED [SUB0]Line 13954: 08-13 18:18:17.382 2310 2560 D RILJ : [5530]> VOICE_REGISTRATION_STATE [SUB0]Line 13961: 08-13 18:18:17.433 2310 2396 D RILJ : [5530]< VOICE_REGISTRATION_STATE {.regState = REG_HOME, .rat = 3, .cssSupported = false, .roamingIndicator = 1, .systemIsInPrl = -1, .defaultRoamingIndicator = -1, .reasonForDenial = 0, .cellIdentity = {.cellInfoType = WCDMA, .cellIdentityGsm = [], .cellIdentityWcdma = [{.base = {.mcc = 460, .mnc = 01, .lac = 47901, .cid = 203242279, .psc = 510, .uarfcn = -1}, .operatorNames = {.alphaLong = CHN-UNICOM, .alphaShort = UNICOM}}], .cellIdentityCdma = [], .cellIdentityLte = [], .cellIdentityTdscdma = []}} [SUB0]Line 13967: 08-13 18:18:17.511 2310 2396 D RILJ : [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED [SUB0]Line 13968: 08-13 18:18:17.519 2310 2310 D RILJ : [5532]> GET_CURRENT_CALLS [SUB0]Line 13970: 08-13 18:18:17.544 2310 2310 D GsmCdmaCallTracker: Event EVENT_POLL_CALLS_RESULT ReceivedLine 13971: 08-13 18:18:17.544 2310 2310 D GsmCdmaCallTracker: [0] update phone state, old=IDLE new=IDLELine 13972: 08-13 18:18:17.544 2310 2396 D RILJ : [5532]< GET_CURRENT_CALLS {} [SUB0]//INCOMINGLine 13974: 08-13 18:18:17.552 2310 2396 D RILJ : [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED [SUB0]Line 13975: 08-13 18:18:17.553 2310 2310 D RILJ : [5534]> GET_CURRENT_CALLS [SUB0]Line 13978: 08-13 18:18:17.570 2310 2310 D GsmCdmaCallTracker: Event EVENT_POLL_CALLS_RESULT ReceivedLine 13979: 08-13 18:18:17.570 2310 2396 D RILJ : [5534]< GET_CURRENT_CALLS {[id=1,INCOMING,toa=129,norm,mt,0,voc,noevp,,cli=1,,3,audioQuality=1] } [SUB0]Line 13980: 08-13 18:18:17.570 2310 2310 D GsmCdmaCallTracker: [0] pendingMo=null, dc=id=1,INCOMING,toa=129,norm,mt,0,voc,noevp,,cli=1,,3,audioQuality=1Line 13981: 08-13 18:18:17.570 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] acquireWakeLockLine 13988: 08-13 18:18:17.573 2310 2310 D GsmCdmaCallTracker: [0] Notify new ring id=1,INCOMING,toa=129,norm,mt,0,voc,noevp,,cli=1,,3,audioQuality=1Line 13989: 08-13 18:18:17.573 2310 2310 D GsmCdmaCallTracker: [0] update phone state, old=IDLE new=RINGING//ActiveLine 14099: 08-13 18:18:19.143 2310 2396 D RILJ : [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED [SUB0]Line 14100: 08-13 18:18:19.145 2310 2310 D RILJ : [5540]> GET_CURRENT_CALLS [SUB0]Line 14103: 08-13 18:18:19.154 2310 2396 D RILJ : [5538]< GET_CURRENT_CALLS {[id=1,ACTIVE,toa=129,norm,mt,0,voc,noevp,,cli=1,,3,audioQuality=1] } [SUB0]Line 14104: 08-13 18:18:19.154 2310 2310 D GsmCdmaCallTracker: Event EVENT_POLL_CALLS_RESULT ReceivedLine 14109: 08-13 18:18:19.159 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] parent= INCOMING, newParent= IDLELine 14110: 08-13 18:18:19.159 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] --dssds----Line 14111: 08-13 18:18:19.159 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] update: parent=ACTIVE, hasNewParent=false, wasConnectingInOrOut=true, wasHolding=false, isConnectingInOrOut=false, changed=trueLine 14112: 08-13 18:18:19.159 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] onConnectedInOrOut: connectTime=1565691499159Line 14113: 08-13 18:18:19.159 2310 2310 D GsmCdmaConnection: [GsmCdmaConn] releaseWakeLockLine 14114: 08-13 18:18:19.161 2310 2310 D GsmCdmaCallTracker: [0] update phone state, old=RINGING new=OFFHOOK//Disconnect,主动挂断Line 14143: 08-13 18:18:20.870 2310 2396 D RILJ : [UNSL]< UNSOL_RESPONSE_NETWORK_STATE_CHANGED [SUB0]Line 14160: 08-13 18:18:20.876 2310 2310 D RILJ : [5547]> GET_CURRENT_CALLS [SUB0]Line 14166: 08-13 18:18:20.999 2310 2310 D GsmCdmaCallTracker: Event EVENT_POLL_CALLS_RESULT ReceivedLine 14167: 08-13 18:18:21.000 2310 2396 D RILJ : [5547]< GET_CURRENT_CALLS {} [SUB0]Line 14191: 08-13 18:18:21.055 2310 2310 D GsmCdmaCallTracker: Event EVENT_POLL_CALLS_RESULT ReceivedLine 14192: 08-13 18:18:21.055 2310 2310 D GsmCdmaConnection: onDisconnect: cause=3Line 14194: 08-13 18:18:21.057 2310 2310 D GsmCdmaCallTracker: [0] update phone state, old=OFFHOOK new=IDLE//制式回升4GLine 14268: 08-13 18:18:22.395 2310 2396 D RILJ : [UNSL]< UNSOL_RESPONSE_NETWORK_STATE_CHANGED [SUB0]Line 14276: 08-13 18:18:22.398 2310 2560 D RILJ : [5565]> VOICE_REGISTRATION_STATE [SUB0]Line 14286: 08-13 18:18:22.460 2310 2396 D RILJ : [5555]< VOICE_REGISTRATION_STATE {.regState = REG_HOME, .rat = 14, .cssSupported = false, .roamingIndicator = -1, .systemIsInPrl = -1, .defaultRoamingIndicator = -1, .reasonForDenial = 0, .cellIdentity = {.cellInfoType = LTE, .cellIdentityGsm = [], .cellIdentityWcdma = [], .cellIdentityCdma = [], .cellIdentityLte = [{.base = {.mcc = 460, .mnc = 01, .ci = 196186673, .pci = 186, .tac = 37147, .earfcn = 1650}, .operatorNames = {.alphaLong = CHN-UNICOM, .alphaShort = UNICOM}, .bandwidth = 2147483647}], .cellIdentityTdscdma = []}} [SUB0]
1.3 主动打电话对方先挂
当主动打电话对方先挂断时,与主动打主动挂的区别在于Disconnect部分的onDisconnect: cause
Line 12599: 08-13 18:18:04.341 2310 2396 D RILJ : [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED [SUB0]Line 12600: 08-13 18:18:04.342 2310 2310 D RILJ : [5408]> GET_CURRENT_CALLS [SUB0]Line 12605: 08-13 18:18:04.476 2310 2396 D RILJ : [5408]< GET_CURRENT_CALLS {} [SUB0]Line 12606: 08-13 18:18:04.476 2310 2310 D GsmCdmaCallTracker: Event EVENT_POLL_CALLS_RESULT ReceivedLine 12608: 08-13 18:18:04.478 2310 2310 D GsmCdmaCallTracker: [0] update phone state, old=OFFHOOK new=OFFHOOKLine 12613: 08-13 18:18:04.489 2310 2310 D GsmCdmaConnection: onDisconnect: cause=2Line 12615: 08-13 18:18:04.490 2310 2310 D GsmCdmaCallTracker: [0] update phone state, old=OFFHOOK new=IDLE
1.4 接电话对方挂断
与接电话主动挂断的区别在于Disconnect:cause
Line 15129: 08-13 18:18:37.715 2310 2310 D GsmCdmaConnection: onDisconnect: cause=2
2 Modem侧
断开了UE与LTE的RRC
连接到CDMA
2.1 主机打电话挂电话
其中SETUP的参数中有被叫电话号码
挂断电话Disconnect
打完电话后释放与CDMA的RRC连接
再进行TAU驻到4G
第二次测量报告的参考信号的功率值30-140=-110刚好等于门限值,故而再次配置,但由下图展示的结果可知仍不理想,故而进行了网络切换,切换到CDMA。
2.2 打电话对方挂断
对方挂断电话DISCONNECT,本机挂断时:
断开与CDMA的RRC连接
2.3 接电话对方挂断
在转换到CDMA制式后,连接了RRC后,接收来电
2.4 接电话本机挂断
流程与接电话对方挂断相同,不同在于信令方向,如DISCONNECT中,被叫:
如果觉得《未开通Volte时的拨打/接通电话——CU》对你有帮助,请点赞、收藏,并留下你的观点哦!