{"id":25301732,"url":"https://github.com/wenerme/astgo","last_synced_at":"2025-08-11T00:52:08.466Z","repository":{"id":68214328,"uuid":"101947941","full_name":"wenerme/astgo","owner":"wenerme","description":"Libs for Go to work with Asterisk","archived":false,"fork":false,"pushed_at":"2024-08-15T22:35:26.000Z","size":249,"stargazers_count":45,"open_issues_count":5,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-02T11:46:50.094Z","etag":null,"topics":["agi","ami","asterisk","golang","golang-library","voip"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wenerme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-31T02:01:32.000Z","updated_at":"2025-05-14T01:29:33.000Z","dependencies_parsed_at":"2024-06-19T13:43:17.397Z","dependency_job_id":null,"html_url":"https://github.com/wenerme/astgo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wenerme/astgo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wenerme%2Fastgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wenerme%2Fastgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wenerme%2Fastgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wenerme%2Fastgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wenerme","download_url":"https://codeload.github.com/wenerme/astgo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wenerme%2Fastgo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269814275,"owners_count":24479358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agi","ami","asterisk","golang","golang-library","voip"],"created_at":"2025-02-13T06:48:54.053Z","updated_at":"2025-08-11T00:52:08.339Z","avatar_url":"https://github.com/wenerme.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Asterisk to Go [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov]  [![Go Report Card][report-card-img]][report-card]\n\nLibs for Golang to work with Asterisk\n\n* AMI\n* AGI\n\n[doc-img]: http://img.shields.io/badge/GoDoc-Reference-blue.svg\n[doc]: https://pkg.go.dev/github.com/wenerme/astgo\n\n[ci-img]: https://github.com/wenerme/astgo/actions/workflows/ci.yml/badge.svg\n[ci]: https://github.com/wenerme/astgo/actions/workflows/ci.yml\n\n[cov-img]: https://codecov.io/gh/wenerme/astgo/branch/master/graph/badge.svg\n[cov]: https://codecov.io/gh/wenerme/astgo/branch/master\n\n[report-card-img]: https://goreportcard.com/badge/github.com/wenerme/astgo\n[report-card]: https://goreportcard.com/report/github.com/wenerme/astgo\n\n## AMI\n\n* Async Action\n* Sync Action\n* Event Subscribe\n* Auto Reconnect\n* Generated Action with document\n* Generated Event with document\n* Generated Client - Action -\u003e Response\n\n```go\npackage main\n\nimport (\n  \"context\"\n  \"fmt\"\n  \"github.com/wenerme/astgo/ami\"\n)\n\nfunc main() {\n  boot := make(chan *ami.Message, 1)\n\n  conn, err := ami.Connect(\n    \"192.168.1.1:5038\",\n    ami.WithAuth(\"admin\", \"admin\"), // AMI auth\n    // add predefined subscriber\n    ami.WithSubscribe(ami.SubscribeFullyBootedChanOnce(boot)),\n    ami.WithSubscribe(func(ctx context.Context, msg *ami.Message) bool {\n      fmt.Println(msg.Format()) // log everything\n      return true               // keep subscribe\n    }, ami.SubscribeSend(), // subscribe send message - default recv only\n    ))\n  if err != nil {\n    panic(err)\n  }\n  \u003c-boot\n  // AMI now FullyBooted\n  _ = conn\n}\n```\n\n## AGI\n\n* FastAGI\n* AGI Bin\n* Generated Command\n* Generated Client\n\n```go\npackage main\n\nimport (\n\t\"github.com/wenerme/astgo/agi\"\n)\n\nfunc main() {\n\t// agi.Listen for FastAGI\n\tagi.Run(func(session *agi.Session) {\n\t\tclient := session.Client()\n\t\tclient.Answer()\n\t\tclient.StreamFile(\"activated\", \"#\")\n\t\tclient.SetVariable(\"AGISTATUS\", \"SUCCESS\")\n\t\tclient.Hangup()\n\t})\n}\n```\n\n## Asterisk Database Model\n* GORM Based Model\n\n## Roadmap\n* [-] Asterisk Database Model\n* [ ] Stasis\n* [ ] ARI\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwenerme%2Fastgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwenerme%2Fastgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwenerme%2Fastgo/lists"}