Browse code

dlg.connectCalleeRelayed() action for relayed INVITEs

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1433 8eb893ce-cfd4-0310-b710-fb5ebe64c474

Stefan Sayer authored on 11/06/2009 16:53:08
Showing 3 changed files
... ...
@@ -68,6 +68,7 @@ DSMAction* DLGModule::getAction(const string& from_str) {
68 68
   DEF_CMD("dlg.reply", DLGReplyAction);
69 69
   DEF_CMD("dlg.acceptInvite", DLGAcceptInviteAction);
70 70
   DEF_CMD("dlg.bye", DLGByeAction);
71
+  DEF_CMD("dlg.connectCalleeRelayed", DLGConnectCalleeRelayedAction);
71 72
 
72 73
   return NULL;
73 74
 }
... ...
@@ -174,3 +175,11 @@ EXEC_ACTION_START(DLGByeAction) {
174 175
     sc_sess->SET_ERRNO(DSM_ERRNO_OK);
175 176
   }
176 177
 } EXEC_ACTION_END;
178
+
179
+
180
+CONST_ACTION_2P(DLGConnectCalleeRelayedAction,',', false);
181
+EXEC_ACTION_START(DLGConnectCalleeRelayedAction) {  
182
+  string remote_party = resolveVars(par1, sess, sc_sess, event_params);
183
+  string remote_uri = resolveVars(par2, sess, sc_sess, event_params);
184
+  sc_sess->B2BconnectCallee(remote_party, remote_uri, true);
185
+} EXEC_ACTION_END;
... ...
@@ -43,5 +43,6 @@ class DLGModule
43 43
 
44 44
 DEF_ACTION_2P(DLGReplyAction);
45 45
 DEF_ACTION_2P(DLGAcceptInviteAction);
46
+DEF_ACTION_2P(DLGConnectCalleeRelayedAction);
46 47
 DEF_ACTION_1P(DLGByeAction);
47 48
 #endif
... ...
@@ -14,3 +14,6 @@ dlg.acceptInvite([code, reason]);
14 14
 dlg.bye([headers])
15 15
  send BYE. useful for example for continuing processing after call has ended.
16 16
 
17
+dlg.connectCalleeRelayed(string remote_party, string remote_uri)
18
+ like B2B.connectCallee() but for relayed INVITEs, i.e. for executing in 
19
+ invite run (run_invite_event=yes and transition "on INVITE" START - invite -> runinvite;)