Hi,

> get Service Category Information Element for a call
> (description in TS 124 008 V13.7.0 10.5.4.33)

According to the mentioned specification, this IE is an optional
part of SETUP message. So, your assumption:

> it is somewhere within gsm_04_08.c

is correct. Have a look at the gsm48_cc_rx_setup():

> /* emergency setup is identified by msg_type */
> if (msg_type == GSM48_MT_CC_EMERG_SETUP)

Emergency calls are also handled there.

The following IEs are handled:

> if (TLVP_PRESENT(&tp, GSM48_IE_BEARER_CAP)) ...
> if (TLVP_PRESENT(&tp, GSM48_IE_FACILITY)) ...
> if (TLVP_PRESENT(&tp, GSM48_IE_CALLED_BCD)) ...
> if (TLVP_PRESENT(&tp, GSM48_IE_USER_USER)) ...
> if (TLVP_PRESENT(&tp, GSM48_IE_SS_VERS)) ...
> if (TLVP_PRESENT(&tp, GSM48_IE_CLIR_SUPP)) ...
> if (TLVP_PRESENT(&tp, GSM48_IE_CLIR_INVOC)) ...
> if (TLVP_PRESENT(&tp, GSM48_IE_CC_CAP)) ...

So, you need to implement checking for the Service Category IE
yourself. It has 0x2e tag, and doesn't seem to be supported by
libosmocore. You would also need to implement parsing of the
payload yourself.

Contributions are welcome ;)

With best regards,
Vadim Yanitskiy.