Finally got around to upgrading our home box, and skype/kb2kbskype
with it. We run the box in PSTN mode, and we've run into one
small snag, which is addressed by the (ugly) patch below.
The difficulty is that multiple-command strings occasionally reach
usbb2k_api. This seems to happen most often when switching from USB
to PSTN mode, for some reason. The blocking of PSTN calls when in
USB mode (which is a _very_good_thing_ in every other way!) make
this particularly painful, because (as my wife pointed out) we
disappear from PSTN-world when the switchback fails.
What turns up in at the top of the message queue case statement
is something like this:
DIALTONE OFF\nDIALTONE OFF\nSWITCH PSTN\n
The existing machinery dutifully processes this as a DIALTONE OFF
statement. All I've done is added a couple of special statements
to catch this particular case. I'm probably not the right
person to write a more elegant solution. :)
Anyway, here's the change, for what it's worth:
diff -r -u usbb2k-api-mod-2.5/src/usbb2k-main.c usbb2k-api-mod-2.5-1/src/usbb2k-main.c
--- usbb2k-api-mod-2.5/src/usbb2k-main.c 2007-11-08 02:22:33.000000000 +0900
+++ usbb2k-api-mod-2.5-1/src/usbb2k-main.c 2008-01-10 02:17:48.000000000 +0900
@@ -301,6 +301,16 @@
{
return CMD_SWITCH_PSTN;
}
+ // added by frank bennett 2008-01-10
+ if (buffcmp(cmd_str,"DIALTONE OFF\nDIALTONE OFF\nSWITCH P")==0)
+ {
+ return CMD_SWITCH_PSTN;
+ }
+ if (buffcmp(cmd_str,"DIALTONE OFF\nSWITCH P")==0)
+ {
+ return CMD_SWITCH_PSTN;
+ }
+ // end add
if (buffcmp(cmd_str,"RING")==0)
{
if (strlen(cmd_str)<5)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Finally got around to upgrading our home box, and skype/kb2kbskype
with it. We run the box in PSTN mode, and we've run into one
small snag, which is addressed by the (ugly) patch below.
The difficulty is that multiple-command strings occasionally reach
usbb2k_api. This seems to happen most often when switching from USB
to PSTN mode, for some reason. The blocking of PSTN calls when in
USB mode (which is a _very_good_thing_ in every other way!) make
this particularly painful, because (as my wife pointed out) we
disappear from PSTN-world when the switchback fails.
What turns up in at the top of the message queue case statement
is something like this:
DIALTONE OFF\nDIALTONE OFF\nSWITCH PSTN\n
The existing machinery dutifully processes this as a DIALTONE OFF
statement. All I've done is added a couple of special statements
to catch this particular case. I'm probably not the right
person to write a more elegant solution. :)
Anyway, here's the change, for what it's worth:
diff -r -u usbb2k-api-mod-2.5/src/usbb2k-main.c usbb2k-api-mod-2.5-1/src/usbb2k-main.c
--- usbb2k-api-mod-2.5/src/usbb2k-main.c 2007-11-08 02:22:33.000000000 +0900
+++ usbb2k-api-mod-2.5-1/src/usbb2k-main.c 2008-01-10 02:17:48.000000000 +0900
@@ -301,6 +301,16 @@
{
return CMD_SWITCH_PSTN;
}
+ // added by frank bennett 2008-01-10
+ if (buffcmp(cmd_str,"DIALTONE OFF\nDIALTONE OFF\nSWITCH P")==0)
+ {
+ return CMD_SWITCH_PSTN;
+ }
+ if (buffcmp(cmd_str,"DIALTONE OFF\nSWITCH P")==0)
+ {
+ return CMD_SWITCH_PSTN;
+ }
+ // end add
if (buffcmp(cmd_str,"RING")==0)
{
if (strlen(cmd_str)<5)
I will check that.
Never new about this bug, thought....
Thanks