Skip to main content

You'd better Wait()

..raw:: html

Sometimes just mindlessly browsing though the online CLI help will teach you something:

<pre> asterisk*CLI>show application wait asterisk*CLI>

System Message: ERROR/3 (<string>, line 7)

Unexpected indentation.

-= Info about application 'Wait' =-

[Synopsis]: Waits for some time

[Description]:

Wait(seconds): Waits for a specified number of seconds, then returns 0.

System Message: WARNING/2 (<string>, line 14)

Definition list ends without a blank line; unexpected unindent.

seconds can be passed with fractions of a second. (eg: 1.5 = 1.5 seconds)

asterisk*CLI> </pre>

So far I'd never seen an example which used franctions of a second. I've been wanting to do something about that, because waiting for a whole second is often way too long. Fortunately Wait() already has the functionality I needed.