From c6b64b214af224e3416cc1d302bea472d847cebf Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Tue, 23 Jun 2015 14:07:37 +0200 Subject: [PATCH] evapi: more documentation for exported functions (cherry picked from commit 96225847ddfc2f879d63adbc0117748c9cf76f02) --- modules/evapi/doc/evapi_admin.xml | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/modules/evapi/doc/evapi_admin.xml b/modules/evapi/doc/evapi_admin.xml index ef2e34a2902..574adefae17 100644 --- a/modules/evapi/doc/evapi_admin.xml +++ b/modules/evapi/doc/evapi_admin.xml @@ -131,8 +131,18 @@ modparam("evapi", "netstring_format", 0) evapi_relay(evdata) - Relay the event data give as parameter to connected applications. - The format on the network is netstring with evdata payload. + Relay the event data given as parameter to connected applications. + + + The format on the network is netstring with evdata payload if + netstring_format parameter is set to 1 or bare evdata if + netstring_format parameter is set to 0. + + + The function is passing the task to evapi dispatcher process, therefore + the SIP worker process is not blocked. Also, it doesn't wait for any + response, therefore the processing of the configuration continues + very fast when executing evapi_relay(). This function can be used from ANY_ROUTE. @@ -166,10 +176,17 @@ evapi_relay("{ \"event\": \"test\",\n \"data\": { \"fU\": \"$fU\" }\n}"); evapi_async_relay(evdata) - Relay the event data give as parameter to connected applications. - The format on the network is netstring with evdata payload. Before + Relay the event data given as parameter to connected applications. Before evaluating the parameter, the request processing is suspended using - tm module. + tm module (using the t_suspend()/t_continue() framework). The routing + of the SIP request can be continued once event_route[evapi:message-received] + is triggered. After evapi_async_relay() returns true, no relaying should + happen in request_route(), it should be followed by exit;. + + + The format on the network is netstring with evdata payload if + netstring_format parameter is set to 1 or bare evdata if + netstring_format parameter is set to 0. This function can be used from REQUEST_ROUTE.