All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [RFC 3/3] STE-plugin: Adding STE plugin
@ 2010-02-02  8:41 Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
  2010-02-02 23:20 ` Denis Kenzior
  0 siblings, 1 reply; 9+ messages in thread
From: Sjur =?unknown-8bit?q?Br=C3=A6ndeland?= @ 2010-02-02  8:41 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 5611 bytes --]

Hi Denis.

We have done some testing with the STE modem for call termination, and this is the result:

TC |Call #1 | Call #2 | Call #3  | Command   | Result
---|--------------------------------------------------------------------
1  |ACTIVE  | ACTIVE  | ..       | ATH         | call 1, 2 terminated	
2  |ACTIVE  | ACTIVE  | ..       | AT+CHUP     | call 1, 2 terminated	
3  |ACTIVE  | ACTIVE  | HELD     | ATH         | call 1, 2 terminated	
4  |ACTIVE  | ACTIVE  | HELD     | AT+CHUP     | call 1, 2 terminated
5  |ACTIVE  | ACTIVE  | HELD     | AT+CHLD=0;H | call 1, 2 and 3 terminated
6  |ACTIVE  | ACTIVE  | WAITING  | ATH         | call 1, 2 terminated
7  |ACTIVE  | ACTIVE  | WAITING  | AT+CHUP     | call 1, 2 terminated
8  |ACTIVE  | HELD    | WAITING  | CHLD=0      | call 3 terminated, 
9  |ACTIVE  | HELD    | WAITING  | ATH         | call 1 terminated
10 |ACTIVE  | HELD    | WAITING  | AT+CHUP     | call 1 terminated
11 |HELD    | HELD    | ACTIVE   | AT+CHLD=0   | call 1, 2 terminated
12 |HELD    | HELD    | ACTIVE   | AT+CHLD=0;H | call 1, 2 and 3 terminated
13 |HELD    | DIALING | ..       | ATH         | call 2 (MO) terminated
14 |HELD    | DIALING | ..       | CHUP        | call 2 (MO) terminated
15 |HELD    | DIALING | ..       | AT+CHLD=12  | call 2 (MO) NOT terminated
16 |HELD    | WAITING | ..       | AT+CHLD=0   | call 2 terminated
17 |HELD    | ..      | ..       | ATH         | call 1 NOT terminated	


Denis Kenzior wrote:
>>> oFono already takes care of this for single calls (see 
>>> src/voicecall.c voicecall_hangup.)  So this is only an issue in the 
>>> case of three way calls, is this what you're referring to here?
>> 
>> Kind of. This is very good, it takes care of the situation with 
>> emergency  call which cannot be terminated with CHLD commands.
>> 
>> But I think there are more issues. If I am not mistaken STE-modems 
>> have the following behavior:
>> CHLD=1X can only terminate call in state ACTIVE or HELD. (I think 
>> this is as STE interprets the standards).
> 
> The standards specify that CHLD=1X can only terminate an ACTIVE call.
> Most modems implement it this way.  There are vendor extensions that 
> provide this functionality (e.g. CHLD=7X on TI.)  By default oFono 
> assumes that release_specific will simply fail if a user attempts to
> use it on an e.g. HELD call with no modem support.    

For the STE modem, AT+CHLD=1x terminates calls in state ACTIVE and HELD.

>> 
>> a) If you are in a active call and receives a new incoming call
>> (ALERTING) and want to reject the new ALERTING call, then STE modem 
>> cannot terminate this call with CHLD=1X. It has to be terminated with 
>> CHLD=0 (cause=BUSY) or ATH (possible CHUP).
> 
> Ok, lets get the terminology clear here.  In this case the incoming 
> call is not ALERTING, it is WAITING.  WAITING calls are always 
> rejected by using CHLD=0.  ALERTING calls are always outgoing calls
> that transitioned from DIALING to alerting the user.   
> 
>> 
>> b) Or you may have the following situation. One call on HOLD, another 
>> ACTIVE call, and then you receive a new incoming call ALERTING. If 
>> you try to terminate the new incoming (ALERTING) call with CHLD=0, I 
>> think you as a side effect will terminate the call on hold as well.
>> If I am not mistaken ATH (possible CHUP) would be the correct in this 
>> situation for STE modems
> 
> The standards are quite clear here, the WAITING call always takes 
> precedence and thus only the WAITING call is affected. Can you check 
> that STE modems do indeed get this wrong?  If the modem is standards 
> compliant, oFono does the right thing here.

STE is standard compliant, only the WAITING call is terminated with AT+CHLD=0. (TC 8)
 
>> 
>> c) If you have an call on hold and initiate a new call, but want to 
>> terminate the newly initiated call (DIALING), then this call cannot 
>> be terminated with CHLD=1X, but you would have to use ATH (or 
>> possible CHUP).
> 
> Yes, so this is the case that we do need to take care of in the core.
> Most
> modems let us get away with sending release_specific up to this point.
> 

For the STE modem, calls in state DIALING and ALERTING will have to be terminated with ATH or AT+CHUP, AT+CHLD=1x does not work.
This means that the current implementation, using release_specific (and thus AT+CHLD=1x) will not work. 

>>> What I have been considering to take care of this case is to add 
>>> end_all and end_all_active callbacks.  According to 27.007/22.030 
>>> ATH should end all calls (active + held) except waiting calls, while
>>> +CHUP should only end the currently active call.  At least on one TI
>>> modem I tried this works as expected.  Do your modems implement the 
>>> same behavior?
>> 
>> No, I don't think so. I think ATH will only terminate one call.
>> In order to terminate all calls you would probably need to do 
>> something like: AT+CHLD=0;H But I'm not sure this works in all 
>> possible scenarios either...
> 
> Can you check the behavior of ATH vs CHUP on STE modems?  We need to 
> send the right one here or both HELD and ACTIVE/DIALING/ALERTING will 
> be terminated.
> If using CHUP and ATH doesn't work out we'll have to come up with 
> another solution.

For the STE modem, ATH will only terminate the active call, not the held call. (TC 9). For more information about ATH and AT+CHUP, please see the table above.

BTW: Sorry if you get this mail twice, something went wrong when posting this last time so I'm had to re-send this.
BR/Sjur

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [RFC 3/3] STE-plugin: Adding STE plugin
@ 2010-02-02  8:17 Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
  0 siblings, 0 replies; 9+ messages in thread
From: Sjur =?unknown-8bit?q?Br=C3=A6ndeland?= @ 2010-02-02  8:17 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 5610 bytes --]

Hi Denis.

Sorry if you get this mail twice, something went wrong when posting this last time so
I'm resending it.

We have done some testing with the STE modem for call termination, and this is the result:

TC |Call #1 | Call #2 | Call #3  | Command   | Result
---|--------------------------------------------------------------------
1  |ACTIVE  | ACTIVE  | ..       | ATH         | call 1, 2 terminated	
2  |ACTIVE  | ACTIVE  | ..       | AT+CHUP     | call 1, 2 terminated	
3  |ACTIVE  | ACTIVE  | HELD     | ATH         | call 1, 2 terminated	
4  |ACTIVE  | ACTIVE  | HELD     | AT+CHUP     | call 1, 2 terminated
5  |ACTIVE  | ACTIVE  | HELD     | AT+CHLD=0;H | call 1, 2 and 3 terminated
6  |ACTIVE  | ACTIVE  | WAITING  | ATH         | call 1, 2 terminated
7  |ACTIVE  | ACTIVE  | WAITING  | AT+CHUP     | call 1, 2 terminated
8  |ACTIVE  | HELD    | WAITING  | CHLD=0      | call 3 terminated, 
9  |ACTIVE  | HELD    | WAITING  | ATH         | call 1 terminated
10 |ACTIVE  | HELD    | WAITING  | AT+CHUP     | call 1 terminated
11 |HELD    | HELD    | ACTIVE   | AT+CHLD=0   | call 1, 2 terminated
12 |HELD    | HELD    | ACTIVE   | AT+CHLD=0;H | call 1, 2 and 3 terminated
13 |HELD    | DIALING | ..       | ATH         | call 2 (MO) terminated
14 |HELD    | DIALING | ..       | CHUP        | call 2 (MO) terminated
15 |HELD    | DIALING | ..       | AT+CHLD=12  | call 2 (MO) NOT terminated
16 |HELD    | WAITING | ..       | AT+CHLD=0   | call 2 terminated
17 |HELD    | ..      | ..       | ATH         | call 1 NOT terminated	


Denis Kenzior wrote:
>>> oFono already takes care of this for single calls (see 
>>> src/voicecall.c voicecall_hangup.)  So this is only an issue in the 
>>> case of three way calls, is this what you're referring to here?
>> 
>> Kind of. This is very good, it takes care of the situation with 
>> emergency  call which cannot be terminated with CHLD commands.
>> 
>> But I think there are more issues. If I am not mistaken STE-modems 
>> have the following behavior:
>> CHLD=1X can only terminate call in state ACTIVE or HELD. (I think 
>> this is as STE interprets the standards).
> 
> The standards specify that CHLD=1X can only terminate an ACTIVE call.
> Most modems implement it this way.  There are vendor extensions that 
> provide this functionality (e.g. CHLD=7X on TI.)  By default oFono 
> assumes that release_specific will simply fail if a user attempts to
> use it on an e.g. HELD call with no modem support.    

For the STE modem, AT+CHLD=1x terminates calls in state ACTIVE and HELD.

>> 
>> a) If you are in a active call and receives a new incoming call
>> (ALERTING) and want to reject the new ALERTING call, then STE modem 
>> cannot terminate this call with CHLD=1X. It has to be terminated with 
>> CHLD=0 (cause=BUSY) or ATH (possible CHUP).
> 
> Ok, lets get the terminology clear here.  In this case the incoming 
> call is not ALERTING, it is WAITING.  WAITING calls are always 
> rejected by using CHLD=0.  ALERTING calls are always outgoing calls
> that transitioned from DIALING to alerting the user.   
> 
>> 
>> b) Or you may have the following situation. One call on HOLD, another 
>> ACTIVE call, and then you receive a new incoming call ALERTING. If 
>> you try to terminate the new incoming (ALERTING) call with CHLD=0, I 
>> think you as a side effect will terminate the call on hold as well.
>> If I am not mistaken ATH (possible CHUP) would be the correct in this 
>> situation for STE modems
> 
> The standards are quite clear here, the WAITING call always takes 
> precedence and thus only the WAITING call is affected. Can you check 
> that STE modems do indeed get this wrong?  If the modem is standards 
> compliant, oFono does the right thing here.

STE is standard compliant, only the WAITING call is terminated with AT+CHLD=0. (TC 8)
 
>> 
>> c) If you have an call on hold and initiate a new call, but want to 
>> terminate the newly initiated call (DIALING), then this call cannot 
>> be terminated with CHLD=1X, but you would have to use ATH (or 
>> possible CHUP).
> 
> Yes, so this is the case that we do need to take care of in the core.
> Most
> modems let us get away with sending release_specific up to this point.
> 

For the STE modem, calls in state DIALING and ALERTING will have to be 
terminated with ATH or AT+CHUP, AT+CHLD=1x does not work.
This means that the current implementation, using release_specific 
(and thus AT+CHLD=1x) will not work. 

>>> What I have been considering to take care of this case is to add
>>> end_all and end_all_active callbacks.  According to 27.007/22.030
>>> ATH should end all calls (active + held) except waiting calls, while
>>> +CHUP should only end the currently active call.  At least on one TI
>>> modem I tried this works as expected.  Do your modems implement the
>>> same behavior?
>> 
>> No, I don't think so. I think ATH will only terminate one call.
>> In order to terminate all calls you would probably need to do
>> something like: AT+CHLD=0;H But I'm not sure this works in all
>> possible scenarios either...
> 
> Can you check the behavior of ATH vs CHUP on STE modems?  We need to
> send the 
> right one here or both HELD and ACTIVE/DIALING/ALERTING will be
> terminated. 
> If using CHUP and ATH doesn't work out we'll have to come up with
> another 
> solution.

For the STE modem, ATH will only terminate the active call, 
not the held call. (TC 9). For more information about ATH and AT+CHUP,
please see the table above.

BR/Sjur

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [RFC 2/3] STE-plugin: Mechanism for inheritance
@ 2010-01-17 17:28 sjur.brandeland
  2010-01-17 17:28 ` [RFC 3/3] STE-plugin: Adding STE plugin sjur.brandeland
  0 siblings, 1 reply; 9+ messages in thread
From: sjur.brandeland @ 2010-01-17 17:28 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 4940 bytes --]

From: Sjur Brandeland <sjur.brandeland@stericsson.com>

This patch adds a mechanism to inherit/specialize from the standard "atmodem".
This is used in the initialization of voice call driver and the network 
registration driver in order to re-use functions from "atmodems" whenever 
possible. We realize this is not the standard way of doing it, so I would
appreciate your comments on this approach.


---
 include/netreg.h    |    5 +++++
 include/voicecall.h |    7 ++++++-
 src/network.c       |   22 ++++++++++++++++++++++
 src/voicecall.c     |   22 ++++++++++++++++++++++
 4 files changed, 55 insertions(+), 1 deletions(-)

diff --git a/include/netreg.h b/include/netreg.h
old mode 100644
new mode 100755
index 0079477..ee0b201
--- a/include/netreg.h
+++ b/include/netreg.h
@@ -17,6 +17,10 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  *
+ *  Copyright (C) 2010 ST-Ericsson AB.
+ *  Author: Marit Henriksen, marit.xx.henriksen(a)stericsson.com.
+ *  STE specific implementation.
+ *
  */
 
 #ifndef __OFONO_NETREG_H
@@ -96,6 +100,7 @@ void ofono_netreg_status_notify(struct ofono_netreg *netreg, int status,
 
 int ofono_netreg_driver_register(const struct ofono_netreg_driver *d);
 void ofono_netreg_driver_unregister(const struct ofono_netreg_driver *d);
+struct ofono_netreg_driver *ofono_netreg_driver_get(const char *driver);
 
 struct ofono_netreg *ofono_netreg_create(struct ofono_modem *modem,
 						unsigned int vendor,
diff --git a/include/voicecall.h b/include/voicecall.h
index 6ceb3d8..ca43c91 100644
--- a/include/voicecall.h
+++ b/include/voicecall.h
@@ -17,6 +17,10 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  *
+ *  Copyright (C) 2010 ST-Ericsson AB.
+ *  Author: Marit Henriksen, marit.xx.henriksen(a)stericsson.com.
+ *  STE specific implementation.
+ *
  */
 
 #ifndef __OFONO_VOICECALL_H
@@ -29,7 +33,7 @@ extern "C" {
 #include <ofono/types.h>
 
 struct ofono_voicecall;
-
+struct ofono_modem;
 typedef void (*ofono_voicecall_cb_t)(const struct ofono_error *error,
 					void *data);
 
@@ -102,6 +106,7 @@ void ofono_voicecall_disconnected(struct ofono_voicecall *vc, int id,
 
 int ofono_voicecall_driver_register(const struct ofono_voicecall_driver *d);
 void ofono_voicecall_driver_unregister(const struct ofono_voicecall_driver *d);
+struct ofono_voicecall_driver *ofono_voicecall_driver_get(const char *driver);
 
 struct ofono_voicecall *ofono_voicecall_create(struct ofono_modem *modem,
 					unsigned int vendor,
diff --git a/src/network.c b/src/network.c
index 8b4eb09..75ee98b 100644
--- a/src/network.c
+++ b/src/network.c
@@ -17,6 +17,10 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  *
+ *  Copyright (C) 2010 ST-Ericsson AB.
+ *  Author: Marit Henriksen, marit.xx.henriksen(a)stericsson.com.
+ *  STE specific implementation.
+ *
  */
 
 #ifdef HAVE_CONFIG_H
@@ -1596,6 +1600,24 @@ void ofono_netreg_driver_unregister(const struct ofono_netreg_driver *d)
 	g_drivers = g_slist_remove(g_drivers, (void *)d);
 }
 
+struct ofono_netreg_driver *ofono_netreg_driver_get(const char *driver)
+{
+	GSList *l;
+
+	if (driver == NULL)
+		return NULL;
+
+	for (l = g_drivers; l; l = l->next) {
+		struct ofono_netreg_driver *drv = l->data;
+
+		if (g_strcmp0(drv->name, driver))
+			continue;
+		else
+			return drv;
+	}
+	return NULL;
+}
+
 static void netreg_unregister(struct ofono_atom *atom)
 {
 	struct ofono_netreg *netreg = __ofono_atom_get_data(atom);
diff --git a/src/voicecall.c b/src/voicecall.c
index 73de35f..1cd5bd7 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -17,6 +17,10 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  *
+ *  Copyright (C) 2010 ST-Ericsson AB.
+ *  Author: Marit Henriksen, marit.xx.henriksen(a)stericsson.com.
+ *  STE specific implementation.
+ *
  */
 
 #ifdef HAVE_CONFIG_H
@@ -1751,6 +1755,24 @@ void ofono_voicecall_driver_unregister(const struct ofono_voicecall_driver *d)
 	g_drivers = g_slist_remove(g_drivers, (void *)d);
 }
 
+struct ofono_voicecall_driver *ofono_voicecall_driver_get(const char *driver)
+{
+	GSList *l;
+
+	if (driver == NULL)
+		return NULL;
+
+	for (l = g_drivers; l; l = l->next) {
+		struct ofono_voicecall_driver *drv = l->data;
+
+		if (g_strcmp0(drv->name, driver))
+			continue;
+		else
+			return drv;
+	}
+	return NULL;
+}
+
 static void voicecall_unregister(struct ofono_atom *atom)
 {
 	DBusConnection *conn = ofono_dbus_get_connection();
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-02-02 23:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-02  8:41 [RFC 3/3] STE-plugin: Adding STE plugin Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
2010-02-02 23:20 ` Denis Kenzior
  -- strict thread matches above, loose matches on Subject: below --
2010-02-02  8:17 Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
2010-01-17 17:28 [RFC 2/3] STE-plugin: Mechanism for inheritance sjur.brandeland
2010-01-17 17:28 ` [RFC 3/3] STE-plugin: Adding STE plugin sjur.brandeland
2010-01-17 21:40   ` Marcel Holtmann
2010-01-18 18:22     ` Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
2010-01-18 21:27       ` Marcel Holtmann
2010-01-20 18:24         ` Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
2010-01-17 22:50   ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.