github.com/CyCoreSystems/ari@v4.8.4+incompatible/_examples/play/README.md (about) 1 # Examples - Play 2 3 This example ARI application listens for calls coming into the Stasis app 4 "test" and then answers the line, plays a sound to the caller, and hangs up. 5 6 ## Asterisk dialplan 7 8 An example dialplan for extension `100` would be something like this: 9 10 ```asterisk 11 exten = 100,1,Stasis("test") 12 ``` 13 14 ## Asterisk ARI configuration 15 16 In order for the example application to connect with Asterisk, a few settings 17 must be enabled. 18 19 `http.conf` settings: 20 21 ```ini 22 [general] 23 enabled=yes 24 bindaddr=127.0.0.1 25 bindport=8088 26 ``` 27 28 `ari.conf` settings: 29 30 ```ini 31 [general] 32 enabled = yes 33 allowed_origins = * ; tighten this down later 34 35 [admin] 36 type = user 37 read_only = no 38 password_format = crypt 39 password = $6$/ejLut/kmjN6E5.g$tXEeth2SQoVYSs0AG0wWIoB3XRJEqK9vm0JGxQHU7Q/IIR/Ln5Zho40fcPUv1n8jvOJWYMJg0/4fLdJpSB2du1 40 ``` 41 42 **NOTE**: to obtain an encrypted password, you can use the `ari mkpassword` 43 command from Asterisk. In this case, the following was done: 44 45 ``` 46 # asterisk -rx "ari mkpasswd admin" 47 ``` 48 49 ## Runtime 50 51 Now, execute the example application, and it should connect to Asterisk and 52 register the "test" ARI application. 53 54 You may verify that it is registered by running the `ari show apps` Asterisk 55 command: 56 57 ``` 58 # asterisk -rx "ari show apps" 59 ``` 60 61 ## Call 62 63 Now, make a call into your Asterisk box to extension 100, and you should hear 64 the playback (assuming you have the Asterisk extra sounds installed). You 65 should also see the call come in on your application's log. 66 67