Menu

Outgoing calls and playing sounds

Help
zipfruder
2002-07-19
2013-04-11
  • zipfruder

    zipfruder - 2002-07-19

    Im trying to hack DesktopCall to dial a number, play a wave, then wait for a DMTF response.

    My debug code is indicating that its playing the file before the destination number has picked up, but Im not hearing anything when the destination number has picked up.

    any ideas?

    public void callChangedEvent(CallEv evlist[])
          {
            for (int i = 0; i < evlist.length; i++) {
              CallEv ev = evlist[i];

          /*
           * When the TerminalConnection associated with the local Terminal is
           * create we want to set it up for source and destinations of the
           * voice media.
           */
            TerminalConnection tc = ((TermConnEv)ev).getTerminalConnection();
            MediaTerminalConnection mtc = (MediaTerminalConnection)tc;
         
              switch(ev.getID())
              {
                   case TermConnCreatedEv.ID:
                       System.out.println("TermConnCreatedEv");
                       try{
                       mtc.usePlayURL(new URL("file:./Greeting.wav"));
                       }catch(Exception e){}
                       break;
                   case MediaTermConnAvailableEv.ID:
                       System.out.println("Bleh. Play money");
                       try{
                       //mtc.startPlaying();
                       }catch(Exception e){}
                       break;
                   case MediaTermConnStateEv.ID:
                       int state = mtc.getMediaState();
                       state = state & MediaTerminalConnection.PLAYING;
                      
                       if (state ==0)
                       {
                           mtc.stopPlaying();
                       }
                       else
                       {
                           System.out.println("Is Playing");
                       }
                      
                       break;
                   case ConnConnectedEv.ID:
                       System.out.println("COnnected");
                                          try{
                       mtc.startPlaying();
                       }catch(Exception e){}
                       break;
                      
               }   
                   }}
       
        }

     
    • Steven A. Frare

      Steven A. Frare - 2002-07-19

      Hi:

      Most modems don't do call progress analysis (CPA) so they report connected immediately after dialing.  If you want to wait until the other end picks up you need an expensive modem or a voice card that does CPA.

      Thanks
      Steve

       
    • zipfruder

      zipfruder - 2002-07-19

      Bleh, the evils of free hardware.

       
    • Adam

      Adam - 2002-08-12

      Hi  zipfruder ,

      Just wondering if you have had any luck on this front?

      I am trying to do a similar thing, however I can't find an event that fires when an outbound call is answered at the other end.

      I can make a call, and start playing an audio file but the audio starts playing at the connection event.

      Cheers,
      Adam

       
    • Steven A. Frare

      Steven A. Frare - 2004-12-24

      Hi:

      Apparently you guys didn't read my message or I am missing something...

      Hmm...  Without going into a really long explanation if your using TAPI with the default TSP then any CPA stuff is shut off by default.  You can change the reg keys.  I answered this on the TAPI mailing list a few years ago, maybe search there for more details?

      Steve

       
      • Renee Zhang

        Renee Zhang - 2008-02-24

        Hi I am having the same problem: I can't find an event that fires when an outbound call is answered at the other end. I have re-set the value of AT+vra, and at+vrn, per Steve's suggestion, But it appears not working.  I am using a very old voice modem Creative Modem Blaster Flash56 DE5620-3.And here is the part of mstapi.log
        16:18:40.625       8    Will place call from line 0 to 7148290.               connectCall @ XProvider.cpp:371
        16:18:40.625       0    Could not find callback method!                       LineCallBackProc @ XProvider.cpp:130
        16:18:40.625       8    LineCallBackProc. dwMessage: 12                       LineCallBackProc @ XProvider.cpp:140
        16:18:40.625       0    Could not find callback method!                       LineCallBackProc @ XProvider.cpp:130
        16:18:40.625       8    LineCallBackProc. dwMessage: 2                        LineCallBackProc @ XProvider.cpp:140
        16:18:40.625       0    Could not find callback method!                       LineCallBackProc @ XProvider.cpp:130
        16:18:40.625       8    LineCallBackProc. dwMessage: 2                        LineCallBackProc @ XProvider.cpp:140
        16:18:40.625       8    lineMakeCall returned -> 65818                        connectCall @ XProvider.cpp:391
        16:18:40.625       8    Waited 0 milliseconds for lineMakeCall                connectCall @ XProvider.cpp:409
        16:18:40.625       8    hCall = -> 66519                                      connectCall @ XProvider.cpp:412
        16:19:15.765       0    Could not find callback method!                       LineCallBackProc @ XProvider.cpp:130
        16:19:15.765       8    LineCallBackProc. dwMessage: 2                        LineCallBackProc @ XProvider.cpp:140
        16:20:10.203       8    DLL_PROCESS_DETACH                                    DllMain @ XProvider.cpp:739

        Any one can help me? I am so frustrated.

        Thanks,

         
    • madanSingh

      madanSingh - 2005-12-02

      Hi Friend,

      Can u plz help me As I am new to XTAPi.

      Plz where I have o put xtapi.inf file and how to
      configure.

      I want to run sample program Outcall.java
      I amble to compile but when I run program it shows
      following error:
      Can't get Provider:
      javax.telephony.JtapiPeerUnavailableException:
      JtapiPeer: ne
      t.xtapi.XJtapiPeer could not be instantiated.

      Plz reply as early as Possible

      Thanks take care

      Madan Singh
      madan25251@yaho.com

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.