New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Channel Variables and AMI Event for Respoke Session #9
Conversation
1. Set of Asterisk Channel Variables related to the Respoke Session 2. AMI (Asterisk Manager Interface) new Event 'respoke_session' in order to show the Respoke Session information. The purpose of such features is to make Respoke information available both on the asterisk channel and on the asterisk manager interface.
Thank you for your Pull Request. It looks like @gcareri hasn't signed our Contributor License Agreement, yet. Thanks for your understanding, |
@gcareri Hi Giuseppe - You've probably seem something similar for Asterisk contributions. Here's the Contributor License Agreement (CLA) for chan_respoke: |
@gcareri Hi Giuseppe - I know the README isn't necessarily part of the code updates. But, could you update the README with how to use these two features? This will help future chan_respoke developers get started using the new feature independent of where they are on the asterisk learning curve. Grazie Giuseppe! |
- Asterisk Channel Variables: details of the new Respoke Session Information available on to the Asterisk Channel and a DialPlan example. - AMI: description of the new Asterisk Manager Interface Event and example.
This is really great work @gcareri. I ❤️ the README updates for both the channel variable and AMI events. 👍 |
[clabot:check] |
It looks like @gcareri just signed our Contributor License Agreement. 👍 Always at your service, Your friendly neighborhood Respoke CLAbot |
@gcareri You're CLA is approved. 😃 |
|
||
##### Example: | ||
|
||
Event: respoke_session |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your AMI events should be PascalCase
not snake_case
to follow Asterisk convention
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have modified the AMI event name according to your suggestion (RespokeSession).
Thank you for your suggestion.
Privilege: system,all | ||
channel: RESPOKE/anonymous-00000006 | ||
id: 98B0F7D7-6AEC-4037-8250-8C5DFA7A2C11 | ||
local: your_respoke_endpoint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For compatibility purposes, I'd CamelCase the keys in the RespokeSession event. That fits the general nomenclature of the other standard AMI events.
For example:
Local: your_respoke_endpoint
LocalType: web
etc.
This might be a silly question about intent, and perhaps this is where my dial plan weakness shows through. Is there a reason you can't use the CHANNEL([local, remote, ...]) to access the same information as those new channel variables - where most of those pieces of session data (local, remote, local_type, remote_type, and a few others) are already exposed? A couple of your exposed variables don't exist right now, but we could expose those through the CHANNEL() function as well. The manager event is not provided at this time, so I see that being unique and beneficial. Looking through your commits it looks like there's been a bit of back and forth on this. For more information about channel variable reading and writing (on the backend) see func_read_channel() and func_write_channel() in channels/chan_respoke.c The dial plan interface can be used as follows (or in other ways as well, like a variable): |
That could certainly be an interesting feature. |
Forgive me for not picking up on this sooner @gcareri. The issue is the following updates to res/res_respoke_session.c may duplicate existing code:
See, channels/chan_respoke.c and the func_read_channel and func_write_channel functions. These functions allow you to use the
But, currently, they only implement I think the final ask is to move this functionality from res/res_respoke_session.c to the func_read_channel and func_write_channel functions in channels/chan_respoke.c. Something like this for
This has the benefit of not duplicating existing code. I believe Everything else looks great btw! Thanks Giuseppe! |
Closing due to inactivity. Feel free to re-open if you want to address the feedback given and want to see this merged in. |
Added two new features:
The purpose of such features is to make Respoke information available both on the asterisk channel and on the asterisk manager interface.