René's URL Explorer Experiment


Title: OriginateCallback receives inconsistent callbacks · Issue #537 · asterisk-java/asterisk-java · GitHub

Open Graph Title: OriginateCallback receives inconsistent callbacks · Issue #537 · asterisk-java/asterisk-java

X Title: OriginateCallback receives inconsistent callbacks · Issue #537 · asterisk-java/asterisk-java

Description: I have been testing a simple integration between our web app and an asterisk box. We originate calls using originateToExtensionAsync, using a local channel and a dialplan, and then record the outcome using a combination of OriginateCallb...

Open Graph Description: I have been testing a simple integration between our web app and an asterisk box. We originate calls using originateToExtensionAsync, using a local channel and a dialplan, and then record the outco...

X Description: I have been testing a simple integration between our web app and an asterisk box. We originate calls using originateToExtensionAsync, using a local channel and a dialplan, and then record the outco...

Opengraph URL: https://github.com/asterisk-java/asterisk-java/issues/537

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"OriginateCallback receives inconsistent callbacks","articleBody":"I have been testing a simple integration between our web app and an asterisk box.  We originate calls using `originateToExtensionAsync`, using a local channel and a dialplan, and then record the outcome using a combination of `OriginateCallback` and `AbstractManagerEventListener` instances.\r\n\r\nIn particular, we are interested in recording:\r\n* the outcome of the calls (Answered, Not Answered, Busy)\r\n* the duration of the answered calls\r\n\r\nTo record the duration, we are watching for the `HangupEvent` (from the `AbstractManagerEventListener`), and then calculating the time between that and the `onSuccess` callback (from the `OriginateCallback`).\r\n\r\nThe issue is that *sometimes*, instead of calling `onSuccess`, the `onNoAnswer` callback is instead called.  In these cases, the `HangupEvent` eventually shows up as well, but because no `onSuccess` ever fired, we are unable to record a duration.  Further, our call records are inaccurate, as the call was answered!\r\n\r\nAfter puzzling over this and looking carefully at the logs, I went searching in the closed issues here and see what seems to be a collection of issues that all describe the exact same problem:\r\n\r\nhttps://github.com/asterisk-java/asterisk-java/pull/255\r\nhttps://github.com/asterisk-java/asterisk-java/issues/207 (note that a commenter here suggests a fix which looks like it was later committed to the mainline: https://github.com/agamezg/asterisk-java/commit/7ef4d04c634a924e5d3bdab37f4effdf18e3baf6)\r\nhttps://github.com/asterisk-java/asterisk-java/issues/145\r\n\r\nI will admit that I am not an asterisk expert, but what seems to be happening is that the `NewStateEvent` that updates the channel state is sometimes arriving *after* the `OriginateResponseEvent` which relies on that `NewStateEvent` to determine whether the channel is up or not.  \r\n\r\nMoreover, from reading through the past bug reports, this may be particular to local channels?  In this case, we are running some prerequisites in the dialplan, so we don't want to dial the call until the dialplan is ready -- I believe we need the local channels in this case?\r\n\r\nI'm hoping to reopen the discussion and determine the best way to make `OriginateCallback` behave correctly.  One MR suggests adding a sleep at the top of `handleOriginateEvent`, for instance, presumably to allow the `NewStateEvent`s to arrive.  Others suggest adding additional clauses inside `handleOriginateEvent` to cover the states of the multiple channels involved.  This is all a bit above my level of understanding, so I'm hoping to get some input.\r\n\r\nI'm attaching a bit of the logs around this event; you can see the `OriginateResponseEvent` arriving about halfway through and causing our app to log `IVRNoAnswer`.  There are several `NewStateEvent`s which arrive before and after, but the ones for the channel named in the `OriginateResponseEvent`, `Local/960@zambiaivr-0000013d;1'`, arrive after, while events for `Local/960@zambiaivr-0000013d;2'` arrive before...\r\n\r\n[asterisk-java.log](https://github.com/asterisk-java/asterisk-java/files/12805926/asterisk-java.log)\r\n\r\n","author":{"url":"https://github.com/elijahsmith","@type":"Person","name":"elijahsmith"},"datePublished":"2023-10-04T16:34:33Z","url":"https://github.com/asterisk-java/asterisk-java/issues/537"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:36649d01-9351-8643-26c8-cf232ad6c8d0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id81CC:1ACDEA:B7531:F4425:6AFD0C92
html-safe-nonce326bc7f0829800ba5580b4807b2ce0dc5f98ff761592896d6a0014122a268e88
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MUNDOjFBQ0RFQTpCNzUzMTpGNDQyNTo2QUZEMEM5MiIsInZpc2l0b3JfaWQiOiI5MTczOTI1MTQ1MzIyNzg1OTM4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacd9ad61a549b36e364c7854c4618b22871ae9b7f05b46c8c05038aa8f4915942b
hovercard-subject-tagissue:1926596751
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/asterisk-java/asterisk-java/537/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0192eb7e66c5eebdb5b20b4b7c114f427a550c4677e7fde3bc458bba70c958e6/asterisk-java/asterisk-java/issues/537
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0192eb7e66c5eebdb5b20b4b7c114f427a550c4677e7fde3bc458bba70c958e6/asterisk-java/asterisk-java/issues/537
og:image:altI have been testing a simple integration between our web app and an asterisk box. We originate calls using originateToExtensionAsync, using a local channel and a dialplan, and then record the outco...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameelijahsmith
hostnamegithub.com
expected-hostnamegithub.com
Noneb29de2abb97b6307b16270785efeb58b51a117d5a9b659acf00b77aa00e7043b
turbo-cache-controlno-preview
go-importgithub.com/asterisk-java/asterisk-java git https://github.com/asterisk-java/asterisk-java.git
octolytics-dimension-user_id12164530
octolytics-dimension-user_loginasterisk-java
octolytics-dimension-repository_id1195396
octolytics-dimension-repository_nwoasterisk-java/asterisk-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1195396
octolytics-dimension-repository_network_root_nwoasterisk-java/asterisk-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c9e619def6d670dc18a45d3b02cea938c1c7e47
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/asterisk-java/asterisk-java/issues/537#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fasterisk-java%2Fasterisk-java%2Fissues%2F537
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fasterisk-java%2Fasterisk-java%2Fissues%2F537
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=asterisk-java%2Fasterisk-java
Reloadhttps://github.com/asterisk-java/asterisk-java/issues/537
Reloadhttps://github.com/asterisk-java/asterisk-java/issues/537
Reloadhttps://github.com/asterisk-java/asterisk-java/issues/537
asterisk-javahttps://github.com/asterisk-java
asterisk-javahttps://github.com/asterisk-java/asterisk-java
Codehttps://github.com/asterisk-java/asterisk-java
Issues25 (25)https://github.com/asterisk-java/asterisk-java/issues
Pull requests9 (9)https://github.com/asterisk-java/asterisk-java/pulls
Discussionshttps://github.com/asterisk-java/asterisk-java/discussions
Actionshttps://github.com/asterisk-java/asterisk-java/actions
Wikihttps://github.com/asterisk-java/asterisk-java/wiki
Security and qualityhttps://github.com/asterisk-java/asterisk-java/security
Insightshttps://github.com/asterisk-java/asterisk-java/insights
https://github.com/asterisk-java/asterisk-java
New issuehttps://github.com/login?return_to=https://github.com/asterisk-java/asterisk-java/issues/537
New issuehttps://github.com/login?return_to=https://github.com/asterisk-java/asterisk-java/issues/537
OriginateCallback receives inconsistent callbackshttps://github.com/asterisk-java/asterisk-java/issues/537#top
https://github.com/elijahsmith
elijahsmithhttps://github.com/elijahsmith
on Oct 4, 2023https://github.com/asterisk-java/asterisk-java/issues/537#issue-1926596751
#255https://github.com/asterisk-java/asterisk-java/pull/255
#207https://github.com/asterisk-java/asterisk-java/issues/207
agamezg@7ef4d04https://github.com/agamezg/asterisk-java/commit/7ef4d04c634a924e5d3bdab37f4effdf18e3baf6
#145https://github.com/asterisk-java/asterisk-java/issues/145
asterisk-java.loghttps://github.com/asterisk-java/asterisk-java/files/12805926/asterisk-java.log
piotrooohttps://github.com/piotrooo
Asterisk Java Projecthttps://github.com/orgs/asterisk-java/projects/2
on Nov 19, 2023https://github.com/asterisk-java/asterisk-java/issues/537#event-14884776383
piotrooohttps://github.com/piotrooo
Asterisk Java Projecthttps://github.com/orgs/asterisk-java/projects/2
on Nov 19, 2023https://github.com/asterisk-java/asterisk-java/issues/537
https://github.com/videanuadrian
videanuadrianhttps://github.com/videanuadrian
on Jun 4, 2024https://github.com/asterisk-java/asterisk-java/issues/537#issuecomment-2146847343
https://github.com/seanbright
seanbrighthttps://github.com/seanbright
on Dec 6, 2025https://github.com/asterisk-java/asterisk-java/issues/537#issuecomment-3621095757
Sign up for freehttps://github.com/signup?return_to=https://github.com/asterisk-java/asterisk-java/issues/537
Sign in to commenthttps://github.com/login?return_to=https://github.com/asterisk-java/asterisk-java/issues/537
Asterisk Java Projecthttps://github.com/orgs/asterisk-java/projects/2
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.