ARI Delayed 183 Due To Device_state Lookup

Home » Asterisk Users » ARI Delayed 183 Due To Device_state Lookup
Asterisk Users 1 Comment

Hi all,

we are searching for shorter post dial delay and we were wondering why the asterisk takes about 190ms from an ARI Command Playback or Answer until the SIP Message is send out.

We took the latest code from github and used the python scripts provided by sangoma in order to start a playback. Using this setup we ensure it is not our setup which causes the delay.

So we see these likes in the log:

[2019-02-20 10:13:50.985] VERBOSE[3079] res_ari.c: <--- Sending ARI response to 127.0.0.1:43764 --->
201 Created Location: /ari/playbacks/a5cb3f78-77db-41f8-9846-147ccb47411d Content-type: application/json
{“id”:”a5cb3f78-77db-41f8-9846-147ccb47411d”,”media_uri”:”sound:tt-monkeys”,”target_uri”:”channel:1550654030.2″,”language”:”en”,”state”:”queued”}

[2019-02-20 10:13:50.987] DEBUG[3079] http.c: HTTP keeping session open. status_code:201
[2019-02-20 10:13:51.178] DEBUG[2900] devicestate.c: No provider found, checking channel drivers for PJSIP – 1111
[2019-02-20 10:13:51.179] DEBUG[2900] devicestate.c: Changing state for PJSIP/1111 – state 3 (Busy)

As you can see the ARI Command gets acknowledged by the 201 response. now the asterisk tries to set the device state to busy. It seems to take about
190ms to lookup the provider before it fails.

In our setup we do not use device states al all. Is there any way to deactivate this internal lookup or to speed it up? We already tried to unload some modules using device state without any success.

One thought on - ARI Delayed 183 Due To Device_state Lookup

  • Hi all,

    does anyone have an idea how to solve this issue?
    As we understand this issue, this state change delays an SIP Session Progress or a 200 OK by about 200ms when using ARI. We did not see this behavior when using Dialplan (or AGI) only.

    would be very appreciated if someone has a hint for us.

    BR
    Jöran