Skip to content

Added ProtocolId and fixed Language in the ChannelData. Added AppName and AppData to the DialplanCEP.#165

Merged
Ulexus merged 7 commits intoCyCoreSystems:mainfrom
Amtelco-Software:main
Dec 12, 2023
Merged

Added ProtocolId and fixed Language in the ChannelData. Added AppName and AppData to the DialplanCEP.#165
Ulexus merged 7 commits intoCyCoreSystems:mainfrom
Amtelco-Software:main

Conversation

@daninmadison
Copy link
Copy Markdown
Contributor

@daninmadison daninmadison commented Sep 15, 2023

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 Reviewable

dcropp and others added 7 commits September 15, 2023 14:49
… 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).
@svarunan
Copy link
Copy Markdown

@Ulexus Can we merge this? I was looking to create a PR for same ProtocolId

@daninmadison
Copy link
Copy Markdown
Contributor Author

My apologies. Is there anything I need to do?

@Ulexus Ulexus merged commit 0e2dabc into CyCoreSystems:main Dec 12, 2023
@Ulexus
Copy link
Copy Markdown
Member

Ulexus commented Dec 12, 2023

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants