[asterisk-bugs] [JIRA] (ASTERISK-25463) Starting Asterisk with ARI module started but sorcery not causes pain

Dan Jenkins (JIRA) noreply at issues.asterisk.org
Fri Oct 30 17:26:33 CDT 2015


    [ https://issues.asterisk.org/jira/browse/ASTERISK-25463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=228071#comment-228071 ] 

Dan Jenkins commented on ASTERISK-25463:
----------------------------------------

Sorry it's taken me a while to get back to you about this

So I put debug and verbose up to 10 and here are the results with these lines commented out in modules.conf

{code}
;load => res_stasis.so
;load => res_stasis_answer.so
;load => res_stasis_device_state.so
;load => res_stasis_playback.so
;load => res_stasis_recording.so
;load => res_stasis_snoop.so
{code}

Here is the result of ari show status

{code}
*CLI> ari show status
ARI Status:
Enabled: Yes
Output format: pretty
Auth realm: Asterisk REST Interface
Allowed Origins: 192.168.99.100:32700,192.168.99.100:8088
User count: 1
{code}

So you can see that the ari module is loaded. (here are the lines in modules.conf)

{code}
load => res_ari.so
load => res_ari_applications.so
load => res_ari_asterisk.so
load => res_ari_bridges.so
load => res_ari_channels.so
load => res_ari_device_states.so
load => res_ari_endpoints.so
load => res_ari_events.so
load => res_ari_mailboxes.so
load => res_ari_model.so
load => res_ari_playbacks.so
load => res_ari_recordings.so
load => res_ari_sounds.so
{code}

{code}
*CLI> module show like ari
Module                         Description                              Use Count  Status      Support Level
res_ari.so                     Asterisk RESTful Interface               0          Running              core
res_ari_model.so               ARI Model validators                     0          Running              core
2 modules loaded
{code}

Here are the results of doing a call to /ari/asterisk/info which relies on nothing other than the stasis module being enabled.

{code}
[Oct 30 22:13:42] Asterisk Ready.
*CLI> HTTP opening session.  Top level
HTTP Request URI is /ari/asterisk/info
match request [ari/asterisk/info] with handler [httpstatus] len 10
match request [ari/asterisk/info] with handler [static] len 6
match request [ari/asterisk/info] with handler [ari] len 3
Match made with [ari]
Finding handler for asterisk
  Handler not found
Examining ARI response:
404 Not Found
Content-type: application/json

{
  "message": "Resource not found"
}
HTTP keeping session open.  status_code:404
Worker thread idle timeout reached. Dying.
Destroying worker thread 4
Worker thread idle timeout reached. Dying.
Destroying worker thread 3
Worker thread idle timeout reached. Dying.
Worker thread idle timeout reached. Dying.
Destroying worker thread 2
Destroying worker thread 1
Worker thread idle timeout reached. Dying.
Destroying worker thread 0

*CLI>
*CLI> TCP timeout reading data
HTTP idle timeout or peer closed connection.
HTTP closing session.  Top level
{code}

The resulting JSON is 

{code}
{
message: "Resource not found"
}
{code}

With a status code of 404

> Starting Asterisk with ARI module started but sorcery not causes pain
> ---------------------------------------------------------------------
>
>                 Key: ASTERISK-25463
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25463
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_ari
>    Affects Versions: 13.6.0
>            Reporter: Dan Jenkins
>            Assignee: Rusty Newton
>
> I had an issue where I was including modules in modules.conf but I had forgotten to enable sorcery. I included the ari resources and so I was able to hit the API itself and it replied but would always return a 404. On the cli, ari show status would say everything was OK but without sorcery everything doesn't work. Should we not allow the ARI to start if sorcery isn't enabled?
> Sorry about the shortness of this issue and the lack of specific detail; filing while at Astricon so it gets recorded. Please let me know if you need any more information.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list