mirror of git://git.sysmocom.de/ofono
qmimodem: Support Emergency calls
Tested with a QMI modem (SierraW MC7304) on an Osmocom 2G network operated by osmo-gsm-tester. When setting the specific call type, an Emergency Setup is submitted towards the network.
This commit is contained in:
parent
7ecd8955e8
commit
4925c0af99
|
@ -74,7 +74,8 @@ enum qmi_voice_call_state {
|
|||
|
||||
enum qmi_voice_call_type {
|
||||
QMI_CALL_TYPE_VOICE = 0x0,
|
||||
QMI_CALL_TYPE_VOICE_FORCE,
|
||||
QMI_CALL_TYPE_VOICE_FORCE = 0x01,
|
||||
QMI_CALL_TYPE_EMERGENCY = 0x09,
|
||||
};
|
||||
|
||||
struct qmi_ussd_data {
|
||||
|
|
|
@ -245,7 +245,10 @@ static void dial(struct ofono_voicecall *vc, const struct ofono_phone_number *ph
|
|||
memcpy(&vd->dialed, ph, sizeof(*ph));
|
||||
|
||||
arg.call_type_set = true;
|
||||
arg.call_type = QMI_CALL_TYPE_VOICE_FORCE;
|
||||
if (ofono_voicecall_is_emergency_number(vc, ph->number) == TRUE)
|
||||
arg.call_type = QMI_CALL_TYPE_EMERGENCY;
|
||||
else
|
||||
arg.call_type = QMI_CALL_TYPE_VOICE_FORCE;
|
||||
|
||||
if (!qmi_voice_dial_call(
|
||||
&arg,
|
||||
|
|
Loading…
Reference in New Issue