[Serusers] Question on How Start MEDIAPROXY.

Bryan Jackson bryan-ser at pipemedia.net
Wed Feb 9 14:45:25 CET 2005


Ricardo

I had the same problem and here is the fix.

In mediaproxy.py and proxydispatcher.py change anything that says from
"optparse import OptionParser" to  "from optik import OptionParser" and
make sure you have the optik module for python installed.

optparse is only available in python2.3

$> diff mediaproxy.py.old /etc/ser/mediaproxy/mediaproxy.py

21c21
<     from optparse import OptionParser
---
>     from optik import OptionParser

$> diff proxydispatcher.py.old /etc/ser/mediaproxy/proxydispatcher.py

35c35
<     from optparse import OptionParser
---
>     from optik import OptionParser

Ricardo Martinez wrote:

>Hello list.
>	I have a question on How to Start Mediaproxy server.  When i start
>mediaproxy from the console i obtain the following error:
>
>[root at sipproxy mediaproxy]# ./mediaproxy.py                  
>  File "./mediaproxy.py", line 84
>    print >>sys.stderr, "Mediaproxy error: %s. Exiting." % why
>           ^
>SyntaxError: invalid syntax
>
>however i have installed Python2.3 
>[root at sipproxy mediaproxy]# python
>python     python1.5  python2    python2.2  python2.3  
>
>When i start mediaproxy with the next lines it works ok : 
>
>[root at sipproxy mediaproxy]# python2.3 mediaproxy.py
>
>So i made a test and i started mediaproxy with the original python.
>
>[root at sipproxy mediaproxy]# python mediaproxy.py     
>  File "mediaproxy.py", line 84
>    print >>sys.stderr, "Mediaproxy error: %s. Exiting." % why
>           ^
>SyntaxError: invalid syntax
>
>And i obtained the same initial error.
>My question is : Is there a way to force mediaproxy to start with the
>pyhton2.3? and therefore make mediaproxy start with %./mediaproxy.py and
>pyhton2.3
>
>Hope that someone can help me here.
>
>  
>





More information about the sr-users mailing list