Skip to content

Instantly share code, notes, and snippets.

View rdegges's full-sized avatar

Randall Degges rdegges

View GitHub Profile
from django_consultants.views import *
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^$', main_page),
# Login / logout.
(r'^login/$', 'django.contrib.auth.views.login'),
(r'^logout/$', logout_page),
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Randall Degges', '[email protected]'),
)
MANAGERS = ADMINS
rdegges@cora:~/code$ django-admin.py startproject django_consultants
rdegges@cora:~/code$ ls django_consultants/
__init__.py manage.py settings.py urls.py
rdegges@cora:~/code$ cd django_consultants/
rdegges@cora:~/code/django_consultants$
rdegges@cora:~/code/django_consultants$ python manage.py syncdbCreating table auth_permission
Creating table auth_group
Creating table auth_user
Creating table auth_message
Creating table django_content_type
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_request: hello-world.sh
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_channel: SIP/flowroute-ac10d3c8
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_language: en
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_type: SIP
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_uniqueid: 1266365654.10672
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_version: 1.6.1.1
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_callerid: <removed>
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_calleridname: unknown
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_callingpres: 0
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_callingani2: 0
; This dial plan code passes all call processing to the call-processor.sh
; shell script with command line arguments.
[incoming]
exten => _X.,1,AGI(call-processor.sh,arg1,arg2,arg3,...,arg127)
[Feb 16 19:14:15] ERROR[25770]: utils.c:1126 ast_carefulwrite: write()
returned error: Broken pipe
[Feb 16 19:14:15] ERROR[25770]: utils.c:1126 ast_carefulwrite: write()
returned error: Broken pipe
#!/bin/bash
echo "ANSWER"
echo "NOOP hello, world!"
echo "HANGUP"
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_request: hello-world.sh
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_channel: SIP/flowroute-ac10d3c8
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_language: en
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_type: SIP
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_uniqueid: 1266365654.10672
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_version: 1.6.1.1
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_callerid: <removed>
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_calleridname: unknown
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_callingpres: 0
<SIP/flowroute-ac10d3c8>AGI Tx >> agi_callingani2: 0
; This dial plan code passes all call processing to the call-processor.sh
; shell script.
[incoming]
exten => _X.,1,AGI(call-processor.sh)
/*
* Code hijacked and modified from: http://devdaily.com/java/edu/pj/pj010016/
*/
import java.io.*;
public class JavaRunCommand {
public static void main(String args[]) {