On Thu, Aug 27, 2009 at 01:16:12AM +0200, Sylvain Munaut wrote:
I finally found that the chan_rate field of the
channel_mode must be 0
for that request to work. And forcing it to 0 in
rsl_chan_activate_lchan, like this :
thanks, nice spot!
--- SNIP ---
rc = channel_mode_from_lchan(&cm, lchan);
if (rc < 0)
return rc;
cm.chan_rate = 0; // Hack !
-----------
makes the thing work.
But that's obviously not the root cause. I thing the lchan tch_mode
should be GSM48_CMODE_SIGN, so that channel_mode_from_lchan would set
the proper value directly.
But I haven't traced yet why tch_mode is not at the good value for the
second call ...
the reason is that we only set it in two places:
1) when we initialize / memset our data structures at program startup
2) in gsm48_tx_chan_mode_modify() when we typically switch from signalling
to voice mode.
So what is missing is re-setting this before rsl_chan_activate_lchan is called.
Right now the architecture of the code is not good enough to have a "right
spot" for it, since we only activate a channel from the code where we process
channel required messages. So probably there would
be the right location to do that. (Around line 1087 of abis_rsl.c before
rsl_chan_activate_lchan() is being called).
Testing + patch submission is very welcome.
Regards,
--
- Harald Welte <laforge(a)gnumonks.org>
http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)