Skip to content

Instantly share code, notes, and snippets.

@andrius
Last active September 30, 2019 12:17
Show Gist options
  • Save andrius/bce51f8be4323a9dda234ebe2d51befc to your computer and use it in GitHub Desktop.
Save andrius/bce51f8be4323a9dda234ebe2d51befc to your computer and use it in GitHub Desktop.
Loopback SIP calls with Asterisk PBX

Loopback SIP call with Asterisk

Reason

I need it for testing of new AMI/AGI/ARI library with crystal-lang;

Demo

asciicast

version: "3.7"
services:
asterisk:
image: andrius/asterisk
volumes:
- ./sip.conf:/etc/asterisk/sip.conf
[general]
;outboundproxy=kamailio.ip.or.hostname:5060
port=5060
bindaddr=0.0.0.0
udpbindaddr=0.0.0.0:5060
tcpenable=yes
tcpbindaddr=0.0.0.0:5060
transport=udp,tcp
language=en
context=default
allowguest=yes
dtmfmode=rfc2833
qualify=5000
nat=force_rport,comedia
disallow=all
allow=g722
allow=alaw
allow=ulaw
icesupport=no
dicrectmedia=no
directrtpsetup=no
videosupport=no
localnet=172.17.0.0/255.255.255.0 ; Docker network
localnet=172.18.0.0/255.255.255.0 ; Docker network
localnet=169.254.0.0/255.255.0.0 ; Zero conf local network
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment