[asterisk-dev] -netsec sip_destroy_hook annoyance, libmidcom proposed change

Matthew Rubenstein email at mattruby.com
Sun Dec 3 00:16:10 MST 2006


	Other than a strict diff, is there any way to see how the netsec
version of Asterisk is different from the main release? And will netsec
run without the Ranch HW, or without any special HW on a straight
Asterisk/SIP/IAX box?

	I'm interested in some of the netsec features, and maybe cross-porting
them to 1.4, but none of the ones that use the Ranch or other HW.


On Sat, 2006-12-02 at 23:01 -0700, asterisk-dev-request at lists.digium.com
wrote:
> Date: Sat, 2 Dec 2006 15:52:09 -0500 (EST)
> From: Peter Beckman <beckman at purplecow.com>
> Subject: [asterisk-dev] -netsec sip_destroy_hook
> annoyance,     libmidcom
>         proposed change
> To: asterisk-dev at lists.digium.com
> Message-ID: <20061202152127.H52176 at thermonuclear.org>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
> 
> I'm going to be using a Ranch Networks box in front of asterisk, which
> requires -netsec and libmidcom.  I'm building and testing the asterisk
> boxes without the Ranch boxes to make sure they work first.
> 
> I disabled midcom in the midcom.conf by putting "midcomnat = no" while
> it
> was not needed; it was preventing calls from going through since no
> firewall existed between it and the net.
> 
> Now I get these messages every few seconds:
> 
>      Dec  2 15:23:38 ERROR[12890]: res_netsec.c:1058
> midcom__sip_destroy_hook: Midcom: Module not enabled
>      Midcom: Module currently disabled
> 
> and I've reviewed the code and understand why.  (Disabled the first by
> commenting out the "console=>" line in logger.conf, a hack but
> suppressed
> 'em).
> 
> I'm wondering if one of the following changes would be acceptable:
> 
>      1. Allow a config var in midcom.conf to specify
> "iknowitsdisabled=yes" so
>         if midcom is disabled, and you know it is, and you don't need
> to be
>         reminded all the time, you can shut off the "midcom disabled"
>         messages.  Defaults to "no".
> 
>      2. Check in chan_sip.c to see if midcom is enabled, and if not,
> don't
>         try to destroy the hook in midcom.
> 
>      3. Change the log level of the message, and set the verbosity of
> the
>         ast_verbose call higher.
> 
> >From tags/1.2.13-netsec/channels/chan_sip.c:
> 
>      2150 #ifdef SIP_MIDCOM
>      2151     if (m_cb)
>      2152       m_cb->__sip_destroy_hook(p);
>      2153 #endif
> 
> >From libmidcom/trunk/res_netsec.c
> 
>      602   if (!midcom_enabled) {
>      603     ast_log(LOG_ERROR, "Midcom: Module not enabled\n");
>      604     if (option_verbose > 1)
>      605       ast_verbose("Midcom: Module currently disabled\n");
>      606     return 1;
>      607   }
> 
> I realize that I could set the verbosity at or below 1, but then the
> other
> things I'm watching for won't be displayed either.
> 
> Beckman
> ---------------------------------------------------------------------------
> Peter Beckman
> Internet Guy
> beckman at purplecow.com
> http://www.purplecow.com/ 
-- 

(C) Matthew Rubenstein



More information about the asterisk-dev mailing list