bts: f_TC_rtp: Chose payload suitable for given codec
Change-Id: I4dbc621c347811f2e320f5001170937ae9c6499c
This commit is contained in:
parent
16a57f17b7
commit
29713c3946
|
@ -2705,6 +2705,27 @@ private function f_RTP_len_by_chan_mod(RSL_IE_ChannelMode chmod) return integer
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function f_RTP_pl_by_chan_mod(RSL_IE_ChannelMode chmod) return octetstring {
|
||||||
|
select (chmod) {
|
||||||
|
case (ts_RSL_ChanMode(RSL_CHRT_TCH_F, RSL_CMOD_SP_GSM1)) {
|
||||||
|
return 'D00000000000000000000000000000000000000000000000000000000000000000'O;
|
||||||
|
}
|
||||||
|
case (ts_RSL_ChanMode(RSL_CHRT_TCH_F, RSL_CMOD_SP_GSM2)) {
|
||||||
|
return 'C0000000000000000000000000000000000000000000000000000000000000'O
|
||||||
|
}
|
||||||
|
case (ts_RSL_ChanMode(RSL_CHRT_TCH_F, RSL_CMOD_SP_GSM3)) {
|
||||||
|
return ''O; // FIXME
|
||||||
|
}
|
||||||
|
case (ts_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM1)) {
|
||||||
|
return '700000000000000000000000000000'O;
|
||||||
|
}
|
||||||
|
case (ts_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM3)) {
|
||||||
|
return ''O; // FIXME
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ''O;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* establish DChan, verify existance + contents of RTP stream */
|
/* establish DChan, verify existance + contents of RTP stream */
|
||||||
function f_TC_rtp(charstring id) runs on ConnHdlr {
|
function f_TC_rtp(charstring id) runs on ConnHdlr {
|
||||||
|
@ -2744,8 +2765,8 @@ function f_TC_rtp(charstring id) runs on ConnHdlr {
|
||||||
[] as_l1_dcch();
|
[] as_l1_dcch();
|
||||||
/* respond to TCH DL with TCH UL (codec frame) */
|
/* respond to TCH DL with TCH UL (codec frame) */
|
||||||
[] L1CTL.receive(tr_L1CTL_TRAFFIC_IND(g_chan_nr, ?, *, ?, ?)) {
|
[] L1CTL.receive(tr_L1CTL_TRAFFIC_IND(g_chan_nr, ?, *, ?, ?)) {
|
||||||
var octetstring fr := 'D00000000000000000000000000000000000000000000000000000000000000000'O;
|
var octetstring pl := f_RTP_pl_by_chan_mod(g_pars.chan_mode);
|
||||||
L1CTL.send(ts_L1CTL_TRAFFIC_REQ(g_chan_nr, ts_RslLinkID_DCCH(0), fr));
|
L1CTL.send(ts_L1CTL_TRAFFIC_REQ(g_chan_nr, ts_RslLinkID_DCCH(0), pl));
|
||||||
repeat;
|
repeat;
|
||||||
}
|
}
|
||||||
/* ignore everything else L1CTL might send us */
|
/* ignore everything else L1CTL might send us */
|
||||||
|
|
Loading…
Reference in New Issue