Upgrade Dingaling to meet new googletalk spec upgrade your client if you have issues.

codecs need more work...

Expose events into javascript so you can create and fire events and 
and pick up chat events with chat-enabled clients like googletalk
EXAMPLE:

session.answer();

e = new Event("custom", "JS::Custom");
e.addHeader("subject", "cool");
e.addBody("hello this is a test");
e.fire;

while(session.ready()) {
    session.execute("sleep", "1000");
    event = session.getEvent();
    if (event) {
      str = event.serialize(); // or ("xml")
      console_log("debug", "Dump Event:\n" + str + "\n");


        e = new Event("custom", "JS::Chat");
        e.addHeader("works", "yes");
        e.addBody("you said: " + event.getBody());
        session.sendEvent(e);
      event.destroy();
    }
}





git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2323 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2006-08-18 01:28:50 +00:00
1 parent 099a771ddf
commit 47192db741
10 files changed
+520 -38

No files matched your search

+5 -5
View File
@@ -271,7 +271,7 @@ static const switch_codec_implementation_t speex_32k_implementation = {
/*.ianacode */ 102,
/*.iananame */ "speex",
/*.samples_per_second */ 32000,
/*.bits_per_second */ 512000,
/*.bits_per_second */ 256000,
/*.nanoseconds_per_frame */ 20000,
/*.samples_per_frame */ 640,
/*.bytes_per_frame */ 1280,
@@ -289,8 +289,8 @@ static const switch_codec_implementation_t speex_16k_implementation = {
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 100,
/*.iananame */ "speex",
/*.samples_per_second */ 16000,
/*.bits_per_second */ 256000,
/*.samples_per_second */ 22000,
/*.bits_per_second */ 128000,
/*.nanoseconds_per_frame */ 20000,
/*.samples_per_frame */ 320,
/*.bytes_per_frame */ 640,
@@ -310,11 +310,11 @@ static const switch_codec_implementation_t speex_8k_implementation = {
/*.ianacode */ 97,
/*.iananame */ "speex",
/*.samples_per_second */ 8000,
/*.bits_per_second */ 128000,
/*.bits_per_second */ 11000,
/*.nanoseconds_per_frame */ 20000,
/*.samples_per_frame */ 160,
/*.bytes_per_frame */ 320,
/*.encoded_bytes_per_frame */ 0,
/*.encoded_bytes_per_frame */ 28,
/*.number_of_channels */ 1,
/*.pref_frames_per_packet */ 1,
/*.max_frames_per_packet */ 1,