Archive for January, 2011

FreeSWITCH + OpenAIS = mod_openais

Example console output:

freeswitch@test01> ais help

ais cluster <show>
ais help

freeswitch@test01> ais cluster show

=======================================================================
Name: 10.0.0.1
 Node ID:                0x100000a
 Node Address:           10.0.0.1
 Node BootTimestamp:     Fri, 13 Aug 2010 15:14:11 GMT
 Node Is Member:         Yes
-----------------------------------------------------------------------
Name: 10.0.0.2
 Node ID:                0x200000a
 Node Address:           10.0.0.2
 Node BootTimestamp:     Mon, 11 Oct 2010 19:21:50 GMT
 Node Is Member:         Yes
=======================================================[  2 node(s) ]==

freeswitch@test01>

Example output of node joining + leaving the cluster:

freeswitch@test01> 2011-01-30 01:31:53.606847 [DEBUG] mod_openais.c:371 CLM event(s) available
2011-01-30 01:31:53.606847 [DEBUG] mod_openais.c:186 clm_cluster_track_cb() called
2011-01-30 01:31:53.606847 [DEBUG] mod_openais.c:192 CLM: Node '10.0.0.2' [ID: 0x200000a, Address: 10.0.0.2], Event: 'Left'

freeswitch@test01> 2011-01-30 01:31:56.803345 [DEBUG] mod_openais.c:371 CLM event(s) available
2011-01-30 01:31:56.804643 [DEBUG] mod_openais.c:186 clm_cluster_track_cb() called
2011-01-30 01:31:56.804643 [DEBUG] mod_openais.c:192 CLM: Node '10.0.0.2' [ID: 0x200000a, Address: 10.0.0.2], Event: 'Joined'

freeswitch@test01>

fs_cli event output (node leaving, still going to rework this a bit):

RECV EVENT
Event-Subclass: OpenAIS-Node-Left
priority: HIGH
Event-Name: CUSTOM
Core-UUID: 86032536-bea5-4a44-87c4-547579b2e4c2
FreeSWITCH-Hostname: test01
FreeSWITCH-IPv4: X.X.X.X
FreeSWITCH-IPv6: ::1
Event-Date-Local: 2011-01-30 01:33:35
Event-Date-GMT: Sun, 30 Jan 2011 00:33:35 GMT
Event-Date-Timestamp: 1296347615442192
Event-Calling-File: mod_openais.c
Event-Calling-Function: clm_send_event
Event-Calling-Line-Number: 152
Node-Name: 10.0.0.2
Node-Address: 10.0.0.2
Node-ID: 0x200000a
Node-BootTimestamp: 1286824910000000000