顯示具有 ISDN 標籤的文章。 顯示所有文章
顯示具有 ISDN 標籤的文章。 顯示所有文章

2023年9月8日 星期五

Q.931 Call States

Q.931 Call Stats,在 Q.931 提到的 calls 有 circuit-switched、packet-mode、temporary signalling、和 global call reference。

null state 不存在
c(U0): No call exists.
c(N0): No call exists.
p(U0): No access connection exists.
p(N0): No access connection exists.
t(U0): No call exists.
t(N0): No call exists.
g(Rest 0): No transaction exists.
call initiated 撥出,user 送出請求或 network 收到請求
c(U1): This state exists for an outgoing call, when the user requests call establishment from the network.
c(N1): This state exists for an outgoing call when the network has received a call establishment request but has not yet responded.
p(U1): This state exists for an outgoing access connection when the user requests access connection establishment from the network.
p(N1): This state exists for an outgoing access connection when the network has received an access connection establishment request but has not yet responded.
t(U1): This state exists for an outgoing call when the user requests call establishment from the network.
t(N1): This state exists for an outgoing call when the network has received a call establishment request but has not yet responded.
overlap sending 撥出,user 收到認可後送 overlap 訊息或 network 認可請求可接收 overlap 訊息
c(U2): This state exists for an outgoing call when the user has received acknowledgement of the call establishment request which permits the user to send additional call information to the network in overlap mode.
c(N2): This state exists for an outgoing call when the network has acknowledged the call establishment request and is prepared to receive additional call information (if any) in overlap mode.
t(U2): This state exists for an outgoing call when the user has received acknowledgement of the call establishment request which permits the user to send additional call information to the network in overlap mode.
t(N2): This state exists for an outgoing call when the network has acknowledged the call establishment request and is prepared to receive additional call information (if any) in overlap mode.
outgoing call proceeding
c(U3): This state exists for an outgoing call when the user has received acknowledgement that the network has received all call information necessary to effect call establishment.
c(N3): This state exists for an outgoing call when the network has sent acknowledgement that the network has received all call information necessary to effect call establishment.
p(U3): This state exists for an outgoing access connection when the user has received acknowledgement that the network has received all access connection information necessary to effect access connection establishment.
p(N3): This state exists for an outgoing access connection when the network has sent acknowledgement that the network has received all access connection information necessary to effect access connection establishment.
t(U3): This state exists for an outgoing call when the user has received acknowledgement that the network has received all call information necessary to effect call establishment.
t(N3): This state exists for an outgoing call when the network has sent acknowledgement that the network has received all call information necessary to effect call establishment.
call delivered
c(U4):This state exists for an outgoing call when the calling user has received an indication that remote user alerting has been initiated.
c(N4): This state exists for an outgoing call when the network has indicated hat remote user alerting has been initiated.
t(U4): This state exists for an outgoing call when the calling user has received an indication that remote user alerting has been initiated.
t(N4): This state exists for an outgoing call when the network has indicated that remote user alerting has been initiated.
call present
c(U6)"This state exists for an incoming call when the user has received a call establishment request but has not yet responded.
c(N6): This state exists for an incoming call when the network has sent a call stablishment request but has not yet received a satisfactory response.
p(U6): This state exists for an incoming access connection when the user has received an access connection establishment request but has not yet responded.
p(N6): This state exists for an incoming access connection when the network has sent an access connection establishment request but has not yet received a satisfactory response.
t(U6): This state exists for an incoming call when the user has received a call establishment request but has not yet responded.
t(N6): This state exists for an incoming call when the network has sent a call establishment request but has not yet received a satisfactory response.
call received
c(U7) This state exists for an incoming call when the user has indicated alerting but has not yet answered.
c(N7): This state exists for an incoming call when the network has received an indication that the user is alerting but has not yet received an answer.
p(U7): This state exists for an incoming access connection when the user has indicated alerting but has not yet answered.
p(N7): This state exists for an incoming access connection when the network has received an indication that the user is alerting but has not yet received an answer.
t(U7): This state exists for an incoming call when the user has indicated alerting but has not yet answered.
t(N7): This state exists for an incoming call when the network has received an indication that the user is alerting but has not yet received an answer.
connect request
c(U8) This state exists for an incoming call when the user has answered the call and is waiting to be awarded the call.
c(N8): This state exists for an incoming call when the network has received an answer but the network has not yet awarded the call.
p(U8): This state exists for an incoming access connection when the user has accepted the access connection and is waiting to be awarded the access connection.
p(N8): This state exists for an incoming access connection when the network has received an answer but the network has not yet awarded the access connection.
t(U8): This state exists for an incoming call when the user has answered the call and is awaiting to be awarded the call.
t(N8): This state exists for an incoming call when the network has received an answer but the network has not yet awarded the call.
incoming call proceeding
c(U9) This state exists for an incoming call when the user has sent acknowledgement that the user has received all call information necessary to effect call establishment.
c(N9): This state exists for an incoming call when the network has received acknowledgement that the user has received all call information necessary to effect call establishment.
p(U9): This state exists for an incoming access connection when the user has sent acknowledgement that the user has received all access connection information necessary to effect access connection establishment.
p(N9): This state exists for an incoming access connection when the network has received acknowledgment that the user has received all access connection information necessary to effect access connection establishment.
t(U9): This state exists for an incoming call when the user has sent acknowledgement that the user has received all call information necessary to effect call establishment.
t(N9): This state exists for an incoming call when the network has received acknowledgement that the user has received all call information necessary to effect call establishment.
active
c(U10) This state exists for an incoming call when the user has received an acknowledgement from the network that the user has been awarded the call. This state exists for an outgoing call when the user has received an indication that the remote user has answered the call.
c(N10): This state exists for an incoming call when the network has awarded the call to the called user. This state exists for an outgoing call when the network has indicated that the remote user has answered the call.
p(U10): This state exists for an incoming access connection when the user has received an acknowledgement from the network that the user has been awarded the access connection. This state exists for an outgoing access connection when the user has received an indication that the local network has completed the access connection.
p(N10): This state exists for an incoming access connection when the network has awarded the access connection to the called user. This state exists for an outgoing access connection when the local network has indicated that the access connection has been completed.
t(U10): This state exists for an incoming call when the user has received an acknowledgement from the network that the user has been awarded the call. This state exists for an outgoing call when the user has received an indication that the remote user has answered the call.
t(N10): This state exists for an incoming call when the network has awarded the call to the called user. This state exists for an outgoing call when the network has indicated that the remote user has answered the call.
disconnect request
c(U11) This state exists when the user has requested the network to clear the end-to-end connection (if any) and is waiting for a response.
c(N11): This state exists when the network has received a request from he user to clear the end-to-end connection (if any).
p(U11): This state exists when the user has requested the local network to clear the access connection and is waiting for a response.
p(N11): This state exists when the network has received a request from the user to clear the access connection.
disconnect indication
c(U12) This state exists when the user has received an invitation to disconnect because the network has disconnected the end-to-end connection (if any).
c(N12): This state exists when the network has disconnected the end-to-end connection (if any) and has sent an invitation to disconnect the user-network connection.
p(U12): This state exists when the user has received an invitation to disconnect because the network has disconnected the access connection to end connection (if any).
p(N12): This state exists when the network has sent an invitation to disconnect the user-network access connection.
suspend request
c(U15) This state exists when the user has requested the network to suspend the call and is waiting for a response.
c(N15): This state exists when the network has received a request to suspend the call but has not yet responded.
resume request
c(U17) This state exists when the user has requested the network to resume a previously suspended call and is waiting for a response.
c(N17): This state exists when the network has received a request to resume a previously suspended call but has not yet responded.
release request
c(U19) This state exists when the user has requested the network to release and is waiting for a response.
c(N19): This state exists when the network has requested the user to release and is waiting for a response.
p(U19): This state exists when the user has requested the network to release the access connection and is waiting for a response.
p(N19): This state exists when the network has requested the user to release the access connection and is waiting for a response.
t(U19): This state exists when the user has requested the network to release and is waiting for a response.
t(N19): This state exists when the network has requested the user to release and is waiting for a response.
call abort
c(N22): This state exists for an incoming call for the point-to-multipoint configuration when the call is being cleared before any user has been awarded the call.
p(N22): This state exists for an incoming access connection for the point-to-multipoint configuration when the access connection is being cleared before any user has been awarded the access connection.
t(N22): This state exists for an incoming call for the point-to-multipoint configuration when the call is being cleared before any user has been awarded the call.
overlap receiving
c(U25) This state exists for an incoming call when the user has acknowledged the call establishment request from the network and is prepared to receive additional call information (if any) in overlap mode.
c(N25): This state exists for an incoming call when the network has received acknowledgement of the call establishment request which permits the network to send additional call information (if any) in the overlap mode.
t(U25): This state exists for an incoming call when the user has acknowledged the call establishment request from the network and is prepared to receive additional call information (if any) in overlap mode.
t(N25): This state exists for an incoming call when the network has received acknowledgement of the call establishment request which permits the network to send additional call information (if any) in the overlap mode.
restart request
(Rest 1): This state exists for a restart transaction when the user has sent a restart request but has not yet received an acknowledgement response from the network.
(Rest 1): This state exists for a restart transaction when the network has sent a restart request but has not yet received an acknowledgement response from the user.
restart
(Rest 2): This state exists when a request for a restart has been received from the network and responses have not yet been received from all locally active call references.
(Rest 2): This state exists when a request for a restart has been received from the user and a response has not yet been received from all locally active call references.
circuitpackettempglobal
U0N0U0N0U0N0Rest0
U1N1U1N1U1N1-
U2N2--U2N2-
U3N3U3N3U3N3-
U4N4--U4N4-
U6N6U6N6U6N6-
U7N7U7N7U7N7-
U8N8U8N8U8N8-
U9N9U9N9U9N9-
U10N10U10N10U10N10-
U11N11U11N11---
U12N12U12N12---
U15N15-----
U17N17-----
U19N19U19N19U19N19-
-N22-N22-N22-
U25N25--U25N25-
------Rest1 (61)
------Rest2 (62)

Q.931 STATUS IE Call state 3.1.16, 3.2.10, 3.3.11. 3.4.3. 4.5.7

Call state value (octet 3) Bits 6 5 4 3 2 1 User State Network state 0 0 0 0 0 0 U0 – Null N0 – Null 0 0 0 0 0 1 U1 – Call initiated N1 – Call initiated 0 0 0 0 1 0 U2 – Overlap sending N2 – Overlap sending 0 0 0 0 1 1 U3 – Outgoing call proceeding N3 – Outgoing call proceeding 0 0 0 1 0 0 U4 – Call delivered N4 – Call delivered 0 0 0 1 1 0 U6 – Call present N6 – Call present 0 0 0 1 1 1 U7 – Call received N7 – Call received 0 0 1 0 0 0 U8 – Connect request N8 – Connect request 0 0 1 0 0 1 U9 – Incoming call proceeding N9 – Incoming call proceeding 0 0 1 0 1 0 U10 – Active N10 – Active 0 0 1 0 1 1 U11 – Disconnect request N11 – Disconnect request 0 0 1 1 0 0 U12 – Disconnect indication N12 – Disconnect indication 0 0 1 1 1 1 U15 – Suspend request N15 – Suspend request 0 1 0 0 0 1 U17 – Resume request N17 – Resume request 0 1 0 0 1 1 U19 – Release request N19 – Release request 0 1 0 1 1 0 – - - - - - N22 – Call abort 0 1 1 0 0 1 U25 – Overlap receiving N25 – Overlap receiving Global interface state value (octet 3) Bits 6 5 4 3 2 1 State 0 0 0 0 0 0 REST0 – Null 1 1 1 1 0 1 REST1 – Restart request 1 1 1 1 1 0 REST2 – Restart All other values are reserved

2022年10月8日 星期六

Q.931 Called party number

Q.931 Channel Identification (ITU Q.931 section 4.5.8)
87654321Octet
IE ID: 0x70 1
Length2
ext.
1
Type of numberNumber plan identification3
0Number digits (IA5 characters)4
etc.
  • Type of number
  • Number plan identification
  • Number digits:IA5 (International Alphabet No. 5) 字元也就是 ITU-T Recommendation T.50,也就是 ASCII。

參考

2022年3月4日 星期五

Q.931 Cause

Q.931 Cause (ITU Q.931 section 4.5.12,定義在 Q.850)
87654321Octet
IE ID: 0x08 1
Length2
ext.
0/1
Coding
Std.
0Location3
ext.
1
Recommendation3a
ext.
1
Cause Value4
Diagnostic(s)5
  • Coding Standard:編碼標準,無法度用 ITU-T 標準才使用其它標準。
    • 0 = ITU-T 標準
    • 1 = ISO/IEC 標準
    • 2 = national 標準
    • 3 = standard specific to identified location
  • Location
    • 0 = user (U)
    • 1 = private network serving the local user (LPN)
    • 2 = public network serving the local user (LN)
    • 3 = transit network (TN)
    • 4 = public network serving the remote user (RLN)
    • 5 = private network serving the remote user (RPN)
    • 7 = international network (INTL)
    • 10 = network beyond interworking point (BI)
    • 12~15:reserved for national use
    • 其它:spare
  • Cause Value:其中 bit 7~5 是 class 分類,表示 the general nature of the event。如下表:
ClassHex Dec Cause
0, 1 =
normal
01 1 Unallocated or unassigned number
02 2 No route to specified transit network (Transit Network Identity)
03 3 No route to destination
04 4 Send special information tone
05 5 Misdialed trunk prefix
06 6 Channel unacceptable
07 7 Call awarded and being delivered in an established channel
08 8 Prefix 0 dialed but not allowed
09 9 Prefix 1 dialed but not allowed
0A 10 Prefix 1 not dialed but required
0B 11 More digits received than allowed, call is proceeding
10 16 Normal call clearing. 如果是呼叫失敗,可能是高層協定 (如 PPP)、認證、或 idle timeout 相關問題。Also, if you have requested a callback, the remote device disconnects the call, generates this code, and then calls you back.
11 17 User busy
12 18 No user responding
13 19 T.301 expired: – User Alerted, No answer from user
15 21 Call rejected
16 22 Number changed to number in diagnostic field.
17 23 Reverse charging rejected
18 24 Call suspended
19 25 Call resumed
1A 26 Non-selected user clearing
1B 27 Destination out of order
1C 28 Invalid number format or incomplete address
1D 29 EKTS facility rejected by network
1E 30 Response to STATUS INQUIRY
1F 31 Normal, unspecified
2 = resource unavailable
21 33 Circuit out of order
22 34 No circuit/channel available
23 35 Destination unattainable
24 36 Out of order
25 37 Degraded service
26 38 Network out of order
27 39 Transit delay range cannot be achieved
28 40 Throughput range cannot be achieved
29 41 Temporary failure
2A 42 Switching equipment congestion
2B 43 Access information discarded
2C 44 Requested circuit channel not available
2D 45 Preempted
2E 46 Precedence call blocked
2F 47 Resource unavailable, unspecified
3 = service or option not available 31 49 Quality of service unavailable
32 50 Requested facility not subscribed
33 51 Reverse charging not allowed
34 52 Outgoing calls barred
35 53 Outgoing calls barred within CUG
36 54 Incoming calls barred
37 55 Incoming calls barred within CUG
38 56 Call waiting not subscribed
39 57 Bearer capability not authorized
3A 58 Bearer capability not presently available
3F 63 Service or option not available, unspecified
4 = service or option not implemented 41 65 Bearer service not implemented
42 66 Channel type not implemented
43 67 Transit network selection not implemented
44 68 Message not implemented
45 69 Requested facility not implemented
46 70 Only restricted digital information bearer capability is available
4F 79 Service or option not implemented, unspecified
5 = invalid message 51 81 Invalid call reference value
52 82 Identified channel does not exist
53 83 A suspended call exists, but this call identity does not
54 84 Call identity in use
55 85 No call suspended
56 86 Call having the requested call identity has been cleared
57 87 Called user not member of CUG
58 88 Incompatible destination
59 89 Non-existent abbreviated address entry
5A 90 Destination address missing, and direct call not subscribed
5B 91 Invalid transit network selection (national use)
5C 92 Invalid facility parameter 93 Mandatory information element is missing
5D 93 Message type non-existent or not implemented
5F 95 Invalid message, unspecified
6 = protocol error 60 96 Mandatory information element is missing
61 97 Message type non-existent or not implemented
62 98 Message not compatible with call state or message type non-existent or not implemented
63 99 Information element nonexistent or not implemented
64 100 Invalid information element contents
65 101 Message not compatible with call state
66 102 Recovery on timer expiry
67 103 Parameter non-existent or not implemented – passed on
6F 111 Protocol error, unspecified
7 = interworking 7F 127 Internetworking, unspecified
?80
+
128 +Proprietary diagnostic code (not necessarily bad). Typically used to pass proprietary control or maintenance messages between multiplexers.

範例

08 02 81 90:Class 0 Value 0

08 03 81 e2 0f :Class 6 Value 2

參考

  • https://www.viavisolutions.com/en-us/support/files/Q.931-Cause-Codes

2018年4月3日 星期二

Q.931 Channel Identification

Q.931 Channel Identification (ITU Q.931 section 4.5.13)
87654321Octet
IE ID: 0x18 1
Length2
ext.
1
Int. id.
present
Int. type0Pref./Excl.D-channel
ind
Info. channel
selection
3
ext.
0/1
Interface identifier3.1
ext.
1
Coding StandardNumber/
Map
Channel type/Map element type3.2
Channel number/Slot map3.3
  • interface identifier present 有設 => 有 octet 3.1 Interface identifier,可以有多個 byte,放界面的編號。
  • interface type= 0 表示 BRI,此時沒有 3.2 及 3.3,用 information channel selection 表示用哪個通道:00 = No channel, 01 = B1 channel, 10 = B2 channel
  • Preferred/Exclusive:0 = 偏好所選的通道 (也就是可以選別的)。1 = 排除眾議,就是要所選的通道。
  • D-channel Indicator:1 = 指 D-channel,忽略 Information Channel Selection。0 = 不是 D-channel。
  • Information Channel Selection
  • Coding Standard:0 = ITU-T 標準
  • Number/Map:0 = 用編號 (Channel number),1 = 用 bit map (Slot map)。
  • Element type:3 = B-channel
  • Channel number:MSB = 1 表示最後 byte,剩下 7-bit 為 channel 編號。
範例
0x18 0x01 0x81:BRI 偏好 B1 channel
0x18 0x03 0xA1 0x83 0x83:PRI 偏好 B channel 3

2016年1月30日 星期六

LAPD

ISDN 的 datalink 層是 Q.921,也就是 LAPD (Link Access Procedure on the D-channel),是 HDLC 的 close cousin。

在 frame 之間及閒置時送 Flag (0x7E, 01111110b),而原本 0x7E 的資料為避免和 Flag 混淆,使用了 bit stuffing 機制,也就是資料在傳送端會每遇到 5 個連續 1 會插入一個 0,接收端再移除。如果出現連續 7 個以上的 1,則視為 abort 而忽略收到的資料。

LAPD 格式
AddressControlInformationFCS
21~20~2

LAPD 運作在 Asynchronous Balanced Mode (ABM),也就是兩端是對等的、沒有主從之分,雙向各自獨立運作。2-byte FCS 檢查資料有沒有錯誤,通常用硬體計算,以下說明省略。重送時,每個 octet 的 bit 1 先送。

Address:2-byte
87654321octet
SAPIC/REA
0
1
TEIEA
1
2
  • EA:Address field extension bit,0 表示有下個 byte、1 則沒有。由於固定 2-byte,所以第一個 EA 為 0,第二個 EA 為 1。
  • C/R:0 表示用戶端是發出的指令及網路端的回覆,1 則表示網路端發出的指令及用戶端的回覆。
  • SAPI:Service Access Point Identifier
    • 0:上層是 Q.931 呼叫控制 (GR303 TMC call proc)
    • 1:I.451 封包模式的呼叫控制 (GR303 EOC, TMC switching)
    • 12:teleaction
    • 16:X.25 level 3 封包
    • 63:自己本身 Layer 2 管理
  • TEI:Terminal End Indentifier,在 SAPI = 0 時
    • 0~63:用於非自動指定 TEI 的設備,PRI 使用 0
    • 64~126:用於自動指定 TEI 的設備
    • 127:廣播給所有 Terminal Endpoints
PRI 和點對點 BRI 使用 SAPI 0 TEI 0,點對多點 BRI 使用 SAPI 63 TEI 127。

Control 欄位包括 Q.921 的 frame type、序號等。
Control87654321octet
I FrameN(S)01Information Frame:連線狀態正常及序號正確後往上層丟
N(R)P2

S Frame0000SS011Supervisory Frame:datalink 本身 supervisory 用,看 SS 2-bit
N(R)P/F2

U FrameMMMP/FMM111Unnumbered Frame:Unnumbered 就是沒序號,看 MMM 及 MM 共 5-bit

P/F 在 command 是 poll,在 response 是 final。

IN(S)0I-Frame,有 Information 欄位
S00000001RR (Receive Ready):I Frame 的 acknowledgement,可以再收。
00000101RNR:Indicates a state of temporary occupation of station (e.g., window full)
00001001REJ:重傳給定的序號之後
U000x0011UI (Unnumbered Information),有 Information 欄位 => Q.931。P/F = 0 [Q.921 5.1.1]
010P0011DISC (Disconnect command)
011F0011UA (Unnumbered Acknowledgement response)
100Fx0111FRMR (Framer reject response)
000F1111DM (Disconnected Mode response)
101P/F1111XID (eXchange IDentification):不支援?
011P1111SABME (Set Asynchronous Balanced Mode Extended):command。在連線初始化時決定 window 大小,最大是 128,也就是可以有 128 個 frame 未完成 ACK。由 Address 的 C/R 可看出遠端是 Network 端還是 User 端


window size:modulo 8 待 acknowledge 的 outstanding frames
extended window size:modulo 128,使用不同的 link initialization frame type,frame type 名稱再加上 E,例如 SABM 變成 SABME。

範例:02 01 7f
  • 02 01 (Address):C/R = 1 = network command 或 user response,SAPI = 0 = Q.931,TEI = 0 = PRI or PTP
  • 7F (Control):U frame SABME,P/F = 1
範例:02 01 01 03:RR for Q.931

範例:FC FF 03 0F 5D 72 01 FF F7 6E:TEI Request
  • FC FF (Address):C/R = 0 = user command 或 network response,SAPI = 63 = Layer 2 Management,TEI = 127 = Broadcast connection for all TEs
  • 03 (Control):UI,P/F = 0
  • 0F (Management entity identifier):固定為 0x0F。
  • 5D 72 (Ri):Request number,一個亂數
  • 01 (message type = REQUEST):請求 64 ~ 126 的 TEI,成功的話回覆 2 = ASSIGNED,失敗的話回覆 3 = DENIED。另外還有 4 = CHECK_REQUEST、5 = CHECK_RESPONSE、6 = REMOVE、7 = VERIFY。
  • FF (Ai 及 E-bit):bit 1 為 E-bit,Ai 欄位的 externsion。剩下 7-bit 為 Ai = Action Indicator = 127 = 任何 TEI。
  • F7 6E (FCS)

沒其他訊息時,每 10 秒送 RR 等回應。沒回應,每秒重送最多共四次,之後改送 SABME,也是每秒重送,直到收到 UA。

MDL-ERROR() 錯誤表

Error CodeError ConditionActionError Type
ASupervisory (F=1)Error LogReceipt of unsolicited response
BDM (F=1)Error LogReceipt of unsolicited response
CUA (F=1)TEI removal procedure or 
TEI check procedure, then if TEI:

free: remove TEI
single: no action
multiple: TEI removal procedure

Receipt of unsolicited response
DUA (F=0)TEI removal procedure or 
TEI check procedure, then if TEI:

free: remove TEI
single: no action
multiple: TEI removal procedure

Receipt of unsolicited response
EDM (F=0)Error LogReceipt of unsolicited response
FSABMEError LogPeer initiated re-establish.
GSABMETEI check procedure, then if TEI:

free: remove TEI
single: no action
multiple: TEI removal procedure

Unsuccessful retransmission (N200 times)
HDISCTEI check procedure, then if TEI:

free: remove TEI
single: no action
multiple: TEI removal procedure

Unsuccessful retransmission (N200 times)
IStatus EnquiryError LogUnsuccessful retransmission (N200 times)
JN(R) errorError LogOther
KReceipt of FRMRError LogOther
LReceipt of frame with undefined control fieldError LogOther
MReceipt of I field not permittedError LogOther
NReceipt of frame with wrong sizeError LogOther
ON201 errorError LogOther

參考

  1. Q.921 ISDN user-network interface – Data link layer specification
  2. http://www.freesoft.org/CIE/Topics/125.htm
  • ISDN Q.921-User Adaptation (IUA):透過 IP 傳送 ISDN Q.921 訊息

Q.931 訊息格式

Q.931 格式的基本欄位包括 Protocol Discriminator、Call Reference、及 Message Type,之後的欄位依據 Message Type 的需要而加,稱為 Information Element (IE)。

87654321Octet
Protocol Discriminator1
Call Reference2~
0Message Type
Information Elements as required

Protocol Discriminator 辨別是什麼協定,Q.931 用的值是 0x08,不過還有其它協定:
  • 0x08:Q.931
  • 0x4F:GR303
  • 0x03 或 0x43:維護用
Call Reference 是用在 user-network 界面的通話參考編號,用戶 (user) 端和網路 (network) 端各自獨立編號,由通話建立端決定。

87654321Octet
0000 Call Reference Length1
Flag
2
Call Referenceetc.
  • Call Reference Length:Call Reference 的長度,可能 0 ~ 3
  • Flag:此 call 建立端設為 0,受話端使用時設為 1

Message Type
  • 0000000
  • 00-----:建立通話
    • 0x01 ALERTING
    • 0x02 CALL PROCEEDING
    • 0x07 CONNECT
    • 0x0F CONNECT ACKNOWLEDGE
    • 0x03 PROGRESS
    • 0x05 SETUP:建立通話
    • 0x0D SETUP ACKNOWLEDGE
  • 01-----:通話中
    • 0x26 RESUME
    • 0x2E RESUME ACKNOWLEDGE
    • 0x22 RESUME REJECT
    • 0x25 SUSPEND
    • 0x2D SUSPEND ACKNOWLEDGE
    • 0x21 SUSPEND REJECT
    • 0x20 USER INFORMATION
  • 10-----:掛斷通話
    • 0x45 DISCONNECT
    • 0x4E RELEASE
    • 0x5A RELEASE COMPLETE
    • 0x46 RESTART
    • 0x4E RESTART ACKNOWLEDGE
  • 11-----:其它
    • 0x60 SEGMENT
    • 0x79 CONGESTION CONTROL
    • 0x7B INFORMATION:提供額外資訊,如 overlap sending。
    • 0x6E NOTIFY
    • 0x7D STATUS
    • 0x75 STATUS ENQUIRY
Information Element (IE) 都會有 IE identifier 辨別哪種 IE,有三種格式,前兩種為單一 byte,bit 8 為 1。第三種可變長度,有長度欄位決定內容長度。
type87654321Octet
a1Information element identifierContents of Information element1

b1Information element identifier1

c0Information element identifier1
Length of contents of information element2
Contents of information element3~

IE identifier

10100001Sending complete
0000
1000Cause
00011000Channel Identification:可重複
01110000Called party number
參考
  1. Q.931
  2. LAPD
  3. Q.931 over IP
  4. Q-Interface Signaling (QSIG)
    • 同樣基於 Q.921/Q.931 的一種 D-channel voice signaling 變形,作為 PBX 間溝通用的標準協定,用來建立通話和管理 PBX 間的 QSIG supplementary service,如 Multiple Subscriber Number、Call Waiting、Calling-Line Identification Presentation (CLIP)、Calling-Line Identification Restriction (CLIR)、Connected-Line Identification Presentation (COLP)、Connected-Line Identification Restriction (COLR)、Malicious Call Identification、Call Hold、Advice of Charge、Three-Way Conference、Call Diversion、CFU Supplementary Service、Path Replacement (ANF-PR)、Call Transfer by Join (SS-CT)、Call Completion to Busy Subscriber (CCBS)、和 Explicit Call Transfer。
    • 呼叫來自 private integrated services network exchange (PINX) 再繞到其它 PINX 設備。
    • Tunneling over H.323:H.323 基於 Q.931,旗下包含基本的 H.225.0 和 H.245,和 supplementary services H.450.1。H.323 Annex-M1 有規範 Tunneling QSIG over H.323,但 Cisco 使用 ISDN Generic Transparency Descriptor (GTD) 在對應的 H.225 訊息不變地傳送 QSIG 訊息。沒對應的,則 tunneled 在 H.225.0 FACILITY 訊息。
    • Tunneling over SIP:在 SIP 指示「Content-Type: application/QSIG」、「Content-Disposition: signal; handling=optional」放在 MIME 信體。非 QSIG 的 Q.931 訊息用「Content-Type: application/x-q931」。
    • https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/cube_sip/configuration/15-mt/cube-sip-15-mt-book/voi-sip-trans-tun.pdf
    • https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/sip/configuration/15-mt/sip-config-15-mt-book/voi-sip-tdm.pdf
  • Calling-Line Identification Presentation (CLIP):來電時提供主叫號碼給被叫。
  • Calling-Line Identification Restriction (CLIR):主叫限制提供主叫號碼給被叫。Calling-Line Identification Restriction Ignore:忽略主叫限制提供主叫號碼給被叫,例如撥緊急電話,即使主叫限制提供主叫號碼還是會提供。
  • Connected-Line Identification Presentation (COLP):接通時提供真正的被叫號碼給主叫。
  • Connected-Line Identification Restriction (COLR):被叫限制接通時提供真正的被叫號碼給主叫。
  • http://shannon.cm.nctu.edu.tw/netexp/isdn03.pdf 整體數位服務網路簡介

SIP header Via

所有 SIP 訊息 都要有 Via,縮寫 v。一開始的 UAC 和後續途經的每個 proxy 都會疊加一個 Via 放傳送的位址,依序作為回應的路徑。 格式 sent-protocol sent-by [ ;branch= branch ][ ; 參數 ...] s...