scratch that, i think i just figured something out.  sorry for posting and
then figuring out my own problem an hour later :(

colin



> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Colin
> Mitchell
> Sent: Sunday, June 29, 2003 3:54 PM
> To: Palm Developer Forum
> Subject: blocking phone calls on T|W
>
>
> Howdy folks, I've got an application that will be deployed on the Tungsten
> W, and one of the requests that has been made of me is to block incoming
> phonecalls in certain situations.  There's not a lot of documentation or
> examples out there for this sort of thing, but the Telephony API seems to
> suggest that it can be done.  However, when I call TelSpcRejectCall, I get
> an telErrCommandFailed error, which seems to suggest something
> fundamentally
> wrong with what I'm doing.  I've tried calling a few other functions, such
> as TelSpcAcceptCall, with the same results.  I've also tried making the
> calls synchronously and aynchronously.  So, I guess my questions are:
>
> - does anyone know of some good sample code for this sort of thing?
> - in lieu of that, has anyone had any success with this problem?
>
> thanks very much!
> colin
>
>
> code follows:
>
> // global var
> UInt16 transID = 1;
>
>
> // here's the guts of the event loop
>    do {
>
>       TelGetEvent(telRefNum, telAppID, &event, evtWaitForever);
>
>
>               if ( event.eType == kTelTelephonyEvent ) {
>                       TelEventType *foo2 = (TelEventType *)&event;
>
>                       if ( foo2->functionId ==
> kTelSpcRejectCallMessage ) {
>                               // this is where the error code shows up
>                          ShowResult(MainTelCloseResultLabel,
> foo2->returnCode);
>                       }
>               }
>
>               TelGetCallStateType foo;
>               foo.numberSize = 20;
>               foo.number = (char *)MemPtrNew(sizeof(char) * 20);
>
>               error = TelGetCallState(telRefNum, telAppID, &foo, NULL);
>
>               if ( foo.state == kTelCallConnecting ) {
>                       error =
> TelIsSpcRejectCallSupported(telRefNum, telAppID, NULL);
>                       if ( error != errNone ) {
>
> ShowResult(MainSysLibLoadResultLabel, error);
>                       }
>                       else {
>
> ShowResult(MainTelIsPhoneConnectedResult2Label, 99);
>                               TelSpcRejectCall(telRefNum,
> telAppID, &transID);
>
>                               // i'm not getting an error here
>                               if ( error != errNone ) {
>
> ShowResult(MainSysLibLoadResultLabel, error);
>                               }
>                       }
>               }
>       }
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to
> unsubscribe, please see http://www.palmos.com/dev/support/forums/
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to