Comments (13)
Hi Matt,
I think you inverted the FS logs:
if bothLegs is true : plivo use record_session()
if bothLegs is false: plivo use record()
I just checked something simple using luarun and a basic script :
-- /tmp/script.lua example script
freeswitch.consoleLog("notice", "plivo test\n");
Diaplan XML :
<extension name="plivo">
<condition field="destination_number" expression="^1234$">
<action application="set" data="record_post_process_exec_api=luarun:/tmp/script.lua"/>
<action application="socket" data="127.0.0.1:8084 async full"/>
</condition>
</extension>
If I use bothLegs='true', it works, I can see the log "plivo test" in FS.
If I use bothLegs='false', doesn't work, script is not fired.
Checking the FS code source, seems "record_post_process_exec_api" and "record_post_process_exec_api" are used only in record_session (when bothLEgs='true')
So cannot be used with bothLegs='false' .
from plivoframework.
I appreciate you looking into this for me. Does this mean I'll have to branch the freeswitch source and add the hook for record_session?
On Aug 5, 2011, at 4:40, [email protected] wrote:
Hi Matt,
I think you inverted the FS logs:
if bothLegs is true : plivo use record_session()
if bothLegs is false: plivo use record()I just checked something simple using luarun and a basic script :
-- /tmp/script.lua example script freeswitch.consoleLog("notice", "plivo test\n");
Diaplan XML :
<extension name="plivo"> <condition field="destination_number" expression="^1234$"> <action application="set" data="record_post_process_exec_api=luarun:/tmp/script.lua"/> <action application="socket" data="127.0.0.1:8084 async full"/> </condition> </extension>
If I use bothLegs='true', it works, I can see the log "plivo test" in FS.
If I use bothLegs='false', doesn't work, script is not fired.
Checking the FS code source, seems "record_post_process_exec_api" and "record_post_process_exec_api" are used only in record_session (when bothLEgs='true')
So cannot be used with bothLegs='false' .
Reply to this email directly or view it on GitHub:
https://github.com/plivo/plivo/issues/27#issuecomment-1733790
from plivoframework.
Get the last git freeswitch source and reinstall FS.
And retry with it, we will see if it helps you =)
from plivoframework.
We recompiled freeswitch and it didn't seem to fix the issue. Looking over the gti.freeswitch.org logs, I don't see a commit that might fix it either.
from plivoframework.
ok I will test with a python script and see what happens .
from plivoframework.
This apparently is still not working.
from plivoframework.
Update to the last plivo revision.
I checked and worked for me.
Here what I have done to test :
I record in background using bothLegs="true" and set maxLength="10", so after 10 seconds,
background recording is stopped and the python script is fired.
RESTXML :
<Response>
<Record bothLegs="true" maxLength="10" playBeep="true"/>
<Speak loop="20">Recording is in progress in background</Speak>
</Response>
FS DIALPLAN XML
<extension name="plivo">
<condition field="destination_number" expression="^1234$">
<action application="set" data="record_post_process_exec_api=pyrun:fstest"/>
<action application="socket" data="127.0.0.1:8084 async full"/>
</condition>
</extension>
Python script fstest.py
import os
from freeswitch import *
def runtime(args):
consoleLog("info", "test pyrun record_session postprocessing\n")
consoleLog("info", "test pyrun args => %s\n" % str(args))
I have installed freeswitch.py from freeswitch source and fstest.py into my python path.
FS logs for the python script :
2011-08-16 17:04:01.202207 [NOTICE] mod_python.c:114 Invoking py module: fstest
2011-08-16 17:04:01.202207 [DEBUG] mod_python.c:183 Call python script
2011-08-16 17:04:01.202207 [INFO] switch_cpp.cpp:1197 test pyrun record_session postprocessing
2011-08-16 17:04:01.202207 [INFO] switch_cpp.cpp:1197 test pyrun args =>
2011-08-16 17:04:01.202207 [DEBUG] mod_python.c:186 Finished calling python script
from plivoframework.
So the fix is in plivo, not freeswitch?
from plivoframework.
Seems in plivo, so now I think it will work for you.
from plivoframework.
It looks like this is indeed a freeswitch bug. I've submitted http://jira.freeswitch.org/browse/FS-3505 to them. Closing this issue.
from plivoframework.
You're a lucky guy, the fix has been commited to freeswitch =)
from plivoframework.
I saw that. And in under 10 minutes too!
On Aug 17, 2011, at 3:40, [email protected] wrote:
You're a lucky guy, the patch was commited to freeswitch =)
Reply to this email directly or view it on GitHub:
https://github.com/plivo/plivo/issues/27#issuecomment-1824176
from plivoframework.
It's also working
On Aug 17, 2011, at 3:40, [email protected] wrote:
You're a lucky guy, the patch was commited to freeswitch =)
Reply to this email directly or view it on GitHub:
https://github.com/plivo/plivo/issues/27#issuecomment-1824176
from plivoframework.
Related Issues (20)
- SchedulePlay doesn't use delimiter
- Element "Number" can't call RTMP session HOT 2
- Redux: Issue with FS originate #48
- Timeout callback
- Documentation is missing HOT 4
- DTMF element does not exist
- Inbound call and hangup url
- Plivo Freeswitch installation script HOT 2
- outboundserver not fetching the action url with the given method parameter in GetDigits tag
- call hang when preforming tranasfer
- gevent problem on Debian Jessie (missing SSLv3) HOT 5
- How to test ?
- Plivo outgoing calls going to voicemail
- Send appropriate User Agent
- Getdigits not detecting the pressed digits randomly?
- List of companies uisng plivoframework HOT 1
- call HANGUP with NORMAL_CLEARING HOT 1
- lockingSwitchOutError: Impossible to call blocking function in the event loop callback HOT 2
- Silence_threshold is too high
- Option to this project HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plivoframework.