All of lore.kernel.org
 help / color / mirror / Atom feed
* voicecall: behavior of ReleaseAndAnswere with held calls?
@ 2011-01-25 12:07 Tomasz GREGOREK
  2011-01-25 20:37 ` Denis Kenzior
  0 siblings, 1 reply; 6+ messages in thread
From: Tomasz GREGOREK @ 2011-01-25 12:07 UTC (permalink / raw)
  To: ofono

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

Hi

I have a question about behavior of ReleaseAndAnswere().
If I am right, this function implements +CHLD=1 at command. Spec 22.030 says

Entering 1 followed by SEND     -              Releases all active calls (if any exist)
                                and accepts the other (held or waiting) call.

oFono is failing on this command when there are held and
active calls as there is only check if waiting call exists in
manager_release_and_answere().

Shouldn't ReleaseAndAnswere() release the active call and bring back the held
one in such situation?

There also could be a little more description of behavior for a case when we have
held and waiting calls saying that the waiting call will be answered and that held
won't be released.

Best regards
Tomasz Gregorek

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 3706 bytes --]

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

* Re: voicecall: behavior of ReleaseAndAnswere with held calls?
  2011-01-25 12:07 voicecall: behavior of ReleaseAndAnswere with held calls? Tomasz GREGOREK
@ 2011-01-25 20:37 ` Denis Kenzior
  2011-01-25 21:43   ` Tomasz Gregorek
  0 siblings, 1 reply; 6+ messages in thread
From: Denis Kenzior @ 2011-01-25 20:37 UTC (permalink / raw)
  To: ofono

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

Hi Tomasz,

> Shouldn’t ReleaseAndAnswere() release the active call and bring back the
> held one in such situation?
>

You shouldn't be using ReleaseAndAnswer in this case, instead you should
use SwapCalls.  SwapCalls has the added benefit of allowing swapping of
held and active calls even if there is a call waiting (if your modem
hardware supports this.)

> 
> There also could be a little more description of behavior for a case
> when we have held and waiting calls saying that the waiting call will be answered and
> that held won’t be released.
> 

The documentation says: "Releases currently active call and answers the
currently waiting call".

Is this not enough? Can you suggest better wording?

Regards,
-Denis

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

* Re: voicecall: behavior of ReleaseAndAnswere with held calls?
  2011-01-25 20:37 ` Denis Kenzior
@ 2011-01-25 21:43   ` Tomasz Gregorek
  2011-01-25 22:01     ` Denis Kenzior
  0 siblings, 1 reply; 6+ messages in thread
From: Tomasz Gregorek @ 2011-01-25 21:43 UTC (permalink / raw)
  To: ofono

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

Hi Denis

2011/1/25 Denis Kenzior <denkenz@gmail.com>

> Hi Tomasz,
>
> > Shouldn’t ReleaseAndAnswere() release the active call and bring back the
> > held one in such situation?
> >
>
> You shouldn't be using ReleaseAndAnswer in this case, instead you should
> use SwapCalls.  SwapCalls has the added benefit of allowing swapping of
> held and active calls even if there is a call waiting (if your modem
> hardware supports this.)
>

SwapCalls wont release active call. This would be a case when we finished
active call and we want to disconnect and get back to the held one.
Though this can also be done with Release on active call followed
by SwapCalls.

>
> > There also could be a little more description of behavior for a case
> > when we have held and waiting calls saying that the waiting call will be
> answered and
> > that held won’t be released.
> >
>
> The documentation says: "Releases currently active call and answers the
> currently waiting call".
>
> Is this not enough? Can you suggest better wording?
>

If we are not touching held calls with this function than it is enough.
I would only add "if any exist" as this function works when there are held
and waiting calls.

"Releases currently active call if any exists, and answers the
currently waiting call."


>
> Regards,
> -Denis
> _______________________________________________
> ofono mailing list
> ofono(a)ofono.org
> http://lists.ofono.org/listinfo/ofono
>

Best regards
Tomasz

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 2307 bytes --]

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

* Re: voicecall: behavior of ReleaseAndAnswere with held calls?
  2011-01-25 21:43   ` Tomasz Gregorek
@ 2011-01-25 22:01     ` Denis Kenzior
  2011-01-25 22:18       ` Tomasz Gregorek
  0 siblings, 1 reply; 6+ messages in thread
From: Denis Kenzior @ 2011-01-25 22:01 UTC (permalink / raw)
  To: ofono

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

Hi Tomasz,

On 01/25/2011 03:43 PM, Tomasz Gregorek wrote:
> Hi Denis
> 
> 2011/1/25 Denis Kenzior <denkenz(a)gmail.com <mailto:denkenz@gmail.com>>
> 
>     Hi Tomasz,
> 
>     > Shouldn’t ReleaseAndAnswere() release the active call and bring
>     back the
>     > held one in such situation?
>     >
> 
>     You shouldn't be using ReleaseAndAnswer in this case, instead you should
>     use SwapCalls.  SwapCalls has the added benefit of allowing swapping of
>     held and active calls even if there is a call waiting (if your modem
>     hardware supports this.)
> 
> 
> SwapCalls wont release active call. This would be a case when we finished
> active call and we want to disconnect and get back to the held one.
> Though this can also be done with Release on active call followed
> by SwapCalls.
> 

Yep, Hangup or HangupMultiparty then SwapCalls.  If you feel that a
single operation to accomplish hangup + swap is required we can
certainly consider it.  For now it didn't pass our API is Minimal +
Complete test.  Perhaps ReleaseAndSwap()...?

>     >
>     > There also could be a little more description of behavior for a case
>     > when we have held and waiting calls saying that the waiting call
>     will be answered and
>     > that held won’t be released.
>     >
> 
>     The documentation says: "Releases currently active call and answers the
>     currently waiting call".
> 
>     Is this not enough? Can you suggest better wording?
> 
> 
> If we are not touching held calls with this function than it is enough.
> I would only add "if any exist" as this function works when there are held
> and waiting calls.
> 
> "Releases currently active call if any exists, and answers the
> currently waiting call."
>  

Fair enough, fixed with commit b937d99791abc8c33ef968be40f193f3985bca8d.

Regards,
-Denis

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

* Re: voicecall: behavior of ReleaseAndAnswere with held calls?
  2011-01-25 22:01     ` Denis Kenzior
@ 2011-01-25 22:18       ` Tomasz Gregorek
  2011-01-25 23:32         ` Denis Kenzior
  0 siblings, 1 reply; 6+ messages in thread
From: Tomasz Gregorek @ 2011-01-25 22:18 UTC (permalink / raw)
  To: ofono

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

Hi Denis

2011/1/25 Denis Kenzior <denkenz@gmail.com>

> Hi Tomasz,
>
> On 01/25/2011 03:43 PM, Tomasz Gregorek wrote:
> > Hi Denis
> >
> > 2011/1/25 Denis Kenzior <denkenz(a)gmail.com <mailto:denkenz@gmail.com>>
> >
> >     Hi Tomasz,
> >
> >     > Shouldn’t ReleaseAndAnswere() release the active call and bring
> >     back the
> >     > held one in such situation?
> >     >
> >
> >     You shouldn't be using ReleaseAndAnswer in this case, instead you
> should
> >     use SwapCalls.  SwapCalls has the added benefit of allowing swapping
> of
> >     held and active calls even if there is a call waiting (if your modem
> >     hardware supports this.)
> >
> >
> > SwapCalls wont release active call. This would be a case when we finished
> > active call and we want to disconnect and get back to the held one.
> > Though this can also be done with Release on active call followed
> > by SwapCalls.
> >
>
> Yep, Hangup or HangupMultiparty then SwapCalls.  If you feel that a
> single operation to accomplish hangup + swap is required we can
> certainly consider it.  For now it didn't pass our API is Minimal +
> Complete test.  Perhaps ReleaseAndSwap()...?
>

I would go with easy solution by just changing src/voicecall.c line 1418

static DBusMessage *manager_release_and_answer(DBusConnection *conn,
                        DBusMessage *msg, void *data)
{
...

1418:
-    if (!voicecalls_have_waiting(vc))
+    if (!voicecalls_have_waiting(vc) && !voicecalls_have_with_status(vc,
CALL_STATUS_HELD))
        return __ofono_error_failed(msg);

...
    vc->driver->release_all_active(vc, generic_callback, vc);

    return NULL;
}

This would give ReleaseAndAnswer full functionality of +CHLD=1.

(sorry for pseudo-patch, working temporary on windows machine)


>
> >     >
> >     > There also could be a little more description of behavior for a
> case
> >     > when we have held and waiting calls saying that the waiting call
> >     will be answered and
> >     > that held won’t be released.
> >     >
> >
> >     The documentation says: "Releases currently active call and answers
> the
> >     currently waiting call".
> >
> >     Is this not enough? Can you suggest better wording?
> >
> >
> > If we are not touching held calls with this function than it is enough.
> > I would only add "if any exist" as this function works when there are
> held
> > and waiting calls.
> >
> > "Releases currently active call if any exists, and answers the
> > currently waiting call."
> >
>
> Fair enough, fixed with commit b937d99791abc8c33ef968be40f193f3985bca8d.
>
Thanks.


>
> Regards,
> -Denis
>

Br
Tomasz

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 3721 bytes --]

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

* Re: voicecall: behavior of ReleaseAndAnswere with held calls?
  2011-01-25 22:18       ` Tomasz Gregorek
@ 2011-01-25 23:32         ` Denis Kenzior
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Kenzior @ 2011-01-25 23:32 UTC (permalink / raw)
  To: ofono

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

>     Yep, Hangup or HangupMultiparty then SwapCalls.  If you feel that a
>     single operation to accomplish hangup + swap is required we can
>     certainly consider it.  For now it didn't pass our API is Minimal +
>     Complete test.  Perhaps ReleaseAndSwap()...?
> 
> 
> I would go with easy solution by just changing src/voicecall.c line 1418
> 
> static DBusMessage *manager_release_and_answer(DBusConnection *conn,
>                         DBusMessage *msg, void *data)
> {
> ...
> 
> 1418:
> -    if (!voicecalls_have_waiting(vc))
> +    if (!voicecalls_have_waiting(vc) &&

I guess you mean || here.

> !voicecalls_have_with_status(vc, CALL_STATUS_HELD))
>         return __ofono_error_failed(msg);
> 
> ...
>     vc->driver->release_all_active(vc, generic_callback, vc);
> 
>     return NULL;
> }
> 
> This would give ReleaseAndAnswer full functionality of +CHLD=1.
> 
> (sorry for pseudo-patch, working temporary on windows machine)
>  
> 

Anyhow, I don't agree, we want the API to reflect what is going to
happen.  The various scenarios involving CHLD are pretty bizarre and
hard to explain to a developer who hasn't learned 22.030 by heart.

Regards,
-Denis

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

end of thread, other threads:[~2011-01-25 23:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25 12:07 voicecall: behavior of ReleaseAndAnswere with held calls? Tomasz GREGOREK
2011-01-25 20:37 ` Denis Kenzior
2011-01-25 21:43   ` Tomasz Gregorek
2011-01-25 22:01     ` Denis Kenzior
2011-01-25 22:18       ` Tomasz Gregorek
2011-01-25 23:32         ` 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.