iuup_cn_node.c: use correct header for AMR SID frames
rx_data(): if iuup header (4 bytes) + amr payload (5 bytes) is 9 bytes
then it means that this is AMR SID (Comfort Noise Frame) and other
header should be used. The second byte of AMR header is set to 0x44.
diff --git a/tests/iuup/iuup_test.c b/tests/iuup/iuup_test.c
index e6f2ca5..6144ac8 100644
--- a/tests/iuup/iuup_test.c
+++ b/tests/iuup/iuup_test.c
@@ -116,6 +116,13 @@
msgb_from_hex("IuUP-Data",
RTP_HEADER IUUP_HEADER RTP_PAYLOAD));
+ printf("\nReceive payload encapsulated in IuUP. Expecting rx_payload() of just RTP packet\n");
+ printf("i.e. should strip away " "0401479e" "\n");
+ expect_rx_payload = RTP_HEADER "f044" "26e9b851ee";
+ rx_pdu(cn,
+ msgb_from_hex("IuUP-Data",
+ RTP_HEADER "0401479e" "26e9b851ee"));
+
printf("\nTransmit RTP. Expecting tx_msg() with inserted IuUP header\n");
expect_tx_msg = RTP_HEADER "000002b3" RTP_PAYLOAD;
tx_payload(cn,
diff --git a/tests/iuup/iuup_test.ok b/tests/iuup/iuup_test.ok
index 8c473d6..8cc4f4f 100644
--- a/tests/iuup/iuup_test.ok
+++ b/tests/iuup/iuup_test.ok
@@ -20,6 +20,17 @@
ok: matches expected msg
rc=0
+Receive payload encapsulated in IuUP. Expecting rx_payload() of just RTP packet
+i.e. should strip away 0401479e
+ -PDU-> [IuUP]
+8060944c6256042c000101020401479e26e9b851ee
+rx_payload() invoked by iuup_cn!
+ [IuUP] -RTP->
+8060944c6256042c00010102f04426e9b851ee
+node_priv=0x2342
+ok: matches expected msg
+rc=0
+
Transmit RTP. Expecting tx_msg() with inserted IuUP header
[IuUP] <-RTP-
8060944c6256042c00010102f03c6cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0