Author: sayer
Date: 2009-04-03 21:23:47 +0200 (Fri, 03 Apr 2009)
New Revision: 1353

Modified:
   trunk/apps/ivr/Ivr.cpp
Log:
calling PyObject_VaCallMethod always with tuple  (see 
http://mail.python.org/pipermail/python-bugs-list/2004-August/024629.html)

Modified: trunk/apps/ivr/Ivr.cpp
===================================================================
--- trunk/apps/ivr/Ivr.cpp      2009-04-02 20:10:35 UTC (rev 1352)
+++ trunk/apps/ivr/Ivr.cpp      2009-04-03 19:23:47 UTC (rev 1353)
@@ -708,7 +708,7 @@
 
 void IvrDialog::onSessionStart(const AmSipRequest& req)
 {
-  callPyEventHandler("onSessionStart","s",req.hdrs.c_str());
+  callPyEventHandler("onSessionStart","(s)",req.hdrs.c_str());
   setInOut(&playlist,&playlist);
   AmB2BCallerSession::onSessionStart(req);
 }
@@ -716,7 +716,7 @@
 void IvrDialog::onSessionStart(const AmSipReply& rep)
 {
   invite_req.body = rep.body;
-  callPyEventHandler("onSessionStart","s",rep.hdrs.c_str());
+  callPyEventHandler("onSessionStart","(s)",rep.hdrs.c_str());
   setInOut(&playlist,&playlist);
   AmB2BSession::onSessionStart(rep);
 }
@@ -729,7 +729,7 @@
 
 void IvrDialog::onDtmf(int event, int duration_msec)
 {
-  if(callPyEventHandler("onDtmf","ii",event,duration_msec))
+  if(callPyEventHandler("onDtmf","(ii)",event,duration_msec))
     AmB2BSession::onDtmf(event,duration_msec);
 }
 
@@ -741,7 +741,7 @@
 
 bool IvrDialog::onOtherReply(const AmSipReply& r)
 {
-  if(callPyEventHandler("onOtherReply","is",
+  if(callPyEventHandler("onOtherReply","(is)",
                        r.code,r.reason.c_str()))
     AmB2BSession::onOtherReply(r);
   return false;
@@ -764,12 +764,12 @@
 }
 
 void IvrDialog::onSipReply(const AmSipReply& r) {
-  callPyEventHandler("onSipReply","O",getPySipReply(r));
+  callPyEventHandler("onSipReply","(O)",getPySipReply(r));
   AmB2BSession::onSipReply(r);
 }
 
 void IvrDialog::onSipRequest(const AmSipRequest& r){
-  callPyEventHandler("onSipRequest","O", getPySipRequest(r));
+  callPyEventHandler("onSipRequest","(O)", getPySipRequest(r));
   AmB2BSession::onSipRequest(r);
 }
 
@@ -791,7 +791,7 @@
   AmPluginEvent* plugin_event = dynamic_cast<AmPluginEvent*>(event);
   if(plugin_event && plugin_event->name == "timer_timeout") {
 
-    callPyEventHandler("onTimer", "i", plugin_event->data.get(0).asInt());
+    callPyEventHandler("onTimer", "(i)", plugin_event->data.get(0).asInt());
     event->processed = true;
   }
 

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

Reply via email to