Documentation |
Documentation.Interface-Binary HistoryHide minor edits - Show changes to output July 21, 2015, at 11:59 AM
by
- Changed lines 1-53 from:
!!!!!Documentation -> [[Documentation.Manuals|Manuals]] -> [[Documentation.Manual|Manual devel]] -> Binary Internal Interface (:title Binary Internal Interface - devel :) ---- [- Page for other versions: devel 1.9 1.8 old versions: 1.7 1.6 1.5 1.4 -] \\ || %color=#185662%[+'''Binary Internal Interface devel'''+]%% || ||[[Interface-CoreStatistics|Prev]] || ---- The '''Binary Internal Interface''' is an OpenSIPS core interface which offers an efficient way for communication between individual OpenSIPS instances. This is especially useful in scenarios where realtime data (such as dialogs) cannot be simply stored in a database anymore, because failover would require entire minutes to complete. This issue can be solved with the new internal binary interface by replicating all the events related to the runtime data (creation / updating / deletion) to a backup OpenSIPS instance. ---- !!!! Configuring the Binary Internal Interface listeners In order to send or listen for Binary Packets, an interface must be specified using the ''bin_listen'' global script parameter. The number of listener processes can be tuned with the optional ''bin_children'' (default: 1) [@ bin_listen = 10.0.0.150:5062 bin_children = 2 @] Currently, the only module to make use of the interface is the '''dialog''' module, which can now replicate all dialog-related events to one or more OpenSIPS instances. Configuration can be done as follows: [@ modparam("dialog", "accept_replicated_dialogs", 1) modparam("dialog", "replicate_dialogs_to", "78.46.64.50:5062") @] More details can be found in the [[http://www.opensips.org/html/docs/modules/devel/dialog.html|documentation page]] of the module. ---- !!!! C Interface Overview (for module developers) The interface allows the module writer to build and send compact '''Binary Packets''' in an intuitive way. In order to '''send packets''' the interface provides the following primitives: * ''int bin_init(str *mod_name, int packet_type)'' - begins the contruction of a new Binary Packet * ''int bin_push_str(const str *info)'' - add a string to the Binary Packet that is currently being built * ''int bin_push_int(int info)'' - add an integer to the Binary Packet that is currently being built * ''int bin_send(union sockaddr_union *dest)'' - sends the Binary Packet to a given destination over UDP \\ In order to '''receive packets''', a module must first register a callback function to the interface: * int bin_register_cb(char *mod_name, void (*)(int packet_type)) \\ Each time the callback is triggered, the information can be retrieved in the same order it was written using: * int bin_pop_str(str *info) - retrieve a string from a received Binary Packet * int bin_pop_int(void *info) - retrive an integer from a received Binary Packet to:
(:redirect Documentation.Interface-Binary-2-2 quiet=1:) July 30, 2013, at 10:27 AM
by
- Changed line 17 from:
In order to send or listen for Binary Packets, an interface must be specific using the ''bin_listen'' global script parameter. The number of listener processes can be tuned with the optional ''bin_children'' (default: 1) to:
In order to send or listen for Binary Packets, an interface must be specified using the ''bin_listen'' global script parameter. The number of listener processes can be tuned with the optional ''bin_children'' (default: 1) July 30, 2013, at 10:27 AM
by
- Changed lines 17-18 from:
In order to send or listen for Binary Packets, a interface must be specific using the ''bin_listen'' global script parameter. The number of listener processes can be tuned with the optional ''bin_children'' (default: 1) to:
In order to send or listen for Binary Packets, an interface must be specific using the ''bin_listen'' global script parameter. The number of listener processes can be tuned with the optional ''bin_children'' (default: 1) Changed line 28 from:
modparam("dialog", "replicate_dialogs_to", "192.168.2.102:5062") to:
modparam("dialog", "replicate_dialogs_to", "78.46.64.50:5062") July 29, 2013, at 07:19 PM
by
- Changed line 39 from:
* ''int bin_register_cb(char *mod_name, void (*)(int packet_type))'' - begins the contruction of a new Binary Packet to:
* ''int bin_init(str *mod_name, int packet_type)'' - begins the contruction of a new Binary Packet July 29, 2013, at 07:18 PM
by
- Changed line 15 from:
!!!! Configuring the Binary Internal Interface to:
!!!! Configuring the Binary Internal Interface listeners July 29, 2013, at 07:17 PM
by
- Changed lines 36-45 from:
The interface allows the module writer to build and send compact '''Binary Packets''' in an intuitive way. This can be done using the following functions: * ''bin_init'' - begins the contruction of a new Binary Packet * ''bin_push_{str, int}'' - add information to the Binary Packet that is currently being built * ''bin_send'' - sends the Binary Packet to a given destination over UDP Individual modules can register to the interface using: * ''bin_register_cb'' When packets are received, the module-specific callback functions are triggered. Information can now be retrieved with: * ''bin_pop_{str, int}'' - extract information from a received Info Packet in the same order it was written to:
The interface allows the module writer to build and send compact '''Binary Packets''' in an intuitive way. In order to '''send packets''' the interface provides the following primitives: * ''int bin_register_cb(char *mod_name, void (*)(int packet_type))'' - begins the contruction of a new Binary Packet * ''int bin_push_str(const str *info)'' - add a string to the Binary Packet that is currently being built * ''int bin_push_int(int info)'' - add an integer to the Binary Packet that is currently being built * ''int bin_send(union sockaddr_union *dest)'' - sends the Binary Packet to a given destination over UDP \\ In order to '''receive packets''', a module must first register a callback function to the interface: * int bin_register_cb(char *mod_name, void (*)(int packet_type)) \\ Each time the callback is triggered, the information can be retrieved in the same order it was written using: * int bin_pop_str(str *info) - retrieve a string from a received Binary Packet * int bin_pop_int(void *info) - retrive an integer from a received Binary Packet July 29, 2013, at 07:09 PM
by
- Changed line 34 from:
!!!! C Interface Overview to:
!!!! C Interface Overview (for module developers) July 29, 2013, at 07:09 PM
by
- Changed lines 15-18 from:
!!!! Usage In order to define an UDP listening interface for incoming Binary Packets, the ''bin_listen'' global script parameter must be defined. The number of listener processes can be increased with the optional ''bin_children'' (default: 1) to:
!!!! Configuring the Binary Internal Interface In order to send or listen for Binary Packets, a interface must be specific using the ''bin_listen'' global script parameter. The number of listener processes can be tuned with the optional ''bin_children'' (default: 1) Changed line 34 from:
!!!! Overview to:
!!!! C Interface Overview July 29, 2013, at 06:58 PM
by
- Deleted line 13:
Deleted lines 14-27:
!!!! Overview The interface allows the module writer to build and send compact '''Binary Packets''' in an intuitive way. This can be done using the following functions: * ''bin_init'' - begins the contruction of a new Binary Packet * ''bin_push_{str, int}'' - add information to the Binary Packet that is currently being built * ''bin_send'' - sends the Binary Packet to a given destination over UDP Individual modules can register to the interface using: * ''bin_register_cb'' When packets are received, the module-specific callback functions are triggered. Information can now be retrieved with: * ''bin_pop_{str, int}'' - extract information from a received Info Packet in the same order it was written ---- Changed lines 17-18 from:
In order to listen for incoming Binary Packets, the ''bin_listen'' global script parameter must be defined. The number of listener processes can be increased with the optional ''bin_children'' (default: 1) to:
In order to define an UDP listening interface for incoming Binary Packets, the ''bin_listen'' global script parameter must be defined. The number of listener processes can be increased with the optional ''bin_children'' (default: 1) Changed lines 24-45 from:
Currently, the only module to make use of the interface is the '''dialog''' module, which can now replicate all dialog-related events to one or more OpenSIPS instances. to:
Currently, the only module to make use of the interface is the '''dialog''' module, which can now replicate all dialog-related events to one or more OpenSIPS instances. Configuration can be done as follows: [@ modparam("dialog", "accept_replicated_dialogs", 1) modparam("dialog", "replicate_dialogs_to", "192.168.2.102:5062") @] More details can be found in the [[http://www.opensips.org/html/docs/modules/devel/dialog.html|documentation page]] of the module. ---- !!!! Overview The interface allows the module writer to build and send compact '''Binary Packets''' in an intuitive way. This can be done using the following functions: * ''bin_init'' - begins the contruction of a new Binary Packet * ''bin_push_{str, int}'' - add information to the Binary Packet that is currently being built * ''bin_send'' - sends the Binary Packet to a given destination over UDP Individual modules can register to the interface using: * ''bin_register_cb'' When packets are received, the module-specific callback functions are triggered. Information can now be retrieved with: * ''bin_pop_{str, int}'' - extract information from a received Info Packet in the same order it was written July 29, 2013, at 04:40 PM
by
- Changed line 32 from:
In order to listen for incoming Binary Packets, the ''bin_listen'' global script parameter must be defined. Moreover, the number of listener processes can be increased with the optional ''bin_children'' (default: 1) to:
In order to listen for incoming Binary Packets, the ''bin_listen'' global script parameter must be defined. The number of listener processes can be increased with the optional ''bin_children'' (default: 1) July 29, 2013, at 02:38 PM
by
- Changed lines 32-33 from:
In order to listen for incoming Binary Packets, the following global script parameters must be configured: to:
In order to listen for incoming Binary Packets, the ''bin_listen'' global script parameter must be defined. Moreover, the number of listener processes can be increased with the optional ''bin_children'' (default: 1) Changed line 36 from:
bin_children = 2 # optional to:
bin_children = 2 July 29, 2013, at 01:50 PM
by
- Changed line 13 from:
The '''Binary Internal Interface''' is an OpenSIPS core interface which offers an efficient way for communication between individual OpenSIPS instances. This is especially useful in scenarios where realtime data (such as dialogs) cannot be simply stored in a database anymore, because failover would require entire minutes to complete. This issue can be solved with the Binary Interface by replicating all the events related to the runtime data (creation / updating / deletion) to a backup OpenSIPS instance. to:
The '''Binary Internal Interface''' is an OpenSIPS core interface which offers an efficient way for communication between individual OpenSIPS instances. This is especially useful in scenarios where realtime data (such as dialogs) cannot be simply stored in a database anymore, because failover would require entire minutes to complete. This issue can be solved with the new internal binary interface by replicating all the events related to the runtime data (creation / updating / deletion) to a backup OpenSIPS instance. July 29, 2013, at 01:48 PM
by
- Changed line 13 from:
The '''Binary Interface''' is an OpenSIPS core interface which offers an efficient way for communication between individual OpenSIPS instances. This is especially useful in scenarios where realtime data (such as dialogs) cannot be simply stored in a database anymore, because failover would require entire minutes to complete. This issue can be solved with the Binary Interface by replicating all the events related to the runtime data (creation / updating / deletion) to a backup OpenSIPS instance. to:
The '''Binary Internal Interface''' is an OpenSIPS core interface which offers an efficient way for communication between individual OpenSIPS instances. This is especially useful in scenarios where realtime data (such as dialogs) cannot be simply stored in a database anymore, because failover would require entire minutes to complete. This issue can be solved with the Binary Interface by replicating all the events related to the runtime data (creation / updating / deletion) to a backup OpenSIPS instance. July 29, 2013, at 01:48 PM
by
- Changed lines 1-2 from:
!!!!!Documentation -> [[Documentation.Manuals|Manuals]] -> [[Documentation.Manual|Manual devel]] -> Binary Interface (:title Binary Interface - devel :) to:
!!!!!Documentation -> [[Documentation.Manuals|Manuals]] -> [[Documentation.Manual|Manual devel]] -> Binary Internal Interface (:title Binary Internal Interface - devel :) Changed line 8 from:
|| %color=#185662%[+'''Binary Interface devel'''+]%% || to:
|| %color=#185662%[+'''Binary Internal Interface devel'''+]%% || July 29, 2013, at 01:40 PM
by
- Changed line 36 from:
bin_children = 2 # optional to:
bin_children = 2 # optional July 29, 2013, at 01:40 PM
by - July 29, 2013, at 01:38 PM
by
- Changed line 24 from:
* ''register_bin_cb'' to:
* ''bin_register_cb'' July 29, 2013, at 01:38 PM
by
- Changed line 27 from:
* ''info_packet_pop_{str, int}'' - extract information from a received Info Packet in the same order it was written to:
* ''bin_pop_{str, int}'' - extract information from a received Info Packet in the same order it was written July 29, 2013, at 01:37 PM
by
- Changed line 18 from:
The interface allows the module writer to build compact '''Binary Packets''' in an intuitive way. It exports the following functions: to:
The interface allows the module writer to build and send compact '''Binary Packets''' in an intuitive way. This can be done using the following functions: Changed lines 22-23 from:
* ''bin_pop_{str, int}'' - extract information from a received Binary Packet in the same order it was written to:
Individual modules can register to the interface using: * ''register_bin_cb'' When packets are received, the module-specific callback functions are triggered. Information can now be retrieved with: * ''info_packet_pop_{str, int}'' - extract information from a received Info Packet in the same order it was written Changed line 39 from:
Currently, the only module to make use of the interface is the '''dialog''' module, which can now replicate all dialog-related events to one or more OpenSIPS instances. to:
Currently, the only module to make use of the interface is the '''dialog''' module, which can now replicate all dialog-related events to one or more OpenSIPS instances. July 29, 2013, at 01:31 PM
by
- Added lines 1-34:
!!!!!Documentation -> [[Documentation.Manuals|Manuals]] -> [[Documentation.Manual|Manual devel]] -> Binary Interface (:title Binary Interface - devel :) ---- [- Page for other versions: devel 1.9 1.8 old versions: 1.7 1.6 1.5 1.4 -] \\ || %color=#185662%[+'''Binary Interface devel'''+]%% || ||[[Interface-CoreStatistics|Prev]] || ---- The '''Binary Interface''' is an OpenSIPS core interface which offers an efficient way for communication between individual OpenSIPS instances. This is especially useful in scenarios where realtime data (such as dialogs) cannot be simply stored in a database anymore, because failover would require entire minutes to complete. This issue can be solved with the Binary Interface by replicating all the events related to the runtime data (creation / updating / deletion) to a backup OpenSIPS instance. ---- !!!! Overview The interface allows the module writer to build compact '''Binary Packets''' in an intuitive way. It exports the following functions: * ''bin_init'' - begins the contruction of a new Binary Packet * ''bin_push_{str, int}'' - add information to the Binary Packet that is currently being built * ''bin_send'' - sends the Binary Packet to a given destination over UDP * ''bin_pop_{str, int}'' - extract information from a received Binary Packet in the same order it was written ---- !!!! Usage In order to listen for incoming Binary Packets, the following global script parameters must be configured: [@ bin_listen = 10.0.0.150:5062 bin_children = 2 # optional @] Currently, the only module to make use of the interface is the '''dialog''' module, which can now replicate all dialog-related events to one or more OpenSIPS instances. |