**** BEGIN LOGGING AT Wed Oct 21 02:59:59 2009 Oct 21 03:02:36 denkenz: ping Oct 21 03:09:18 pong Oct 21 03:19:47 i doubt i cannot use g_at_result_iter_next_unquoted_string for chld_cb directly Oct 21 03:20:05 unless we add check for ')', e.g. (1,2,3) Oct 21 03:20:25 it would get result like, 1, 2, 3). 3) is not what i want Oct 21 03:20:50 so now i have a patch like Oct 21 03:20:56 diff --git a/gatchat/gatresult.c b/gatchat/gatresult.c Oct 21 03:20:56 index 1436ae3..3d07e13 100644 Oct 21 03:20:56 --- a/gatchat/gatresult.c Oct 21 03:20:56 +++ b/gatchat/gatresult.c Oct 21 03:20:56 @@ -131,12 +131,12 @@ gboolean g_at_result_iter_next_unquoted_string(GAtResultIter *iter, Oct 21 03:20:57 goto out; Oct 21 03:20:59 } Oct 21 03:21:01 - if (line[pos] == '"') Oct 21 03:21:03 + if (line[pos] == '"' || line[pos] == ')') Oct 21 03:21:05 return FALSE; Oct 21 03:21:07 end = pos; Oct 21 03:21:09 - while (end < len && line[end] != ',') Oct 21 03:21:11 + while (end < len && line[end] != ',' && line[end] != ')') Oct 21 03:21:13 end += 1; Oct 21 03:21:15 iter->buf[end] = '\0'; Oct 21 03:21:48 that sounds fine Oct 21 03:23:11 + if (line[pos] == '"' || line[pos] == ')') Oct 21 03:23:16 That part isn't necessary I think Oct 21 03:24:01 after return 2, the next pos is ')'. Oct 21 03:24:15 after return 3, the next pos is ')' Oct 21 03:24:22 then it shoudl return Oct 21 03:24:59 ah yes, you're right Oct 21 03:25:11 okay Oct 21 03:25:39 and another thing is. voicecall may have an issue in multicall Oct 21 03:26:02 in clcc_poll_cb, line 282, if (memcmp(nc, oc, sizeof(struct ofono_call)) && !nc->type) Oct 21 03:26:25 i meet a scenario may have issues Oct 21 03:26:55 we have call #1 come in and #1 is active. Oct 21 03:27:03 then #2 is coming Oct 21 03:27:12 then we close #1, Oct 21 03:27:18 then close #2, Oct 21 03:27:34 the get properties show #2 is still incoming Oct 21 03:29:16 interesting, you might be right actually Oct 21 03:29:40 although nc and oc have the same call id, but they represent different call already Oct 21 03:30:09 so we can never release #2 Oct 21 03:30:50 and i don't understand about 'nc->clip_validity = oc->clip_validity;' Oct 21 03:31:10 It is a bit late here and that logic is warped Oct 21 03:31:28 but I think what happens is that #2 is not incoming, it is in fact waiting Oct 21 03:31:43 So once we release 1, it should become incoming, correct? Oct 21 03:31:52 right Oct 21 03:32:24 Maybe it is the case that we need to check for that whenever a call goes away Oct 21 03:32:25 my voicecall has the similar state machine like yours Oct 21 03:32:44 that's the tricky part i am debugging now Oct 21 03:32:48 If no more held/active calls, move waiting to incoming Oct 21 03:33:13 CLCC will tell you waiting already become incoming Oct 21 03:33:28 and we need update that info correctly Oct 21 03:34:34 anyway, i will first try my part to see if i could fix it. :) Oct 21 03:34:59 That logic should take care of this, since we always compare the clcc results Oct 21 03:35:33 yeah. in clcc_poll_cb. Oct 21 03:35:51 so what could be wrong then, hm Oct 21 03:36:49 you can reproduce it by my previous step. B call in while having A. then hangup A then B Oct 21 03:37:01 hangup B Oct 21 03:37:18 and see properties of voicecallmanager Oct 21 03:39:36 Works for me :) Oct 21 03:41:08 really=-O Oct 21 03:42:46 Yah, works on phonesim Oct 21 03:43:11 The call doesn't go into the "incoming" state, but it is ended successfully Oct 21 03:43:19 okay, i will doube check then, Oct 21 03:44:15 i am testing on atgen0, but shoudl be the same Oct 21 03:46:02 This might be a bug in phonesim Oct 21 03:46:11 It doesn't transition the call to incoming state Oct 21 03:46:25 i will try phonesim later Oct 21 03:49:19 Well if you manage to reproduce it, make sure to save OFONO_AT_DEBUG log Oct 21 03:49:28 okay Oct 21 03:49:29 I don't see how it can happen right now Oct 21 03:50:48 how to send log to u Oct 21 03:50:56 email is fine Oct 21 03:51:13 okay Oct 21 04:13:52 Grr, what I was afraid of Oct 21 04:14:21 The reason this happens is that CRING/RING gets triggered before we got a chance to poll CLCC again after ATH/CHLD/NO CARRIER Oct 21 04:18:26 zhenhua: I think the fix is to return a RING/CRING if there's a call in waiting state Oct 21 04:19:04 zhenhua: Should be safe since we know a clcc poll is scheduled already anyway Oct 21 05:07:14 denkenz: right. i have a small test to return from RING and it works Oct 21 05:07:48 denkenz: and in this case, you reply on CLCC to notify a new call? Oct 21 05:51:19 zhenhua: Yes, in the most bizarre case we actually have both calls dropped Oct 21 05:51:35 zhenhua: And a new arrives, but since clcc_poll is scheduled anyway we should still detect the call Oct 21 05:52:31 zhenhua: It is about the best we can do, it is much better to use vendor specific call progress indicators, which tell you exactly what happened Oct 21 05:55:42 denkenz: i found a different on LG KM900 phone. but i am trying another Oct 21 05:56:24 in atmodem, CLCC keep index at both side, so we can use nc->id > oc->id to know one call is ended Oct 21 05:56:32 but in hfp, CLCC index will change Oct 21 05:56:52 for example, if old status is Oct 21 05:56:53 ofonod[19120]: Response line: +CLCC: 1,1,0,0,0,"02161167086",129 Oct 21 05:56:53 ofonod[19120]: Response line: +CLCC: 2,1,5,0,0,"13564636515",129 Oct 21 05:57:11 in hfp, the new status become Oct 21 05:57:12 ofonod[19120]: < \r\n+CLCC: 2,1,4,0,0,"13564636515",129\r\n Oct 21 05:57:22 instead of ofonod[19120]: < \r\n+CLCC: 1,1,4,0,0,"13564636515",129\r\n Oct 21 05:57:40 sorry my mistake, the later one is true Oct 21 05:57:51 the index would change from 2 to 1 Oct 21 05:57:59 but in atmodem, CLCC index is kept Oct 21 05:58:12 eww Oct 21 05:58:40 You're saying HFP would end the first call and the second call and immediately reuse the index of the first call? Oct 21 05:58:47 right Oct 21 05:59:06 so i need compare phone number to know the first call is ended Oct 21 05:59:36 Ugh, what about CIEV, is that of any help here? Oct 21 06:00:23 no Oct 21 06:00:41 will have callsetup = 0 from CIEV Oct 21 06:03:30 so would you get something like call 1 active (call=1), call 2 waiting (callsetup=1), call 1 hung up (call=0)? Oct 21 06:04:23 yes Oct 21 06:04:52 and when callsetup=0, i need find out which line is ended by CLCC status comparing Oct 21 06:05:24 Not really, there can only be 1 incoming or waiting call Oct 21 06:05:42 Unless callsetup also means outgoing as well Oct 21 06:06:13 callsetup=2, 3 means outgoing Oct 21 06:06:38 dialing or alerting Oct 21 06:06:56 Yah, so if you go from callsetup 1 to 0, you know you have no incoming nor waiting calls Oct 21 06:07:52 why? will it have two waiting call? Oct 21 06:07:57 and one active Oct 21 06:08:07 nope, not in GSM Oct 21 06:08:18 Can only have 1 of (waiting|incoming) Oct 21 06:08:26 Cannot have 2 incoming, or 2 waiting Oct 21 06:08:31 cannot have incoming and waiting Oct 21 06:08:31 ok Oct 21 06:09:13 does it possible to have 1 waiting and 1 incoming Oct 21 06:09:20 no Oct 21 06:09:51 but we could have held call Oct 21 06:10:02 then callheld=1 Oct 21 06:10:07 yes Oct 21 06:10:26 fine, i will rethink my part Oct 21 06:10:40 There's still plenty of race conditions there Oct 21 06:10:50 Because the bloody indicators are not reported atomically Oct 21 06:11:31 yes Oct 21 06:12:19 Anyway, save the logs of some of these bizarre conditions Oct 21 06:12:35 sure Oct 21 06:12:37 We will probably want to make test cases for them Oct 21 06:17:19 denkenz: and why use number GINT_TO_POINTER(0) instead of GINT_TO_POINTER(CALL_STATUS_ACTIVE) Oct 21 06:17:31 i prefer later one Oct 21 06:19:03 the enum's not defined in the drivers Oct 21 06:19:24 and I'm lazy ;) Oct 21 06:20:26 enum is in common.h so driver could access them. :) Oct 21 06:20:47 now it is ;) Oct 21 06:21:05 feel free to submit a patch to fix it Oct 21 06:22:58 okay Oct 21 16:16:36 sabotage: That one is available for phonesim, calypso and mbm plugins Oct 21 16:16:43 denkenz: what is needed to get phonesim modem to expose CallVolume? Oct 21 16:17:10 I can't find the interface on any path Oct 21 16:17:43 fyi, this is on 0.7 tag Oct 21 16:18:02 Lemme see Oct 21 16:18:04 which, according to gil log, has it added to phonesim Oct 21 16:18:09 s/gil/git/ Oct 21 16:18:18 works on HEAD Oct 21 16:18:23 are you sure its in 0.7? Oct 21 16:18:28 yep Oct 21 16:18:35 packaged it myself Oct 21 16:18:46 actually 2 commits > 0.7 tag Oct 21 16:20:04 I guess I should update the package to 0.8 and test from that though Oct 21 16:20:17 Its a puzzle, make sure that phonesim also supports it Oct 21 16:20:35 * sabotage hadn't planned on it for todays work, but needs it to test/verify a new bug report Oct 21 16:20:40 It needs CLVL query support Oct 21 16:20:47 using latest phonesim Oct 21 16:20:53 * sabotage checks Oct 21 16:21:25 phonesim commits for this are HEAD~3 and HEAD~2 Oct 21 16:23:25 And I still have no idea why its crashing in the distro, any way to provide a proper backtrace? Oct 21 16:24:12 hmm, seems last phonesim packaging missed the CVL adds to moblin.xml by ~6 hrs Oct 21 16:24:31 ok, so I will rev phonesim and ofono packages and retest Oct 21 16:24:45 nod, its working on HEAD/HEAD of ofono/phonesim Oct 21 16:24:59 have them install the debuginfo version Oct 21 16:25:00 What are you using it for anyway? :) Oct 21 16:25:22 "sudo debuginfo-install ofono" Oct 21 16:25:53 what do you mean "what are you using it for"? Oct 21 16:26:04 CallVolume? Oct 21 16:26:17 yeah Oct 21 16:27:02 wasn't, but got a bug report from QA that the mute button did nothing... so I was checking into what the latest was on ofono and volume controls Oct 21 16:27:25 that's what led me to looking for the interface, which I found missing ;) Oct 21 16:27:38 Trouble is, you can't really rely on that one to be present always Oct 21 16:27:47 no? Oct 21 16:28:21 what conditions determine its availability? Oct 21 16:28:21 no, most 'modern' platforms do software audio management Oct 21 16:28:21 modem capabilities Oct 21 16:28:28 meaning? Oct 21 16:28:29 E.g. N900 does audio entirely through Pulse Oct 21 16:28:49 So we really need AudioManager for that stuff Oct 21 16:28:54 so app must perform volume control rather than through ofono? Oct 21 16:29:00 oFono API was meant as backward compatibility / use for HFP Oct 21 16:29:14 or will ofono "do the right thing" and mask this Oct 21 16:29:17 AudioManager needs to handle all of this Oct 21 16:29:36 * sabotage should read up on AudioManager soon then Oct 21 16:29:45 ;) Oct 21 16:29:52 The API is meant for simpler devices, like the Freerunner Oct 21 16:29:59 which do everythough through the modem Oct 21 16:30:02 Modern systems don't Oct 21 16:30:31 anyway, I'll rev the packages, and get it working as a conditional and squash the bug and worry about AudioManager post release Oct 21 16:30:48 since we don't *actually* have a modem yet Oct 21 16:30:49 yah, sounds like a plan Oct 21 16:30:59 Shh ;) Oct 21 16:31:02 ;) Oct 21 16:44:15 denkenz: do you have an upstream bugzilla for phonesim? Oct 21 16:44:27 no, we're using moblin for now Oct 21 16:44:44 * sabotage can't find a phonesim component there Oct 21 16:44:56 create one Oct 21 16:45:28 I've never had a bug reported against it :) Oct 21 16:46:19 * sabotage can't create components :/ Oct 21 16:47:00 assigned to "Other Applications" with [Phonesim] in summary and /me as assignee Oct 21 16:47:47 BTW, we really need make dist* and proper versioning in phonesim too ;) Oct 21 16:47:58 otherwise the version will never change from 0.1 :P Oct 21 16:48:07 Yah, Marcel is doing something Oct 21 16:48:08 but that's a battle for another day Oct 21 16:48:15 Problem is Qt / qmake doesn't make it easy Oct 21 16:48:22 nod Oct 21 16:48:39 thus I defer to another day Oct 21 16:48:42 phonesim is mostly a crutch anyway Oct 21 16:48:47 nof Oct 21 16:48:50 nod too Oct 21 20:15:39 denkenz: what is the "right" way to handle the following: given an active call + held call; hangup active and make held active Oct 21 20:15:39 should I first swap then hang up held Oct 21 20:15:58 I don't see a "make held active" method Oct 21 20:16:22 but if I've hung up active, will swap handle this? Oct 21 20:30:52 there's one, lemme think about it a sec :) Oct 21 20:32:39 What you want is CHLD=1 Oct 21 20:33:28 However, that will return an error if you have a waiting call Oct 21 20:33:37 CHLD=1 is ReleaseAndAnswer Oct 21 20:34:11 Other alternative is to Swap, then hangup the held call Oct 21 20:34:42 Which again fails if you have a waiting call ;) Oct 21 20:34:52 sabotage: Did I tell you I hate GSM? Oct 21 20:51:43 denkenz: heh... not this afteroon, no... but thanks for the reminder Oct 21 20:52:36 denkenz: define "waiting" call Oct 21 20:52:55 I've yet to see an instance of that (at least from my limited phonesim testing) Oct 21 20:53:28 I've seen all the others, just never waiting Oct 21 20:53:55 basically whenever someone calls you the call shows up as waiting or incoming Oct 21 20:54:07 The network is setup in such a way that you can only have 1 such call Oct 21 20:54:29 If you currently have any other call dialing/held/active, the call is treated as waiting Oct 21 20:54:44 If you don't have any other calls, the call is treated as incoming Oct 21 20:55:03 ah, ok, not seen that, good to know Oct 21 20:55:25 only ever tested initial incoming and various outgoings Oct 21 20:58:41 so, did I miss the answer or is it that there is no answer and we'll have to come up with a solution? Oct 21 21:01:29 so the answer is that most direct route is to use ReleaseAndAnswer Oct 21 21:01:52 if you have an active call + held call, calling that will hang up the active call and make held active in one command Oct 21 21:02:03 The caveat being that if you have a waiting call, it won't work Oct 21 21:03:10 if I have a waiting call, *is* there a right solution? Oct 21 21:03:29 If you have a waiting call you need to do something with it Oct 21 21:03:35 Your choices become rather limited Oct 21 21:04:39 well the particular situation I'm running into is that I'm trying to hang up the active call, but since there is a held call, I want to make it active... Oct 21 21:04:56 For that one you're OK Oct 21 21:05:15 If you have waiting then you either release the waiting, or replace the active with the waiting Oct 21 21:05:19 I can query if there is a call waiting, in which case, I will directly hang up the active call and answer the waiting one (or similar) Oct 21 21:06:45 Yep, you can do that as well Oct 21 21:06:45 hmm, ReleaseAndAnswer says: "Releases currently active call and answers the currently Oct 21 21:06:52 waiting call. Please note that if the current call is Oct 21 21:06:54 a multiparty call, then all parties in the multi-party Oct 21 21:06:56 call will be released. Oct 21 21:06:58 oops Oct 21 21:07:01 bad c-n-p Oct 21 21:07:25 yep, multiparty call is treated as one giant call Oct 21 21:07:28 which is diff than what you said regarding it's use with a held call Oct 21 21:07:30 no? Oct 21 21:08:18 or is the described behavior (with held and no waiting) an undocumented "feature" of that method? Oct 21 21:08:43 I need to update the docs to say 'waiting or held' Oct 21 21:11:12 ok Oct 21 21:11:47 will try it out, thanks Oct 21 21:29:00 denkenz: ReleaseAndAnswer failed with 1 active + 1 held Oct 21 21:29:02 ** (mohler:7024): WARNING **: Failed drop active and accept waiting call: org.ofono.Error.Failed: Operation failed Oct 21 21:29:29 caveat being this is only 0.7 Oct 21 21:33:21 lemme check Oct 21 21:42:40 Ok, in my infinite wisdom I disabled this Oct 21 21:42:55 Probably to avoid all of this confusion Oct 21 21:43:19 Do you want me to make an explicit method for this? ReleaseAndUnhold or something? Oct 21 21:44:00 Note that iPhone UI keeps the call held Oct 21 21:44:09 And our UI designers are just following that ;) Oct 21 22:01:27 sorry, AFK Oct 21 22:02:13 well, to be fair, no one has actually "defined" the expected behavior in this use case, I'm just trying to do something sane... Oct 21 22:02:24 but maybe my definition of sane needs altering ;) Oct 21 22:03:04 I can certainly leave the held call as held, but there is still no way to simply "activate" a held call, on it's own, AFAICS Oct 21 22:04:57 there is Oct 21 22:04:59 SwapCalls Oct 21 22:05:14 if active has already been hung up? Oct 21 22:05:21 doesn't matter Oct 21 22:05:26 IOW, if no active and 1 held Oct 21 22:05:33 ok Oct 21 22:05:38 * sabotage verifies Oct 21 22:05:45 SwapCalls is used to Hold a call, or Unhold a call Oct 21 22:05:52 If you have active + held, it swaps Oct 22 00:32:57 denkenz: ping Oct 22 00:35:21 pong Oct 22 00:37:55 in multi-call, some phone's call index will decrease if previous call is ended Oct 22 00:38:04 but some phone, like iphone doesn't Oct 22 00:38:26 for example, we have call A and B, and the index of B is 2 Oct 22 00:38:43 if A is ended, iPhone return B. and index is still 2 Oct 22 00:38:55 but LG phone return 1... Oct 22 00:39:43 so we could not count on call id, but need a hashtable to record id mapping then Oct 22 00:43:55 anyway, let me double confirm about that Oct 22 00:44:02 i need try Nokia phone also Oct 22 00:46:42 Nod, IMO it is a buggy implementation that shuffles the IDs Oct 22 00:47:03 But go ahead and confirm Oct 22 00:47:19 so if that is in case, do we need support that buggy one? Oct 22 01:28:19 eventually :) Oct 22 02:22:26 denkenz: ping Oct 22 02:36:56 yes? Oct 22 02:42:23 i don't why but nokia phone has problem to use hfp Oct 22 02:42:35 the problem is AT+CHLD? Oct 22 02:42:48 if i send CHLD? then nokia disconnect the connection. Oct 22 02:42:57 lol Oct 22 02:43:10 but if i use minicom to input AT+CHLD? mannually. everything is fine. Oct 22 02:43:41 really confused me Oct 22 02:44:55 Maybe it thinks you're trying to use it as a modem :) Oct 22 02:45:04 So it forcefully kills your connection Oct 22 02:45:26 err... but i can use minicom to connect to hfp port Oct 22 02:45:37 doesn't make sense. Oct 22 02:46:18 LG phone is buggy so i ignore it now. Nokia has the same behavior with iPhone Oct 22 02:46:25 CLCC return the right index Oct 22 02:46:43 heh, that is weird ;) Oct 22 02:46:52 CLCC behavior is what I would expect Oct 22 02:47:06 maybe the LG phones are just crappy Oct 22 02:47:33 right **** ENDING LOGGING AT Thu Oct 22 02:59:56 2009