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

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Mon Nov 15 17:23:18 2010 +0100

DSM example: handling CANCEL while INVITE pending

---

 doc/dsm/examples/handle_cancel.dsm |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/doc/dsm/examples/handle_cancel.dsm 
b/doc/dsm/examples/handle_cancel.dsm
new file mode 100644
index 0000000..efcc3e9
--- /dev/null
+++ b/doc/dsm/examples/handle_cancel.dsm
@@ -0,0 +1,21 @@
+-- handle cancel correctly
+-- by replying with 487
+-- 
+-- this is only necessary if run_invite_event=yes
+-- and final reply to INVITE is delayed
+-- so CANCEL can happen while call setup is proceeding
+import(mod_dlg);
+initial state BEGIN;
+
+transition "inv got" BEGIN - invite / {
+ set($connect_session=0);
+ dlg.reply(101, Still Trying);
+} -> WAIT;
+
+transition "cancel" BEGIN - hangup / {
+ dlg.reply(487, canceled);
+ stop(false); 
+} -> END;
+
+state WAIT;
+state END;
\ No newline at end of file

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

Reply via email to