CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: TAPI probelm

  1. #1
    Join Date
    Mar 2001
    Location
    Hong Kong
    Posts
    3

    TAPI probelm

    Dear all,

    I am a new comer, nice to meet u all. I am now working on a project which required me to use TAPI to make a call. My programme can only make a call, but it remains silence during th call, i.e. no human voice nor tones can be heard. Tone detection and generation can function properly. So would any one suggest me what's wrong with it?
    The attached is my programme in vb.

    Thx for your kind atteention.

    Regards.

    Jones

  2. #2
    Join Date
    Mar 2001
    Location
    Hong Kong
    Posts
    3

    Re: TAPI probelm

    Dear all,

    I'm sorry that I've forgotten to post the codes as well. As I dun have Mozilla 4+ , the codes may may be in a mess, but I can send them as attachment of e- mail if anyone is willing to give me their address. Thx a lot!!!!

    Here they are


    When cmdDial is clicked:
    private Sub cmdDial_Click()


    ' make a call


    Dim strAddr as string


    strAddr = Trim(CentreNo)


    Call mylineMakeCall (strAddr,LINEMEDIAMODE_AUTOMATEDVOICE)



    End Sub



    The mylineInit function:

    public Sub mylineInit()


    Dim Retcode as Long


    admylineCallBack = PtrToLong (AddressOf LINECALLBACK)


    lLineInst = GetModuleHandle(vbNullString)


    Retcode = lineInitialize(lphLineApp, lLineInst, admylineCallBack, "TAPIVOICE OUT", lpNumLines)



    The lineopen function:
    public Sub mylineOpen(byval LineID as Long))


    Dim a as Long)


    udtLineCall.dwTotalSize = LINECALLPARAMS_FIXEDSIZe + 2048 )


    a = lineOpen(lphLineApp, LineID, lphLine, 65540, &H0, 0, LINECALLPRIVILEGE_OWNER, LINEMEDIAMODE_AUTOMATEDVOICE, udtLineCall)


    End sub)




    The line make call function:

    public Sub mylineMakeCall(TelNumber as string, MediaMode as Long)


    Dim a as Long


    Dim strAddr as string


    udtLineCall.dwMediaMode = MediaMode


    a = lineMakeCall(lphLine, lhActiveCall, TelNumber, 0, udtLineCall)


    End Sub




    Jones

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured