Voice SDKs
...
Android SDK Integration
Platform Integration
14 min
platform integration customer api endpoints exotel provides full control to customers to implement call routing business logic for this, customers need to host the following http endpoints to handle callbacks from exotel platform dial whom endpoint host a http endpoint which will be queried by the exotel platform to get to the destination user method get request url (example) https //company com/v1/accounts/exotel/dialtonumber note this url needs to be provided to exotel or configured in the connect applet request body callsid unique call identifier callfrom caller username callto exophone customfield it will be passed only if you have sent the second optional param while making the call from the app expected response on success, the api should return with response code 200 ok the response body should be a string of type sip \<remoteid> “sip ” tag is needed to hint the exotel platform to connect calls over voip at present, sip and pstn intermixing is not supported any other response is treated as failure remoteid is the username with which the call destination subscriber was registered with exotel platform example request get /v1/accounts/exotelip2ipcalling1/dialtonumber?callsid=743ddcf5a0552050bc37b6d0ff9613bn\&callfrom=sip\ alice\&callto=sip 08040408080\&callstatus=ringing\&direction=incoming\&created=sat,+23+nov+2019+22 00 37\&dialcallduration=0\&starttime=2019 11 23+22 00 37\&endtime=1970 01 01+05 30 00\&calltype=call attempt\&dialwhomnumber=\&flow id=249196\&tenant id=113828\&from=sip\ alice\&to=sip 08040408080\¤ttime=2019 11 23+22 00 37 response { "fetch after attempt" false, "destination" { "numbers" \[ "sip 1234567890" ] }, "outgoing phone number" "08080808080", "record" false, "recording channels" "dual", "max ringing duration" 30, "max conversation duration" 3600, "request id" "2e48100e6b474714b1a64bfa9f5b7a55", "method" "get", "http code" 200, "code" null, "error data" null, "status" null } push notification endpoint exotel implements registration less dialing where a user need not periodically register with sip registrar for receiving incoming calls instead the call details are pushed to the device as push notification using which call can be established this method is beneficial as calls will reach the user even when the app is not in foreground or swipe killed it saves battery since it does not need to keep persistent voip connection when idle exotel will provide call data as payload & payloadversion to your push notification endpoint that needs to be pushed to the client device from your application backend refer section receive incoming call for handling of push notification payload note headers are not supported in the notify endpoints method post request url (example) https //\<your api key> \<your api token>@company com/v1/accounts/exotel/pushtoclient note this url needs to be configured in exotel platform request body subscribername name with which subscriber registered with exotel platform payload call data which should be passed to the client sdk payloadversion version of payload scheme expected response on success, the api should return with response code 200 ok any other response is treated as failure exotel api endpoints subscriber management customers can manage their subscribers in the exotel platform using the apis listed “subscriber management api” document for clients to be able to use voip calling features they need to be added as subscribers under your account there are two ways in which your client registration with exotel account happens, pre provisioning the customer pre configures the client accounts even before the app is installed by the client refer to the “subscriber management api” document for details on creating client accounts dynamic provisioning a client account is created after the app is installed by the user and signs up with the application backend refer to authentication and authorization for workflow details once client provisioning happens, clients can be managed using subscriber management apis authentication and authorization access to the exotel platform by exotelvoice is authenticated using a set of bearer tokens subscriber token the application backend must obtain these tokens from the exotel platform and provide them to the client on request refer to the “subscriber management api” document for details on receiving the onauthenticationfailure event, the application should request a new subscriber token from its backend and reinitialize the sdk as shown in section initialize library contact exotel support if you get onauthenticationfailure even after token renewal onauthenticationerror() event provides following error types authentication invalid token token parameters are invalid authentication expired token token expired reference documents android javadoc for the exotelvoice library api subscriber management api document for details on api to manage subscriber support contact please write to hello\@exotel in for any support required with integration troubleshooting guide outgoing call i am not getting any requests on the “dial whom” endpoint for outgoing calls? check if “dial whom” url was configured in connect applet and reachable check if the call is listed in your account dashboard if not, then check if the phone has internet connectivity check if the sip exophone number was set in callcontroller dial() api check if c alllistener oncallfailed() event was received with error type congestion error, which means rate limit quota was exceeded check if calllistener oncallinitiated() event was received from the sdk check if call getcalldetails() returns non null sessionid field check if report the issue to exotel support with sessionid (from app) and call reference id (if available, from account dashboard) i am hearing a ringing tone but the callee has not received the call? ringing tone implies that the call has reached the exotel platform incoming call my calls are not landing on the callee app? check if the call is listed in your account dashboard and dialout happened to the remote subscriber if not then, refer to the troubleshooting guide for outgoing calls check if the application received push notification with call payload from your application backend if not, then check the device oem if xiaomi phones, refer to section problems with push notifications on xiaomi devices check if push notification url is reachable and configured in the exotel platform check if push notification url got the call payload from exotel platform check if the call payload was sent to the target device from your backend if the call notification is received in the app, then check if the library is initialized using exotelvoiceclient isinitialized() check if payload received in push notification was programmed in the library through exotelvoiceclient relaysessiondata() report the issue to exotel support with call reference id (from account dashboard) problems with push notifications on xiaomi devices your application needs to have the following additional permissions in the miui settings page open settings (by tapping the cog icon in the top right corner), select “manage apps”, select “your application” enable “autostart” select “other permissions” turn on “show on lock screen” turn on “display pop up windows while running in the background” select “battery saver” and set “no restrictions” the steps here refer to miui global 11 0 2 on android 7 1 depending on device and software version, designation and location of menu items may differ ringtone not playing while receiving push notifications on xiaomi devices your application needs to have the following additional permissions in the miui settings page open settings (by tapping the cog icon in the top right corner), select “manage apps”, select “your application” go to “notifications” → “notification categories” enable “allow floating notification” for ‘exotel voip sample’ enable “allow floating notification” for ‘io cloudonix sdk foregroundnotificationchannelname’ the steps here refer to miui global 13 0 7 0 on android 12 016 depending on device and software version, designation and location of menu items may differ display not awake display awake is handled from the following permission defined in manifest \<uses permission android\ name="android permission wake lock" /> it has been found that the ringtone is playing but the display is not awake, the above permission can’t handle it properly this can be handled from the application side using powermanager implementation light up screen when notification received android which is not handled in current app code authentication requesting subscriber token from exotel platform giving 4xx response? response code troubleshooting 400 malformed packet check subscriber name format it should be an alphanumeric string of size less than 16 characters 401 it requires basic authentication using api key\ token 403 voip calling is not enabled in your account contact exotel support why is sdk reporting onauthenticationfailure response for a subscriber token received from exotel platform? check the errortype in response if it is, authentication invalid token invalid token initialize new token authentication expired token token expired initialize new token
🤔
Have a question?
Our knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.