Brekeke PBX Wiki

Setting Up Development Environment

If you are using Brekeke PBX v3.2 or later, please use Brekeke PAL Websocket instead of using Brekeke PAL.
The support for the Brekeke PAL will be discontinued in the Brekeke PBX v3.11 or later.

 

Setting Up Development Environment
Step 1
  • Please download Brekeke PAL from here and install it.
  • If you already have Brekeke PAL installed and want to update it, please close all the programs using Brekeke PAL and uninstall Brekeke PAL first.
Step 2
  • Open up Visual Studio and pick any .NET language you want to program in.
  • On the “Toolbox” window, right click on it and select “Choose Items…”. Under “.NET Component” tab click on “Browse” and go to the folder where Brekeke PAL is installed, and select “PAL.dll” file.
  • Now, drag and drop Brekeke PAL control onto the form.
Step 3
  • Brekeke PAL will receive events from Brekeke PBX if a certain user trigger an event. So in the program, we need to have an event handler function for it.
  • But before Brekeke PAL will start receive events, it needs to know which user to monitor. We need to create an array of users and subscribe them to Brekeke PAL by calling subscribeStatus () function.

 

    For VB .NET:
Dim users ("1111", "3333", "5555", "6666") As String
Pal1.subscribeStatus(users(0), users, 60)
    For C#:
string[] users = {"1111", "3333", "5555", "6666"};
Pal1.subscribeStatus(users[0], users, 60);

 

  • Now, Brekeke PAL knows which user to monitor, next we need a function that will handle incoming events.
    For VB .NET:
AddHandler Pal1.notify_status, AddressOf Pal1_notify_status
Private Sub Pal1_notify_status(ByVal user As String, ByVal talkerID As Integer)
...
End Sub
    • OR
Private Sub Pal1_notify_status(ByVal user As String, ByVal talkerID As Integer) Handles Pal1.notify_status
...
End Sub
    For C#:
Pal1.notify_status += new PAL.PAL.notify_statusEventHandler(Pal1_notify_status);
private void Pal1_notify_status(string user, int talkerID)
{
...
}
Yes No
Suggest Edit