mirror of git://git.sysmocom.de/ofono
Remove Voicecall.Busy method
According to 22.030, UDUB or CHLD=0 can only be invoked on waiting calls. Most AT command based modems do not support using CHLD=0 on an incoming call. So we remove the Busy method and invoke set_udub on a call that is in the waiting state.
This commit is contained in:
parent
9b084e9656
commit
e9341c5203
|
@ -7,21 +7,11 @@ Object path [variable prefix]/{modem0,modem1,...}/{voicecall01,voicecall02,...}
|
|||
|
||||
Methods dict GetProperties()
|
||||
|
||||
Returns all global system properties. See the
|
||||
Returns all properties for this object. See the
|
||||
properties section for available properties.
|
||||
|
||||
Possible Errors: [service].Error.InvalidArguments
|
||||
|
||||
void Busy()
|
||||
|
||||
Notifies the incoming or waiting call that the user
|
||||
is busy. This is done by setting the User Determined
|
||||
User Busy (UDUB) condition. This method is only valid
|
||||
if there is an incoming or waiting call.
|
||||
|
||||
This functionality is generally implemented by using
|
||||
the +CHLD=0 AT command.
|
||||
|
||||
void Deflect(string number)
|
||||
|
||||
Deflects the incoming or waiting call to number given
|
||||
|
@ -39,8 +29,19 @@ Methods dict GetProperties()
|
|||
|
||||
Hangs up the voice call.
|
||||
|
||||
This functionality is generally implemented by
|
||||
+CHLD=1X, +CHUP or ATH AT commands.
|
||||
For an incoming call, the call is hung up using ATH or
|
||||
equivalent. For a waiting call, the remote party is
|
||||
notified by using the User Determined User Busy (UDUB)
|
||||
condition. This is generally implemented using CHLD=0.
|
||||
|
||||
Please note that the GSM specification does not allow
|
||||
the release of a held call when a waiting call exists,
|
||||
or the release of a particular party in a held
|
||||
multiparty call.
|
||||
|
||||
Note that releasing a held call or a particular party
|
||||
of a held multiparty call might not be possible on some
|
||||
implementations.
|
||||
|
||||
void Answer()
|
||||
|
||||
|
|
|
@ -211,30 +211,6 @@ static DBusMessage *voicecall_get_properties(DBusConnection *conn,
|
|||
return reply;
|
||||
}
|
||||
|
||||
static DBusMessage *voicecall_busy(DBusConnection *conn,
|
||||
DBusMessage *msg, void *data)
|
||||
{
|
||||
struct voicecall *v = data;
|
||||
struct ofono_voicecall *vc = v->vc;
|
||||
struct ofono_call *call = v->call;
|
||||
|
||||
if (call->status != CALL_STATUS_INCOMING &&
|
||||
call->status != CALL_STATUS_WAITING)
|
||||
return __ofono_error_failed(msg);
|
||||
|
||||
if (!vc->driver->set_udub)
|
||||
return __ofono_error_not_implemented(msg);
|
||||
|
||||
if (vc->pending)
|
||||
return __ofono_error_busy(msg);
|
||||
|
||||
vc->pending = dbus_message_ref(msg);
|
||||
|
||||
vc->driver->set_udub(vc, generic_callback, vc);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static DBusMessage *voicecall_deflect(DBusConnection *conn,
|
||||
DBusMessage *msg, void *data)
|
||||
{
|
||||
|
@ -277,6 +253,7 @@ static DBusMessage *voicecall_hangup(DBusConnection *conn,
|
|||
struct voicecall *v = data;
|
||||
struct ofono_voicecall *vc = v->vc;
|
||||
struct ofono_call *call = v->call;
|
||||
int num_calls;
|
||||
|
||||
if (call->status == CALL_STATUS_DISCONNECTED)
|
||||
return __ofono_error_failed(msg);
|
||||
|
@ -297,7 +274,19 @@ static DBusMessage *voicecall_hangup(DBusConnection *conn,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if ((g_slist_length(vc->call_list) == 1) && vc->driver->hangup &&
|
||||
if (call->status == CALL_STATUS_WAITING) {
|
||||
if (vc->driver->set_udub == NULL)
|
||||
return __ofono_error_not_implemented(msg);
|
||||
|
||||
vc->pending = dbus_message_ref(msg);
|
||||
vc->driver->set_udub(vc, generic_callback, vc);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
num_calls = g_slist_length(vc->call_list);
|
||||
|
||||
if (num_calls == 1 && vc->driver->hangup &&
|
||||
(call->status == CALL_STATUS_ACTIVE ||
|
||||
call->status == CALL_STATUS_DIALING ||
|
||||
call->status == CALL_STATUS_ALERTING)) {
|
||||
|
@ -342,8 +331,6 @@ static DBusMessage *voicecall_answer(DBusConnection *conn,
|
|||
|
||||
static GDBusMethodTable voicecall_methods[] = {
|
||||
{ "GetProperties", "", "a{sv}", voicecall_get_properties },
|
||||
{ "Busy", "", "", voicecall_busy,
|
||||
G_DBUS_METHOD_FLAG_ASYNC },
|
||||
{ "Deflect", "s", "", voicecall_deflect,
|
||||
G_DBUS_METHOD_FLAG_ASYNC },
|
||||
{ "Hangup", "", "", voicecall_hangup,
|
||||
|
|
Loading…
Reference in New Issue