{"id":16431244,"url":"https://github.com/wictorwilen/botbuilder-calling-processor","last_synced_at":"2026-02-17T05:01:58.510Z","repository":{"id":44109216,"uuid":"184483890","full_name":"wictorwilen/botbuilder-calling-processor","owner":"wictorwilen","description":"Calling processor for Bot Framework incoming calling webhook","archived":false,"fork":false,"pushed_at":"2022-12-09T21:47:27.000Z","size":140,"stargazers_count":4,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T13:52:52.773Z","etag":null,"topics":["bot-framework","calling","microsoft-teams"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wictorwilen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-01T21:26:10.000Z","updated_at":"2023-08-29T10:31:50.000Z","dependencies_parsed_at":"2023-01-25T17:16:06.233Z","dependency_job_id":null,"html_url":"https://github.com/wictorwilen/botbuilder-calling-processor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wictorwilen/botbuilder-calling-processor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wictorwilen%2Fbotbuilder-calling-processor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wictorwilen%2Fbotbuilder-calling-processor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wictorwilen%2Fbotbuilder-calling-processor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wictorwilen%2Fbotbuilder-calling-processor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wictorwilen","download_url":"https://codeload.github.com/wictorwilen/botbuilder-calling-processor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wictorwilen%2Fbotbuilder-calling-processor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29534447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T05:00:25.817Z","status":"ssl_error","status_checked_at":"2026-02-17T04:57:16.126Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bot-framework","calling","microsoft-teams"],"created_at":"2024-10-11T08:29:31.936Z","updated_at":"2026-02-17T05:01:58.308Z","avatar_url":"https://github.com/wictorwilen.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Calling processor for Bot Framework incoming calling webhook\n\n[![npm version](https://badge.fury.io/js/botbuilder-calling-processors.svg)](https://badge.fury.io/js/botbuilder-calling-processors)\n\n | @master | @preview |\n :--------:|:---------:\n [![Build Status](https://travis-ci.org/wictorwilen/botbuilder-calling-processors.svg?branch=master)](https://travis-ci.org/wictorwilen/botbuilder-calling-processors)|[![Build Status](https://travis-ci.org/wictorwilen/botbuilder-calling-processors.svg?branch=preview)](https://travis-ci.org/wictorwilen/botbuilder-calling-processors)\n\n\n## Sample usage\n\n``` TypeScript\nimport * as _Request from \"request\";\nimport uuidv1 = require(\"uuid/v1\");\nimport { IncomingCallProcessor, IncomingCallProcessorConfig, IncomingCallHandler, call, resultInfo } from \"botbuilder-calling-processor\";\nimport express = require(\"express\");\n\nprivate callProcessor: IncomingCallProcessor;\n@BotCallingWebhook(\"/api/calling\")\npublic async onIncomingCall(req: express.Request, res: express.Response, next: express.NextFunction) {\n    log(\"/api/calling ping\");\n    if (!this.callProcessor) {\n        const handler: IncomingCallHandler = {\n            onIncomingCall: async (resource: string, resourceData: call): Promise\u003cstring\u003e =\u003e {\n                log(\"Incoming call\");\n                return new Promise\u003cstring\u003e(async (resolve, reject) =\u003e {\n                    const token = await getAuthToken();\n                    const clientContext = uuidv1();\n                    _Request({\n                        method: \"POST\",\n                        uri: `https://graph.microsoft.com/beta${resource}/answer`,\n                        headers: {\n                            \"content-type\": \"application/json\",\n                            \"authorization\": `Bearer ${token}`\n                        },\n                        body: JSON.stringify({\n                            callbackUri: `https://${process.env.HOSTNAME}/api/calling`,\n                            acceptedModalities: [\"audio\", \"video\"],\n                            mediaConfig: {\n                                \"@odata.type\": \"#microsoft.graph.serviceHostedMediaConfig\",\n                                \"preFetchMedia\": [\n                                    {\n                                        uri: `https://${process.env.HOSTNAME}/assets/audio1.wav`,\n                                        resourceId: \"1D6DE2D4-CD51-4309-8DAA-70768651088E\"\n                                    }\n                                ] \n                            }\n                        })\n                    }, async (error: any, response: any, body: any) =\u003e {\n                        if (response.statusCode === 202) {\n                            log(`Call answered!`);\n                            resolve(clientContext); \n                        } else {\n                            reject(`Invalid response from Microsoft Graph: ${response.status}`);\n                        }\n                    });\n                });\n            },\n            onCallTerminated: (resource: string, result: resultInfo): Promise\u003cvoid\u003e =\u003e {\n                log(\"Call termindated\");\n                return Promise.resolve();\n            }\n        };\n        this.callProcessor = new IncomingCallProcessor(handler);\n    }\n    this.callProcessor.process(req, res);\n}\n\n## License\n\nCopyright (c) Wictor Wilén. All rights reserved.\n\nLicensed under the MIT license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwictorwilen%2Fbotbuilder-calling-processor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwictorwilen%2Fbotbuilder-calling-processor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwictorwilen%2Fbotbuilder-calling-processor/lists"}