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]