Skip to content

Instantly share code, notes, and snippets.

View rdegges's full-sized avatar

Randall Degges rdegges

View GitHub Profile
from django import forms
class CreateServerForm(forms.Form):
"""
Create a new Server model.
"""
hostname = forms.CharField(
label = 'Server Name',
max_length = 50,
required = False
from django.db import models
class Server(models.Model):
"""
This class represents a physical server.
"""
hostname = models.CharField('Server Name',
help_text = 'Hostname of the server.',
max_length = 50
)
[inbound]
exten => 18182223333,1,Dial(SIP/1000)
[outgoing]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@${GLOBAL(TRUNK)})
[general]
static=yes
writeprotect=no
clearglobalvars=no
[globals]
TRUNK=flowroute
[1000]
type=friend
nat=yes
canreinvite=no
secret=mysecretpassword
qualify=yes
mailbox=1000@default
host=dynamic
dtmfmode=rfc2833
dial=SIP/1000
[root@localhost asterisk]# asterisk -rx 'sip show registry'
Host Username Refresh State Reg.Time
sip.flowroute.com:5060 xxxxxxxx 105 Registered Tue, 02 Mar 2010 09:34:23
1 SIP registrations.
allow=ulaw
allow=g729
register => xxx:[email protected]
[authentication]
[digium-current]
name=CentOS-$releasever - Digium - Current
baseurl=http://packages.digium.com/centos/$releasever/current/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium
[asterisk-current]
name=CentOS-$releasever - Asterisk - Current
baseurl=http://packages.asterisk.org/centos/$releasever/current/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium