TAPI (make A call)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ahmed fat-hi

    #1

    TAPI (make A call)

    hi every body
    to make a call using TAPI
    i do the following:
    1- initiate connectiion
    2- Select an Address
    3- make a call

    when i make a call i execute the function
    ITAddress::Crea teCall the first parameter it takes is the
    distination address (BSTR bstrAddressToCa ll)
    bstrAddressToCa ll will be the phone number
    to define bstrAddressToCa ll i write the following code

    ITAddress * pAddress;
    char *szAddressToCal l="+2 (02) 82-4570988";
    BSTR bstrAddressToCa ll = SysAllocString( (OLECHAR*)
    szAddressToCall );
    if(S_OK == pAddress->get_DialableAd dress
    (&bstrAddressTo Call))
    MessageBox("ok" );
    else
    MessageBox("no" );
    pAddress->CreateCall(
    bstrAddressToCa ll,
    LINEADDRESSTYPE _PHONENUMBER,
    TAPIMEDIATYPE_A UDIO , //Media type
    &pBasicCall
    );

    this code accept the phone number but still i can not make
    a call. I can't dial the phone number via my modem.
    can u help me plz
    thanx
  • William DePalo [MVP VC++ ]

    #2
    Re: TAPI (make A call)

    "ahmed fat-hi" <amfat2000@hotm ai.com> wrote in message
    news:0dfc01c368 ce$dcb1d720$a60 1280a@phx.gbl.. .[color=blue]
    > hi every body
    > to make a call using TAPI
    > i do the following:
    > 1- initiate connectiion
    > 2- Select an Address
    > 3- make a call[/color]

    You will find more help on using TAPI in the

    microsoft.publi c.win32.program mer.tapi

    group than you will here. I suggest that you post any follow-up to your
    question again in that group.

    The Platform SDK has a sample named Dialer in its subfolder

    samples\netds\T api\Tapi2\Diale r

    It looks a lot like the old dialer that was included with 95 many years ago.
    It will do what you want. But perhaps unfortunately for you it uses the
    earlier procedural C API rather than the new COM based API of TAPI3. (Many
    of us consider that a good thing. <BWG>)

    As this is a .dotnet group, I should point that if you are using a
    managed language you might want to check this link which describes a
    simplified
    C# wrapper for TAP 2:



    I haven't tried, but it shouldn't be hard to convert to (or perhaps consume
    in) Managed C++

    Regards,
    Will



    Comment

    Working...