aboutsummaryrefslogtreecommitdiff
path: root/src/mm-base-call.c
AgeCommit message (Collapse)Author
8 daysbase-call: handle multiple DTMF charactersDan Williams
Send each character through the state machine one at a time. Some modems (various Quectel ones for example) can process multiple at the same time, and while that should be easily implemented using the new changes to send_dtmf() it's not done in any plugin yet. Signed-off-by: Dan Williams <dan@ioncontrol.co>
8 daysbase-call: interpret DTMF character ',' as two-second pauseDan Williams
Do what other dialers do and interpret ',' as a short pause, which helps handle automated menus. Signed-off-by: Dan Williams <dan@ioncontrol.co>
8 daysbase-call: convert DTMF tone handling to a state machineDan Williams
Generalize the timeout/stop logic that QMI requires into the base call. We'll use this to implement the pause character (,) generically. Signed-off-by: Dan Williams <dan@ioncontrol.co>
8 dayscall: allow setting DTMF tone duration at call creation timeDan Williams
Instead of hard-coding a 500ms DTMF tone duration, let applications use a specific duration at call setup time. Signed-off-by: Dan Williams <dan@ioncontrol.co>
8 daysbase-call: remove usage of MMBaseModemDan Williams
Split out the things we actually use from MMBaseModem into separate properties that can be independently implemented (or just left NULL) for unit tests. Signed-off-by: Dan Williams <dan@ioncontrol.co>
8 daysbase-call: split AT-specific call code into MMCallAtDan Williams
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08Move log parent and connection property binding to helperDan Williams
Continues removing usage of MMBaseModem in a bunch of files by splitting out bits of its usage to separate interfaces. Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08auth-provider: move auth provider logic into each classDan Williams
Rather than make all of them rely on MMBaseModem for it. This lets us disentangle dependencies for easier unit testing. For interfaces, rather than casting directly to MMBaseModem use intermediate interfaces (MMIfaceAuth and MMIfaceOpLock) that tests can fake out. Signed-off-by: Dan Williams <dan@ioncontrol.co>
2024-04-23base-modem: support non-serial ports when peeking the best AT portAleksander Morgado
When we don't care about the type of AT port to use, prefer the QMI or MBIM based ones if any available.
2024-04-23base-modem-at: switch to use the MMIfacePortAt by defaultAleksander Morgado
The whole codebase is updated to assume the MMBaseModem AT operations require an object implementing the MMIfacePortAt interface, instead of a MMPortSerialAt object. In the places where we know the port is a MMPortSerialAt, e.g. when we query explicitly for the primary or secondary serial AT port, we will use an explicit MM_IFACE_PORT_AT() cast when calling the AT command method. In the places where we get_best_at_port() we're going to assume that we don't know the port type. This method will be updated in a follow up commit to support the MMIfacePortAt interface as well.
2024-03-13base-call: log user requestsAleksander Morgado
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