Click to See Complete Forum and Search --> : TAPI probelm


JonesEEE
March 23rd, 2001, 01:10 AM
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

JonesEEE
March 23rd, 2001, 01:49 AM
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