--
Nuno Miguel Reis | Unified Communication Systems
M. +351 913907481 | nreis@wavecom.pt
This is the output after calling the script right after start:2014-09-23 03:49:45.801129 [NOTICE] mod_python.c:212 Invoking py module: teste2014-09-23 03:49:45.801129 [NOTICE] switch_cpp.cpp:1328 Testing123...2014-09-23 03:49:45.801129 [NOTICE] switch_cpp.cpp:1328 Dumping current CDR INFO2014-09-23 03:49:45.801129 [ERR] mod_python.c:293 Error calling python script2014-09-23 03:49:45.801129 [ERR] mod_python.c:164 Python Error by calling script "teste": <type 'exceptions.AttributeError'>Message: 'PySwigObject' object has no attribute 'getXMLCDR'Exception: NoneTraceback (most recent call last)File: "/opt/freeswitch/scripts/teste.py", line 12, in handlerAll the following script calls work just fine.Note: If you want to test the code snippet i've added before don't forget to add:import freeswitchLooking forward to hear from you.Best Regards,--
Nuno Miguel Reis | Unified Communication Systems
WAVECOM-Soluções Rádio, S.A.
M. +351 913907481 | nreis@wavecom.pt
Cacia Park | Rua do Progresso, Lote 15
3800-639 AVEIRO | Portugal
T. +351 309 700 225 | F. +351 234 919 191
GPS | www.wavecom.pt
On Tue, Sep 23, 2014 at 3:44 AM, Nuno Reis <nreis@wavecom.pt> wrote:Hi guys.I've reported this before and i can tell that it is still happening in the latest v1.4.How reproduce:
- just create a dialplan that calls a python script
- dial that dialplan entry
Example code (works with anything that invokes session):#!/usr/bin/env python# -*- coding: utf-8 -*-from __future__ import absolute_importdef handler(session, args):freeswitch.consoleLog("notice", "Testing123...")freeswitch.consoleLog("notice", "Dumping current CDR INFO")freeswitch.consoleLog("info", str(session.getXMLCDR()))freeswitch.consoleLog("notice", "The END!")mod_pyhton crashes everytime the script is called right after a freeswitch start (the very first time session is invoked inside a mod_python python script).After the first time (error), everything starts to work just fine.This doesn't happen in e6b8b3e4f2deac73547bc9b9a2cb3e1d3147d101 from v1.2.stableShould i open a jira on this?--Nuno Miguel Reis | Unified Communication Systems
WAVECOM-Soluções Rádio, S.A.
M. +351 913907481 | nreis@wavecom.pt
Cacia Park | Rua do Progresso, Lote 15
3800-639 AVEIRO | Portugal
T. +351 309 700 225 | F. +351 234 919 191
GPS | www.wavecom.pt