dlg.bye() action

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1406 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 17 years ago
parent 94f2e56f3b
commit 585f886f21

@ -31,6 +31,7 @@
#include "DSMSession.h"
#include "AmSession.h"
#include <string.h>
#include "AmSipHeaders.h"
SC_EXPORT(DLGModule);
@ -66,6 +67,7 @@ DSMAction* DLGModule::getAction(const string& from_str) {
DEF_CMD("dlg.reply", DLGReplyAction);
DEF_CMD("dlg.acceptInvite", DLGAcceptInviteAction);
DEF_CMD("dlg.bye", DLGByeAction);
return NULL;
}
@ -162,3 +164,13 @@ bool DLGAcceptInviteAction::execute(AmSession* sess,
return false;
}
EXEC_ACTION_START(DLGByeAction) {
string hdrs = resolveVars(arg, sess, sc_sess, event_params);
if (sess->dlg.bye(hdrs)) {
sc_sess->SET_ERRNO(DSM_ERRNO_UNKNOWN_ARG);
} else {
sc_sess->SET_ERRNO(DSM_ERRNO_OK);
}
} EXEC_ACTION_END;

@ -43,4 +43,5 @@ class DLGModule
DEF_ACTION_2P(DLGReplyAction);
DEF_ACTION_2P(DLGAcceptInviteAction);
DEF_ACTION_1P(DLGByeAction);
#endif

@ -11,3 +11,6 @@ dlg.acceptInvite([code, reason]);
accept audio stream from last_req (INVITE), and reply with 200 OK (default)
or code, reason
dlg.bye([headers])
send BYE. useful for example for continuing processing after call has ended.

Loading…
Cancel
Save