Ability to set codec in MulticastRTP Asterisk channels

Posted on Wed 12 December 2012 in VoIP • Tagged with asterisk, c, code, patch, rtp, VoIPLeave a comment

Here you can find a port for Asterisk trunk (rev. 377802) of this patch: http://lists.digium.com/pipermail/asterisk-dev/2011-September/051262.html.
This patch permits to set the codec of an outgoing multicast RTP stream via the variable MULTICAST_RTP_CODEC:

exten => 999,1,Answer()  
exten => 999,n,Set(MULTICAST_RTP_CODEC=alaw ...
Continue reading

Php sinippet: howto ignore HTTP errors in file_get_contents()

Posted on Fri 04 November 2011 in PHP • Tagged with code, http, phpLeave a comment

A useful snipped of php code:

echo file_get_contents('http://www.example.com/foo.html',\
  FALSE, stream_context_create(array\
  ('http'=>;array('ignore_errors' =>; TRUE))))
Continue reading

Client side result pagination in python-ldap

Posted on Tue 25 October 2011 in Python • Tagged with code, ldap, python, python-ldapLeave a comment

Sometime I must fighting with monkeys-configured LDAP servers.
This time DIT does not support RFC2696 (Paged Results for LDAP query), the data tree contains over 90000 entries.
Thanks to ldap.resiter is possible to implement client side pagination in ldap scripts.
These simple lines of code explain how to:

import ...
Continue reading