As title … …
Story: 遇到一種新的格式, 既有的 code, parse 不到預期的值 …
- 如圖為封包:
- XML 內容:
- 根據用戶提供的Notify XML 來看
<Null:simservs xmlns:Null="http://uri.etsi.org/ngn/params/xml/simservs/xcap">
<Null:dial-tone-management>
<Null:dial-tone-pattern>standard-dial-tone</Null:dial-tone-pattern>
<Null:mcid-service>mcid-service-withdrawn</Null:mcid-service>
<Null:no-dialling-behaviour>rejectCall</Null:no-dialling-behaviour>
<Null:three-pty-service>three-pty-service-withdrawn</Null:three-pty-service>
<Null:cw-service>cw-service-provisioned</Null:cw-service>
</Null:dial-tone-management>
</Null:simservs> - 問題點在於: 沒辦法 parse 到 standard-dial-tone, 所以沒辦法設定正確的參數, 進而播放正確的 Tone
- 根據用戶提供的Notify XML 來看
- 文件 TS183 043 - V2.5.1 - Telecommunications and Internet
- <?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:ss="http://uri.etsi.org/ngn/params/xml/simservs/xcap"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://uri.etsi.org/ngn/params/xml/simservs/xcap" elementFormDefault="qualified"
attributeFormDefault="unqualified"> - <xs:element name="dial-tone-pattern" default="standard-dial-tone"
minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="standard-dial-tone"/>
<xs:enumeration value="special-condition-tone"/>
<xs:enumeration value="message-waiting-tone"/>
</xs:restriction>
</xs:simpleType>
</xs:element> - <xs:element name="mcid-service" default="mcid-service-withdrawn" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="mcid-service-provisioned"/>
<xs:enumeration value="mcid-service-withdrawn"/>
</xs:restriction>
</xs:simpleType>
</xs:element> - Set Call Forward 會 送 SIP-INFO trigger
<xs:element name="no-dialling-behaviour" default="rejectCall" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="rejectCall"/>
<xs:enumeration value="immediateCallSetup"/>
<xs:enumeration value="deferredCallSetup"/>
</xs:restriction>
</xs:simpleType>
</xs:element>