Code

Remember to clear your browser cache before downloading :)

GUI code (Perl for quagga)

monitor (Perl. Can be used with Asterisk, GnuGK, Cisco (you can use Cisco for CO-BGP instead of quagga), Yate. Can be easily extended.)

monitorcobgp (TCL, can be run by Embedded Event Manager (EEM)) Cisco TCL/EEM mini-howto (older version monitor)

CHF code (Perl. The code implements the lookup function and the “glue” to make it work with Asterisk.) Note: You must also have the monitor script (the previous bullet) running with subroutine write_plaintext. It will populate an intermediate CO-table (at the moment a plain text file “COtable.txt”, you can easily make it use a database also). The CHF will use the intermediate table instead of the CO-BGP table directly (Option 6).

CHF code (C. Implements the lookup function, as well as Asterisk FastAGI “bindings”.). Note: You must also have the monitor script (the previous bullet) running with subroutine write_plaintext. It will populate an intermediate CO-table (at the moment a plain text file “COtable.txt”, you can easily make it use a database also). The CHF will use the intermediate table instead of the CO-BGP table directly.

Convert an IPv6 prefix to a telephony prefix (and vice versa; Perl)

Configuration

Asterisk (tested in Linux Debian 6.0)

sip.conf

h323.conf

extensions.conf

modules.conf

GnuGK (tested in Linux Debian 6.0)

See guidelines in the comments of the monitor code (above subroutine write_gnugk).

Yate (tested in Linux Debian 6.0)

See guidelines from the monitor code (above subroutine write_yate).

Cisco ISR 2921

Cisco ISR BGP configuration. NOTE: In this configuration the CO-BGP neighbor (in this example 10.10.5.12) and the “normal” eBGP neighbor (10.63.0.2) are handled from the same router. In other words, no dedicated “CO-BGP router” is needed.

Cisco ISR voice configuration example.

Quagga

Debian (in this example configuration, CO-BGP and the “normal” BGP are handled from the same process):

/etc/quagga/bgpd.conf

/etc/network/interfaces

/etc/quagga/debian.conf

/etc/quagga/zebra.conf

CentOS: Same as with Debian.

Note that no IPv4 networks are advertised to CO-BGP neighbor (10.10.0.12), and no IPv6 networks to CL-BGP neighbor (10.63.0.1):

# vtysh -c 'show ip bgp neighbors 10.63.0.1 advertised-routes' > 10.10.5.0/24 10.63.0.2 0 32768 i # vtysh -c 'show ipv6 bgp neighbors 10.63.0.1 advertised-routes' % No such neighbor or address family # vtysh -c 'show ip bgp neighbors 10.10.0.12 advertised-routes' # vtysh -c 'show ipv6 bgp neighbors 10.10.0.12 advertised-routes' *&gt; 2001:db8:941:215::/64 2001:db8::10:10:5:12 0 32768 i

(Scipts, configuration and documentation by Visa Holopainen -2013)