×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    2

    exchange small amounts of data between asterisk server and S40 Midp2.0 (nokia 6230i)

    hi
    i need to establish a connection between my 6230i (midp 2.0, s40) and my server. A regular speech call has to be used, because its for free and inet connection, sms, etc are expensive.

    It works fine using voice based menus like, "press 1 if u want get the server ip". asterisk uses a shell script to get it from ifconfig into a integer variable and then plays the right audio file.

    Now i got a new (used) cell phone and i want the ip to be displayed.
    So far a connection to the asterisk is established, the midlet still ( or again) running and the asterisk server at the other end of the line send the ip using dtmf with "#" instaed of "." . Searching this forum i got the impression reading dtmf on s60 is hard and on s40 it is impossible.

    Other functions i want to implement with this are to open a specific port on the firewall (like ssh) just for the duration i need it to be open to lower secutrity risks. or switch the content of the http server from i.e. eyeos to ajaxterm. I can do this if i can get some small integers to my asterisk server.

    i playing with the idea to solder an headset cabel so the output of the earspeaker --> microphone and then use media player to play dtmf

    has anyone an idea if there is another way to exchange small amounts of data between my server and the cell phone not using an internet connection or sms?
    Last edited by kleinerkiffer; 2008-01-18 at 15:16.

  2. #2
    Registered User
    Join Date
    Jan 2008
    Posts
    2

    Re: exchange small amounts of data between asterisk server and S40 Midp2.0 (nokia 623

    i just tried to play a music file(mp3) while a call is established. Does not work!
    videos, etc dont work either!

    but i can record part of the call.
    and it is possible to play back those files while a call (.amr)
    so it should be possible to record all dtmf tones sent by the computer with one application and save them as .amr one time
    and with the other app using the media player

    i just recorded the dtmf tones in amr format now im looking for a way to play them
    code examples are again hard to unterstand.... it says how to play embedded wave files but it doesnot say how to embed them and wether it works with amr...

    after a lot of tryNerror i got so far:

    import javax.microedition.media.*
    import java.io.*
    .......
    try{
    InputStream is = getClass().getResourceAsStream(DTMF1.wav);
    try{
    Player p = Manager.createPlayer(is,"audio/wav"); // i dont use x-wav because of this
    try{
    p.start();
    }catch(Exception e1){
    StatusLabel.setText("p.start()" + e1.getMassage());
    }
    }catch(Exception e2){
    StatusLabel.setText("createPlayer()" + e2.getMassage());
    }
    }catch(Exception e3){
    StatusLabel.setText("inputstream" + e3.getMassage());
    }


    building it (netbeans and including DTFM1.wav into the top directory of the .jar)
    and excecuting on the 6230i gives me the message: ""createPlayer()Param is null"
    i think it means initialising the inputstream is didnt work. and that may be a result of not finding the .wav ..... any1 know where to put the files so they are found?
    Last edited by kleinerkiffer; 2008-01-18 at 19:00.

  3. #3
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: exchange small amounts of data between asterisk server and S40 Midp2.0 (nokia 623

    Hello kleinerkiffer,

    ..
    InputStream is = getClass().getResourceAsStream(DTMF1.wav);
    ..
    See this thread and the suggestion by Hartti there:

    http://discussion.forum.nokia.com/fo...d.php?t=114809


    Using FileConnection API as instead of InputStream could possibly do the trick, here's the idea:

    ...
    //using here an example path within phone's memory; check the 6230i's path
    FileConnection conn = (FileConnection) Connector.open("file:///C:/Data/Sounds/filename.wav");
    ...
    player = Manager.createPlayer(conn.openInputStream(), "audio/wav");
    ...


    Related resource:

    http://www.forum.nokia.com/info/sw.n..._0_en.zip.html


    Regards,
    r2j7

Similar Threads

  1. Nokia 7210 (S40) Internal Server Error 500
    By erictummers in forum Mobile Java General
    Replies: 0
    Last Post: 2002-10-03, 11:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×