Module: sems
Branch: master
Commit: 317417a6a4bdb6107e6d523ee88eced9d8aa9055
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=317417a6a4bdb6107e6d523ee88eced9d8aa9055

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Fri Feb 24 20:08:12 2012 +0100

dsm: updated example for early media

---

 doc/dsm/examples/early_media.dsm |   43 ++++++++++++++++++-------------------
 1 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/doc/dsm/examples/early_media.dsm b/doc/dsm/examples/early_media.dsm
index dead6ea..afad0bc 100644
--- a/doc/dsm/examples/early_media.dsm
+++ b/doc/dsm/examples/early_media.dsm
@@ -1,30 +1,29 @@
 
+-- simple example on playing a file in early media for max 10 seconds
+-- then sending 500 final reply
+
 import(mod_dlg);
 
-initial state START ;
+initial state START;
 transition "on invite" START - invite -> runinvite;
-transition "on sess start" START - sessionStart -> runstart;
 
 state runinvite 
-      enter { 
-       -- we don't want to have the default 200 OK reply
-       set(reply_request=0);
-      };
-
-state runstart
-      enter { 
-       dlg.acceptInvite(183, progress);
-       connectMedia();
-       -- can of course be playPrompt as well
-       playFile(/home/stefan/sub_nautilus.wav);
-       setTimer(1, 10);
-      };
-
-transition FR runstart - timerTest(#id==1) / 
-   dlg.reply(500, denied);
-   stop
-  -> FIN;
-
-transition bye runstart - hangup / stop -> FIN;
+ enter { 
+   set($dlg.reply.hdrs="P-Prompt-Type: Charging-info\r\nP-Prompt-Content: 
5\r\n");
+   dlg.acceptInvite(183, progress);
+   connectMedia();
+   playFile(wav/default_en.wav);
+   setTimer(1, 10);
+
+   -- we don't want to have the default 200 OK reply
+   set($connect_session=0);   
+ };
+
+transition FR runinvite - timerTest(#id==1) / {
+   dlg.reply(500, "denied");
+   stop;
+}  -> FIN;
+
+transition bye runinvite - hangup / stop -> FIN;
 
 state FIN;

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

Reply via email to