optional headers to bye. based on patch by Balint Kovacs

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1389 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 17 years ago
parent 9b4bba32d7
commit 4eba991fd3

@ -37,7 +37,7 @@ class IvrDialogBase:
def stopSession(self): # stop everything
pass
def bye(self): # BYEs (or CANCELs) the SIP dialog
def bye(self [, headers]): # BYEs (or CANCELs) the SIP dialog
pass

@ -182,10 +182,16 @@ static PyObject* IvrDialogBase_dropSession(IvrDialogBase* self, PyObject*)
return Py_None;
}
static PyObject* IvrDialogBase_bye(IvrDialogBase* self, PyObject*)
static PyObject* IvrDialogBase_bye(IvrDialogBase* self, PyObject* args)
{
char* hdrs = "";
assert(self->p_dlg);
self->p_dlg->dlg.bye();
if(!PyArg_ParseTuple(args,"|s", &hdrs))
return NULL;
self->p_dlg->dlg.bye(hdrs);
Py_INCREF(Py_None);
return Py_None;
}
@ -518,7 +524,7 @@ static PyMethodDef IvrDialogBase_methods[] = {
{"stopSession", (PyCFunction)IvrDialogBase_stopSession, METH_NOARGS,
"Stop the session"
},
{"bye", (PyCFunction)IvrDialogBase_bye, METH_NOARGS,
{"bye", (PyCFunction)IvrDialogBase_bye, METH_VARARGS,
"Send a BYE"
},
{"redirect", (PyCFunction)IvrDialogBase_redirect, METH_VARARGS,

Loading…
Cancel
Save