Ok, here is my script (it wasn't a AGI-script), a really really short
one. It doesn't give any information back to asterisk, because i didn't
need that information. But this should be _really_ easy to implement
into a real AGI-script.
You will need python and the simpleosc lib from
http://www.ixi-software.net/content/body_backyard_osc.html



extensions.conf:

[default]
exten => 5599,1,Set(TIMEOUT(response)=300)
exten => 5599,2,Set(TIMEOUT(digit)=300)
exten => 5599,3,Answer()
exten => 5599,4,Read(digit,beep,1)
exten => 5599,5,System(/path/to/osc.py 127.0.0.1 10000 ${digit}) ; HOST,
PORT, VALUE
exten => 5599,6,Goto(4)
exten => 5599,7,Hangup



The digit is sent to the /sip message.

In Pd you would use something like:
[dumpOSC 10000]
 |
[OSCroute /sip]
 |
[print]
#!/usr/bin/python
# 
#This is public domain


import sys, osc

osc.init()

osc.sendMsg("/sip",[int(sys.argv[3])],sys.argv[1],int(sys.argv[2]))
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to