iuup_cn_node.c: make it work for AMR 12.2k codec
rx_data: prepend hardcoded AMR 12.2 header "0xf03c" to the front of RTP
payload
osmo_iuup_cn_tx_payload: strip AMR header (2 bytes) from the front of RTP
payload
diff --git a/tests/iuup/iuup_test.c b/tests/iuup/iuup_test.c
index 8d96f06..e6f2ca5 100644
--- a/tests/iuup/iuup_test.c
+++ b/tests/iuup/iuup_test.c
@@ -111,7 +111,7 @@
#define RTP_PAYLOAD "6cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0"
printf("\nReceive payload encapsulated in IuUP. Expecting rx_payload() of just RTP packet\n");
printf("i.e. should strip away " IUUP_HEADER "\n");
- expect_rx_payload = RTP_HEADER RTP_PAYLOAD;
+ expect_rx_payload = RTP_HEADER "f03c" RTP_PAYLOAD;
rx_pdu(cn,
msgb_from_hex("IuUP-Data",
RTP_HEADER IUUP_HEADER RTP_PAYLOAD));
@@ -119,18 +119,18 @@
printf("\nTransmit RTP. Expecting tx_msg() with inserted IuUP header\n");
expect_tx_msg = RTP_HEADER "000002b3" RTP_PAYLOAD;
tx_payload(cn,
- msgb_from_hex("RTP data", RTP_HEADER RTP_PAYLOAD));
+ msgb_from_hex("RTP data", RTP_HEADER "f03c" RTP_PAYLOAD));
printf("\nMore RTP, each time the Frame Nr advances, causing a new header CRC.\n");
expect_tx_msg = RTP_HEADER "0100e2b3" RTP_PAYLOAD;
tx_payload(cn,
- msgb_from_hex("RTP data", RTP_HEADER RTP_PAYLOAD));
+ msgb_from_hex("RTP data", RTP_HEADER "f03c" RTP_PAYLOAD));
expect_tx_msg = RTP_HEADER "02007eb3" RTP_PAYLOAD;
tx_payload(cn,
- msgb_from_hex("RTP data", RTP_HEADER RTP_PAYLOAD));
+ msgb_from_hex("RTP data", RTP_HEADER "f03c" RTP_PAYLOAD));
expect_tx_msg = RTP_HEADER "03009eb3" RTP_PAYLOAD;
tx_payload(cn,
- msgb_from_hex("RTP data", RTP_HEADER RTP_PAYLOAD));
+ msgb_from_hex("RTP data", RTP_HEADER "f03c" RTP_PAYLOAD));
printf("All done.\n");
}
diff --git a/tests/iuup/iuup_test.ok b/tests/iuup/iuup_test.ok
index 2b09c66..8c473d6 100644
--- a/tests/iuup/iuup_test.ok
+++ b/tests/iuup/iuup_test.ok
@@ -15,14 +15,14 @@
8060944c6256042c000101020100e2b36cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
rx_payload() invoked by iuup_cn!
[IuUP] -RTP->
-8060944c6256042c000101026cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
+8060944c6256042c00010102f03c6cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
node_priv=0x2342
ok: matches expected msg
rc=0
Transmit RTP. Expecting tx_msg() with inserted IuUP header
[IuUP] <-RTP-
-8060944c6256042c000101026cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
+8060944c6256042c00010102f03c6cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
tx_msg() invoked by iuup_cn!
<-PDU- [IuUP]
8060944c6256042c00010102000002b36cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
@@ -32,7 +32,7 @@
More RTP, each time the Frame Nr advances, causing a new header CRC.
[IuUP] <-RTP-
-8060944c6256042c000101026cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
+8060944c6256042c00010102f03c6cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
tx_msg() invoked by iuup_cn!
<-PDU- [IuUP]
8060944c6256042c000101020100e2b36cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
@@ -40,7 +40,7 @@
ok: matches expected msg
rc=0
[IuUP] <-RTP-
-8060944c6256042c000101026cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
+8060944c6256042c00010102f03c6cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
tx_msg() invoked by iuup_cn!
<-PDU- [IuUP]
8060944c6256042c0001010202007eb36cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
@@ -48,7 +48,7 @@
ok: matches expected msg
rc=0
[IuUP] <-RTP-
-8060944c6256042c000101026cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
+8060944c6256042c00010102f03c6cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
tx_msg() invoked by iuup_cn!
<-PDU- [IuUP]
8060944c6256042c0001010203009eb36cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0