Ahmed | 2019-03-21 11:02:54 UTC | #1
my call not initialized and nor ringing when using /api/v2/conversations/calls/
We use angularjs queue service component to chain these api calls Note: this is a psuedo-code
$q((resolve, reject) => { client.loginImplicitGrant(clientId, redirectUri, state) .then(() => usersApi.getUsersMe()()) .then(selfData => { userData = selfData; return notificationsApi.postNotificationsChannels(); }) .then(channel => { notificationsApi.putNotificationsChannelSubscriptions(userData, channel) }) .then(() => { // Invoke API return conversationsApi.postConversationsCalls(conversationBody); }) .then(data => { this.pccallId = data.id; resolve(data); }) .catch(err => { reject(err); }); }); REQUEST BODY for putNotificationsChannelSubscriptions
subscriptionBody = [{"id":<user id>}] example
subscriptionBody = [{"id":"v2.users.fa2651e5-acf9-4bea-83fa-ce6980a70a04.conversations"}] for postConversationsCalls
conversationBody = {"phoneNumber":<phoneNumber>} or even
conversationBody = {"phoneNumber":"tel:<phoneNumber>"} example
conversationBody = {"phoneNumber":"801097789937"} RESPONSE for postNotificationsChannels
200 response = { "connectUri":"wss://carrier-pigeon.eu-west-1.mypurecloud.ie/v1/channels/8rsnpol3hao3u8tveam7fmrq65", "id":"8rsnpol3hao3u8tveam7fmrq65", "expires":"2019-03-14T13:12:38.043Z" } for putNotificationsChannelSubscriptions note: it takes the previous channel response id in its end-point as follows /api/v2/notifications/channels/8rsnpol3hao3u8tveam7fmrq65/subscriptions
200 response= { "entities":[{"id":"v2.users.fa2651e5-acf9-4bea-83fa-ce6980a70a04.conversations"}] } for postConversationsCalls example
202 response = { "id":"3f40827f-d9e8-4018-96c6-ea12dc2673df", "selfUri":"/api/v2/conversations/calls/3f40827f-d9e8-4018-96c6-ea12dc2673df" }
tim.smith | 2019-03-21 14:06:28 UTC | #2
A couple things to check:
- If using a WebRTC station, see step 2 under Configure the PureCloud WebRTC phone settings
- Make sure you can place calls using the standard PureCloud UI. If you can't do it there, the API isn't going to work either. That would point to a configuration issue in your org.
After checking those things, if you're still having an issue, please open a case with PureCloud Care to investigate as the API is behaving properly.
system | 2019-04-21 14:06:30 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 4837