Link to home
Start Free TrialLog in
Avatar of DataMaat
DataMaat

asked on

Dial number from asp page with tapi32.dll

I have a asp page that give results from a database with customers and telephonenumbers
It is not .net but the 'old' asp
I want to hyperlink the phonenumber and call the tapi32.dll functions to open a specific tapiline so then number is dial thrue the phone of the employee.
Is there anyone who can give me some code to do this.
for example:
set varTapi = create serverobject(tapi32,....)
varTapi.OpenTapiline("702")
varTapi.Dial("phonenumber")

something like that

ASKER CERTIFIED SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DataMaat
DataMaat

ASKER

Thanks
I am working on friday on this application, so then I test the suggested solution, I can't tested at home.
The users have a phone connected true a tapi-application and each phone had create a unique tapiline
so I hope the function MakeCall use the right tapi-line, or is this one of the parameters of the function MakeCall.
Solution from Rob is exact the same as effx.
But anyway thanks effx for your comment.
This is the syntax of the MakeCall method....
http://msdn2.microsoft.com/en-us/library/ms731501(VS.85).aspx

I'm not so sure you can specify a specific line....

Regards,

Rob.
Thanks Rob,

I let you know the result friday
Sorry I can not respons immediately, because I'm working by several customers.

Kind regards,
Nope ours are slightly diffrent, his does not create the object correctly, it would if it was just VBScript

But im guessing your using ASP so it would be Server.CreateObject and not CreateObject by itself
That's true effx, DataMaat, try that out if you don't get anywhere.....

Regards,

Rob.
hai,
sorry I think it's not that easy
I test the following code but the only thing I get is the phonumber on my screen:

<%@ Language=VBScript %>
<%Response.Expires =-1%>
<%      varNr=request.querystring("Telnr") & ""
      response.write VarNr
      if varNr <>"" then
            Set OutDial = Server.CreateObject("RequestMakeCall.RequestMakeCall")
            lngResult = OutDial.MakeCall(varNr,"","","")
            response.write lngResult
            Set OutDial=nothing
      end if
%>
You sould get the result from the call.
You sould get the phone number and the result.

Test it without the 'if varNr <>"" then' statement
thanks effx,

I tried but this is the only result (see screenshot)
I put the phonenumber in the querystring and load the asp-page.
Indeed I expect the result by: response.write lngResult

test.bmp
Wouldn't you have to use client side code, not server side?  The Server.CreateObject wouldn't work for this, because it would be trying to make the call through the server, not the client.  Try removing the

"Server."

from the CreateObject call.

Regards,

Rob.
Sorry i understood that you were making the call from the server.
sorry It's still not what I want, the answers did not give a solution for my problem. But i think it points me in the right direction to look further.
thanks anyway