Module: sems
Branch: rco/offer_answer
Commit: 89794996c4ccb144bf73c76c00d6d32eacc38c0e
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=89794996c4ccb144bf73c76c00d6d32eacc38c0e

Author: Raphael Coeffic <[email protected]>
Committer: Raphael Coeffic <[email protected]>
Date:   Mon May 16 15:23:21 2011 +0200

split the 183 reply from audio setup.

---

 doc/dsm/examples/183_early_establish.dsm |   48 +++++++++++++++++-------------
 1 files changed, 27 insertions(+), 21 deletions(-)

diff --git a/doc/dsm/examples/183_early_establish.dsm 
b/doc/dsm/examples/183_early_establish.dsm
index 5156311..f0e2f18 100644
--- a/doc/dsm/examples/183_early_establish.dsm
+++ b/doc/dsm/examples/183_early_establish.dsm
@@ -8,48 +8,54 @@ import(mod_dlg);
 
 initial state START ;
 transition "on invite" START - invite -> runinvite;
-transition "on sess start" START - sessionStart -> runstart;
+
 state runinvite 
       enter { 
        log(2, run invite!); 
        dlg.reply(100, trying...);
        -- we don't want to have the default 200 OK reply
        set(connect_session=0);
+       setTimer(1, 2);
 };
 
-state runstart
-      enter { 
-        log(2, run start!); 
-        -- we don't want to have session connected (RTP sent) yet
-        set(connect_session=0);
-        setTimer(1, 2);
-      };
-transition "go early" runstart - timerTest(#id==1) / 
+transition "go early" runinvite - timerTest(#id==1) / {
         dlg.acceptInvite(183, progress);
-        connectMedia();
-        playFile(wav/default_en.wav);
-   -> playing_early_msg; 
-transition "playing file failed" runstart - exception; test(#type==file) / {
+} -> replied_183;
+
+state replied_183;
+
+transition "on sess start" runinvite - earlySession -> play_early_msg;
+state play_early_msg
+      enter {
+       log(2, run start!);
+       connectMedia();
+       playFile(wav/default_en.wav);
+};
+
+transition "play file failed" runinvite - exception; test(#type==file) / {
         log(1, Error playing file!); 
         dlg.reply(500, server error); 
         stop 
 } -> FIN;
 
-state playing_early_msg;
-transition "early message ended" playing_early_msg - noAudioTest / 
+transition "early message ended" replied_183 - noAudioTest / {
         dlg.acceptInvite(200, ok);
         recordFile(/tmp/test.wav);
         setTimer(3,10);
-  -> recording;
-transition "recording failed" playing_early_msg - exception; / 
-   log(1, Error recording!); stop(true) -> FIN;
+} -> recording;
 
 state recording;
 
-transition "bye in early" (playing_early_msg, runstart) - hangup / {
-        dlg.reply(487,call terminated);
-        stop(false) 
+transition "recording failed" replied_183 - exception; / 
+   log(1, Error recording!); stop(true) -> FIN;
+
+transition "bye in early" (replied_183, play_early_msg, runinvite) - hangup / {
+       log(2, hangup event received);
+        stop(false)
 } -> FIN;
+
 transition "recording timer" recording - timerTest(#id==3) / stop -> FIN;
+
 transition "bye in recording" recording - hangup / stop -> FIN;
+
 state FIN;

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to