Comments (19)
ok added feature in dev branch :
If you set both attributes, you are tracking B legs hangup in Dial element .
In the http request you will find parameters below :
DialALegUUID
DialBLegUUID
DialBLegHangupCause
So now you can test it (sorry not tested again, I'm reinstalling my test server) :
cd /path/to/plivo/install
cd src/plivo
git pull
git checkout -b dev origin/dev
Now you are in dev branch
Restart plivo to test =)
To come back to stable version :
git checkout master
from plivoframework.
Unfortunately didn't work. It looks like the answered event sent the b leg params instead or something, because I am expecting a To
param, but I see things like called_no
instead:
2011-07-12 17:10:19,963 outbound_server[32805]: INFO: (2) Requested to http://127.0.0.1:8000/_plivo/incoming/answered/ with {'direction': 'inbound', 'called_no': 'plivo', 'from_no': '1000', 'sched_hangup_id': '', 'call_uuid': '93f891d7-21ab-4602-a071-8c24ff375514', 'aleg_request_uuid': '', 'aleg_uuid': ''}
from plivoframework.
That is upon answering the inbound call. I never made it to ending the call.
from plivoframework.
Maybe the dev version is quite out of date?
from plivoframework.
- dev is up to date =)
- maybe I didn't understand your request :
in my mind, it was :
-
"A leg" Inbound call is starting a restxml scenario (by fetching answer url)
-
In this restxml, you have a Dial Element to dial a "B Leg" and bridge it with "A Leg" (the incoming call) :
<Dial BLegHangupAction="MyURL" BLegHangupMethod="POST" ... /> -
When "B Leg" channel hangs up, "MYURL" must be fetched (else there is a bug)
from plivoframework.
That's the correct description of the feature. It seems I was checking out an old dev branch. I got the correct one running but got the following error:
2011-07-13 13:41:19,001 outboundserver[38482]: ERROR: (6) 'Dial' object has no attribute 'get_channel_unique_id'
2011-07-13 13:41:19,002 outboundserver[38482]: ERROR: (6) Traceback (most recent call last):
2011-07-13 13:41:19,002 outboundserver[38482]: ERROR: (6) File "/Library/Python/2.6/site-packages/plivo-0.1.0-py2.6.egg/plivo/rest/freeswitch/outboundsocket.py", line 386, in _run
2011-07-13 13:41:19,002 outboundserver[38482]: ERROR: (6) self.process_call()
2011-07-13 13:41:19,002 outboundserver[38482]: ERROR: (6) File "/Library/Python/2.6/site-packages/plivo-0.1.0-py2.6.egg/plivo/rest/freeswitch/outboundsocket.py", line 414, in process_call
2011-07-13 13:41:19,002 outboundserver[38482]: ERROR: (6) self.execute_xml()
2011-07-13 13:41:19,002 outboundserver[38482]: ERROR: (6) File "/Library/Python/2.6/site-packages/plivo-0.1.0-py2.6.egg/plivo/rest/freeswitch/outboundsocket.py", line 549, in execute_xml
2011-07-13 13:41:19,002 outboundserver[38482]: ERROR: (6) element_instance.run(self)
2011-07-13 13:41:19,003 outboundserver[38482]: ERROR: (6) File "/Library/Python/2.6/site-packages/plivo-0.1.0-py2.6.egg/plivo/rest/freeswitch/elements.py", line 128, in run
2011-07-13 13:41:19,003 outboundserver[38482]: ERROR: (6) result = execute(outbound_socket)
2011-07-13 13:41:19,003 outboundserver[38482]: ERROR: (6) File "/Library/Python/2.6/site-packages/plivo-0.1.0-py2.6.egg/plivo/rest/freeswitch/elements.py", line 565, in execute
2011-07-13 13:41:19,003 outboundserver[38482]: ERROR: (6) % (self.bleg_hangup_url, self.bleg_hangup_method, self.get_channel_unique_id())
2011-07-13 13:41:19,003 outboundserver[38482]: ERROR: (6) AttributeError: 'Dial' object has no attribute 'get_channel_unique_id'
from plivoframework.
Also, I think the names of the attributes should be camel-case to match the rest of the API (bLegHangupAction
& bLegHangupMethod
)
from plivoframework.
ok fixed error and changed to camel-case style in last dev commit =)
from plivoframework.
With Venky we were thinking about something more simple :
when doing Dial with "action" and "method", why not just adding B leg uuid in the parameters posted into http request ?
from plivoframework.
because action does a redirect, but I want the XML to continue executing
from plivoframework.
New Exception:
Traceback (most recent call last):
File "core.pyx", line 337, in gevent.core.__simple_handler (gevent/core.c:4494)
TypeError: send_to_url() takes at most 4 arguments (5 given)
Failed to execute callback for active_event fd=-1 flags=INIT
cb = <built-in method switch of greenlet.greenlet object at 0x1035b2390>
arg = ( ( <plivo.rest.freeswitch.inboundsocket.RESTInboundSocket object at 0x1035afb50>,
u'http://127.0.0.1:8000/_plivo/b-leg/hung_up',
{ 'DialALegUUID': u'f3fa8ce9-021b-4d36-9618-053338130756',
'DialBLegHangupCause': u'UNALLOCATED_NUMBER',
'DialBLegUUID': u'fa06b595-0552-4122-99a6-922f9ab04c90'},
u'POST'),
{ })
from plivoframework.
fixed
I was thinking something again :
we can use "action" and "method" and add B leg uuid in the parameters posted into http request
and add one extra attribute to Dial element : "redirect" :
By default redirect flag will be set to "true".
When it will be set to "false", the call won't be redirected to the http response but the http request will be fired.
<Dial action="MYURL" method="POST" redirect="false"> ... </Dial>
In the http request you will get same params as for B leg callback :
- DialBLegUUID
- DialHangupCause
- DialALegUUID
from plivoframework.
That solution sounds good to me.
On Jul 18, 2011, at 3:36, [email protected] wrote:
fixed
I was thinking something again :
we can use "action" and "method" and add B leg uuid in the parameters posted into http request
and add one extra attribute to Dial element : "redirect" :
By default redirect flag will be set to "true".
When it will be set to "false", the call won't be redirected to the http response but the http request will be fired....
In the http request you will get same params as for B leg callback :
- DialBLegUUID
- DialHangupCause
- DialALegUUID
Reply to this email directly or view it on GitHub:
https://github.com/plivo/plivo/issues/18#issuecomment-1593365
from plivoframework.
ok perfect I will do that today and will update helpers :)
from plivoframework.
Hi matt, try the last master branch revision, all things have been merged now.
So you can use now :
<Dial action="MYURL" method="POST" redirect="false"> ... </Dial>
from plivoframework.
This works but there is no DialBLegUUID
posted.
from plivoframework.
ok I'm going to fix that today
from plivoframework.
ok fixed in last commit in master branch =)
from plivoframework.
It's all working! Thanks!
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.