Here it is
http://www.youtube.com/watch?v=vCNoAyKN86o
You have to put a script in
/var/lib/asterisk/agi-bin
my script
#!/usr/bin/python
import sys
import os
from xmlrpclib import ServerProxy
env = {}
tests = 0
while 1:
line = sys.stdin.readline().strip()
if line == '':
break
key,data = line.split(':')
if key[:10] == 'agi_arg_1':
temp=data.strip()
server=ServerProxy('http://192.168.1.132:8000/Cantina/default/call/xmlrpc')
server.add(temp)
***************************
Then call it from extensions.conf like this
exten => 700,1,Answer()
same => n,Read(TMP,vm-enter-num-to-call,1,,1,3)
same => n,AGI(myscript.py,${TMP})
same => n,Hangup()
Then the rest is web2py tornado and Websockets like Bruno explains in an
excellent tutorial
2012/6/14 villas <[email protected]>
> Yes, it would be very interesting to see a code example -- thanks!
>
>
>
> On Thursday, June 14, 2012 12:49:16 PM UTC+1, mweissen wrote:
>>
>> I am working with Asterisk and it would be very interesting for me to see
>> a connection with web2by.
>> Am 14.06.2012 13:46 schrieb "António Ramos" <[email protected]>:
>>
>>> Hello does anyone knows about Asterisk Open source PBX?
>>>
>>> I have a working example with Web2py.
>>> Its fantastic.
>>>
>>>
>>>