This module provides access to json-rpc services (operating over TCP/Netstrings). This module uses t_suspend() and t_continue() from the TM module. Note that after invoking an asynchronous operation, the processing will continue later, in another application process. Therefore, do not rely on variables stored in private memory, use shared memory if you want to get values after the processing is resumed (e.g., $shv(...) or htable $sht(...)).
| Parámetro | Tipo | Descripción |
|---|---|---|
| servers | string | 3.2. max_conn_attempts (int) |
| max_conn_attempts | int | 3.1. servers (string) |
| servers | string | The servers providing the remote jsonrpc service. Format is "host1:port1,priority1 host2:port2,priority2". Requests to servers of the same priority will be distributed evenly (round robin). Server gro |
| max_conn_attempts | int | Max number of connection attempts for a server. -1 will keep reconnecting forever, 0 will skip any attempt to reconnect. |
4.2. jsonrpc_request(method, parameters, return_route, error_route, result_var)
4.1. jsonrpc_notification(method, parameters)
Invokes the remote 'method' with the given 'parameters' as a notification. Unlike jsonrpc_request (below), notifications do not receive a response. Script processing continues in the usual fashion as soon as the notification has been sent.
Invokes the remote 'method' with the given 'parameters'. When the response is received, continues processing of the SIP request with the route[return_route]. If a timeout occurs, no servers can be reached, or a jsonrpc error message is received, cont
Copyright © 2011 Flowroute LLC (flowroute.com)