Fix TR-104: VoiceService.{i}.SIP.Client.{i}.Status

The following status code of Client registration are supported:
Registering, Up, Error_Registration, Quiescent, Disabled.

Initializing,  Deregistering, Error_Misconfigured, Error_Network
will never be set in tr104 due to not corresponding response from pjsip.

Signed-off-by: Grzegorz Sluja <grzegorz.sluja@iopsys.eu>
This commit is contained in:
Grzegorz Sluja 2021-04-21 14:16:02 +02:00
parent af33bc4d40
commit 45b823fe47

View file

@ -218,10 +218,12 @@ static int get_ServicesVoiceServiceSIPClient_Status(char *refparam, struct dmctx
if (state && *state) {
if (strcasecmp(state, "Registered") == 0) {
*value = "Up";
} else if (strcasecmp(state, "Request") == 0) {
} else if (strcasecmp(state, "Rejected") == 0) {
*value = "Error_Registration";
} else if (strcasecmp(state, "Stopped") == 0) {
*value = "Quiescent";
} else if (strcasecmp(state, "Unregistered") == 0) {
*value = "Registering";
} else {
*value = state;
}
}
}