This is slightly hacky, part of ussd.c responsible for registering services is duplicated and parse_ss_control_string is modified to accept a fourth SI fragment in the input string.
Includes tests for SS parser, utility functions and SMS PDU decoder / encoder utilities.