neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/32164 )


Change subject: wip: how osmo-bsc might use SDP strings directly
......................................................................

wip: how osmo-bsc might use SDP strings directly

Change-Id: Ie91de7e913235b04e84e81b6ce940364d92162d6
---
M src/osmo-bsc/bsc_subscr_conn_fsm.c
M src/osmo-bsc/lchan_rtp_fsm.c
2 files changed, 41 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/64/32164/1

diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c 
b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index de9d4d2..b8bf15a 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -776,6 +776,22 @@
        };
        mgcp_pick_codec(&mgw_info, for_lchan, false);

+       /* TODO: add full SDP to the MGCP command
+       struct sdp_msg sdp = {
+               .ptime = 20,
+       };
+
+       {
+               enum mgcp_codecs codec = 
chan_mode_to_mgcp_codec(lchan->activate.ch_mode_rate.chan_mode,
+                                                                lchan->type == 
GSM_LCHAN_TCH_H? false : true);
+               struct codec_mapping *m = codec_mapping_by_mgcp_codec(codec);
+               if (m)
+                       sdp_audio_codecs_add_copy(dst, &m->sdp);
+       }
+
+       sdp_msg_to_sdp_str_buf(mgw_info->sdp, sizeof(mgw_info->sdp), &sdp);
+       */
+
        rc = osmo_strlcpy(mgw_info.addr, addr, sizeof(mgw_info.addr));
        if (rc <= 0 || rc >= sizeof(mgw_info.addr)) {
                LOGPFSML(conn->fi, LOGL_ERROR, "Failed to compose MGW endpoint 
address for MGW -> MSC\n");
diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c
index 7e9c31f..11006fa 100644
--- a/src/osmo-bsc/lchan_rtp_fsm.c
+++ b/src/osmo-bsc/lchan_rtp_fsm.c
@@ -912,6 +912,22 @@
        }
 }

+/* TODO: implement this
+int lchan_add_codecs_to_sdp(struct sdp_audio_codecs *dst, const struct 
gsm_lchan *lchan)
+{
+       enum mgcp_codecs codec = 
chan_mode_to_mgcp_codec(lchan->activate.ch_mode_rate.chan_mode,
+                                                        lchan->type == 
GSM_LCHAN_TCH_H? false : true);
+
+       TODO codec_mapping so far only exists in osmo-msc.git
+       struct codec_mapping *m = codec_mapping_by_mgcp_codec(codec);
+       if (!m)
+               return 0;
+
+       sdp_audio_codecs_add_copy(dst, &m->sdp);
+       return 0;
+}
+*/
+
 void mgcp_pick_codec(struct mgcp_conn_peer *verb_info, const struct gsm_lchan 
*lchan, bool bss_side)
 {
        enum mgcp_codecs codec = 
chan_mode_to_mgcp_codec(lchan->activate.ch_mode_rate.chan_mode,

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32164
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ie91de7e913235b04e84e81b6ce940364d92162d6
Gerrit-Change-Number: 32164
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofm...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to