Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add metadata property to createCall api #163

Open
davehorton opened this issue May 6, 2023 · 9 comments
Open

add metadata property to createCall api #163

davehorton opened this issue May 6, 2023 · 9 comments
Assignees

Comments

@davehorton
Copy link
Contributor

Add support for an optional metadata property to createCall. If provided, 'metadata' should be an object and this data should then be provided in the call_hook for the new call

{
    "application_sid": "0d27aee6-d1e6-4707-bdde-1cc20b50ca88",
    "from": "15083728399",
    "to": {
        "type": "phone",
        "number": "15082084809"
    },
   "metadata": {
      "customer": "acme",
      "referenceId: "deadbeef"
   }
}
@davehorton
Copy link
Contributor Author

This will of course require changes in jambonz-feature-server as well (and possibly verb-specifications?)

@vdharashive
Copy link

This Metadata also should be available in call status hook too

@davehorton
Copy link
Contributor Author

it should probably just be treated as tag data, which does appear in the call status hook

@xquanluu
Copy link
Contributor

xquanluu commented May 6, 2023

in current version of api-server, it forward what ever it received from user to feature server,
For me no need to do change on api-server. Start working on feature server to send these data to hook and call status hook

@davehorton
Copy link
Contributor Author

yes but should swagger be updated?

@xquanluu
Copy link
Contributor

xquanluu commented May 7, 2023

Hi @davehorton @vdharashive
I have small question, tag is already supported in create call API, why do we need to have metadata?

@davehorton
Copy link
Contributor Author

is tag already supported? I forgot that....if so, then we don't need metadata. Can you show how it is used @xquanluu ?

@xquanluu
Copy link
Contributor

xquanluu commented May 7, 2023

Hi @davehorton
Here:
https://github.com/jambonz/jambonz-feature-server/blob/main/lib/http-routes/api/create-call.js#L130

https://github.com/jambonz/jambonz-feature-server/blob/main/lib/http-routes/api/create-call.js#L196

So that in create-call REST API body, just include:
"tag": {
"customer": "acme",
"referenceId: "deadbeef"
}

Then the customerData object will be sent to call_hook and call_status_hook.

@xquanluu
Copy link
Contributor

xquanluu commented May 7, 2023

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

No branches or pull requests

3 participants