mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-03-06 17:40:35 +01:00
VoiceService: Get CallStatus values using new dedicated ubus call
The new ubus call has been created in asterisk to get proper CallStatus
values for line:
ubus call asterisk call_status '{ "line" : X }'
Use it to get proper values according to TR-104 definitions.
This commit is contained in:
parent
3ad0978f8d
commit
0e101a4c48
1 changed files with 2 additions and 11 deletions
|
|
@ -247,18 +247,9 @@ static int get_ServicesVoiceServiceCallControlLine_CallStatus(char *refparam, st
|
|||
char line_str[16];
|
||||
|
||||
snprintf(line_str, sizeof(line_str), "%d", line_num);
|
||||
dmubus_call("endpt", "status", UBUS_ARGS{{"line", line_str, Integer}}, 1, &res);
|
||||
dmubus_call("asterisk", "call_status", UBUS_ARGS{{"line", line_str, Integer}}, 1, &res);
|
||||
if (res) {
|
||||
/*
|
||||
* Convert the status to a value specified in TR-104.
|
||||
*
|
||||
* Note that the current status provided by UBUS "endpt status" can not be mapped to those values
|
||||
* specified in TR-104.
|
||||
*
|
||||
* TODO: the corresponding UBUS RPC will be enhanced in order to provide more TR-104 compliant values
|
||||
*/
|
||||
char *offhook = dmjson_get_value(res, 1, "offhook");
|
||||
*value = *offhook == '1' ? "Connected" : "Idle";
|
||||
*value = dmjson_get_value(res, 1, "call_status");
|
||||
} else {
|
||||
BBF_DEBUG("dmubus_call() failed\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue