diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2019-11-12 01:23:04 +0100 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2019-11-23 07:59:07 +0000 |
commit | 06b859ca314f53a902329ed95848dbafef1d4f87 (patch) | |
tree | 46cee580ca0cd2b7aa582a60f8ab5dd955d1415c | |
parent | 36558d9526185bd1d5eb2f86fcf7cfabf40ab2a1 (diff) |
msc: add sdp to MNCC
SDP is added to the MNCC protocol in osmo-msc
Ie16f0804c4d99760cd4a0c544d0889b6313eebb7.
This patch adds SDP to the ttcn3 MNCC messaging.
These changes still work with current osmo-msc master that doesn't send SDP /
ignores received SDP in MNCC.
Change-Id: Ic9568c8927507e161aadfad1a4d20aa896d8ae30
-rw-r--r-- | library/MNCC_EncDec.cc | 3 | ||||
-rw-r--r-- | library/MNCC_Types.ttcn | 149 | ||||
-rw-r--r-- | library/mncc.h | 4 |
3 files changed, 106 insertions, 50 deletions
diff --git a/library/MNCC_EncDec.cc b/library/MNCC_EncDec.cc index b4937e77..f2692d7a 100644 --- a/library/MNCC_EncDec.cc +++ b/library/MNCC_EncDec.cc @@ -259,7 +259,7 @@ MNCC__PDU dec__MNCC__PDU(const OCTETSTRING& in) case MNCC_RTP_FREE: in_rtp = (const struct gsm_mncc_rtp *) in_mncc; rtp = MNCC__PDU__Rtp(in_rtp->callref, in_rtp->ip, in_rtp->port, in_rtp->payload_type, - in_rtp->payload_msg_type); + in_rtp->payload_msg_type, in_rtp->sdp); u.rtp() = rtp; break; default: @@ -315,6 +315,7 @@ MNCC__PDU dec__MNCC__PDU(const OCTETSTRING& in) sign.imsi() = CHARSTRING(in_mncc->imsi); sign.lchan__type() = in_mncc->lchan_type; sign.lchan__mode() = in_mncc->lchan_mode; + sign.sdp() = in_mncc->sdp; u.signal() = sign; break; } diff --git a/library/MNCC_Types.ttcn b/library/MNCC_Types.ttcn index 828f341c..52965791 100644 --- a/library/MNCC_Types.ttcn +++ b/library/MNCC_Types.ttcn @@ -360,7 +360,9 @@ type record MNCC_PDU_Signal { charstring imsi, uint8_t lchan_type, /* empty in OSmoMSC */ - uint8_t lchan_mode /* empty in OsmoMSC */ + uint8_t lchan_mode, /* empty in OsmoMSC */ + + charstring sdp optional }; @@ -374,7 +376,9 @@ type record MNCC_PDU_Rtp { uint32_t ip, uint16_t rtp_port, uint32_t payload_type, - uint32_t payload_msg_type + uint32_t payload_msg_type, + + charstring sdp optional }; type record MNCC_PDU_Hello { @@ -464,7 +468,8 @@ template MNCC_PDU ts_MNCC_SIMPLE(MNCC_MsgType msg_type, uint32_t call_id) := { emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -494,7 +499,8 @@ template MNCC_PDU tr_MNCC_SIMPLE(template MNCC_MsgType msg_type, template uint32 emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -527,7 +533,8 @@ template MNCC_PDU ts_MNCC_SETUP_req(uint32_t call_id, charstring called, charstr emergency := omit, imsi := imsi, lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } }; @@ -559,7 +566,8 @@ template MNCC_PDU tr_MNCC_SETUP_req(template uint32_t call_id := ?, emergency := *, imsi := imsi, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } }; @@ -592,7 +600,8 @@ template MNCC_PDU ts_MNCC_SETUP_rsp(uint32_t call_id, charstring imsi := "", emergency := omit, imsi := imsi, lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } }; @@ -623,7 +632,8 @@ template MNCC_PDU tr_MNCC_SETUP_rsp(template uint32_t call_id, emergency := omit, imsi := imsi, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } }; @@ -656,7 +666,8 @@ template MNCC_PDU tr_MNCC_SETUP_ind(template uint32_t call_id := ?, template MNC emergency := *, imsi := imsi, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -688,7 +699,8 @@ template (value) MNCC_PDU ts_MNCC_SETUP_ind(uint32_t call_id, MNCC_number called emergency := omit, imsi := imsi, lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -719,7 +731,8 @@ template MNCC_PDU ts_MNCC_SETUP_CNF(uint32_t call_id, template MNCC_number conne emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -750,7 +763,8 @@ template MNCC_PDU tr_MNCC_SETUP_cnf(uint32_t call_id, template MNCC_number conne emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -791,7 +805,8 @@ template MNCC_PDU tr_MNCC_REJ_req(template uint32_t call_id, template MNCC_cause emergency := omit, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -822,7 +837,8 @@ template MNCC_PDU ts_MNCC_REJ_ind(uint32_t call_id, template MNCC_cause cause := emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -855,7 +871,8 @@ template MNCC_PDU tr_MNCC_CALL_CONF_ind(template uint32_t call_id, template MNCC emergency := omit, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -887,7 +904,8 @@ template MNCC_PDU ts_MNCC_CALL_CONF_ind(uint32_t call_id, emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -922,7 +940,8 @@ template MNCC_PDU ts_MNCC_CALL_PROC_req(uint32_t call_id, template MNCC_bearer_c emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -955,7 +974,8 @@ template MNCC_PDU tr_MNCC_CALL_PROC_req(template uint32_t call_id, emergency := omit, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -988,7 +1008,8 @@ template MNCC_PDU ts_MNCC_PROGRESS_req(uint32_t call_id, MNCC_progress prog, emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1021,7 +1042,8 @@ template MNCC_PDU ts_MNCC_ALERT_req(uint32_t call_id, template MNCC_progress pro emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1053,7 +1075,8 @@ template MNCC_PDU tr_MNCC_ALERT_req(template uint32_t call_id, emergency := omit, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1088,7 +1111,8 @@ template MNCC_PDU tr_MNCC_ALERT_ind(template uint32_t call_id, template MNCC_pro emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1120,7 +1144,8 @@ template (value) MNCC_PDU ts_MNCC_ALERT_ind(uint32_t call_id, emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1152,7 +1177,8 @@ template MNCC_PDU ts_MNCC_NOTIFY_req(uint32_t call_id, MNCC_notify notify) := { emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1183,7 +1209,8 @@ template MNCC_PDU tr_MNCC_NOTIFY_ind(template uint32_t call_id, template MNCC_no emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1217,7 +1244,8 @@ template MNCC_PDU tr_MNCC_DISC_ind(template uint32_t call_id := ?, template MNCC emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1249,7 +1277,8 @@ template (value) MNCC_PDU ts_MNCC_DISC_ind(uint32_t call_id, template (value) MN emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1283,7 +1312,8 @@ template MNCC_PDU ts_MNCC_DISC_req(uint32_t call_id, MNCC_cause cause, emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1316,7 +1346,8 @@ template MNCC_PDU tr_MNCC_DISC_req(template uint32_t call_id, emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1349,7 +1380,8 @@ template MNCC_PDU tr_MNCC_REL_ind(template uint32_t call_id := ?, template MNCC_ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1381,7 +1413,8 @@ template (value) MNCC_PDU ts_MNCC_REL_ind(uint32_t call_id, emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1413,7 +1446,8 @@ template MNCC_PDU ts_MNCC_REL_req(uint32_t call_id, MNCC_cause cause, emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1443,7 +1477,8 @@ template MNCC_PDU tr_MNCC_REL_req(template uint32_t call_id, template MNCC_cause emergency := omit, imsi := ?, lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1490,7 +1525,8 @@ template MNCC_PDU ts_MNCC_FACILITY_req(uint32_t call_id, charstring fac) := { emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1521,7 +1557,8 @@ template MNCC_PDU tr_MNCC_FACILITY_ind(template uint32_t call_id := ?, template emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1552,7 +1589,8 @@ template MNCC_PDU tr_MNCC_START_DTMF_ind(template uint32_t call_id := ?, templat emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1583,7 +1621,8 @@ template MNCC_PDU ts_MNCC_START_DTMF_rsp(uint32_t call_id, MNCC_keypad keypad) : emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1614,7 +1653,8 @@ template MNCC_PDU ts_MNCC_START_DTMF_rej(uint32_t call_id, MNCC_cause cause) := emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1653,7 +1693,8 @@ template MNCC_PDU tr_MNCC_MODIFY_ind(template uint32_t call_id := ?, template MN emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1684,7 +1725,8 @@ template MNCC_PDU ts_MNCC_MODIFY_rsp(uint32_t call_id, MNCC_bearer_cap bcap) := emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1715,7 +1757,8 @@ template MNCC_PDU ts_MNCC_MODIFY_req(uint32_t call_id, MNCC_bearer_cap bcap) := emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1747,7 +1790,8 @@ template MNCC_PDU tr_MNCC_MODIFY_cnf(template uint32_t call_id := ?, emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1778,7 +1822,8 @@ template MNCC_PDU ts_MNCC_USERINFO_req(uint32_t call_id, MNCC_useruser uu, integ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1810,7 +1855,8 @@ template MNCC_PDU tr_MNCC_USERINFO_ind(template uint32_t call_id := ?, template emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1849,7 +1895,8 @@ template MNCC_PDU ts_MNCC_HOLD_rej(uint32_t call_id, MNCC_cause cause) := { emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1877,7 +1924,8 @@ template MNCC_PDU ts_MNCC_SIMPLE_RTP(MNCC_MsgType msg_type, uint32_t call_id) := ip := 0, rtp_port := 0, payload_type := 0, - payload_msg_type := 0 + payload_msg_type := 0, + sdp := "" } } } @@ -1897,7 +1945,8 @@ template MNCC_PDU tr_MNCC_RTP_CREATE(template uint32_t call_id := ?, ip := ip, rtp_port := rtp_port, payload_type := payload_type, - payload_msg_type := ? + payload_msg_type := ?, + sdp := * } } } @@ -1911,7 +1960,8 @@ template MNCC_PDU ts_MNCC_RTP_CONNECT(uint32_t call_id, uint32_t ip, uint32_t rt ip := ip, rtp_port := rtp_port, payload_type := pt, - payload_msg_type := 0 + payload_msg_type := 0, + sdp := "" } } } @@ -1926,7 +1976,8 @@ template MNCC_PDU tr_MNCC_RTP_CONNECT(template uint32_t call_id, ip := ip, rtp_port := rtp_port, payload_type := pt, - payload_msg_type := 0 + payload_msg_type := 0, + sdp := "" } } } diff --git a/library/mncc.h b/library/mncc.h index 3e00db8a..9aff9481 100644 --- a/library/mncc.h +++ b/library/mncc.h @@ -265,6 +265,8 @@ struct gsm_mncc { unsigned char lchan_type; unsigned char lchan_mode; + + char sdp[1024]; }; struct gsm_data_frame { @@ -296,6 +298,8 @@ struct gsm_mncc_rtp { uint16_t port; uint32_t payload_type; uint32_t payload_msg_type; + + char sdp[1024]; }; struct gsm_mncc_bridge { |