DSM:mod_dlg: added setting errno if dlg.acceptInvite fails

sayer/1.4-spce2.6
Stefan Sayer 14 years ago
parent e2ffc89f22
commit 8c0a4b6679

@ -170,6 +170,9 @@ EXEC_ACTION_START(DLGAcceptInviteAction) {
ERROR("%i %s\n",e.code,e.reason.c_str());
sess->setStopped();
sess->dlg.reply(*sc_sess->last_req.get(),e.code,e.reason);
sc_sess->SET_ERRNO(DSM_ERRNO_DLG);
sc_sess->SET_STRERROR("Error accepting call: "+ int2str(e.code) + " "+ e.reason);
}
} EXEC_ACTION_END;

@ -30,6 +30,8 @@
#define MOD_CLS_NAME DLGModule
#define DSM_ERRNO_DLG "dlg"
DECLARE_MODULE_BEGIN(MOD_CLS_NAME);
bool onInvite(const AmSipRequest& req, DSMSession* sess);
DECLARE_MODULE_END;

@ -30,7 +30,7 @@ dlg.acceptInvite([code, reason]);
* sets $errno (arg,general)
accept audio stream from last_req (INVITE), and reply with 200 OK (default)
or code, reason
or code, reason. sets "dlg" type errno if negotiation fails.
dlg.bye([headers])
send BYE. useful for example for continuing processing after call has ended.

Loading…
Cancel
Save