Hi Paul,
o Schroeder, Paul [05/30/08 17:40]:
> Hi stefan,
> 
> that´s cool, but it do not solve my problem. I want to start a function on 
> the pythonserver with php. To start something on a phpserver with php and to 
> start something on a pythonserver with python i managed already, but i´am 
> unable or to stupid to put this things together.
can you elaborate a bit on what you are trying to do? what is the php 
server doing, what is the python server doing? are you using sems ivr 
python ?

I understood your original question such that you wanted to call a 
function in a call in sems from a php website (like in webconference - 
php webserver controlling calls in sems by xmlrpc).


Stefan

> 
> paul
> 
> -----Ursprüngliche Nachricht-----
> Von: Stefan Sayer [mailto:[EMAIL PROTECTED] 
> Gesendet: Freitag, 30. Mai 2008 00:47
> An: Schroeder, Paul
> Cc: [EMAIL PROTECTED]
> Betreff: Re: [Semsdev] xml-rpc
> 
> 
> 
> o Schroeder, Paul [05/29/08 19:03]:
>> Hello,
>>
>> i want to activate a pythonfunction via xml-rpc from a phpsite, how can i do 
>> this?
> you can either modify xmlrpc2di module to expose functions from ivr scripts, 
> or you can simply use python xmlrpc server and start it as extra thread when 
> the script is compiled using ivr.createThread, like this
> 
> from SimpleXMLRPCServer import *
> 
> class MyServer(SimpleXMLRPCServer):
>    ...
>    def _dispatch(self, method, params):
>                  try:
>                          func = getattr(self, 'export_' + method)
>                  except AttributeError:
>                          raise Exception('method "%s" is not supported' 
> % method)
>                  else:
>                          return func(*params) ###### exported functions:
>     def export_ping(self):
>                  return [1]
> 
> server = MyServer((listen_addr, listen_port)) class run_obj:
>       def run(self):
>               debug("running server...")
>                  server.serve_forever()
> 
> t = run_obj()
> ivr.createThread(t)
> 
> the funny thing is that you can call properties from the server when your 
> call is running, e.g.:
> 
> class IvrDialog(IvrDialogBase):
>        ...
>      def onSessionStart(self, hdrs):
>                  ...
>                  server.some_func(self.dialog.callid)
> 
> hth
> Stefan
>> paul
>> _______________________________________________
>> Semsdev mailing list
>> [email protected]
>> http://lists.iptel.org/mailman/listinfo/semsdev
> 
> --
> Stefan Sayer
> VoIP Services
> 
> [EMAIL PROTECTED]
> www.iptego.com
> 
> iptego GmbH
> Am Borsigturm 40
> 13507 Berlin
> Germany
> 
> Amtsgericht Charlottenburg, HRB 101010
> Geschaeftsfuehrer: Alexander Hoffmann
> _______________________________________________
> Semsdev mailing list
> [email protected]
> http://lists.iptel.org/mailman/listinfo/semsdev

-- 
Stefan Sayer
VoIP Services

[EMAIL PROTECTED]
www.iptego.com

iptego GmbH
Am Borsigturm 40
13507 Berlin
Germany

Amtsgericht Charlottenburg, HRB 101010
Geschaeftsfuehrer: Alexander Hoffmann
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to