This document was generated from CDN thread Created by: Irawan Ongkowijoyo on 07-09-2009 10:13:55 AM does anybody know, how to capture FAC code or description using jtapi class?i try to build an application with limitation call, base on FAC code or description.thank u for your help..Subject: RE: Capture FAC Code/Description with JTAPI Replied by: David Staudt on 07-09-2009 04:47:57 PMCan you elaborate a bit more on the exact call flow and requirements? JTAPI interacts with FAC/CMC via DTMF digits - either playing them out or capturing them incoming.Subject: RE: Capture FAC Code/Description with JTAPI Replied by: Irawan Ongkowijoyo on 08-09-2009 04:03:24 AMthanks david,i try to capture FAC Code/description when someone input his FAC on the IP phone.and then i use this FAC information to limit his call, based on time (ex: disconnect his call after 3 minutes). i have my own database, contain information about his FAC code/description and time limit.i'm using cisco Call Manager 7.0. Subject: RE: Capture FAC Code/Description with JTAPI Replied by: Agung Jiwandono on 18-06-2011 01:56:59 AMthis question is really same to me... there are somebody can help me ?? thanks before...Subject: RE: Capture FAC Code/Description with JTAPI Replied by: Mohan Potluri on 20-06-2011 12:56:07 AMWhen a FAC is needed CUCM plays a tone to the caller. if application is observing the address (add CallControlcallObserver) it will receive CiscoToneChangedEv event. <h3 style="font-family: Times; font-size: medium;">getWhichCodeRequired() on this event would return FAC_REQUIRED if FAC is configured. You can use this information to start your timer. </h3>Look for CiscoTermButtonPressedEv in java docs if you want to find out the FAC code dailed by the user. Using these two you should be able to do what you mentioned. Let us know the result. Subject: RE: Capture FAC Code/Description with JTAPI Replied by: Agung Jiwandono on 20-06-2011 10:29:55 PMWhen a FAC is needed CUCM plays a tone to the caller. if application is observing the address (add CallControlcallObserver) it will receive CiscoToneChangedEv event.
<h3 style="font-family: Times; font-size: medium;">getWhichCodeRequired() on this event would return FAC_REQUIRED if FAC is configured. You can use this information to start your timer. </h3>
Look for CiscoTermButtonPressedEv in java docs if you want to find out the FAC code dailed by the user. Using these two you should be able to do what you mentioned.
Let us know the result.
thanks for your answer Mohan. i will try it...Subject: RE: Capture FAC Code/Description with JTAPI Replied by: Agung Jiwandono on 21-06-2011 05:01:20 AM
When a FAC is needed CUCM plays a tone to the caller. if application is observing the address (add CallControlcallObserver) it will receive CiscoToneChangedEv event.
<h3 style="font-family: Times; font-size: medium;">getWhichCodeRequired() on this event would return FAC_REQUIRED if FAC is configured. You can use this information to start your timer. </h3>
Look for CiscoTermButtonPressedEv in java docs if you want to find out the FAC code dailed by the user. Using these two you should be able to do what you mentioned.
Let us know the result.
thanks for your answer Mohan. i will try it...
dear Mohan,i was try your solution, but if i run this script :1if(curEv instanceof CiscoTermButtonPressedEv){
2 bufPrintln( "\n[" + srcAddress.getName() + "] Received Call Event : " + curEv );
3 }
Subject: RE: Capture FAC Code/Description with JTAPI Replied by: Agung Jiwandono on 21-06-2011 05:09:12 AMdear Mohan,i was try your solution, but if i run this script : 1
2if(curEv instanceof CiscoTermButtonPressedEv){
3 bufPrintln( "\n[" + srcAddress.getName() + "] Received Call Event : " + curEv );
4 try {
5 boolean pressDigit = true;
6 ((CiscoTermEvFilter)curEv).setButtonPressedEnabled(pressDigit);
7 } catch (Exception e) {
8 }
9}
i didn't get the result anything about this event...i have create this script too... 1
2if (curEv instanceof CiscoTermDataEv){
3 bufPrintln( "\n[" + srcAddress.getName() + "] Received Call Event : " + curEv );
4}
5
6if (curEv instanceof CiscoTermEvFilter){
7 bufPrintln( "\n[" + srcAddress.getName() + "] Received Call Event : " + curEv );
8 ((CiscoTermEvFilter)curEv).setButtonPressedEnabled(pressDigit);
9}
can you help me, why i didn't get the result anything for all three event above ?? or why i didn't run the Event...thanks before...Subject: RE: Capture FAC Code/Description with JTAPI Replied by: Mohan Potluri on 21-06-2011 11:20:13 AMTo see CiscoTermButtonPressedEv, you need to turn on the filters using interfaces on CiscoTermEvFilter and call observer on Terminal. The code you indicated should be part of your Terminal Observer. Subject: RE: Capture FAC Code/Description with JTAPI Replied by: Mohan Potluri on 21-06-2011 12:04:04 PMPreconditions to get this event: Application should set the filter on Terminal to get this event.Application should add a observer on the terminal. Pusedo code: CiscoTermEvFilter myFilter = term.getFilter(); myFilter.setButtonPressedEnabled(true);myFilter.setRTPEventsEnabled(true); term.setFilter(myFilter);term.addObserver(myObserver); The code you posted should be part of the terminal observer implementation. Can you try the above code and let me know if you are seeing the event. Subject: RE: Capture FAC Code/Description with JTAPI Replied by: Agung Jiwandono on 21-06-2011 10:19:10 PMi've done to try it. but there is an error... this is my code : 1protected final void metaEvent ( CallEv [] eventList ) {
2
3 for ( int i = 0; i < eventList.length; i++ ) {
4 CallEv curEv = eventList[i];
5
6 Terminal term = srcAddress.getTerminals()[0];
7 TerminalConnection termConn = term.getTerminalConnections()[0];
8 CiscoTerminal cTerm = (CiscoTerminal) termConn.getTerminal();
9
10 CiscoTermEvFilter filter = cTerm.getFilter();
11 filter.setDeviceStateActiveEvFilter(true);
12 filter.setButtonPressedEnabled(true);
13 filter.setRTPEventsEnabled(true);
14 filter.setDeviceDataEnabled(true);
15
16 cTerm.setFilter(filter);
17 cTerm.addObserver(myObserver); => error ---------------------------------------------
there are something wrong with my code ??what should i do with this error ? what should i make to initialize parameter "myObserver"..Subject: RE: Capture FAC Code/Description with JTAPI Replied by: Mohan Potluri on 23-06-2011 02:05:18 PMThe code is not making much sense to me. Are trying to change filter and add observer from another observer implementation? Take a look at the same application makecall and jtrace to get an idea on how to add observer on terminals.