IMS短信配置
SMS Over IMS procedure and related NV/EFS settings
随着IMS大规模商用,越来越多的IMS短消息问题被暴露了出来。根据我们的分析与总结,
大部分问题都归结为配置问题。这个KBA我们就详细总结了IMS 短信在WMS/NAS模块的处理流程,
以及相关NV/EFS的用法和推荐设置供大家参考。
- IMS Transport Registration
- Example code flow for GW mode IMS SMS procedure
- Log Snippet of a MO IMS SMS
- SMS retry 机制
- NV/EFS settings
- Appendix:
WMS作为短消息处理的一个总控模块,负责SMS路由到不同rat的协议层进行进一步处理。一般来说WMS会根据client来的message mode来调用相应的API对短消息进行处理GW API (wms_msg_send_gw() )or CDMA API(wms_msg_cdma_send_client_message() )。对于IMS短消息来说比较常见的是GW mode短消息格式,所以本文所涉及的代码流程例子仅针对GW mode IMS短消息。
1. IMS Transport Registration
要想通过IMS发送短消息很重要的一个前提必须是IMS在网络侧成功注册了SMS service。当sms_domain_pref 设置为PS Pref (NV#66472)并且IMS模块本身打开了SMSEnable NV以及SMS service bit mask (详见NV/EFS settings),IMS就会在发起注册的时候enable SMS feature tag,当网络回复SMS service 注册成功IMS 会调用wms_msg_transport_cap_update() 通知WMS 更新SMS 注册transport 为WMS_MSG_TRANSPORT_TYPE_SMS_OVER_IMS。此时当client发送短消息,WMS/NAS最终调用IMS注册到WMS的CB函数 qpOriginateSmsCb()发送短消息至IMS模块(具体流程详见Example code flow for GW mode IMS SMS procedure)
- IMS 初始化阶段会注册给WMS一个CB供SMS发送: wms_msg_transport_reg_mo_sms_cb->qpOriginateSmsCb -> qipcallsms_dpl_cb
//register
02:48:00.441 qpDplSms.c 01132 qpSmsRegisterForMoSms - Callback Pointer for MO SMS registered with WMS --> d05bf428
- 网络回复SMS cap可用
1939 00070320 m: <sip:440511907300305@[2001:268:2052:bc3f:0:19:7370:6601]:5060>;+sip.instance="<urn:gsma:imei:00440172-794387-0>";+g.3gpp.accesstype="cellular2";+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";+g.3gpp.smsip
- IMS通知WMS SMS transport 更新: qpSmsUpdateTransportCapability-> wms_msg_transport_cap_update
[ wmsmsg.c 13630] Current transport cap = 1048576; transport capability notified to clients = 262144 |
如果IMS没能成功注册SMS service,WMS不会有注册的IMS transport,那么短消息只能通过LGW走CS_Domain发送。
2. Example code flow for GW mode IMS SMS procedure
wms_msg_send_client_message()
->wms_msg_send_gw()
->wms_msg_choose_registered_transport()
->wms_cm_gw_send_rl_data()
->CMCNas_SendData()
->CMCNas_MN_SendData()
->MN_process_SM_RL_DATA_REQ()
->MN_control_SMS_RL( connection_id, s_mo_sms_req )
if(mo_sms_transport_type == NAS_MSG_TRANSPORT_TYPE_SMS_OVER_IMS)
{
MN_put_MNIMS_MO_RPDU();
->wms_mn_mo_sms_callback()
->qpOriginateSmsCb() \\WMS注册的发送短消息回调函数
}
else
{
MN_put_MNSMS_EST_REQ();
->MN_send_message()\\CS domain 短消息
}
3. Log Snippet of a MO IMS SMS
Log Snippet:
//WMS_MSG_TRANSPORT_TYPE_SMS_OVER_IMS
wmsmsg.c 4030] MO record transport type: 0
wmscm_gw.c 662] MO SMS Message Sent to MN 0
wmsmsg.c 4490] GW MO Record 0 in use SMI 151
wmsmsg.c 4529] wms_msg_send_gw() returns 0
wmsmsg.c 1257] Notify: 0 WMS_MSG_EVENT_SEND
[mn_process_smrl_msgs.c 115] DS: SUB 0 =MNCNM= transport type recd = 1, current transport type is set at 2
[mn_process_smrl_msgs.c 141] DS: SUB 0 =MNCNM= transport type recd = 1, transport type is now set at 1, success = 1
[mn_process_smrl_msgs.c 184] DS: SUB 0 =MNCNM= MN NO MO SMS in Progress
[ mn_timers.c 487] DS: SUB 0 =MNCNM= SMR-3 started timer 0
[mn_sms_processing.c 764] DS: SUB 0 =MNCNM= SMR-3 transitioned from state 0 to 1
[ wmsmsg.c 13331] wms_mn_mo_sms_callback is called to send RP message with type 0
[ qpDplSms.c 1005] qpOriginateSmsCb: as_id[1]
4. NV/EFS settings
| NV/EFS ID | Tag | Path | Recommend value for IMS | Usage |
|---|---|---|---|---|
| 66472 | sms_domain_pref | /nv/item_files/modem/ mmode/ sms_domain_pref | 1 | Set to 1 PS pref 0 PS not allowed |
| 66473 | sms_mandatory | /nv/item_files/modem/ mmode/ sms_mandatory | 0 | when set to 1, if NV #66472 was 0 or was 1 and IMS SMS service reg failed, LTE will be blocked and fallback to 3G/2G. see appendix code snippet of NV66473 usage for more detail data card should set to 0 |
| 73833 | SmsEnabled | /nv/item_files/ims/ qp_ims_service_enable ment_config | 1 | SmsEnable on legacy platform it was iSMSOverIPNetworkIn dication in NV67259 ' IMS SMS Configuration ' This NV was start from Atlas platform |
| 67259 | IMS SMS Configuration | /nv/item_files/ims/ qp_ims_sms_config iSMSOverIPNetworkIn dication | 1 | Only applicable on legacy(JO/TA) |
| 71527 | IMS Reg Config Db | /nv/item_files/ims/ qp_ims_reg_config_db ims_rat_apn_info[0]. iIMSServiceInfo | Bit2 set to 1 | Bit2 in iIMSServiceInfo used enable SMS feature tag registration in IMS See Appendix for more detail of the bit mask settings |
| | cs_domain_fallback | /nv/item_files/modem/ sms/ cs_domain_fallback | 0 | To allow SMS retry on CS domain when PS domain not allowed by NW |
| 73857 | enable_retry | /nv/item_files/modem/ sms/enable_retry | 1 | To allow SMS retry on receiving RP error |
If want enable SMS over IMS, below NV/EFS settings was mandatory.
1. need to set NV#66472 to PS prefer,
2. enable SMSEnable in IMS NV#73833 or NV67259
3. need enable SMS service in NV#71527 iIMSServiceInfo by set bit2 to 1, for detail in see
Appendix.
5. SMS retry 机制
有时候IMS发送短消息会失败。这时候假如手机的SMS retry是打开的(/nv/item_files/modem/sms/enable_retry),WMS会去判断要不要重试
o 如果RP_ERROR是permanent错误(参见cause list in wms_msg_rp_error_permanent()),WMS认为这时候不需要重试
o 如果GCF flag打开,WMS也不会重试
o 如果IMS短消息发送失败并且失败的原因被WMS标识为PS domain 短信网络不支持(参考reject list in wms_msg_mo_network_no_support()),那么该失败短消息需要fallback到CS domain重新尝试发送。这里需要将/nv/item_files/modem/sms/cs_domain_fallback设置为0。如果不将此NV设置为0,WMS也不会在CS域重试。
o 其它RP_Error, WMS 仍旧会在IMS上发起重试
6. Appendix:
BIT mask mapping of iIMSServiceInfo in NV#71527
QP_VOLTE = 0, /*VOLTE service indication*/
QP_VT = 1, /*VT service indication*/
QP_SMS = 2, /*SMS service indication*/
QP_IM = 3, /*Instant message service indication*/
QP_VS = 4, /*VS service indication*/
QP_IS = 5, /*Image share service indication*/
QP_MSRP = 6, /*MSRP service indication*/
QP_GL = 7, /*Geo Location service indication*/
QP_PRESENCE = 8, /*Presence service indication*/
QP_FT = 9, /*File transfer service indication*/
QP_RCS_ALL = 10, /*All RCS enable service indication*/
QP_SM = 11,
QP_DEFAULT_SRV = 15, /*If default service is enable in that case operator mode will take a preference*/
QP_USSD = 16, /*USSD service*/
QP_MAX_SERVICE = 17
- Code snippet of NV66473 usage:
/* Perform PLMN blocking only if SMS is mandatory or Device is SMS only, and device is not in volte only mode */
/* For SMS domain = PS_SMS_NOT_ALLOWED, do not consider ims reg status , as
** SMS over IMS is not allowed by device config itself
*/
if ((sds_sub_prop_ptr->gen_sub_config.is_sms_mandatory == TRUE) &&
(sds_sub_prop_ptr->gen_sub_config.sms_domain_pref[SYS_SYS_MODE_LTE] ==
SYS_SMS_DOMAIN_PREF_PS_SMS_NOT_ALLOWED ||
(sds_sub_prop_ptr->gen_sub_config.sms_domain_pref[SYS_SYS_MODE_LTE] ==
SYS_SMS_DOMAIN_PREF_PS_SMS_PREF &&
sds_sub_prop_ptr->gen_sub_info.ims_sub_info.ims_registration_status[
CM_IMS_CALL_TYPE_SMS] == CM_IMS_REG_STATUS_FAIL_PERMANENT)) &&
sys_mode == SYS_SYS_MODE_LTE )
{
/* Perform PLMN blocking as SMS is not available
** PLMN blocking will be performed only when there is no CSFB call
*/
if((cmcall_are_there_csfb_call_preferences(mm_id) == FALSE) &&
(cmcall_is_there_a_call_type_per_device(CM_CALL_TYPE_EMERGENCY) ==
CM_CALL_ID_INVALID) &&
(cmph_is_in_emergency_cb() == FALSE)
)
{
cmsds_perform_plmn_blocking(mm_id, CM_PLMN_BLOCK_REAS_NO_SMS);
}
附件列表
Java-Android手机千人开发交流QQ群:38088312,PHP开发千人高级交流QQ群:50194090,欢迎加入学习!本站为
非赢利站点,挖掘网络资源,分享个人兴趣,如有侵犯您的版权,请联系我们,我们会第一时间删除内容或添加转载出处,敬请谅解!
