Incoming TAPI 3.0 events

Implevit-cbiImplevit-cbi Posts: 24Member
edited 2000-08-10 in Navision Financials
HELP!!!!!!!!! <img border="0" title="" alt="" src="images/smiles/icon_confused.gif" />

A server based telephone exchange brings incoming messages as TAPI 3.0 events... on incoming call I should start a Navision Form with adress of the owner of the incoming phone...

Has anybody experiences with such problems?

Would be very nice if somebody could show me a way how to handle?

Thank you for your help


<img border="0" title="" alt="" src="images/smiles/icon_confused.gif" />


  • fabianfabian Posts: 186Member
    I did that last year for a customer:

    First thing you need is a third party application written in C, Delphi or VB to trigger the Tapi-events. If a TAPI-event occurs you create a flat-file containing information of the person who is being called and of course the telephone number which calles.

    In Navision you simply scan on a regular basis for new "Phone-files".

    Needless to say that you need a Key on the Telephone-number in the address table.

    Success mainly depends on the telephone central you use respectively what kind of user-informateion the central is able to provide.


    Marcus Fabian
    +41 79 439 78 72
    With best regards from Switzerland

    Marcus Fabian
  • Implevit-cbiImplevit-cbi Posts: 24Member
    A regular scan is not very interesting - is there no possibility as the icoming data may generate a own event?
  • dbdb Posts: 82Member
    OCX can't pass event to NF.
    CFront could'n run NF form.
    Automation - I don't know, but I think that NO too.

    What you think to do if NF not runing on this workstation ?
    I know only one way to run NF: run fin.exe !!!

    You can't call NF func. from outside too, because they not a compiled func. they are only precompiled, you must pass them to interpretator.

    In NF you can't map func to message/event, can't create thread too.

    The best solution can be creating of own API that stores all info thru CFront.
  • Dave_CoxDave_Cox Posts: 83Member
    I am no expert!

    Would it not be best to use C/Front and VB or C++ when the TAPI event is fired get the Phone No then use C/Front to lookup Navision and Return the Name fields then open a VB form from the OCX with the Details from Navision.

    The Call could be from a Customer, Ship-to ,Vendor, Prospect or Contact!

    You would realy need another table in NF with Type No Code Name Company, Number to use for lookup!

    The call maybe to a specific extention how would you deal with that?

    There is TAPI software out there is anyone using third party software?

    MindSource (UK) Limited
    Navision Service Partner
  • fabianfabian Posts: 186Member
    I'm afraid Chrostoph's problem is not solved by simply showing (lookup) the name of the person who is calling. At least that was the case in my earlier project.
    In fact the customer wanted not only to know who was calling but wanted Navision to react accordingly:
    * If a vendor is calling, open the vendor card
    * If a customer is calling open a sales-order form
    * If it's only an address, open the address form

    Christoph, I understand if you say "A regular scan is not very interesting". But let's face it: Why seeking for an interesting (= complicated high-tech-) solution if there's an easy reliable way which works?

    Marcus Fabian
    +41 79 439 78 72
    With best regards from Switzerland

    Marcus Fabian
  • dbdb Posts: 82Member
    Fabian you are right it will work, but that not nice solution and not comprehensible for new programing technologies. File import was used ~3-10 years ago.
    I was heve very similar problem, but in another context. I was solved it folowing:
    1. necessary data puted into NF table X over CFront.
    2. external API runs dll with macro func. that launching fin.exe puting user name & password, selecting company and pushing F12.
    3. Codeunit 1 was modified to detect this user & running forms depends on data in table X.
    4. After completing poping massage, macro dll closing fin.exe

    there is one minus: additional session.
  • Implevit-cbiImplevit-cbi Posts: 24Member
    Sounds great... would this be also possible to execute when NF is open without opening a second session?
  • John_TegelaarJohn_Tegelaar Posts: 159Member
    DB - What API dll with macro function did you use for this?

  • fabianfabian Posts: 186Member
    File import was used ~3-10 years ago.

    Well, that doesn't mean that it's a bad solution, does it?

    You can believe me, I experienced lots of different approaches including ODBC-Links, Third party DLL's, OCX's etc.
    After all I decided for this old-fashioned simple solution for three reasons:
    1) You don't need to install and run a third-party link-program on EVERY client.
    2) You save memory and speed as this third-party program would take ressources.
    3) Whenever you have a live-connection between two programs, everything collapses if ONE of the applications involved has a problem. In case your Telephone-check-for-call application halts, you could not continue working with navision even if no phone calls are in the pipeline. On the other hand, if you use simple flat-files, you could continue using Navision. In worst case phone-calls would not be processed as the 3rd-Party application hangs and does not provide a message file.


    Marcus Fabian
    +41 79 439 78 72
    With best regards from Switzerland

    Marcus Fabian
  • Implevit-cbiImplevit-cbi Posts: 24Member

    What I don't understand is... where will I insert this pull code? I meen on I have this TAPI 3.0 events (from Windows 2000... And I have a Navision Installation with, lets say 10 users... now everyone of this users may get phone calls and sometimes he may take also calls which where for another person in the office (if the person would be not in the office).

    In your scenario every navision client would have to look permanently to see if a call is coming in...

    This sounds for me as like a lot of traffic (and if I think the same scenario with 50 clients ... <img border="0" title="" alt="" src="images/smiles/icon_eek.gif" />
  • dbdb Posts: 82Member
    to Christoph
    I. I don't think that that is good run Call's form on the same NF instance. Because: a) if you making raport or posting data to tables (locked tables) or filling data in forms you will lost data in the best case or it can cause error. b) if running 2 fin.exe instaces, in which instance must form's popuped.

    to John
    II. One hacker was maded this dll for me.

    to Marcus
    III. Old good solution's can't be bad !!! <img border="0" title="" alt="" src="images/smiles/icon_smile.gif" />
    >1) On file solution you need install third-parity too. To solve this "problem" by creating table in nf where can be stored all dll or exe as BLOB. And on run check installation, if not installed puts out needed files.

    >2) Memory: TRUE, but if program is inactive win it places on swap mem.
    Speed: CPU time usage is lower than in file solution, no needs to run empty cycles.

    >3)This depends on development. The program must be written corectlly, no another cure. The same can happen on file solution too.

    In now days technologies I see following solution:
    - then launching fin.exe, it checks for settings: call-processing is needed or not. If yes fin.exe creates new thread for call processing.
    - running thread is checking for call
    - then receiving call sending event to nf
    - if on nf runing thread with higher priority, it not will interupted.
    - nf depens on USERID & settings popups form
    - thru OCX receiving data from call-aplication
    Very nice or not?
    But in NF can't do this. <img border="0" title="" alt="" src="images/smiles/icon_sad.gif" />
  • Implevit-cbiImplevit-cbi Posts: 24Member

    sounds super... and how would be the Navision Version of your solution of now days technology?
  • Dave_CoxDave_Cox Posts: 83Member
    Fabians solution would be ok for Tele-Sales by having a list table form with the incoming calls updated by the timer then the Operator could select the next call in the list, the form would poll for the files so if the form is not open you are not polling.

    Not for a small office where every call is flashed up to all users.
    MindSource (UK) Limited
    Navision Service Partner
  • Implevit-cbiImplevit-cbi Posts: 24Member
    It's not a Telesales office but a whole company, one person works in accounting, another one in sales or purchase... I may not add on every form a poll - function which updates every 10 seconds...
    <img border="0" title="" alt="" src="images/smiles/icon_sad.gif" />
  • fabianfabian Posts: 186Member
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by db:
    In now days technologies I see following solution:
    - then launching fin.exe, it checks for settings: call-processing is needed or not. If yes fin.exe creates new thread for call processing.

    to db: (By the way, would you mind telling us your real name?)

    You know that Navision has not thread-technology implemented, neither can Navision process Windows-events. So your scenario is a nice to have but doesn't help Christoph as he has to deal with the capabilities of the current version of Navision with all it's restrictions.

    Therefore, let's repeat the rules everybody already knows. As far as OCX's are concerned:
    * Navision can not fire or process triggers.
    * Navision has no exception handling.

    to Dave:
    >>, the form would poll for the files so if the form is not open you are not polling.<<

    Unless you take a form which is always open such as Form 330, the main menu.


    Ok, what happenes if a customer calls?
    First we have to clearify who he is calling: If it's ONE company number which makes 20 phones ring at the same time, we really do have a problem. But if he's dialing directly Mr. John Doe at 5551234, we are one step further.
    The telephone central knows that if 5551234 is being called, it has to forward the call to the phone of John Doe while a number 5551235 would have to be forwarded to the phone of Mary Smith.
    So far so well. Generally we can say the central "knows" which number belongs to which user.

    Now the next question is: Is the central aware of our computer network? Could it create a file on the server telling which number is being called and which number is calling?
    This question has not be asked and answered so far. I know that there are phone centrals respectively add-on software which are able to handle this problem by creating either TAPI-Events or creating files containing the information: "External 5558765 is calling 5551234".
    If we get as far as to have this information within a record (flat-file or memory) we are close to the solution.

    So the question to Christoph (the best specialist in the use of smilies in this forum :-) ) is: What capabilities does YOUR central have to provide information about caller/callee and how is this information being provided?
    - File on the Server?
    - TAPI-Event to the server?
    - TAPI-Event to the right client or to all clients?
    - Event to the Telephone which then fires a TAPI-Event to the attached Computer?


    Marcus Fabian
    +41 79 439 78 72
    With best regards from Switzerland

    Marcus Fabian
  • dbdb Posts: 82Member
    Christoph, If I dreaming to see NF more open and integrated with developers tools (vb, vc ..). You writing code on VB or VC and after compiling inserting it to NF database. I WANNA Ctrl-Z !!!

    Marcus, I'm only trying to look at the best solution. Then I solving problems using methodic:
    -Finding the finnest solution
    -declining parts of solution that can't be done by technical or finacials reasons
    -Checking integrity of solution and adding missing parts
    -repeat 2-3 until have good solution.

    sorry, lets return to TAPI.
    If you put some code in codeunit 1, it can be proccessed on pushing F12. You need Call handling API that on call will send F12 keystroke to NF.

    Dalius Brokevicius
    Perfo ltd., Lithuania
    +370 98 37029
Sign In or Register to comment.