Hi All,

I was working a few months back on some LCLS implementation with bts-loop and I got it working, including that the pbx can use SIP Re-INVITES to get in and out of the audio loop during calls.

However, I only ever tested it with one call, that is with two phones. When I tested it on alive site, immediately there where problems so I reverted and left it. Looking at it again now, there's a very obvious problem which is that osmo-msc generates the same GCR for (almost) every call. I had noticed this before but for some reason I thought I had seen it generating different GCR for a second simultaneous call, but no.

Anyway, the above is extraneous info to the question:

Could somebody take a look at this:

https://gitea.osmocom.org/cellular-infrastructure/osmo-msc/src/branch/master/src/libmsc/transaction.c#L156

where we have:

    osmo_store32be(trans->callref, lcls->gcr.cr);
    osmo_store16be(use_lac ? trans->msc_a->via_cell.lai.lac : trans->msc_a->via_cell.cell_identity, lcls->gcr.cr + 3);

Now, If I change the order, such that would seem logical:

    osmo_store16be(use_lac ? trans->msc_a->via_cell.lai.lac : trans->msc_a->via_cell.cell_identity, lcls->gcr.cr + 3);
    osmo_store32be(trans->callref, lcls->gcr.cr);

Then I get a different GCR, reflecting the trans->callref for each call. But am I then maybe overwriting the LAC/CI ?

Would seem to make sense, but I'm just not sure if that is all there is to it, as I don't really grok osmo_store_xxxx

    for(i = 0; i < n; q[i] = (x >> ((n - 1 - i) * 8)) & 0xFF, i++);

Is it just a simple order error, and is everything OK with lcls->gcr.cr + 3 as the pointer *p passed to osmo_store32be_ext() ?

 given that:

struct osmo_lcls *lcls;

where:

struct osmo_lcls {

    struct osmo_gcr_parsed gcr;

};

struct osmo_gcr_parsed {

    uint8_t cr[5];

};

I guess I'm still not really 100% on the char/uint8_t thing and advancing pointers.

Thanks!

k.


Reply via email to