Discussion in 'Code Samples & Tips' started by cpc6128, Apr 10, 2008.

  1. cpc6128

    cpc6128 Member Licensed User

    Hello all,

    Does anyone know of a way to toggle the speakerphone on and off?
    I have gone through the registry but can't find anything that looks appropriate.
  2. Erel

    Erel Administrator Staff Member Licensed User

    Sending the keycode 127 toggles the speakerphone (while speaking). Credits go to Peter Foot's blog: http://peterfoot.net/ProgrammaticallyActivatingSpeakerphone.aspx

    If you want to answer a call and automatically activate the speaker you should download this example: http://www.basic4ppc.com/forum/showthread.php?t=1736
    And change two of the subs:
    Sub phone_IncomingCall
        timer1.Enabled = 
    true 'Wait two seconds before pressing the Talk button.
    End Sub

    Sub Timer1_Tick
    If duringCall Then
            timer1.Enabled = 
    127'Toggle the speaker.
    114'Simulate the green Talk button.
            duringCall = true
    End If
    End Sub
    Otherwise you could just use Hardware.KeyPress(127) with a hardware object.
  3. cpc6128

    cpc6128 Member Licensed User

    Thanks Erel!

    It's odd that there is no (proper) way to do this in code, but a great testament to Peter Foot's ingenuity for providing a decent workaround.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice