Skip to content

Instantly share code, notes, and snippets.

View rdegges's full-sized avatar

Randall Degges rdegges

View GitHub Profile
#!/usr/bin/python
"""
pyannoy.py
@author: Randall Degges
@email: rdegges@gmail.com
@date: 1-15-2010
@license: GPLv3 (http://www.gnu.org/licenses/gpl-3.0.txt)
rdegges@cora:~/code$ ./pyannoy.py 18882223333 5
Placing call... 0 to 18882223333 using caller ID 13237589975 and playing soundfile hello-world at 2010-01-16 02:09:06.285090
Placing call... 1 to 18882223333 using caller ID 14944527639 and playing soundfile hello-world at 2010-01-16 02:10:06
Placing call... 2 to 18882223333 using caller ID 16170548852 and playing soundfile hello-world at 2010-01-16 02:11:06
Placing call... 3 to 18882223333 using caller ID 18298520261 and playing soundfile hello-world at 2010-01-16 02:12:06
Placing call... 4 to 18882223333 using caller ID 16292306101 and playing soundfile hello-world at 2010-01-16 02:13:06
rdegges@cora:~/code$ ls -la /var/spool/asterisk/outgoing/
total 28
drwxr-xr-x 2 rdegges rdegges 4096 2010-01-16 02:09 .
/*
* Code hijacked and modified from: http://devdaily.com/java/edu/pj/pj010016/
*/
import java.io.*;
public class JavaRunCommand {
public static void main(String args[]) {
; This dial plan code passes all call processing to the call-processor.sh
; shell script.
[incoming]
exten => _X.,1,AGI(call-processor.sh)
<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
#!/bin/bash
echo "ANSWER"
echo "NOOP hello, world!"
echo "HANGUP"
[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
; 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)
<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
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