Yes it is optional arg, thanks for correcting.
Balu
Stefan Sayer wrote:
Hi,
thanks. it needs to be optional arg (after |), otherwise it would
break existing scripts, see the just committed patch.
btw, patch as attachment preferred; pasting into file confuses my
patch(1).
Stefan
o Balint Kovacs [05/19/09 15:07]:
I lost the end of patch.
Sorry
Index: IvrDialogBase.cpp
===================================================================
--- IvrDialogBase.cpp (revision 1354)
+++ IvrDialogBase.cpp (working copy)
@@ -182,12 +182,18 @@
return Py_None;
}
>
-static PyObject* IvrDialogBase_bye(IvrDialogBase* self, PyObject*)
+static PyObject* IvrDialogBase_bye(IvrDialogBase* self, PyObject* args)
{
+ char* hdrs=0;
+
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 +526,7 @@
{"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,
--
Balint Kovacs
Software Engineer
Gamma Telecom
Mobile +36 (06) 70 244 6677
Phone +44 (0) 207 078 8213
Email [email protected] <mailto:[email protected]>
Web www.gammatelecom.com <http://www.gammatelecom.com>
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev