Added ProtocolId and fixed Language in the ChannelData. Added AppName and AppData to the DialplanCEP.#165
Merged
Ulexus merged 7 commits intoCyCoreSystems:mainfrom Dec 12, 2023
Merged
Conversation
… to the websocket. listen needed to call wg.Done if the context was cancelled.
…ulting in an negative waitgroup count) Previous loop could have signaled wg Done, so we must always use the sync.Once for signalling the wg.Done
This allows the caller to pass in their context. ConnectWithContext then uses this Context for the cancel. If the caller/parent cancels the Context, the child Connect routine detects the Context is closed and cleans up. This allows for a more complex environment with multiple go routines running under a parent/client model.
For chan_sip and PJSIP this is the SIP header Call-ID value. Language was in the ChannelData protobuf, but was missing from channel.go so applications could not retrieve the Language value passed from Asterisk. Added AppName and AppData to the DialplanCEP. This allows applications to know the current Asterisk dialplan application and the parameters (data) passed to the application. If ARI disconnects or is starting up, an application should retrieve a list of it's current channels. Without retrieving a list of channels, we could have calls stuck in Asterisk Stasis application. PJSIP and chan_sip calls will be disconnected when the other end disconnects. However, local channels or ExternalMedia channels could become permanently stuck. If the channels have stasis application name, we know we are in control of the call via ARI. The AppData field allows us to retrieve a list of parameters that were passed to the stasis application. This AppData is very useful when Asterisk dialplans are configured to pass data to the Stasis application. The ARI Stasis application retrieves these parameters via the AppData (when AppName is Stasis).
|
@Ulexus Can we merge this? I was looking to create a PR for same |
Contributor
Author
|
My apologies. Is there anything I need to do? |
Ulexus
approved these changes
Dec 12, 2023
Member
|
Thanks! |
ronlockard
pushed a commit
to two-barrels/ari
that referenced
this pull request
May 12, 2025
… and AppData to the DialplanCEP. (CyCoreSystems#165) * Added ProtocolId to the ChannelData. For chan_sip and PJSIP this is the SIP header Call-ID value. Language was in the ChannelData protobuf, but was missing from channel.go so applications could not retrieve the Language value passed from Asterisk. Added AppName and AppData to the DialplanCEP. This allows applications to know the current Asterisk dialplan application and the parameters (data) passed to the application. --------- Co-authored-by: Dan Cropp <dcropp@amtelco.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added ProtocolId to the ChannelData.
For chan_sip and PJSIP this is the SIP header Call-ID value.
Language was in the ChannelData protobuf, but was missing from channel.go so applications could not retrieve the Language value passed from Asterisk.
Added AppName and AppData to the DialplanCEP. This allows applications to know the current Asterisk dialplan application and the parameters (data) passed to the application.
If ARI disconnects or is starting up, an application should retrieve a list of it's current channels.
Without retrieving a list of channels, we could have calls stuck in Asterisk Stasis application.
PJSIP and chan_sip calls will be disconnected when the other end disconnects.
However, local channels or ExternalMedia channels could become permanently stuck.
If the channels have stasis application name, we know we are in control of the call via ARI.
The AppData field allows us to retrieve a list of parameters that were passed to the stasis application.
This AppData is very useful when Asterisk dialplans are configured to pass data to the Stasis application.
The ARI Stasis application retrieves these parameters via the AppData (when AppName is Stasis).
This change is