JTAPI CallCenterProvider

Hi,
i am developing a test application with JTAPI and am currently trying to connect to the Call Center from my application. I try to create a new provider, but i get this message:
Error: com.cisco.jtapi.PlatformExceptionImpl: Unable to create provider -- Connection refused: connect
Seems like the connection is denied by Call Manager, however i can login into Call Manager with the JTAPI user and pass. What could be wrong?
This is how it looks in the code:
this.CCprovider=(CallCenterProvider)peer.getProvider("CallCenterIP;login=Jtapi_user;passwd=pass");
Regards,
Marko

You have to add in the ctimanager permissions to the user.
This message from the log shows you're still running PA with the 3.3 jtapi.jar file:
Follow the steps in Updating JTAPI Files on page 13 of the PA 1.4(5) release notes to install the 4.1 jtapi.jar file.
http://www.cisco.com/univercd/cc/td/doc/product/voice/assist/assist14/relnote/pa145rn.pdf

Similar Messages

  • CUCM 8.6.2 and JTAPI problems

    Hello,
    Following many threads regarding JTAPI errors, data sync, and so on (eg: https://supportforums.cisco.com/message/3566010#3566010 , https://supportforums.cisco.com/thread/2090094) , I'm wondering if this catastrophic bug CSCuf44112 could be the root cause for these errors. Not only UCCX errors but also other applications involving CTI (Voice Recording, CUPC/Jabber in control deskphone mode).
    It's difficult to fully understand what's written and the possible consequences.
    Help to decrypt would be appreciated.
    JC

    I have bookmarked your post.  An interesting topic indeed.  Thank you for posting it.
    Anthony Holloway
    Please use the star ratings to help drive great content to the top of searches.

  • JTAPI / CTI Connection problems CUCM 9.1.2 and AndTek 4.8.5

    Hi All,
    we have a problem with JTAPI Connection to AndTek. The colleagues, they use AndTek, can login / logout, but after it, the actual status doesn't change by the others. If they restarts the phones (cable out, cable in), status will be changed. Other solution, restart Callmanager (sometimes the restart of the service "CTI Manager" can help too). 
    With AndTek we tried to find the problem, what they found: the phones are losing the connection to the  AndTek service, and Application Users cannot control the phones.
    Questions:
    - How can I stay under control, investigate the connection of the JTAPI at side of CUCM
    . Which trace / debug can help to find the problem by Application Users

    You can monitor CTIConnectionActive under Performance tab in RTMT for a real-time number of JTAPI connections.
    CTIManager SDL traces from CUCM and JTAPI logs from Genesys should help diagnose the exact JTAPI messaging and see what is closing the connection.  There's a keep-alive process as part of JTAPI that Genesys should be using.
    Lastly, a packet capture may help if there are network interruptions causing the issue.

  • Need Help In JTAPI generating a Flash Hook Signal

    Hi all,
    I am currently involved in a project that requires me to transfer a incoming call to another call. However, the lines that they are using is phonenet. Thus if I am to transfer a call in this environment, the application will use up 2 of the channals without freeing them even after the caller and the transfered party have terminated their connection(gotta physically busyout the trunk)
    I am very new in the field of telecommunication and esp to Jtapi. I would need some help from you guys as The only way that I think that could solve my problem is to send a flash hook signal then dial the number(flash hook transfer).
    Can anyone advise me on this?
    Thanks..
    Kenny

    Hey there,
    Have you tried File->Add to Library and then choose the songs off the flash drive? Another way is to head to "Edit" and then choose "Preferences". From there, head over to the "Advanced" tab and make sure there is a check mark next to "Copy files to iTunes Music folder when adding to library." See if that helps.
    B-rock

  • CUCM and UCCX JTAPI version 7.1(5) vs 7.1(5b)

    Wondering if any one has CUCM 7.1(5) running with UCCX and what JTAPI version is being used?  Then if anyone is running CUCM 71(5b) and if what version of JTAPI is being used?   Running into bug on CUCM 7.1(3) CSCtb77537 and need to upgrade.

    Hi
    I recently had a cust with this problem on 7.1(3); upgraded them to 7.1(5) and all was well afterwards.
    The version of JTAPI you use is the version of JTAPI that comes with whatever CCM version you install; so no point getting hung up on that - just remember to ensure all your JTAPI apps have their version upgraded to match (as with any TAPI apps).
    Regards
    Aaron
    Please rate helpful posts..

  • JTAPI

    Hi friends I want to use Voice modem with JTAPI is it possible.
    I have downloaded following code but it gives me error �cant get provider�
    What I have to do plz reply me soon [email protected]
    CODE
    =============PlacingPhoneCallGUI=====
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.telephony.*;
    import javax.telephony.events.*;
    /* This class provides the graphical user interface for the placing call application. */
    public class PlacingPhoneCallGUI extends JFrame implements ActionListener
         /* Declaring the GUI variables. */
         JButton getProvider_button;
         JButton zero_button, one_button, two_button, three_button, four_button, five_button, six_button, seven_button, eight_button, nine_button, star_button, hash_button;
         JButton call_button, hang_button, redial_button, status_button;
         JTextField phoneNumText; /* Contains the destination phone number. */
         JComboBox lines_combo;
         JLabel oconn_label, otconn_label, conn_label, tconn_label;
         String phNumber = null;
         int maxPhoneLength = 15;
         /* Declaring the JTAPI variables. */
         Provider jtapiprovider = null; /* Contains the default JTAPI provider. */
         Terminal ph_terminal = null; /* The phone terminal attached to the system. */
         JTAPIOutCallObserver callobserver = null; /* Behaves as the call observer for this application. */
         Connection connection[] = null;/* This array holds the phone call connections objects. */
         Call phonecall = null; /* Behaves as the phone call. */
         TerminalConnection m_destTerminalConnection = null; /* Holds the destination terminal connection. */
         TerminalConnection m_terminalConnection = null; /* Holds the originating terminal connection. */
         /* Public constructor takes no input parameter. */
         public PlacingPhoneCallGUI()
              setTitle("Placing Phone Call");
              addWindowListener(new WindowAdapter()
                   public void windowClosing(WindowEvent we)
                        exit_from_application();
              buildGUI();
              callobserver = new JTAPIOutCallObserver(this);
              setSize(380, 300);
              setLocation(250, 100);
              setVisible(true);
         /* This method is called in the constructor. This method creates the GUI to place the Phone Call application. */
         public void buildGUI()
              /* Initializing the menu and menu items. */
              JMenu menu = new JMenu("File");
              JMenuBar menubar = new JMenuBar();
              JMenuItem exit_item = new JMenuItem("Exit");
              exit_item.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        exit_from_application();
              /* Adding the menu and the menu items in the menu bar. */
              menu.add(exit_item);
              menubar.add(menu);
              setJMenuBar(menubar);
              /* Get the content pane of the JFrame. Set the layout and the background color of the content pane. */
              Container cont = this.getContentPane();
              cont.setLayout(null);
              cont.setBackground(Color.gray);
              JLabel label = new JLabel("Please click the Get Providers button to get the list of providers.");
              label.setBounds(10,10,380,20);
              cont.add(label);
              JLabel provider_label = new JLabel("Providers");
              provider_label.setBounds(10,30,60,20);
              cont.add(provider_label);
              lines_combo = new JComboBox();
              lines_combo.setBounds(75,30, 235,20);
              lines_combo.addActionListener(this);
              cont.add(lines_combo);
              getProvider_button = new JButton("Get Providers");
              getProvider_button.addActionListener(this);
              getProvider_button.setBounds(190, 60, 120,20);
              cont.add(getProvider_button);
              JLabel dialer_label = new JLabel("Phone Dialer");
              dialer_label.setBounds(10,90, 100,20);
              cont.add(dialer_label);
              /* This panel contains the buttons from 0 -9, * and #. */
              JPanel dialer_panel = new JPanel();
              dialer_panel.setBackground(Color.gray);
              dialer_panel.setLayout(new GridLayout(4, 3, 3, 3));
              one_button = new JButton("1");
              two_button = new JButton("2");
              three_button = new JButton("3");
              four_button = new JButton("4");
              five_button = new JButton("5");
              six_button = new JButton("6");
              seven_button = new JButton("7");
              eight_button = new JButton("8");
              nine_button = new JButton("9");
              star_button = new JButton("*");
              zero_button = new JButton("0");
              hash_button = new JButton("#");
              one_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appening the phone number by 1 in the text field named phoneNumText. */
                        phoneNumText.setText(phoneNumText.getText()+"1");
              two_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 2. */
                        phoneNumText.setText(phoneNumText.getText()+"2");
              three_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 3. */
                        phoneNumText.setText(phoneNumText.getText()+"3");
              four_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 4. */
                        phoneNumText.setText(phoneNumText.getText()+"4");
              five_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 5. */
                        phoneNumText.setText(phoneNumText.getText()+"5");
              six_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 6. */
                        phoneNumText.setText(phoneNumText.getText()+"6");
              seven_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 7. */
                        phoneNumText.setText(phoneNumText.getText()+"7");
              eight_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 8. */
                        phoneNumText.setText(phoneNumText.getText()+"8");
              nine_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 9. */
                        phoneNumText.setText(phoneNumText.getText()+"9");
              zero_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 0. */
                        phoneNumText.setText(phoneNumText.getText()+"0");
              star_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appening the phone number by *. */
                        phoneNumText.setText(phoneNumText.getText()+"*");
              hash_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appening the phone number by #. */
                        phoneNumText.setText(phoneNumText.getText()+"#");
              /* Adding all the numbered buttons in the dialer_panel. */
              dialer_panel.add(one_button);
              dialer_panel.add(two_button);
              dialer_panel.add(three_button);
              dialer_panel.add(four_button);
              dialer_panel.add(five_button);
              dialer_panel.add(six_button);
              dialer_panel.add(seven_button);
              dialer_panel.add(eight_button);
              dialer_panel.add(nine_button);
              dialer_panel.add(star_button);
              dialer_panel.add(zero_button);
              dialer_panel.add(hash_button);
              /* Setting the position of the dialer panel and add it to the content pane. */
              dialer_panel.setBounds(10,115,140,110);
              cont.add(dialer_panel);
              JLabel ph_no = new JLabel("Phone Number");
              phoneNumText = new JTextField();
              phoneNumText.addKeyListener(new KeyAdapter()
                        public void keyReleased(KeyEvent ke)
                             if(phoneNumText.getText().length()>=maxPhoneLength)
                                  String str = phoneNumText.getText();
                                  phoneNumText.setText(str.substring(0,15));
              /* Initializing the Call, Hangup, Redial, and Show Status buttons. Add the action listener to the buttons. */
              call_button = new JButton("Call");
              hang_button = new JButton("Hangup");
              redial_button = new JButton("Redial");
              status_button = new JButton("Show Status");
              call_button.addActionListener(this);
              hang_button.addActionListener(this);
              redial_button.addActionListener(this);
              status_button.addActionListener(this);
              /* Setting the position of the Call, Hangup, Redial and Show Status buttons. Add the buttons to the content pane of the frame. */
              ph_no.setBounds(200, 90, 100,20);
              phoneNumText.setBounds(200, 115, 110, 20);
              call_button.setBounds(200, 140, 110, 20);
              hang_button.setBounds(200, 165, 110, 20);
              redial_button.setBounds(200, 190, 110, 20);
              status_button.setBounds(200, 215, 110, 20);
              cont.add(ph_no);
              cont.add(phoneNumText);
              cont.add(call_button);
              cont.add(hang_button);
              cont.add(redial_button);
              cont.add(status_button);
              /* Initializing the status panel. This panel can be shown or hidden by clicking on the Show Status button. */
              JPanel status_panel = new JPanel();
              status_panel.setBackground(Color.cyan);
              status_panel.setBorder(new EtchedBorder());
              status_panel.setLayout(null);
              /* Initializing the labels for the status panel. */
              JLabel label1 = new JLabel("Origin Connection");
              JLabel label2 = new JLabel("Origin Terminal Connection");
              JLabel label3 = new JLabel("Connection");
              JLabel label4 = new JLabel("Terminal Connection");
              oconn_label = new JLabel("Unknown");
              otconn_label = new JLabel("Unknown");
              conn_label = new JLabel("Unknown");
              tconn_label = new JLabel("Unknown");
              oconn_label.setForeground(Color.blue);
              otconn_label.setForeground(Color.blue);
              conn_label.setForeground(Color.blue);
              tconn_label.setForeground(Color.blue);
              /* Setting the position of different labels to be added in the status panel. */
              label1.setBounds(7, 7, 140, 20);
              label2.setBounds(157, 7, 180, 20);
              oconn_label.setBounds(7, 32, 140, 20);
              otconn_label.setBounds(157, 32, 180, 20);
              label3.setBounds(7, 67, 140, 20);
              label4.setBounds(157, 67, 180, 20);
              conn_label.setBounds(7, 92, 140, 20);
              tconn_label.setBounds(157, 92, 180, 20);
              /* Add different labels to the status panel. */
              status_panel.add(label1);
              status_panel.add(label2);
              status_panel.add(oconn_label);
              status_panel.add(otconn_label);
              status_panel.add(label3);
              status_panel.add(label4);
              status_panel.add(conn_label);
              status_panel.add(tconn_label);
              status_panel.setBounds(10, 250, 350, 120);
              cont.add(status_panel);
         /* This method is invoked when end user clicks on any button provides in the user interface. */
         public void actionPerformed(ActionEvent ae)
              /* If end user user clicks on the Call button. */
              if (ae.getSource() == call_button)
                   /* Shows the error message if an outgoing call is already placing. */
                   if (phonecall != null)
                        JOptionPane.showMessageDialog(null, "Please hangup the call first.", "Error", JOptionPane.ERROR_MESSAGE);
                        return;
                   /* Shows the error message if the end user did not specify the phone number. */
                   if (phoneNumText.getText() == null || phoneNumText.getText().trim().equals(""))
                        JOptionPane.showMessageDialog(null, "Invalid phone number entry!", "Error", JOptionPane.ERROR_MESSAGE);
                        return;
                   phNumber = ""+phoneNumText.getText().trim();
                   Address address = null;
                   /* Shows the error message if the terminal is not selected by the end user. */
                   if (ph_terminal == null)
                        JOptionPane.showMessageDialog(null, "Please select a terminal first.", "Error", JOptionPane.ERROR_MESSAGE);
                        return;
                   try
                        /* Getting the addresses associated with the particular terminal. */
                        Address addresses[] = ph_terminal.getAddresses();
                        address = addresses[0];
                   catch (Exception excp)
                        System.err.println("Exception in ph_terminal.getAddresses(): "+excp) ;
                   try
                        /* Creating the Call object and adding the observer to that Call object. */
                        phonecall = jtapiprovider.createCall();
                        phonecall.addObserver(callobserver);
                   catch (Exception excp)
                        System.err.println("Exception in jtapiprovider.createCall(): "+excp) ;
                   /* Place the telephone call. */
                   try
                        connection = phonecall.connect(ph_terminal, address, phNumber);
                   catch (Exception excp)
                        System.out.println("Exception in placing the phone call: "+excp.toString());
                   try
                        TerminalConnection[] tconnection = connection[1].getTerminalConnections();
                        m_destTerminalConnection = tconnection[0];
                        Terminal t = m_destTerminalConnection.getTerminal();
                        tconnection = connection[0].getTerminalConnections();
                        TerminalConnection m_terminalConnection = tconnection[0];
                        t.addCallObserver(callobserver);
                   catch(Exception e)
                        System.out.println("Exception getting remote terminal");
                   //StatusWindow status_window = new StatusWindow(new JFrame("parent"), false);
              else if (ae.getSource() == getProvider_button)
                   /* Create a provider by first obtaining the XTAPI implementation of JTAPI and then the default provider of the XTAPI implementation. */
                   try
                        /* Creating the provider by obtaining the XTAPI implementation of JTAPI. */
                        JtapiPeer jtapipeer = JtapiPeerFactory.getJtapiPeer("net.sourceforge.gjtapi.raw.modem.ModemProvider");
                        /* Obtaining the default provider of the selected implementation. */
                        jtapiprovider = jtapipeer.getProvider(null);
                        Terminal[] terminals = jtapiprovider.getTerminals();
                        for(int i = 0; i < terminals.length; i++)
                             /* Populating the combo box with the present terminals. */
                             lines_combo.insertItemAt(terminals, i);
                        getProvider_button.setEnabled(false);
                   catch (Exception excp)
                        JOptionPane.showMessageDialog(this, "Unable to get the provider.");
              else if (ae.getSource() == lines_combo)
                   /* This code invokes when end user selects an item from the combo box. */
                   try
                        if (ph_terminal != null)
                             /* Removing the call observer object associated with that terminal. */
                             ph_terminal.removeCallObserver(callobserver);
                        /* Instantiate the terminal object and adding the call observer to that terminal. */
                        ph_terminal = (Terminal)lines_combo.getSelectedItem();
                        ph_terminal.addCallObserver(callobserver);
                   catch (Exception e)
                        JOptionPane.showMessageDialog(this, "Unable to add the call observer to the selected terminal.");
              else if (ae.getSource() == hang_button)
                   /* This code invokes when end user clicks on the Hangup button in the user interface. */
                   try
                        for (int i=0; i<connection.length; i++)
                             try
                                  /* Closing all the connections and set the Call object to null. */
                                  connection[i].disconnect();
                                  phonecall = null;
                             catch(Exception ex)
                                  System.out.println("Exception in closing the phone call. ");
                   catch (Exception ex){}
              else if (ae.getSource() == redial_button)
                   /* This method invokes when end user clicks on the Redial button. */
                   call_button.doClick();
              else if (ae.getSource() == status_button)
                   if (status_button.getText().equals("Show Status"))
                        /* Maximize the size of the frame when end user clicks on the Show Status button. */
                        setSize(380, 440);
                        status_button.setText("Hide Status");
                   else
                        /* Minimize the size of the frame when end user clicks on the Hide Status button. */
                        setSize(380, 300);
                        status_button.setText("Show Status");
         /* This method is used to terminate the application. */
         void exit_from_application()
              hang_button.doClick();
              System.exit(0);
         /* Main method. */
         public static void main(String[] args)
              PlacingPhoneCallGUI ppc = new PlacingPhoneCallGUI();
    ====JTAPIOutCallObserver================
    import javax.telephony.*;
    import javax.telephony.events.*;
    /* The MyOutCallObserver class implements the CallObserver interface. */
    public class JTAPIOutCallObserver implements CallObserver
         PlacingPhoneCallGUI gui = null;
         /* Public constructor takes the object of PlacingPhoneCallGUI class as parameter. */
         public JTAPIOutCallObserver(PlacingPhoneCallGUI gui)
              this.gui = gui;
         /* The callChangedEvent() method is called every time an associated event with the call is raised. */
         public void callChangedEvent(CallEv[] evlist)
              for (int i = 0; i < evlist.length; i++)
                   /* Checking if the event occured is the connection event. */
                   if (evlist[i] instanceof ConnEv)
                        if (evlist[i].getID() == ConnAlertingEv.ID)
                             /* This event indicates that the state of the connection is changed to the Connection.ALERTING. */
                             gui.oconn_label.setText("ALERTING");
                             gui.conn_label.setText("ALERTING");
                        else if (evlist[i].getID() == ConnInProgressEv.ID)
                             /* This event indicates that the state of the connection is changed to the Connection.IN_PROGRESS. */
                             gui.oconn_label.setText("INPROGRESS");
                             gui.conn_label.setText("INPROGRESS");
                        else if (evlist[i].getID() == ConnConnectedEv.ID)
                             /* This event indicates that the state of the connection is changed to the Connection.CONNECTED. */
                             gui.oconn_label.setText("CONNECTED");
                             gui.conn_label.setText("CONNECTED");
                        else if (evlist[i].getID() == ConnDisconnectedEv.ID)
                             /* This event indicates that the state of the connection is changed to the Connection.DISCONNECTED. */
                             gui.oconn_label.setText("DISCONNECTED");
                             gui.conn_label.setText("DISCONNECTED");
                        else if (evlist[i].getID() == ConnUnknownEv.ID)
                             /* This event indicates that the state of the connection is changed to the Connection.UNKNOWN. */
                             gui.oconn_label.setText("UNKNOWN");
                             gui.conn_label.setText("UNKNOWN");
                        else if (evlist[i].getID() == ConnCreatedEv.ID)
                             /* This event indicates that the new connection has been created. */
                             gui.oconn_label.setText("IDLE");
                             gui.conn_label.setText("IDLE");
                   /* Checking if the event occured is the terminal connection event. */
                   else if (evlist[i] instanceof TermConnEv)
                        if (evlist[i].getID() == TermConnActiveEv.ID)
                             /* This event indicates that the state of the terminal connection object is changed to the TerminalConnection.ACTIVE. */
                             gui.otconn_label.setText("ACTIVE");
                             gui.tconn_label.setText("ACTIVE");
                        else if (evlist[i].getID() == TermConnRingingEv.ID)
                             /* This event indicates that the state of the terminal connection object is changed to the TerminalConnection.RINGING. */
                             gui.otconn_label.setText("RINGING");
                             gui.tconn_label.setText("RINGING");
                        else if (evlist[i].getID() == TermConnDroppedEv.ID)
                             /* This event indicates that the state of the terminal connection object is changed to the TerminalConnection.DROPPED. */
                             gui.otconn_label.setText("DROPPED");
                             gui.tconn_label.setText("DROPPED");
                        else if (evlist[i].getID() == TermConnUnknownEv.ID)
                             /* This event indicates that the state of the terminal connection object is changed to the TerminalConnection.UNKNOWN. */
                             gui.otconn_label.setText("UNKNOWN");
                             gui.tconn_label.setText("UNKNOWN");
                        else if (evlist[i].getID() == TermConnCreatedEv.ID)
                             /* This event indicates that a new terminal connection object has been created. */
                             gui.otconn_label.setText("IDLE");
                             gui.tconn_label.setText("IDLE");
    Hi friends I want to use Voice modem with JTAPI is it possible.
    I have downloaded following code but it gives me error �cant get provider�
    What I have to do plz reply me soon [email protected]
    CODE
    =============PlacingPhoneCallGUI=====
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.telephony.*;
    import javax.telephony.events.*;
    /* This class provides the graphical user interface for the placing call application. */
    public class PlacingPhoneCallGUI extends JFrame implements ActionListener
         /* Declaring the GUI variables. */
         JButton getProvider_button;
         JButton zero_button, one_button, two_button, three_button, four_button, five_button, six_button, seven_button, eight_button, nine_button, star_button, hash_button;
         JButton call_button, hang_button, redial_button, status_button;
         JTextField phoneNumText; /* Contains the destination phone number. */
         JComboBox lines_combo;
         JLabel oconn_label, otconn_label, conn_label, tconn_label;
         String phNumber = null;
         int maxPhoneLength = 15;
         /* Declaring the JTAPI variables. */
         Provider jtapiprovider = null; /* Contains the default JTAPI provider. */
         Terminal ph_terminal = null; /* The phone terminal attached to the system. */
         JTAPIOutCallObserver callobserver = null; /* Behaves as the call observer for this application. */
         Connection connection[] = null;/* This array holds the phone call connections objects. */
         Call phonecall = null; /* Behaves as the phone call. */
         TerminalConnection m_destTerminalConnection = null; /* Holds the destination terminal connection. */
         TerminalConnection m_terminalConnection = null; /* Holds the originating terminal connection. */
         /* Public constructor takes no input parameter. */
         public PlacingPhoneCallGUI()
              setTitle("Placing Phone Call");
              addWindowListener(new WindowAdapter()
                   public void windowClosing(WindowEvent we)
                        exit_from_application();
              buildGUI();
              callobserver = new JTAPIOutCallObserver(this);
              setSize(380, 300);
              setLocation(250, 100);
              setVisible(true);
         /* This method is called in the constructor. This method creates the GUI to place the Phone Call application. */
         public void buildGUI()
              /* Initializing the menu and menu items. */
              JMenu menu = new JMenu("File");
              JMenuBar menubar = new JMenuBar();
              JMenuItem exit_item = new JMenuItem("Exit");
              exit_item.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        exit_from_application();
              /* Adding the menu and the menu items in the menu bar. */
              menu.add(exit_item);
              menubar.add(menu);
              setJMenuBar(menubar);
              /* Get the content pane of the JFrame. Set the layout and the background color of the content pane. */
              Container cont = this.getContentPane();
              cont.setLayout(null);
              cont.setBackground(Color.gray);
              JLabel label = new JLabel("Please click the Get Providers button to get the list of providers.");
              label.setBounds(10,10,380,20);
              cont.add(label);
              JLabel provider_label = new JLabel("Providers");
              provider_label.setBounds(10,30,60,20);
              cont.add(provider_label);
              lines_combo = new JComboBox();
              lines_combo.setBounds(75,30, 235,20);
              lines_combo.addActionListener(this);
              cont.add(lines_combo);
              getProvider_button = new JButton("Get Providers");
              getProvider_button.addActionListener(this);
              getProvider_button.setBounds(190, 60, 120,20);
              cont.add(getProvider_button);
              JLabel dialer_label = new JLabel("Phone Dialer");
              dialer_label.setBounds(10,90, 100,20);
              cont.add(dialer_label);
              /* This panel contains the buttons from 0 -9, * and #. */
              JPanel dialer_panel = new JPanel();
              dialer_panel.setBackground(Color.gray);
              dialer_panel.setLayout(new GridLayout(4, 3, 3, 3));
              one_button = new JButton("1");
              two_button = new JButton("2");
              three_button = new JButton("3");
              four_button = new JButton("4");
              five_button = new JButton("5");
              six_button = new JButton("6");
              seven_button = new JButton("7");
              eight_button = new JButton("8");
              nine_button = new JButton("9");
              star_button = new JButton("*");
              zero_button = new JButton("0");
              hash_button = new JButton("#");
              one_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appening the phone number by 1 in the text field named phoneNumText. */
                        phoneNumText.setText(phoneNumText.getText()+"1");
              two_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 2. */
                        phoneNumText.setText(phoneNumText.getText()+"2");
              three_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 3. */
                        phoneNumText.setText(phoneNumText.getText()+"3");
              four_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 4. */
                        phoneNumText.setText(phoneNumText.getText()+"4");
              five_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 5. */
                        phoneNumText.setText(phoneNumText.getText()+"5");
              six_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 6. */
                        phoneNumText.setText(phoneNumText.getText()+"6");
              seven_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 7. */
                        phoneNumText.setText(phoneNumText.getText()+"7");
              eight_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 8. */
                        phoneNumText.setText(phoneNumText.getText()+"8");
              nine_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 9. */
                        phoneNumText.setText(phoneNumText.getText()+"9");
              zero_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appending the phone number by 0. */
                        phoneNumText.setText(phoneNumText.getText()+"0");
              star_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appening the phone number by *. */
                        phoneNumText.setText(phoneNumText.getText()+"*");
              hash_button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        /* Appening the phone number by #. */
                        phoneNumText.setText(phoneNumText.getText()+"#");
              /* Adding all the numbered buttons in the dialer_panel. */
              dialer_panel.add(one_button);
              dialer_panel.add(two_button);
              dialer_panel.add(three_button);
              dialer_panel.add(four_button);
              dialer_panel.add(five_button);
              dialer_panel.add(six_button);
              dialer_panel.add(seven_button);
              dialer_panel.add(eight_button);
              dialer_panel.add(nine_button);
              dialer_panel.add(star_button);
              dialer_panel.add(zero_button);
              dialer_panel.add(hash_button);
              /* Setting the position of the dialer panel and add it to the content pane. */
              dialer_panel.setBounds(10,115,140,110);
              cont.add(dialer_panel);
              JLabel ph_no = new JLabel("Phone Number");
              phoneNumText = new JTextField();
              phoneNumText.addKeyListener(new KeyAdapter()
                        public void keyReleased(KeyEvent ke)
                             if(phoneNumText.getText().length()>=maxPhoneLength)
                                  String str = phoneNumText.getText();
                                  phoneNumText.setText(str.substring(0,15));
              /* Initializing the Call, Hangup, Redial, and Show Status buttons. Add the action listener to the buttons. */
              call_button = new JButton("Call");
              hang_button = new JButton("Hangup");
              redial_button = new JButton("Redial");
              status_button = new JButton("Show Status");
              call_button.addActionListener(this);
              hang_button.addActionListener(this);
              redial_button.addActionListener(this);
              status_button.addActionListener(this);
              /* Setting the position of the Call, Hangup, Redial and Show Status buttons. Add the buttons to the content pane of the frame. */
              ph_no.setBounds(200, 90, 100,20);
              phoneNumText.setBounds(200, 115, 110, 20);
              call_button.setBounds(200, 140, 110, 20);
              hang_button.setBounds(200, 165, 110, 20);
              redial_button.setBounds(200, 190, 110, 20);
              status_button.setBounds(200, 215, 110, 20);
              cont.add(ph_no);
              cont.add(phoneNumText);
              cont.add(call_button);
              cont.add(hang_button);
              cont.add(redial_button);
              cont.add(status_button);
              /* Initializing the status panel. This panel can be shown or hidden by clicking on the Show Status button. */
              JPanel status_panel = new JPanel();
              status_panel.setBackground(Color.cyan);
              status_panel.setBorder(new EtchedBorder());
              status_panel.setLayout(null);
              /* Initializing the labels for the status panel. */
              JLabel label1 = new JLabel("Origin Connection");
              JLabel label2 = new JLabel("Origin Terminal Connection");
              JLabel label3 = new JLabel("Connection");
              JLabel label4 = new JLabel("Terminal Connection");
              oconn_label = new JLabel("Unknown");
              otconn_label = new JLabel("Unknown");
              conn_label = new JLabel("Unknown");
              tconn_label = new JLabel("Unknown");
              oconn_label.setForeground(Color.blue);
              otconn_label.setForeground(Color.blue);
              conn_label.setForeground(Color.blue);
              tconn_label.setForeground(Color.blue);
              /* Setting the position of different labels to be added in the status panel. */
              label1.setBounds(7, 7, 140, 20);
              label2.setBounds(157, 7, 180, 20);
              oconn_label.setBounds(7, 32, 140, 20);
              otconn_label.setBounds(157, 32, 180, 20);
              label3.setBounds(7, 67, 140, 20);
              label4.setBounds(157, 67, 180, 20);
              conn_label.setBounds(7, 92, 140, 20);
              tconn_label.setBounds(157, 92, 180, 20);
              /* Add different labels to the status panel. */
              status_panel.add(label1);
              status_panel.add(label2);
              status_panel.add(oconn_label);
              status_panel.add(otconn_label);
              status_panel.add(label3);
              status_panel.add(label4);
              status_panel.add(conn_label);
              status_panel.add(tconn_label);
              status_panel.setBounds(10, 250, 350, 120);
              cont.add(status_panel);
         /* This method is invoked when end user c

    He, the code is in there twice so it's not as big as it first seems.
    Your problem doesn't seem to be programming related however, it's more of a hardware problem. If the code can't get a provider, then you need to figure out why it can't. Maybe there are applications out there that you can use to test if you can get to a provider from your workstation?

  • JTAPI + Xtapi: Urgent help needed with compensation.

    Hi
    I'm new to jtapi. I'm using xtapi implementation with the following statements in Outcall.java sample code.
    import javax.telephony.*;
    import javax.telephony.events.*;
    //import MyOutCallObserver;
    public class Outcall {
      public static final void main(String args[]) {
        Provider myprovider = null;
        try {
          JtapiPeer peer = JtapiPeerFactory.getJtapiPeer("net.xtapi.XJtapiPeer");
          myprovider = peer.getProvider("MSTAPI");
        } catch (Exception excp) {
          System.out.println("Can't get Provider: " + excp.toString());
          System.exit(0);
        Address origaddr = null;
        Terminal origterm = null;
        try {
          origaddr = myprovider.getAddress("1");
          //Just get some Terminal on this Address
          Terminal[] terminals = origaddr.getTerminals();
          if (terminals == null) {
            System.out.println("No Terminals on Address.");
            System.exit(0);
          origterm = terminals[0];
        } catch (Exception excp) {
          // Handle exceptions;
        // Create the telephone call object and add an observer.
         Call mycall = null;
        try {
          mycall = myprovider.createCall();
          mycall.addObserver(new MyOutCallObserver());
        } catch (Exception excp) {
          // Handle exceptions
        try {
          Connection c[] = mycall.connect(origterm, origaddr, "5149372568");
        } catch (Exception excp) {
          System.out.println(excp.toString());
    }I have dowloaded all the jar files (xtapi.jar, mstapisp.jar, jtapi1.2.jar) and added to the library in Netbeans IDE. And i have put Xtapi.dll in the source folder (same as Outcall.java).
    When I run the project I get the following error and the program hangs execution without finishing.
    javax.telephony.InvalidArgumentException
    MyOutCallObserver.callChangedEvent
    java.lang.NullPointerException
    java.lang.NullPointerException
    I believe the above exception come is from the below line in the code.
    origaddr = myprovider.getAddress("1");
    The getAddress( ) of the provider class throws InvalidArgumentException. Can some one help me in solving the error?
    Is this error has anything to do with the my modem or the xtapi.inf file. I want to know how to get the contents for xtapi.inf file and where to place it. I'm using US Robotics Fax modem. I also tried the same code in a system wich has intel voice modem, but got the same error.
    If some one has a complete source code for java application, which can pick and answer phone calls. If it has a link from pbx to voip through the modem, it will be really great. I'm ready to buy the code from you if its is working.
    Thanks in advance for the help.
    Harun.

    Problem solved.
    Actually the exception doesn't affect the running of the program. The problem was solved when i reinstalled the modem driver and tried again.

  • Where to get the compiled form of JTAPI 1.3 or JTAPI 1.4 specification..

    I am new to J2ME....i have the *.java files of JTAPI 1.3 and 1.4 but not able to work with them....can anybody plz help me where can i get the *.class files for the specification???

    Still no answer? May be I have posted in the wrong forum? So I have to leave it as it is...

  • Use of JTAPI in Caller ID

    Hello all, I'm doing a Computer Science degree, and my topic for this semester's programing project is Caller ID Management. I'm supposed to implement a call-logging software in Java, and JTAPI seems like a ready solution, but the problem is, I'm not quite sure how to use it, and my lecturers are clueless. I was told to use a caller ID-enabled 56K modem for my project, and I'm lost.
    I've been doing some research on how caller ID works from phone to phone, and I've read how it works, from what meagre sources I can find on the net - emphasis here on the ASCII format for the CND message, and the format of the protocol used.
    My questions are as follows:
    1) Will I be able to use JTAPI for my project? I know it's written on the JTAPI page that it can be used for call-logging, but I'm going mad trying to finish going through all the specifications provided on this site, and I'm still not even sure which package I should be looking at.
    2) If the caller ID is going to be from phone to pc, do I have to be directly worried about the protocol, and the format & content of the received data messages, or will the JTAPI methods deal with that internally?
    Unrelated request:
    If anyone has any good sites or documents on implementing Caller ID (preferably as detailed as possible), I'd be grateful if you helped me out abit. I've only managed to find two pages of something helpful: most of the info on Caller ID is too superfluous to be of any help.
    Thanks for your help! :)

    Hi
    When I was trying to compile Outcall and Incall sample code from sun website I found this error:
    "Can't get Provider: javax.telephony.JtapiPeerUnavailableException: JtapiPeer: DefaultJtapiPeer could not be instantiated."
    If you can give me a sample code that you know it will work or you know any changes needed to this sample code plz say to me, I would be glad that you give me a code that you are sure about that because I am new in JTAPI

  • JTAPI media

    Our objective:
    Recording calls coming to specific terminal.
    Problem:
    We can’t cast Provider object to MediaProvider object.
    Is Cisco Call Manager support this casting or need certain configuration.

    hello!
    I'm developing a system with the same idea discussed here.
    I have already registered the CTI Port but I cannot receive any CallCtlConnEv from that address. I just only receive those events if I only add a CallObserver to the IP Phone from where I'm dialing and when I try to accept the call, the cti's address is out of service. If I add a CallObserver to the cti's address, I cannot receive the CallCtlConnEv from the cti's address.
    The application in JMF should be running in the same server as the JTAPI server? Or it can be running on the IP which address is the one where I configured when registering the cti port?
    My code is on the attachments. I didn't put the addressObserver. Could you take a look at it and see what's wrong?
    Thank you!

  • JTAPI - directory login timeout

    Hi, I'm trying to have a play with JTAPI, however when I try to execute 'makecall' I get
    Caught exception com.cisco.jtapi.PlatformExceptionImpl: Unable to create provider -- directory login timeout
    I'm running callmanager 6.0.1
    any ideas?

    worked this one out - I forgot to add in the ctimanager permissions to the user.
    this is now working correctly.

  • JTAPI and call center

    Hi,
    does Cisco provide call center classes with their JTAPI? For instance, i would like to monitor Call center events with the JTAPI application, the same way i can monitor events on Call manager.
    Regards,
    Marko

    You can get alot of information as to whats going on in the callcenter via the HDS database. You can also connect into the CTI interface on the CTIOS server. To get information via the ctitoolkit. Remember that JTAPI can way heavily on the CPU load on a server, and the agents add additional overhead to a standard CUCM box as well. You might run into a device weight issue if you get too carried away.

  • JTAPI and Firewall

    Do we need to open specific port to allow JTAPI client outside of corporate firewall to communicate with CUCM?

    it depends on where your application server sits.. if it's in the voice zone you shouldn't need any changes, but if not, you definitely need to open ports. The ports needed are mentioned in the JTAPI developer guide (it's a single one.. and another one if you use secure JTAPI). Of course, if you want to do media (cti ports, cti routepoints) then you'll need a whole bunch of ports (the JTAPI port plus whatever ports the phones use.. I don't have the link handy but it's part of the callmanager documentation.. a single PDF that lists all ports the callmanager ever uses, including the JTAPI port).

  • JTAPI performance and limits

    If you are monitoring all call and terminal events for all phones via JTAPI, does it burden your CUCM since it has to respond to your app about these events -- specially when you have more than a thousand phone. Are there some guidelines about JTAPI performance and limits -- i.e maximum number of phones/JTAPI client, etc.

    Please check you have enabled AXL updates on the Call Manager side:
    For CUCM 4.x
    http://www.cisco.com/en/US/docs/voice_ip_comm/cucm/dir_plugin/plug413.html
    Do you have the CTI Manager service running on the server you're attempting to make a JTAPI Provider?
    In CRS 4.x and later, it should create the JTAPI and RM JTAPI users, but it may prompt for CCM 'administrator' credentials to add the users. If you have MLA enabled, this really means the 'ccmadministrator' user or a user with similar privileges.

  • JTAPI failing after outage

    Hello,
    I am working on a UCCE 9.0
    I had previously configured a CTI route point to be dialed when agents need to transfer their calls to the queue and it was working fine.
    After an outage in the call center (still investigating the causes, but probably related to Call Manager outage), agent phones restarted and ever since, the route point 1234 is not working anymore, it's giving a busy tone.
    I noticed that this route point's IP is that of PG A
    However, on Framework Portico, when having a look at the processes, I got the attached:
    - The VRU PIMs are active on side A and idle on B
    - The UCM and Jtapi are idle on side A and active on side B
    - I have warnings in the UCM pim process, which I dumped and the result is attached
    Is this a normal behavior? To have the different PIMs active on the two different sides?
    Any idea how to fix the CTI route point problem?
    Thank you,
    Sahar Hanna

    We had a similar problem recently after a network outage... lots of CTI Route Points showing as Unregistered, but giving an IP address of the B side PG even though A side was Active. There a couple ways to go about fixing the CTI RP association:
    For each effected CTI Route Point, remove control of it from the PG's Application User in Call Manager, then re-add it.
    or, you can shut down PG services simlutaneously on the A and B side PGs, then start them back up... start up the one you would like "Active" first.  Best to do this during a service window, as it will prevent agent logins, end existing logins, and present a fast busy signal to all calls on UCCE CTI Route Points during the outage.
    A full service restart like (2) above should fix your split Active/Idle issue as well. You can also cycle the services one side at a time (first the side you want active, then the side you want idle after the first comes back up), but I found when we had our CTI RP registration issues that they weren't fixed until both sides were shut down and restarted.
    You might be able to just restart the JTAPI service in Call Manager to fix the registrations, however this won't push active PG services back to a single side.
    -Jameson

Maybe you are looking for