[OpenSIPS-Devel] Patch Review - Accept Variables in acc_*_request comment field for acc module

Ryan Bullock rrb3942 at gmail.com
Tue Feb 21 01:06:58 CET 2012


This patch adds support for variables in the acc_*_request function
for the acc module.

Example:

$avp(test) = "Some comment";
$avp(mycode) = "404";

acc_log_request("$avp(mycode) $avp(test)");

This will show up in the logs with the sip_code  of 404 and a comment
of 'Some comment';

This patch also inputs the default sip reason string if just an error
code is supplied.

Example:

acc_log_request("480");

This will show up in the logs with the sip_code of 480 and the comment
of 'Temporarily Unavailable';

I will also update the documentation for the module to include
examples with sip codes, but would like someone to review this patch
first and ensure I am not doing anything stupid (I don't know C very
well).

Thanks!

Regards,

Ryan Bullock
-------------- next part --------------
A non-text attachment was scrubbed...
Name: acc_request_pvar.patch
Type: text/x-diff
Size: 6817 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/devel/attachments/20120220/71eb2c0a/attachment-0001.patch>


More information about the Devel mailing list