[asterisk-dev] ast_safe_system() from within chan_sip.c

Scott Griepentrog sgriepentrog at digium.com
Mon Feb 22 10:28:39 CST 2016


​> unsuccessful register count

Why not use the security event logging system instead?  Would be easier
than modifying chan_sip, and less prone to introducing undesired side
affects by inserting a system call.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+Security+Framework
 ​

On Mon, Feb 22, 2016 at 10:06 AM, Pedro Guillem [e-Mediate] <pg at e-mediate.co
> wrote:

> Hi Folks
>
> I haven´t used C in a decade so i´m kind of rusty, but I understand the
> advanced basics of it.
>
>
>
> I know there is a function called ast_safe_system() declared on asterisk.c
> used to perform system calls.
>
> I need chan_sip.c to call a local program each time a registration is
> unsuccessful.
>
>
>
> I know the exact line of chan_sip.c where I can trigger this system call,
> but I don´t know if I can use ast_safe_system()  from within a function of
> chan_sip.c.
>
>
>
> Any ideas?
>
> Should I include an additional header files to chan_sip.c in order to call
> this function?
>
>
>
> Best
>
> Pedro
>
>
>
> PS: Yeah.. most of you will probably ask why on earth would I want to do
> that..
>
> Quick answer is I don´t want to modify chan_sip.c that much in order to do
> something like keeping an unsuccessful register count… so i´d rather
> delegate that to a third party script
>
>
>
>
>
>
>
>
>
> Este correo electrónico se ha enviado desde un equipo libre de virus y
> protegido por Avast.
> www.avast.com <https://www.avast.com/sig-email>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>



-- 
[image: Digium logo]
Scott Griepentrog
Digium, Inc · Software Developer
445 Jan Davis Drive NW · Huntsville, AL 35806 · US
direct/fax: +1 256 428 6239 · mobile: +1 256 580 6090
Check us out at: http://digium.com · http://asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20160222/b27272fc/attachment-0001.html>


More information about the asterisk-dev mailing list