Author: sayer
Date: 2009-05-19 15:24:09 +0200 (Tue, 19 May 2009)
New Revision: 1389

Modified:
   trunk/apps/ivr/IVRInterface.txt
   trunk/apps/ivr/IvrDialogBase.cpp
Log:
optional headers to bye. based on patch by Balint Kovacs

Modified: trunk/apps/ivr/IVRInterface.txt
===================================================================
--- trunk/apps/ivr/IVRInterface.txt     2009-05-19 13:14:35 UTC (rev 1388)
+++ trunk/apps/ivr/IVRInterface.txt     2009-05-19 13:24:09 UTC (rev 1389)
@@ -37,7 +37,7 @@
     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
 
 

Modified: trunk/apps/ivr/IvrDialogBase.cpp
===================================================================
--- trunk/apps/ivr/IvrDialogBase.cpp    2009-05-19 13:14:35 UTC (rev 1388)
+++ trunk/apps/ivr/IvrDialogBase.cpp    2009-05-19 13:24:09 UTC (rev 1389)
@@ -182,10 +182,16 @@
   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 @@
   {"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,

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to