Commit Graph

65 Commits

Author SHA1 Message Date
Denis Kenzior 815d62888f hfp: Fix case where RING never arrives 2014-05-30 12:25:23 -05:00
Denis Kenzior 29fefe6450 hfp: Use enum from hfp.h 2014-03-19 10:24:57 -05:00
Denis Kenzior a4a170e1ea hfpmodem: Call ofono_voicecall_mpty_hint as needed 2013-09-12 13:17:39 -05:00
Denis Kenzior c912e0066a hfp: Set UDUB affected set to WAITING only
INCOMING calls are not affected by UDUB, only by +CHUP.
2013-08-25 01:25:28 -05:00
Denis Kenzior fe36dec9a1 hfp: Fix up disconnect reason handling for +CHUP
The affected call types for +CHUP were set to only ACTIVE calls.
Instead the affected set should include INCOMING, DIALING, ALERTING and
ACTIVE calls.

Thanks to Ionut Dediu for the diagnosing and reporting this issue.
2013-08-25 01:21:23 -05:00
Denis Kenzior b9782fedfc hfpmodem: Add comment for previous commit 2013-01-21 09:41:54 -06:00
Mikel Astiz 843bd71169 hfpmodem: Fix release-and-swap without +CIEV
Some phones do not send the corresponding call state update (+CIEV)
after a successful release-and-swap operation (AT+CHLD=1).

This has been observed with a Nokia 500, while testing ReleaseAndSwap()
while an active and a held call exist:

ofonod[20414]: > AT+CLCC\r
ofonod[20414]: < \r\n+CLCC: 1,0,1,0,0,"<number1>",145\r\n
ofonod[20414]: < \r\n+CLCC: 2,0,0,0,0,"<number2>",145\r\n
ofonod[20414]: < \r\nOK\r\n
ofonod[20414]: > AT+CHLD=1\r
ofonod[20414]: < \r\nOK\r\n

After this, no +CIEV is received, but the call has been hung up.

The proposed approach to solve this consists of using AT+CLCC, unless
a call release has been received within a specific time period.

The result fixes the problem as can be seen below:

ofonod[20847]: < \r\n+CLCC: 1,0,1,0,0,"<number1>",145\r\n
ofonod[20847]: < \r\n+CLCC: 2,0,0,0,0,"<number2>",145\r\n
ofonod[20847]: < \r\nOK\r\n
ofonod[20847]: > AT+CHLD=1\r
ofonod[20847]: < \r\nOK\r\n
ofonod[20847]: > AT+CLCC\r
ofonod[20847]: < \r\n+CLCC: 1,0,0,0,0,"<number1>",145\r\n
ofonod[20847]: < \r\nOK\r\n
ofonod[20847]: < \r\n+CIEV: 5,2\r\n
ofonod[20847]: < \r\n+CIEV: 5,0\r\n
2013-01-21 09:41:54 -06:00
Mikel Astiz cbb784e734 hfpmodem: Avoid transitional voicecall states
While processing the result of AT+CLCC, process the differences in a way
that disconnections are reported first, then call state changes and
finally new calls.

The goal is to avoid unnecessary transitional states such as two active
calls existing at the same time.
2013-01-21 09:41:54 -06:00
Mikel Astiz 9726e50d82 hfpmodem: Refactor voicecall notify with foreach
Define a helper function in order to use foreach statements when
ofono_voicecall_notify() needs to be called.
2013-01-21 09:41:54 -06:00
Michael Brudevold ef25cf1adf hfpmodem: use full CLCC handling in dialing case
A call that moves from the dialing to active state before the +CLCC response
will not properly be added as a voicecall. This is because the dialing callback
was using simplified handling and only looked for calls in the dialing or
alerting state.

AT sequence that exhibited the failure (AG device was an iPhone accessing
visual voicemail):

> +CIND: ("service",(0-1)),("call",(0-1)),("callsetup",(0-3)),
("battchg",(0-5)),("signal",(0-5)),("roam",(0-1)),("callheld",(0-2))
...
> +CIEV: 3,2
< AT+CLCC
> +CIEV: 2,1
> +CIEV: 3,0
> +CLCC: 1,0,0,0,0,"**21153**",129,"Voicemail"
2012-04-11 23:54:38 -05:00
Marcel Holtmann 4e77afffb3 drivers: Update copyright information 2011-10-10 13:39:48 -07:00
Frédéric Dalleau f13b3d3a6b hfpmodem: Fix g_at_chat leak 2011-08-05 17:02:36 -05:00
Frédéric Danis 3b00f5aad7 hfpmodem: fix callheld indicator
Callheld move from 1 (active and held calls) to 2 (all calls on hold) may
result of:
- active call has been dropped by remote,
- an intermediate state during a call swap which will be followed by a
  move back to 1.
So, wait a little before checking calls state.
2011-07-25 23:06:16 -05:00
Denis Kenzior b33d6b5fcb hfp_hf: Reorganize common code into hfpmodem 2011-07-21 03:49:27 -05:00
Denis Kenzior 1bc1e52751 hfp: Fix some whitespace issues 2011-03-17 16:11:02 -05:00
Jeevaka Badrappan a4c3733314 hfpmodem: M16 coding style fix 2011-02-05 07:04:17 -08:00
Jeevaka Badrappan 3fef7a3d26 hfpmodem: Use defined call_status enum 2011-02-05 05:07:42 -08:00
Lucas De Marchi a6d15c6a64 hfpmodem: use ofono_call initializer 2011-02-01 18:31:28 +01:00
Jeevaka Badrappan 0f4b44d5cf hfpmodem: remove NULL check 2011-01-29 18:39:37 +01:00
Jeevaka Badrappan 12c3cf6969 voicecall: remove ofono_cug_option 2011-01-26 16:38:15 -06:00
Helen Clemson fa576435a5 hfpmodem: Incorrect string length in dtmf buf.
Strlen includes a NULL character.
2011-01-14 14:26:37 +01:00
Jeevaka Badrappan 7e52569104 hfpmodem: M15 coding style fix 2011-01-12 08:06:58 -08:00
Lucas De Marchi b82a7f8511 drivers: explicitly compare pointers to NULL
This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)

// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@

- !E
+ E == NULL
// </smpl>
2010-11-29 11:37:09 -06:00
Lucas De Marchi 74125ff5d4 Fix common misspellings in drivers
Fix common misspellings by using the list available at
http://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines

From the list cited above, the substitution script found the following
misspellings:

subsidary(-ies)->subsidiary(-ies)
transfering->transferring
2010-09-14 16:00:16 +09:00
Marcel Holtmann 41133da001 hfpmodem: Remove useless NULL checks before g_free 2010-08-16 22:06:24 +02:00
Sjur Brændeland dde0a4ccb5 voicecall: Rename hangup to hangup_active 2010-08-12 11:32:12 -05:00
Zhenhua Zhang 00262e36db Fix Don't check CLIR CUG option in hfp_dial
For HFP call, no need to check CLIR & CUG option. It doesn't affect dial
out string.
2010-03-09 10:33:13 -06:00
Denis Kenzior c98b951fe6 Refactor: Remove atutil dump_response
No longer needed now that we have nice AT command tracing using
OFONO_AT_DEBUG=1
2010-02-08 12:28:23 -06:00
Denis Kenzior 7f9a9b0cdc Fix: Don't use ofono_debug directly in plugins 2010-02-08 12:09:01 -06:00
Denis Kenzior d223243913 Fix: Use snprintf instead of sprintf in HFP 2010-02-05 12:00:14 -06:00
Marcel Holtmann 144080e749 Update copyright information 2010-01-01 17:00:10 -08:00
Denis Kenzior 6cb038fafb Style: Repeat for drivers 2009-12-17 21:45:40 -06:00
Denis Kenzior b95025ab01 Style: Fix style issues in hfpmodem 2009-12-09 02:41:16 -06:00
Zhenhua Zhang aeaf9b4a55 Add clip_timeout for notify incoming call
Schedule a clip_timeout in the ring notify. If CLIP comes right
after RING, we cancel the timer. If doesn't, we notify the call
without phone number.
2009-12-09 02:37:07 -06:00
Zhenhua Zhang c7902b83e6 Add poll_clcc if we are in multiparty call
If we are in multiparty call, remote AG won't update indicator
if any call in multiparty call is released by CHLD=1x. So we
have to poll it periodically.
2009-12-09 02:37:02 -06:00
Zhenhua Zhang 7f9e4038a2 Add multiparty call support for hfpmodem
Add CHLD=3, 2x and 4 to create multiparty call, private chat and
call transfer.
2009-12-09 02:36:43 -06:00
Zhenhua Zhang 5dbb2f424a Add hfp_release_specific to release specific call
Use AT+CHLD=1x to release a specific call if AG supports that.
2009-12-09 02:36:28 -06:00
Denis Kenzior e049862b51 Style: Remove empty line 2009-12-08 22:17:51 -06:00
Zhenhua Zhang bd81a13493 Fix update hfp_hangup to release active call
In HFP, AT+CHUP is intended to release the current active call.
2009-12-08 04:29:14 -06:00
Denis Kenzior 18e8c906c5 Make sure to list calls in HFP voicecall driver 2009-12-04 16:52:32 -06:00
Zhenhua Zhang d90c657bd4 Add hfp_send_dtmf to send tones for hfpmodem 2009-12-04 16:52:32 -06:00
Denis Kenzior a3539b5988 Update HFP voicecall driver to new world order 2009-12-04 16:52:31 -06:00
Denis Kenzior 8e258ff54b Get rid of list_calls in hfp driver 2009-12-04 16:52:31 -06:00
Zhenhua Zhang 64015ff4b8 Fix: Move CHLD from voicecall driver to plugin
According HFP v1.5 spec, AT+CHLD=? should be a part of SLC
connection. So we should not do it after SLC connection is
created.
2009-11-24 20:43:41 -06:00
Zhenhua Zhang bbc2eecd6f Fix: Poll CLCC to replace the code in call_held=1
When using CHLD=2x in multiparty call, call_held is 1 and we
should not swap all active->held. So we cannot save this pull
in private chat.
2009-11-20 09:37:37 +01:00
Denis Kenzior 1c3d41fafc Fix: Don't drop dialing calls when call=0 signaled 2009-11-16 11:47:42 -06:00
Denis Kenzior 77b3048325 Fix: Don't double-swap calls when 3-way dialing 2009-11-16 11:23:48 -06:00
Denis Kenzior 534d7f89d2 Fix: Update the status to held properly 2009-11-16 11:19:23 -06:00
Denis Kenzior 957fc90d37 Refactor: Move repeated code to a function 2009-11-16 11:15:31 -06:00
Zhenhua Zhang 5e1067b8a2 Fix: Handle callsetup=0 when no waiting or dialing call
When call=1 and callsetup=0, if no waiting or dialing call, the call
is active and no need to notify status change.
2009-11-16 11:09:21 -06:00