Stefan Sayer writes:

 > python apparently uses a global interpreter and dsm's mod_py was 
 > initialized before ivr. I have added AmConfig::PlugInPath to PYTHONPATH 
 > now in mod_py as well. 

that helped.  now sems starts fine with both ivr and dsm modules loaded.

i then tried to test if dsm app and ivr app work simultaneously, but can't
get dsm test app (modified slightly from test_dbfile.dsm) to work:

import(mod_mysql);

initial state lobby 
  enter { 
    log(1, entering lobby)
    mysql.connect(mysql://user:p...@localhost/sems);
    mysql.playDBAudio(SELECT audio FROM default_audio WHERE 
application='announcement' AND message='greeting_msg', play.wav);
  };

transition "error" lobby - test($errno!="") / stop(true) -> end;
transition "audio ends" lobby - noAudioTest / stop(true) -> end;
transition "bye recvd" lobby - hangup / stop(false) -> end;

state end;

according to debug output below, it receives audio file from the db ok,
but fails to play it (or send audio out).

i have defined media_ip in sems.conf.  ivr apps work fine.

another thing that i noticed from debug (and the log message) is that
lobby is entered two times although sems receives the invite only once.

-- juha

----------------------------------------------------------------------

May 26 12:53:39 localhost sems[26771]: WARNING: [b65fdb90] execute 
(DSMCoreModule.cpp:308): FSM:  'entering lobby'
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] runactions 
(DSMStateEngine.cpp:160): executing 
'mysql.connect(mysql://user:p...@localhost/sems)'
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] runactions 
(DSMStateEngine.cpp:160): executing 'mysql.playDBAudio(SELECT audio FROM 
default_audio WHERE application='announcement' AND message='greeting_msg', 
play.wav)'
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] wav_read_header 
(wav_hdr.c:126): trying to read WAV file
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] wav_read_header 
(wav_hdr.c:129): tag = <RIFF>
...
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] setBufferSize 
(AmBufferedAudio.cpp:61): set output buffer size to 0 low thresh 0, fill thresh 0
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] addToPlaylist 
(DSMDialog.cpp:237): add item to playlist
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] runactions 
(DSMStateEngine.cpp:160): executing 'log(1, $db.rows)'
May 26 12:53:39 localhost sems[26771]: WARNING: [b65fdb90] execute 
(DSMCoreModule.cpp:308): FSM: $db.rows ''
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] init 
(DSMStateEngine.cpp:210): run init event...
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] runEvent 
(DSMStateEngine.cpp:255): checking transition 'error'
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] match 
(DSMCoreModule.cpp:524): test '' vs ''
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] runEvent 
(DSMStateEngine.cpp:255): checking transition 'audio ends'
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] runEvent 
(DSMStateEngine.cpp:255): checking transition 'bye recvd'
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] postEvent 
(AmEventQueue.cpp:48): AmEventQueue: trying to post event
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] postEvent 
(AmEventQueue.cpp:56): AmEventQueue: event posted
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] relayEvent 
(AmB2BSession.cpp:184): AmB2BSession::relayEvent: id=
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] processEvents 
(AmEventQueue.cpp:71): event processed
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] run 
(AmSession.cpp:342): vixxtnxbitqc...@localhost dlg.getUACTransPending() = 0
May 26 12:53:39 localhost sems[26771]: DEBUG: [b6cc2b90] processEvents 
(AmEventQueue.cpp:69): before processing event
May 26 12:53:39 localhost sems[26771]: DEBUG: [b6cc2b90] process 
(AmMediaProcessor.cpp:397): Session inserted to the scheduler
May 26 12:53:39 localhost sems[26771]: DEBUG: [b6cc2b90] processEvents 
(AmEventQueue.cpp:71): event processed
May 26 12:53:39 localhost sems[26771]: WARNING: [b6cc2b90] nextPacket 
(AmRtpStream.cpp:600): RTP Timeout detected. Last received packet is too old.
May 26 12:53:39 localhost sems[26771]: DEBUG: [b6cc2b90] nextPacket 
(AmRtpStream.cpp:601): diff.tv_sec = 1243329454
May 26 12:53:39 localhost sems[26771]: DEBUG: [b6cc2b90] postEvent 
(AmEventQueue.cpp:48): AmEventQueue: trying to post event
May 26 12:53:39 localhost sems[26771]: DEBUG: [b6cc2b90] postEvent 
(AmEventQueue.cpp:56): AmEventQueue: event posted
May 26 12:53:39 localhost sems[26771]: DEBUG: [b6cc2b90] postEvent 
(AmEventQueue.cpp:48): AmEventQueue: trying to post event
May 26 12:53:39 localhost sems[26771]: DEBUG: [b6cc2b90] postEvent 
(AmEventQueue.cpp:56): AmEventQueue: event posted
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] processEvents 
(AmEventQueue.cpp:69): before processing event
May 26 12:53:39 localhost sems[26771]: ERROR: [b6cc2b90] send 
(AmRtpPacket.cpp:212): while sending RTP packet: Socket operation on non-socket
May 26 12:53:39 localhost sems[26771]: DEBUG: [b65fdb90] process 
(AmSession.cpp:503): AmSession::process
May 26 12:53:39 localhost sems[26771]: ERROR: [b6cc2b90] send 
(AmRtpStream.cpp:241): while sending RTP packet.
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems

Reply via email to