Juha Heinanen wrote:

  the only open issue is how to figure out that the message played by

  conference.playMixIn($message_file);

  to the callee has ended so that the call can be properly terminated.  i
  already asked this before and got a hint to use addSeparator:

after experimenting a bit more with this, it turned out that the
application can be written without mod_conference.  for playing message to
caller, this is all that is needed:

transition "session starts in callee leg" START - sessionStart / {

  log(2, "aas_callee: session starts");
  set($connect_session=0);
  setInOutPlaylist();
  sets($message_file="/var/lib/sems/audio/extensions/$(message).wav");
  playFile($message_file, false);
  set($b_status=CONNECTED);
  sets($msg="aas_callee: posting event $b_status to $status_sink");
  log(2, $msg);
  postEvent($status_sink, b_status);

} -> CONNECTED;

and then it is easy to catch noAudioTest() event and hangup the call:

transition "message ended" CONNECTED - noAudioTest() / {
  log(2, "Message ended");
  flushPlaylist();
  set($b_status=DISCONNECT);
  postEvent($status_sink, b_status);
  stop(false);
} -> END;

-- juha
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems

Reply via email to