<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="font-family: Times; font-size: 16px; "><b><div>Ruud, will your suggestion on the odd version fix be making it to the 2.0.4 release?</div><div><br></div><div>Cheers</div><div><br></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; font-weight: normal; "><div>_____________________________</div><div><br></div><div>Darren Sessions</div><div><a href="mailto:dmsessions@gmail.com">dmsessions@gmail.com</a></div><div><a href="http://www.darrensessions.com">http://www.darrensessions.com</a></div><div><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="line-height: 14px; white-space: pre-wrap; ">_____________________________</span></font></div></span></div><div><br></div><div><br></div><div><br></div><div><br></div>Ruud Klaver</b> <a href="mailto:users%40lists.opensips.org?Subject=%5BOpenSIPS-Users%5D%20Problems%20with%20mediaproxy%202.0.3%20over%20opensuse%0A%0911.0&In-Reply-To=c5347fe10808241952s1387d45am137a591554b47c1b%40mail.gmail.com" title="[OpenSIPS-Users] Problems with mediaproxy 2.0.3 over opensuse        11.0">ruud at ag-projects.com </a><br><i>Mon Aug 25 13:28:27 CEST 2008</i></span><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><blockquote type="cite"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Times; font-size: 16px; "><pre>Hi Ivan,
On 25 Aug 2008, at 04:52, Ivan Medeiros wrote:
><i> Hello everyone.
</i>><i>
</i>><i> I had been problem to use the mediaproxy 2.0.3 over opensuse 11.0. I
</i>><i> had got error both media-relay and media-dispatcher.
</i>><i>
</i>><i> The media-dispatcher error had been following:
</i>><i>
</i>><i> # ./media-dispatcher --no-fork
</i>><i> Starting MediaProxy Dispatcher 2.0.3
</i>><i> Twisted is using epollreactor
</i>><i> failed to create MediaProxy Dispatcher: ASN1 parser: Element was not
</i>><i> found.
</i>><i> Traceback (most recent call last):
</i>><i> --- <exception caught here> ---
</i>><i> File "./media-dispatcher", line 52, in <module>
</i>><i> dispatcher = Dispatcher()
</i>><i> File "/usr/local/src/mediaproxy-2.0.3/mediaproxy/dispatcher.py",
</i>><i> line 413, in __init__
</i>><i> self.cred = X509Credentials(cert_name='dispatcher')
</i>><i> File "/usr/local/src/mediaproxy-2.0.3/mediaproxy/tls.py", line
</i>><i> 132, in __init__
</i>><i> twisted.X509Credentials.__init__(self, self.X509cert,
</i>><i> self.X509key, [self.X509ca], [self.X509crl])
</i>><i> File "/usr/local/src/mediaproxy-2.0.3/mediaproxy/tls.py", line 99,
</i>><i> in __get__
</i>><i> return descriptor.get()
</i>><i> File "/usr/local/src/mediaproxy-2.0.3/mediaproxy/tls.py", line 82,
</i>><i> in get
</i>><i> self.object = self.klass(f.read())
</i>><i> File "<string>", line 1, in __init__
</i>><i>
</i>><i> File "/usr/lib/python2.5/site-packages/gnutls/validators.py", line
</i>><i> 273, in check_args
</i>><i> return func(*func_args)
</i>><i> File "/usr/lib/python2.5/site-packages/gnutls/crypto.py", line 70,
</i>><i> in __init__
</i>><i> gnutls_x509_crt_init(byref(self._c_object))
</i>><i> File "/usr/lib/python2.5/site-packages/gnutls/library/errors.py",
</i>><i> line 61, in _check_status
</i>><i> raise GNUTLSError(ErrorMessage(retcode))
</i>><i> gnutls.errors.GNUTLSError: ASN1 parser: Element was not found.
</i>><i>
</i>><i>
</i>><i> After spend some time tracing the execution and making gnutls
</i>><i> samples I perceived that the media-dispatcher does not call the
</i>><i> function gnutls_global_init. Thus, the gnutls_x509_crt_init can't
</i>><i> find the "PKIX1.Certificate" because the _gnutls_get_pkix () returns
</i>><i> nil. In order to solve this problem I added the follows lines on
</i>><i> mediaproxy/dispatcher.py:
</i>><i>
</i>><i> 23,24c24
</i>><i> > from gnutls.library.functions import gnutls_global_init
</i>><i> 412d411
</i>><i> > gnutls_global_init()
</i>
Indeed, gnutls_global_init() should be called, but not from here. In
python-gnutls there is a Python C extension module called
_gnutls_init. This module will call gnutls_global_init when it is
loaded.
Are you sure you compiled this file before installing python-gnutls?
You can execute "python setup.py install" to install python-gnutls
globally or "./build_inplace" to compile this file in the local
directory.
><i> The media-relay error had been following:
</i>><i>
</i>><i> # ./media-relay --no-fork
</i>><i> Starting MediaProxy Relay 2.0.3
</i>><i> Set resource limit for maximum open file descriptors to 11000
</i>><i> failed to create MediaProxy Relay: Could not determine Linux kernel
</i>><i> version
</i>><i>
</i>><i> This problem was easier to solve, and it is happen because the
</i>><i> format of the file /proc/sys/kernel/osrelease may be different
</i>><i> across the linux distributions. eg. 2.6.25.XX and not 2.6.25-XX
</i>><i> To solve it, I apply the following patch on mediaproxy/relay.py
</i>><i>
</i>><i> 286c286,289
</i>><i> < major, minor, revision = [int(num) for num in
</i>><i> open(KERNEL_VERSION_FILE).read().split("-", 1)[0].split(".")]
</i>><i> ---
</i>><i> > kernel_version =
</i>><i> open(KERNEL_VERSION_FILE).read().split("-", 1)[0].split(".")
</i>><i> > major = kernel_version[0]
</i>><i> > minor = kernel_version[1]
</i>><i> > revision = kernel_version[2]
</i>
This is not a fix at all, all you did was avoid the conversion from
strings to integers. If you want to make sure this statement works
with a weirdly named kernel such as yours, you could change it to the
following:
major, minor, revision = [int(num) for num in open("/proc/sys/kernel/
osrelease").read().split("-", 1)[0].split(".", 4)[:3]]
Ruud Klaver
AG Projects</pre></span></blockquote></div><div><br></div></span></div></span></div></span></div></span></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>