Skip to content

Instantly share code, notes, and snippets.

View sboily's full-sized avatar
❤️
Wazo

Sylvain Boily sboily

❤️
Wazo
View GitHub Profile
@sboily
sboily / Asterisk Stasis AMQP
Last active August 12, 2019 18:04 — forked from nballas-wazo/Examples
Documentation for Stasis + RabbitMQ Event Forwarding
Dialplan:
-------------------------------------------------
For an application named 'bar'
exten = 6001,1,NoOp()
same = n,Answer()
same = n,Stasis(bar) ; this will generate events which will be forwarded to stasis (websocket or AMQP)
same = n,Hangup()
REST API:
{% macro form_field(field) -%}
{% set with_label = kwargs.pop('with_label', False) %}
{% set placeholder = '' %}
{% if not with_label %}
{% set placeholder = field.label.text %}
{% endif %}
<div class="control-group {% if field.errors %}error{% endif %}">
{% if with_label %}
<label for="{{ field.id }}" class="control-label">
{{ field.label.text }}{% if field.flags.required %} *{% endif %}: