aboutsummaryrefslogtreecommitdiff
path: root/src/mm-base-call.c
AgeCommit message (Collapse)Author
2023-10-27core: ensure all errors returned in DBus operations are normalizedAleksander Morgado
We want to ensure that all errors reported via DBus operations are normalized to MM-specific errors. We don't want to return QMI or MBIM specific errors, as those are protocol specific and we don't want DBus clients to need to rely on knowing which is the protocol in use by the device.
2022-11-04core,log: new 'MSG' log level between 'INFO' and 'WARN'Aleksander Morgado
We're bumping the current "INFO" level messages to the new "MSG" level, also making the new level the default. The old "INFO" level will be used to setup an intermediate level of logging which is not as verbose as "DEBUG" but still provides some capabilities to analyze the behavior of a modem.
2020-04-08error-helpers: port to use object loggingAleksander Morgado
2020-04-08base-call: port to use object loggingAleksander Morgado
2020-04-08base-call: set dbus id as soon as object is createdAleksander Morgado
2019-12-05base-call: do not require primary port to start a callAleksander Morgado
If the modem is connected using the primary port, we can just rely on the secondary port. # mmcli --call 0 --start error: couldn't start the call: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Connected: Cannot run sequence: port is connected'
2019-10-17base-call: if start() fails, always terminatedAleksander Morgado
2019-10-17call: disallow non-emergency calls when in emergency-only stateAleksander Morgado
2019-10-17base-call: catch terminated errors before ATD repliesAleksander Morgado
If we get one of the in-call termination errors before ATD replies OK, we need to cancel the start() operation right away and return an error to the caller. Otherwise, the Call will be reported as "terminated" right away, but the caller would not get an error back until 90s later: $ sudo mmcli --call 0 --start error: couldn't start the call: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Serial.ResponseTimeout: Serial command timed out'
2019-07-12voice,call,cinterion: add Purism as copyright holderAleksander Morgado
The GSM supplementary services related changes, as well as the rework done to manage calls per call id, is copyrighted by Purism SPC.
2019-07-11base-call: use g_object_connect() to connect all handlersAleksander Morgado
2019-07-11api,call: new JoinMultiparty() and LeaveMultiparty() methodsAleksander Morgado
2019-07-11api,call: new Multiparty boolean propertyAleksander Morgado
It will be set to TRUE if this call is part of a multiparty call.
2019-07-11base-call: remove in-call event and audio settings logicAleksander Morgado
The in-call unsolicited events and the in-call audio settings are managed exclusively at modem level, and no longer at call object level. This is because these two things are applicable to all calls that may be active at the same time.
2019-07-11base-call: allow updating audio settings from out of the call objectAleksander Morgado
E.g. if we want the modem-level in-call state management to provide what audio settings are expected in all ongoing calls.
2019-07-11base-call: implement Deflect() with +CTFRAleksander Morgado
2019-07-11api,call: new Deflect() methodAleksander Morgado
This method allows deflecting an incoming or waiting call to a different number.
2019-07-11base-call: support hanging up specific callsAleksander Morgado
E.g. we can hangup a waiting call without interfering with the active one.
2019-07-11broadband-modem: if +CLCC is supported, call supports detailed eventsAleksander Morgado
2019-07-11base-call: if incoming call is reported terminated, cleanup timeoutAleksander Morgado
2019-07-11base-call: allow skipping the timeout in incoming callsAleksander Morgado
E.g. if the modem supports reporting incoming call updates explicitly.
2019-07-11base-call: allow keeping ongoing call index for easy call matchingAleksander Morgado
2019-07-11base-call: add simple getters for the MmGdbusCall propertiesAleksander Morgado
2018-12-12base-call: Increase incoming call timeout to ten secondsBob Ham
The standard says a RING or CRING should be emitted whenever the network sends an incoming call notification, which is nation-specific: "Interpretation of indications from the network to determine what constitutes a "ring" is defined by national regulations. This result code should be repeated each time the network repeats the incoming call indication." -- ITU-T Rec. V.250, p. 42 On the giffgaff (O2) network in the UK, a SIMCom SIM7100E modem emits RING indicators every six seconds. The current timeout is only five seconds resulting in a stream of timed-out ModemManager call objects whenever there is an incoming call. To fix this, we increase the timeout to ten seconds.
2018-12-12base-call: Fix in-call URC regex to match handler logicBob Ham
The handler assumes the regex sub-expressions each have the same index so they need to be within the same set of parentheses rather than each individually parenthesised. Without this fix, call state changes are missed.
2018-10-20base-call: remove unused 'self' variablesBen Chan
2018-10-16base-call: implement generic audio channel setup/cleanup handlersAleksander Morgado
Modems that require specific commands to setup or cleanup the audio channel as soon as a call is ongoing can subclass these two new methods. The setup() method is considered part of the call start/accept process, and so if it fails, the whole operation will fail. The failures in the cleanup() method will be reported in the log, but otherwise ignored, as this operation may be executed without any user intervention (e.g. if the remote party hangs up).
2018-10-16api/libmm-glib/cli: add AudioPort and AudioFormat properties to the Call objectDan Williams
2018-10-16base-call: treat 'ringing-in' as an in-call stateAleksander Morgado
So that we setup in-call events as soon as we get the incoming call ringing in. This allows us to have plugin-specific implementations e.g. reporting call termination when the remote caller hangs up.
2018-10-16mm-iface-mode: provide direction and number when creating callsAleksander Morgado
Calls created from property bundles are always outgoing, while calls created as input events from URCs during runtime are always incoming. This change makes it mandatory to provide at least direction of the call when the object is created, leaving the number as an optional property that may or may not be known in advance (e.g. it would be optional only for incoming calls).
2018-10-16iface-modem-voice: always create plugin-specified call objectsAleksander Morgado
The Voice interface logic must always use the create_call() object from its own interface to create call objects, as that is the method that plugins can subclass to provide plugin-specific call objects. This applies to both incoming and outgoing calls.
2018-10-16base-call: improve loggingAleksander Morgado
2018-10-16base-call: listen for connection error URCs in-callAleksander Morgado
In order to detect state changes while we're in-call, we have to monitor the standard connection errors we're used to, but have them processed as URCs instead of as responses to ATD requests.
2018-10-16base-call: automatically terminate unanswered incoming callsAleksander Morgado
Try to automatically detect when the caller finishes the attempt to establish the call.
2018-10-16base-call: ACTIVE after start() if detailed transitions unavailableAleksander Morgado
The most detailed call state transition flow for a new outgoing call would be: UNKNOWN -> DIALING -> RINGING -> ACTIVE But, if the modem doesn't support reporting intermediate states (e.g. DIALING or RINGING) then a successful start() should imply getting into ACTIVE state right away. For now, only the Huawei plugin implements the detailed transition support, so make them configurable via call object properties.
2018-10-16base-call: setup/cleanup custom events when transitioning to/from in-callAleksander Morgado
2018-10-16base-call: don't update state twiceAleksander Morgado
The mm_gdbus_call_set_() methods update the properties in the same way as via g_object_set(), no need to do it twice.
2018-10-16base-call: call state updates only in the interface logicAleksander Morgado
Don't do any call state update on the generic implementation of the commands, do it in the common interface logic exclusively. We were doing the state updates in both places.
2018-10-16base-call: don't notify a state change if it didn't changeAleksander Morgado
2018-10-16base-call: no need to delete call info from the deviceAleksander Morgado
Call information only lives in the ModemManager logic, there is no associated date stored within the device itself. Therefore, simplify everything by assuming there is nothing to remove. Looks like this logic was implemented because it was originally based on the SMS management logic, but for SMS we do have to remove them (the stored PDU parts) from the device.
2018-10-16base-call: fix logic when rejecting callsAleksander Morgado
Make sure the async task is always finished, even when mm_base_modem_at_command_finish() returns an error which is not MM_SERIAL_ERROR_RESPONSE_TIMEOUT.
2018-10-16base-call: fix logic when accepting callsAleksander Morgado
Don't return FALSE when call is successfully accepted, otherwise the caller will get very confused: ModemManager[19952]: <debug> [1528968478.344338] (ttyACM2): --> 'ATA<CR>' ModemManager[19952]: <debug> [1528968478.361986] (ttyACM2): <-- '<CR><LF>OK<CR><LF>' (ModemManager:19952): GLib-GIO-CRITICAL **: 11:27:58.387: g_dbus_method_invocation_take_error: assertion 'error != NULL' failed And also, make sure the async task is always finished, even when mm_base_modem_at_command_finish() returns an error which is not MM_SERIAL_ERROR_RESPONSE_TIMEOUT.
2018-06-11call-list: coding style fixesAleksander Morgado
2018-04-24all: drop unused variablesLubomir Rintel
Keeps build with GCC 8 happy. mm-base-call.c:758:18: warning: variable 'response' set but not used [-Wunused-but-set-variable] mm-base-call.c:822:18: warning: variable 'response' set but not used [-Wunused-but-set-variable] mm-base-sms.c:908:18: warning: variable 'response' set but not used [-Wunused-but-set-variable] mm-sms-list.c:331:25: warning: variable 'ctx' set but not used [-Wunused-but-set-variable] mm-iface-modem-messaging.c:1210:21: warning: variable 'storage_ctx' set but not used [-Wunused-but-set-variable] huawei/mm-plugin-huawei.c:183:18: warning: variable 'response' set but not used [-Wunused-but-set-variable] ublox/mm-plugin-ublox.c:161:24: warning: variable 'response' set but not used [-Wunused-but-set-variable] ublox/mm-plugin-ublox.c:159:24: warning: variable 'ctx' set but not used [-Wunused-but-set-variable] icera/mm-modem-helpers-icera.c:218:25: warning: variable 'first_free' set but not used [-Wunused-but-set-variable] novatel/mm-common-novatel.c:50:18: warning: variable 'response' set but not used [-Wunused-but-set-variable]
2017-07-14base-call: minor coding style fixesBen Chan
2017-07-06base-call: port mm_base_call_delete to use GTaskAleksander Morgado
2017-07-06base-call: minor coding style fixesAleksander Morgado
2017-07-06base-call: no need to keep a modem reference aroundAleksander Morgado
The mm_base_modem_at_command() async calls keep a modem reference valid for as long as the operation and its completion handler are run, so there really is no need for the caller (the call operation) to keep a reference to the modem object itself.
2017-07-06base-call: port call_delete to use GTaskBen Chan
2017-07-06base-call: port call_send_dtmf_ready to use GTaskBen Chan