IRC log for #asterisk-dev on 20160126

00:06.54*** join/#asterisk-dev kharwell (kharwell@nat/digium/x-leefzhmwpvbslgif)
00:34.34gtjosephso i have a review (2072) that is based on another review that i abandoned.  2072 still shows it as related and when I git review -d 2072 it still pulls down the earlier review.  how do i get rid of the earlier one?
00:35.52gtjosephnevermind.  git rebase -i
01:25.57coreyfarrellgtjoseph: still around?
01:26.06gtjosephyep
01:26.53*** part/#asterisk-dev kharwell (kharwell@nat/digium/x-leefzhmwpvbslgif)
01:26.59coreyfarrellif you have some time I'd like to talk to you about some alternatives to some of the plans you have
01:27.19gtjosephgot time now if you do
01:28.19coreyfarrellhow many situations of &ref_to_other_module exist?  the point of this is to ask how much it would take to create accessors like: void *get_ref_to_other_module(void);
01:28.37gtjosephthey'e in pjproject
01:29.31gtjosephi was trying to to make res_pjproject proxy those things
01:29.36gtjosephtrying NOT to
01:29.37coreyfarrellmaybe I don't understand, can you give me an example?
01:29.49gtjosephyep, let me find it
01:30.30gtjosephwcgrep "&pjsip" res
01:32.00coreyfarrellahh I get it
01:32.23gtjosephthey get resolved now because the modules do -lpj -pjsip, etc
01:32.31gtjosephall individually
01:32.47coreyfarrellyup it's not dependent on the module load order htey all link to libpj*
01:33.00gtjosephexactly
01:33.10coreyfarrellso what is actually gained by having a static build instead of having nice scripts to build and install pjproject shared libraries the right way?
01:33.44gtjosephdid you read the email chain? :):)
01:33.59gtjosephi have several beeves
01:34.22coreyfarrellbut I mean if people were using your scripts to build the shared library..
01:34.23gtjoseph1 trying to troubleshoot when you have no idea what the runtime environment looks like
01:34.59gtjosephwe still don't know
01:35.08gtjosephmaybe they didn't use the script
01:35.16gtjosephmaybe they used the distro
01:36.20gtjosephif digium took over pjproject it wouldn't be an issue. :)
01:36.26coreyfarrellthat'll still be the case though.  people can still decide to not use your static build.  if they have an existing libpjproject installed then it would use that anyways.
01:37.10gtjosephtrue and we can say "tough shit" when they request support (very nicely of course)
01:37.57gtjosephgot a segfault and not running the static build?  reproduce it with the static build and we can help
01:39.22coreyfarrellhmm ok.. so for the bundled pjproject build, have you considered creating a a libasteriskpj.so (similar to libasteriskssl.so)?  Instead of linking it into res_pjproject..
01:39.48gtjosephcould do that what's the difference?
01:40.09gtjosephoh, make i tnot a module
01:40.13gtjosephyou mean
01:40.15coreyfarrellyes
01:40.50coreyfarrellsorry module_loadorder.h is a hack.. main/asterisk shouldn't need to know how the modules work to be able to load them
01:41.21gtjosephwhy?  that's like saying systemd or initscripts are a hack
01:41.29gtjosephwe have the info why not use it
01:41.59gtjosephthis gets rid of the GLOBAL_SYMBOLS processing altogether
01:42.29gtjosephthe hack is that we have to dlopen a module twice to get the GLOBAL_SYMBOLS
01:42.30coreyfarrellwon't work for 3rd party modules with globals
01:42.36gtjosephsure it will
01:42.42gtjosephthat's what modules.conf is for
01:43.44gtjosephbesides, what asterisk modules would be dependent on third-party modules?
01:44.19gtjosephthey've still got load_pri to use for sequencing
01:44.33coreyfarrellI'm talking about a group of 3rd party modules.. where one has global exports and the others use those symbols
01:44.43gtjosephyep, load_pri
01:46.11gtjosephif the group has multiple exporters, they HAVE to use modules.conf anyway, even today
01:46.22gtjosephcuz it's BUSTED
01:46.59gtjosephand don't forget, we still use LAZY
01:47.11coreyfarrellI mean: res_module_1 (has exports), res_module_2 (calls exports from res_module_1).  currently those will load in the correct order without load_pri, res_module_1 will load first due to globals
01:48.39gtjosephit still won't matter unless they are referencing function pointers
01:49.50coreyfarrellit does matter if the module_load() of res_module_2 calls the export
01:50.58gtjosephnope because ALL modules are dlopened before any have their 'load' functions run
01:52.52coreyfarrellyou can't assume that the export from res_module_1 is safe to run before the 'load' function of that module is run
01:54.14gtjosephload_pri
01:54.18coreyfarrellthat'
01:54.19gtjosephthat's it's job
01:55.28coreyfarrellthat's a good enough answer for master, but not 13.  currently load_pri is not needed to have the module with exports initialized first.
01:56.15gtjosephwell, i can leave the global processing in to catch those cases.
01:57.06gtjosephthe whole GLOBAL/load_pri thing is overly complex now
01:58.01gtjosephif module writers aren't paying attention to load_pri, then some education is needed
01:59.26gtjosephdo you write third-party modules?  If so, do you do it in-tree or out-of-tree?
01:59.42coreyfarrellwasn't for nothing that I trashed what we currently have and started fresh in my module loader experiment.  really the module loader needs to be explicitly told "module a requires module b".
02:00.23gtjosephquite true.  that's why i'm using the depend and use tags
02:01.02gtjosephi looked at your patch, but it had a LOT of changes that I didn't understand
02:01.59gtjosephor just didn't have the time to delve into. :)
02:02.10coreyfarrellyeah it got a bit out of control.  that patch actually caused 'dlclose' to be run on shutdown, which exposed *A LOT* of shutdown races..
02:02.23gtjoseph:)
02:02.50coreyfarrelldid you have a chance to check out the wiki page?
02:03.00gtjosephi didn't
02:03.20coreyfarrellat this point the patch is stale but the wiki page is not
02:03.25gtjosephi always have a hard time finding stuff on the wiki
02:03.30gtjosephlink?
02:04.06coreyfarrellhttps://wiki.asterisk.org/wiki/display/AST/Module+Loader+Ideas
02:08.01coreyfarrellone difference I want to point out is that main/asterisk would not be compiled to know that res_pjsip requires res_pjproject, res_pjsip.manifest would tell asterisk of the dependency.
02:08.01gtjosephthere's a lot of stuff there
02:08.38gtjosephhow do the manifests get read at runtime?
02:09.14*** join/#asterisk-dev DivideBy0x00 (~DivideBy0@unaffiliated/divideby0x0)
02:09.40coreyfarrellast_config_load2
02:10.26gtjosephand how are they distributed and where do they live?
02:11.02gtjosephalong side the modules?
02:11.30coreyfarrellthat's what the latest patch did..
02:11.57gtjosephand is there a dependency resolver in you patch?
02:12.41gtjosephI.E where does the loader start?
02:13.19coreyfarrellyes.. let me look for it.
02:13.48gtjosephoh, and there are 2 dependecy trees...  one for dlopen and one for running the 'load' function.  they may not be the same
02:14.31gtjosephload-order and initialization-order
02:16.25coreyfarrellactually the load order can be done in initialization order, if you know enough before you load.
02:17.03gtjosephnot necessarily
02:17.30coreyfarrellhow?
02:17.51gtjosephwell, maybe if we scrub the modules so they're not setting stupid load_pri
02:18.24gtjosephwe have cases where the load_pri for an exported is higher than modules that use it
02:18.32gtjosephexporter
02:18.54gtjosephit only works because of globals. :)
02:19.29coreyfarrellcurrently my patch did not reimplement load_pri.  in either case load_pri would be a suggestion where dependencies are a requirement.
02:19.59gtjosephso still, how do you know where to start?
02:20.20coreyfarrellwith modules that don't have any unfulfilled dependencies :)
02:21.27coreyfarrellif you put autoload=no, load=chan_pjsip into your modules.conf, the load of chan_pjsip would force all deps to load
02:22.02coreyfarrellby default it loads in the same order as listed in the manifest which is generated in the same order as the MODULEINFO block of sources.
02:22.50gtjosephbut don't you have to build a single list
02:23.58gtjosephyou basically have to do what make does
02:24.16coreyfarrellnot sure what you mean?
02:24.56gtjosepha needs b, c, d   b needs x, y  y needs m, n, o
02:25.26gtjosephyou need to load m, n, o first
02:25.53coreyfarrelloh, so to go from 'load=a' to knowing that we need: m,n,o,y,x,b,c,d,a ?
02:26.00gtjosephexactly
02:26.21gtjosephactually goiong from 'load everything'
02:26.37coreyfarrellah module_manifest_build_alldeps in module_manifest.c (the end of the file)
02:26.53coreyfarrellat startup it builds a full list of everything needed by each module.
02:27.17gtjosephby each module?
02:27.56coreyfarrellso at runtime the module loader would know that a requires m,n,o,y,x,b,c,d
02:28.06coreyfarrelly needs m, n, o
02:28.20coreyfarrellb needs x, y, m, n, o
02:28.25gtjosephso assuming autoload is yes, you just start with any module
02:28.49gtjosephor is there a master manifest?
02:29.10gtjosephor is that what modules.conf becomes
02:31.02coreyfarrellthere isn't really a master manifest.. modules.conf becomes the place for 'config dependent requirements'.
02:31.20gtjosephso autoload?
02:31.46coreyfarrelllet me look at something again
02:32.21gtjosephi guess if each manifest gets fully resolved, then it doesn't matter where you start
02:33.26coreyfarrellyes but there is one important thing on the TODO list about that.
02:33.51coreyfarrellchan_sip does not have any dependency on format_whatever, but obviously the format needs to be loaded first.
02:33.53gtjosephisn't there always?
02:34.23gtjosephsure, they'd definately need to be cleanup
02:34.35gtjosephon the MODULEINFO structures
02:35.23gtjosephok, so i can go the libastpjproject.so route for 13 and that eliminates the need for messing with the loader for now
02:36.06gtjosephthe next question is...   can you strip down your patch for master to just handling load order as a start?
02:36.36gtjosephi think it's too complex as a single unit
02:37.27gtjoseph<PROTECTED>
02:38.30coreyfarrellit would be really helpful to me if someone would review the concept of the manifest files
02:38.43gtjosephthat i can do
02:39.05gtjosephit looked sane anyway at first glance
02:40.43coreyfarrellwell the manifest files and the modules.conf kind of go together..
02:40.45gtjosephlet me look at it overnight and we can chat more tomorrow
02:41.24coreyfarrellsounds great thanks
02:41.55gtjosephno prob.  i only had a can of soup to eat today, so i'm off for the night. :)
02:42.42coreyfarrellwell get something to eat.. have a good night
05:45.19*** join/#asterisk-dev bof22 (~Thunderbi@185.13.183.107)
05:45.31*** join/#asterisk-dev bof22 (~Thunderbi@185.13.183.107)
07:46.00*** join/#asterisk-dev hehol (~hehol@gatekeeper.loca.net)
08:16.26*** join/#asterisk-dev pchero_work (~pchero@109.70.54.56)
08:20.50*** join/#asterisk-dev tzafrir (~tzafrir@local.xorcom.com)
08:20.50*** mode/#asterisk-dev [+o tzafrir] by ChanServ
08:45.10*** join/#asterisk-dev bof22 (~Thunderbi@185.13.183.107)
12:49.47*** join/#asterisk-dev bof22 (~Thunderbi@185.13.183.107)
12:52.54*** join/#asterisk-dev oej (~oej@195.149.146.45)
12:52.54*** mode/#asterisk-dev [+o oej] by ChanServ
13:15.20*** join/#asterisk-dev [TK]D-Fender (~chatzilla@216-191-106-163.dedicated.allstream.net)
13:24.29*** join/#asterisk-dev mjordan (~mjordan@75.76.55.191)
13:24.29*** mode/#asterisk-dev [+o mjordan] by ChanServ
13:43.16*** join/#asterisk-dev newtonr (RustyNewto@nat/digium/x-oxltklfjvuchnbtm)
13:43.16*** mode/#asterisk-dev [+o newtonr] by ChanServ
14:22.32*** join/#asterisk-dev newtonr (RustyNewto@nat/digium/x-ddtlcqdymwvysysx)
14:22.32*** mode/#asterisk-dev [+o newtonr] by ChanServ
14:38.48*** join/#asterisk-dev goddva (~goddva@2a02:fe0:c510:e300:ae9e:17ff:fe91:a8c9)
15:02.20gtjosephcoreyfarrell: got some feedback on the manifest whenever you have time.
15:02.36*** join/#asterisk-dev w9sh (~sph@c-73-54-187-250.hsd1.ga.comcast.net)
15:03.10fileshould your reviews be held in WIP until you two discuss things further?
15:03.25gtjosephyep, i;m doing that now
15:03.34fileack
15:03.50*** join/#asterisk-dev mjordan (mjordan@nat/digium/x-zubfoycdzkueboph)
15:03.50*** mode/#asterisk-dev [+o mjordan] by ChanServ
15:05.49coreyfarrellgood morning gtjoseph
15:06.02gtjosephgood morning coreyfarrell
15:07.06gtjosephcoreyfarrell: want some feedback now or later in the day?
15:07.19coreyfarrellnow is good
15:07.38gtjosephcool.  i'm looking at the wiki page now...\
15:08.07gtjosephso for module level...   I'd remove the load priority and export globals
15:08.28gtjosephmy thinkingis that the dependency tree shoul dbe the only place to express order
15:09.59coreyfarrellyup I think I agree with removing load priority and that 'optional dependencies' would work better.. like a way to say "if format_wav and chan_sip are being loaded, the format needs to be first".
15:10.26gtjosephwhich prings me to...
15:10.27coreyfarrellthe 'export globals' doesn't actually control load order in this case, it controls the dlopen options
15:10.29gtjosephbrings
15:10.43gtjosephAh
15:11.01gtjosephok, ok
15:11.21gtjosephmaybe rename to dlopen_options
15:12.29gtjosephnow for the dependencies...
15:12.48gtjosephalthough systemd gets a bad rap, i kind of like the concepts
15:12.55coreyfarrellbut the dlopen flags aren't intended to be exposed through the manifest.  just export symbols or don't
15:13.00gtjosephrequired, required-by, wants, wanted-by
15:13.29gtjosephok, i just don't want people to get confused by it's current meaning
15:14.10gtjosephback to the dependencies...
15:14.28gtjosephi ran into an issue yesterday that I think your 'provides' might solve but i wanted to make sure...
15:14.51coreyfarrellI think that would be a documentation issue.. ensure it's clear that order is controlled by deps only
15:15.36gtjosephif your dialplan does an 'include = parkedcalls', pbx.c will barf if res_parking hasn't been loaded yet to ptovide the context.
15:15.43gtjosephcool on the docs
15:16.10newtonrwhat is the yum/dnf equivalent to  apt-file on Debian?
15:16.58gtjosephnewtonr: if apt file tells you what package a file is in, it's 'dnf provides <path>'
15:17.05newtonrgtjoseph, thanks!
15:17.07*** join/#asterisk-dev kharwell (kharwell@nat/digium/x-etiyklojhyxyrzex)
15:18.26gtjosephcoreyfarrell: as you pointed out, there are cases where a core function might want something but can't express it as a depends or uses but the module knows what it provides
15:19.10coreyfarrellgtjoseph: I don't think a module manifest would list a pbx context as a provide.. remember the manifest is for compile-time dependencies, so if 'parkedcalls' is a configurable context that probably wouldn't be a provide.
15:19.21gtjosephi'm just thinking that there are 4 types, 2 hard, 2 soft...   2 i need, 2 i provide
15:19.51gtjosephbu tmaybe it provides 'CONTEXTS'
15:20.12gtjosephor 'DIALPLAN_FUNCTION'
15:20.20*** join/#asterisk-dev putnopvut (putnopvut@asterisk/master-of-queues/mmichelson)
15:20.20*** mode/#asterisk-dev [+o putnopvut] by ChanServ
15:20.45gtjosephthere are probably some pseudo-targets like that
15:20.58gtjosephCODECS , FORMATS,
15:21.07coreyfarrellthough in this case maybe it would be better from pbx_config to 'want' res_parking.  what we were talking about with optional deps where it would set load order but not force res_parking to load.
15:21.09gtjosephor CODEC, FORMAT
15:21.31gtjosephbut in this case, it does need to load
15:21.35gtjosephor the context won't be there
15:21.53coreyfarrellonly if extensions.conf has 'include => parkedcalls'
15:21.57gtjosephplus it's be better to say res_parking is wanteds-by pbx
15:22.32gtjosephtrue but if you use res_parking, then your dialplan m,ust reference it
15:22.37gtjosephor there's no point
15:24.00gtjosephif we do it in pbx_config, then any time a new module provides something, pbx_config has to be updated
15:24.27gtjosephi think it's cleaner if it becomes kind of a well-known target
15:28.33gtjosephThe only other thing I was thinking about was dlopen order vs initialization order.   I'm hoping that with a better expression of the dependency tree, we shoul dbe able to dlopen and initialize at the same time but...
15:28.54coreyfarrellnot sure I follow you on the 'include => parkedcalls'. what do you think should be in the manifests for this?   keep in mind there is no pbx.manifest, manifests are for modules only.
15:29.02gtjosephexactly
15:29.48gtjosephi'm thinking that in res_parking we do a wanted-by pbx, or provides CONTEXT
15:30.06gtjosephor wanted-by pbx_config, etc
15:31.26gtjosephprovides DIALPLAN_FUNCTION, DIALPLAN_APP, CHANNEL, CDR, CEL, TEXT, etc
15:31.32gtjosephTEST
15:31.44coreyfarrellok.. so maybe res_parking is <wantedby type="virtual">dialplan</wantedby> and pbx_config has <provides type="virtual">dialplan</provides>
15:32.11gtjosephah, that  might be cool
15:33.45gtjosephdoe spbx_config provide it or publish or
15:34.04gtjosephactually provides is ok
15:34.19gtjosephit's providing the dialplan
15:35.05gtjosephto we need the virtual on the want, requi ?
15:35.08gtjosephrequire
15:35.17gtjosephmaybe that should be on the provides
15:35.34gtjosephthat way the requiring module doesn't have to know what type it is
15:35.44coreyfarrellwhat do you mean?
15:36.05gtjosephwell, i'm thinking the namespace should be 'global'
15:36.40gtjosepht5ype=virtual should only be specified by the thing that publishes the name
15:37.31gtjoseph./configure could create the default ones for the system capabilities it discovers
15:37.39gtjosephas external
15:39.49coreyfarrellI think the types need to be specified.. nothing stops SHELL from being a function and an application for example.  also if we were to allow <requires> to be specified without type I think type="module" would be the better choice.
15:41.53gtjosephhmmm.
15:42.05coreyfarrellmaking the 'type' attribute optional is also problematic for build_tools/get_module_manifest which is just a gawk script, not an xml reader...
15:42.40gtjosephi've got a network issue i've got to deal with.  can we pick this up in about 30 minutes?
15:42.46coreyfarrelleverything in the manifests are generated from the MODULEINFO and DOCUMENTATION blocks.
15:42.54coreyfarrellgtjoseph: sure talk to you soon
16:22.54*** join/#asterisk-dev rmudgett (rmudgett@nat/digium/x-nysgjervquruuxcm)
16:32.31stefan27chan_sip.c in receive_message() seems to set the variable SIP_RECVADDR on an ast_msg object which seems to be passed to  message.c's msg_route(struct ast_channel *chan, struct ast_msg *msg) which in turn spawns a weird channel c which executes dialplan in the messages context. I want to access the value of SIP_RECVADDR on the spawned channel c through dialplan commands, but I don't seem
16:32.31stefan27able to with any existing dialplan cmds. What makes most sense to patch to make this happen? What is SIP_RECVADDR used for anyways?
16:41.07stefan27not so familiar with the pbx architecture so is it safe to do a combo of ast_msg_get_var(msg, "SIP_RECVADDR") and pbx_builtin_setvar_helper(chan,...) in msg_route before ast_pbx_run_args(chan, &pbx_args) is run? (I'm just trying to get a dirty quickfix running without breaking much)
16:41.50filedoes the MESSAGE_DATA dialplan function not do what you need?
16:43.24stefan27ill check - thanks I might have overlooked that function
16:43.31stefan27I looked at MESSAGE
16:44.37mjordanit's MESSAGE_DATA
16:45.44mjordanyou can access any of the arbitrary key/value pairs set up via that dialplan function
16:46.57stefan27If that's true that's really good, patching complicates maintenance
16:47.58mjordanindeed :-)
16:48.03mjordanlooks for an example
16:48.51mjordanhttp://git.asterisk.org/gitweb/?p=asterisk/testsuite.git;a=blob;f=tests/channels/SIP/message_auth_cust_hdr/configs/ast1/extensions.conf;h=013753be7e659df193abacceff86d926e5bbb8c6;hb=HEAD
16:48.58mjordanYou can even get SIP headers :-)
16:57.53stefan27it worked... thanks a lot
17:06.37stefan27Oh dear, our video+text-enabled asterisk is such a mess. There's so many custom patches and features that are 80% complete
17:13.07*** join/#asterisk-dev w9sh (~sph@c-73-54-187-250.hsd1.ga.comcast.net)
17:15.00stefan27we fetched a bunch of video-aiding patches from the asterisk-video lists but they never made it to trunk so maintenance is nightmare
17:41.08gtjosephcoreyfarrell: back finally.  1 thing i wanted to mention about the xml, it's already parsed from the source files and available in menuselect-tree easy to use any xml tools on it
17:41.45mjordanstefan27: clean em up and contribute them back :-)
17:43.47coreyfarrellgtjoseph: if you have an idea for a better way to implement build build_tools/get_module_manifest I'm open to suggestions
17:44.08gtjosephi'll look
17:45.30coreyfarrellgtjoseph: be aware the patch modifies many MODULEINFO blocks..  some just add new lines, in other cases the tags were changed
17:45.36gtjosephright now i'm using xsltproc to convert menuselect-rett to a makefile.  no reason we can't do the same to create the manifests.
17:45.47gtjosephmenuselect-tree
17:46.57coreyfarrellbe aware get_module_manifest operates on MODULEINFO and DOCUMENTATION sections vs menuselect does not see DOCUMENTATION.
17:47.37gtjosephwhy the need for DOCUMENTATION?
17:49.23coreyfarrellfor the [provides] section.  see https://wiki.asterisk.org/wiki/display/AST/Module+Loader+Ideas#ModuleLoaderIdeas-ExampleManifest that module provides a dialplan function so it's listed in the manifest
17:50.01coreyfarrelltechnically it's not needed for basic module to module dependencies
17:50.55gtjosephi would rather see the documentation process pick the MODULEINFO section up than the dependency process pick up DOCUMENTATION
17:51.04gtjosephrather than
17:51.52coreyfarrellI don't follow
17:52.20gtjosephthings that actually control how asterisk is built or loaded shouldn't be in the DOCUMENTATION section.
17:53.23gtjosephif we're going to actually use something, it should be in one place...MODULEINFO
17:53.51gtjosephthe documentation generate process should pick up MODULEINFO for inclusion in the docs
17:54.38coreyfarrellwell a couple things.  1) menuselect doesn't support one module requiring a dialplan app or function yet.  2) all dependencies must be listed in MODULEINFO.  3) only provides are found in DOCUMENTATION
17:55.24gtjosephmenuselect doesn't have to support it as long as it doesn't barf on it. :)
17:55.55gtjosephstill, if we use MODULEINFO only, then the existing extraction processes work as is
17:57.18coreyfarrellso talking about dialplan functions, the information is already in DOCUMENTATION.. they also have to be listed in the module_load.. I don't think we should require having a 3rd copy of all function names just to make the build process slightly easier.
17:58.25gtjoseph" they also have to be listed in the module_load" ?
17:59.12gtjosephyou mean as part of the register?
18:00.29coreyfarrellyeah so indirectly.. you have to pass the function name through the struct to ast_custom_function..
18:01.13gtjosephok, gotcha.  well we can update which ever extraction process to add the info the menuselect-tree so we have it in 1 central xml document
18:03.10coreyfarrellremember we're generating a separate manifest for each module, so I think operating on a central document is not helpful
18:03.36gtjosephit is to validate the dependencies at build time
18:04.22gtjosephsimple process to xsltproc the single file and produce a manifest for each Mmodule> element (or whatever the tag is)
18:05.30coreyfarrellfair enough.  I never did much work on menuselect.c, I actually modified the scripts that generated menuselect-tree so they filtered out the tags I added (global exports and support level for example)
18:05.51gtjosephmenuselect actually only looks for specific elements
18:06.03gtjosephit ignores anything it doesn't need
18:06.56coreyfarrellI think it warns on things it doesn't need.  otherwise i wouldn't have bothered filtering out the new tags
18:07.19coreyfarrellbut still that's probably an easy issue
18:07.31gtjosephhmmm.  have to look again but your right, easy issue to fix
18:08.01gtjosephenough feedback for now? :)
18:11.39gtjosephso main goal:  1 call to dlopen for any module.  if it fails it's because someone didn't set the tags correctly in MODULEINFO, right?
18:12.37gtjosephno more load order stuff in the AST_MODULE_INFO structure, right?
18:13.39gtjosephuntil someone proves otherwise, the module's "load" function is called directly after the dlopen
18:14.32gtjosephif someone has a reason for load being called in a different order than dlopen, we add a new tag, makbe the systemd-like before and after
18:15.04coreyfarrelleverything added to MODULEINFO was removed from AST_MODULE_INFO (support level, exports globals, load priorities)
18:15.38gtjosephyep, just restating for the chat log and anyone else watching. :)
18:16.19coreyfarrellI'm still trying to get a better handle on how to replace load priorities.
18:16.21gtjosephall other points ok?
18:16.50gtjosephwhat's still troubling?
18:18.05gtjosephfrom everything in the tags we discussed don't we have enough to create a linear list?
18:18.06coreyfarrellwell the module loader needs to understand that cdr_csv is a CDR module and chan_sip is a channel module, and channel modules should be loaded after CDR modules.  but we don't want chan_sip to "require" cdr_csv.
18:18.29gtjosephyep, which is why I mentioned the provides=CDR, etc
18:19.06gtjosephCHANNEL, DIALPLAN_FUNCTION, etc.  well known targets that get loaded at specific times
18:19.54gtjosephchan_sip requires CDR,CEL,BRIDGE
18:19.59gtjosephor whatever
18:20.29gtjosephor even CHANNEL requires CDR,CEL,BRIDGE
18:20.52gtjosephbuilt-in dependencies
18:21.33coreyfarrellyeah I was just thinking maybe we want to have a channel.manifest that would require cdr/cel/bridging..
18:21.45gtjosephexactly
18:22.19gtjosephbasically we're creating systemd unit files. :)
18:22.58gtjosephmaybe we can use libsystemd to do the work.
18:23.05gtjosephi didn't say that
18:23.12coreyfarrelltroublemaker
18:23.43gtjosephseriously, we trying to solve the exact same problem
18:24.26gtjosephactually we could also use libgmake
18:25.51gtjosephmake the manifests make-ish and at runtime concatenate them all and do a 'make all' and let make tell us the order.
18:26.34gtjosephwait, i know.... we just rewrite asterisk in makefile.  yeah, thatg's it.
18:26.52gtjosephi must be low on blood-sugar
18:30.09gtjosephcoreyfarrell: you went really quiet.  Too much?
18:30.42mjordanonly suggestion I have is that when y'all have hammered out the approach you're outlining, make sure something is posted to the -dev list before writing a lot of code :-)
18:30.54mjordanthis sounds rather sweeping :-)
18:31.06filesweeping, far reaching
18:31.14gtjosephyep.   got a timeline for 14 yet
18:32.09filethe future.
18:32.31gtjosephso no proposed freeze dates or anything
18:34.10fileno, but provided stuff is discussed and far enough along... shouldn't be a problem imo
18:34.56*** part/#asterisk-dev w9sh (~sph@c-73-54-187-250.hsd1.ga.comcast.net)
18:35.31coreyfarrellsorry had to walk away for a bit.
18:35.52gtjosephalthough there aren't many source code changes that can't be automated it'd still be good to have it in place early enough that as new stuff goes into master, it ises the new MODULEINFO
18:36.30fileregressions and testing on as many situations and platforms as possible is what I'd want
18:36.37fileer, regression testing
18:37.06gtjosephagreed.
18:37.09coreyfarrellregression testing is what blew up my original review
18:37.45gtjosephi think if we restrict to just the load process, we'd be pretty good.
18:39.16coreyfarrellthe unload process is changed by automatic module to module references.  unload is actually where most regressions surfaced
18:39.55gtjosephhow.
18:40.03gtjosephit's be no worse than it is today
18:42.19coreyfarrellsorry it was a while ago I worked on that part of the code, I just remember having a ton of races during unload.
18:51.40gtjosephcoreyfarrell: i'm off to lunch.  think about how you want to proceed and how we can split up the work.
18:54.09filecoreyfarrell, does this mean your old RFC is deprecated too?
19:04.10*** join/#asterisk-dev tzafrir (~tzafrir@bzq-179-40-172.cust.bezeqint.net)
19:04.10*** mode/#asterisk-dev [+o tzafrir] by ChanServ
19:08.11*** join/#asterisk-dev newtonr (RustyNewto@nat/digium/x-fvcamftoaatlyxzx)
19:08.11*** mode/#asterisk-dev [+o newtonr] by ChanServ
19:30.52coreyfarrellgtjoseph: I think we should start by updating the wiki page or making a new one.
19:38.20dan_jThis has a link labelled 'CDR Consolidation' but the link doesnt work. Please can someone confirm what CDR Consolidation does and if it can be disabled?
19:38.21dan_jhttps://wiki.asterisk.org/wiki/display/AST/Asterisk+12+CDR+Specification
19:45.16mjordaner
19:45.24rmudgettIIRC mjordan gave up on CDR consolidation as being too complex to get right
19:45.34mjordanIt is, although the language there is confusing.
19:46.01mjordanReally, what it is referring to is that when one bridge is merged into another bridge, the CDRs in the bridge that goes away are going to be finalized, and new CDRs generated for all of the newly created channel pairings
19:46.01filemjordan, blame CDRs and not yourself
19:46.13dan_jJust trying to figure out why, at the end of the call, a final CDR is created with the same channel name as the first channel that started the call.
19:46.14mjordanThat's a SUPER rare occurrance.
19:46.33mjordanwhat is your endbeforehexten, and are you using the 'g' option in Dial?
19:47.18dan_jI've not set endbeforehexten to anything, and I'm not using g. Just read through the cdr spec sheet for v12
19:48.42dan_jSorry, just checked my config
19:48.42dan_jendbeforehexten=yes
19:49.21mjordandan_j: What version of 13? I just fixed a bug related to this in the latest release
19:49.36mjordanor rather, fixed the behavior to be a little bit friendlier.
19:49.46dan_jIt's a recent clone
19:49.54mjordanlooks
19:50.21mjordancommit 1087b0c6eda6a2372f923a6cac6dccc865fd438a is where I tweaked it a bit
19:50.37mjordanthat being said, you can think of what happens like this
19:50.48mjordanwhen you have a single channel executing dialplan, that gets a CDR - there's a call in Asterisk.
19:51.10mjordanIf it dials someone, so long as they both go *directly* into a bridge, that results in one CDR. That is, we have a Party A, and a Party B, and life is good.
19:51.26mjordanNote that this doesn't care what *type* of channels you're using. So if you're using Local channels, you'll have two CDRs generally
19:51.44mjordanNow, if when people hang up, you generally should just have the one CDR.
19:51.55mjordanHowever, if either channel starts executing dialplan again, that gets a new CDR.
19:52.12mjordanWe can't "re-use" the existing one, as the act of tearing down the bridge between the Party A and Party B finalizes that record
19:52.57mjordanAnd it *HAS* to finalize that record. There's too much that can happen in Asterisk dialplan to account for both situations, that is, where you want a bridge being finished to signify that the parties are done talking, and where you want to let someone to keep modifying that record.
19:53.33mjordanThe reason why it used to get away with this shenaniganry was due to all the ridiculous exceptions put into the features/channel bridging code in 11 and previous versions, which was an unmaintainable mess that had a lot of subtle bugs that resulted in people losing billing records.
19:54.36dan_jI've got a single channel, which dials a Local channel, so one CDR. Then the Local channel dials a 2nd local channel, so thats two CDR records. Thats fine.  The 2nd dials a 3rd and now theres 3 CDR records. Then the call ends and for some reason a 4th record is added. Interestingly, the 4th record has the first channel for PartyA and the final 4th channel
19:54.36dan_jfor party B. As if it's consolidated everything and created a CDR entry telling me what the final conversation ended up looking like.
19:55.12mjordanI'm going to *guess* that's the bridge merging that happens, if you have local channel optimization on
19:55.27mjordanyou can enable 'cdr set debug on', and it will dump a TON of information about what is happening during the CDR process
19:56.14mjordanif you aren't optimizing local channels, then that would feel like a bug. But when you optimize the local channels, you're allowing Asterisk to collapse the information down to a single pairing of channels, which, from the perspective of the CDR engine, ends up being those two channels.
19:57.12dan_jOk, but when optimizing, the CDR from the original unoptimized channels still get stored?
19:58.36dan_jHow can I search commits to see if/when they've been merged so I can work out if they've already been in an asterisk release?
20:04.47coreyfarrelldan_j: if you have the commit id you can search in gerrit, ex: https://gerrit.asterisk.org/#/q/commit:1087b0c6eda6a2372f923a6cac6dccc865fd438a
20:05.29dan_jThanks
20:05.32coreyfarrellthat's for commits done since git migration anyways.
20:32.58dan_jmjordan: thanks for the help. just pulled the latest code and checked i've got /n on all local channels, now i'm getting more usable CDR records.
21:03.00*** join/#asterisk-dev newtonr (RustyNewto@nat/digium/x-anbblvozauuedvae)
21:03.00*** mode/#asterisk-dev [+o newtonr] by ChanServ
21:14.46*** join/#asterisk-dev newtonr (RustyNewto@nat/digium/x-eigzfoskjllleltc)
21:14.46*** mode/#asterisk-dev [+o newtonr] by ChanServ
21:21.28coreyfarrellfile: I'm confused, in the artifacts for the ref_debug the tests I checked so far still show the res_odbc leak.  But the console log says that res_odbc.so was not built.
21:22.13filethat's... odd
21:24.02*** join/#asterisk-dev mjordan (mjordan@nat/digium/x-malvlqqkohxdgqzs)
21:24.02*** mode/#asterisk-dev [+o mjordan] by ChanServ
21:29.58coreyfarrellhmm just noticed in the console log --- rm: cannot remove `/tmp/asterisk-testsuite': Operation not permitted
21:30.25coreyfarrellalso a few lines later -- warning: failed to remove 'logs/'
21:34.23fileyeah, that's something to be fixed but it shouldn't really be a problem besides nonsense in the output
21:35.01coreyfarrellawesome the artifact download failed (it's 3.6gb)
21:35.17fileoh great
21:38.32gtjosephanyone want a laugh??   I did a make distclean followed by a sudo make uninstall and got this... https://pastebin.com/gEMAy7Ef
21:39.05coreyfarrellah, I just looked in one of the Asterisk log files from the artifact.. it says Jan 23 12:07 but test 7 was yesterday at 2pm
21:42.44coreyfarrellgtjoseph: it deleted your symlinks to usr dirs
21:42.55gtjosephanyone know how to recreate the /usr/lib64->/lib64 symlink using only bash??
21:43.02gtjosephyeah, no shit
21:44.24gtjosephoh well have to reboot i guess.
21:59.57*** join/#asterisk-dev gtjoseph (~gtj0@unaffiliated/gtj)
22:00.21gtjosephwell, i won't be doing THAT again. :)
22:09.44gtjosephOh boy!  Monster savings on Digium Phones!!
22:18.04wdoekesgtjoseph: busybox in /bin/, if you have it
22:18.19wdoekesa bit late now ;)
22:18.24gtjosephdracut shell worked but that's a goot idea.
22:18.47gtjosephi have it installed but didn't think about it
22:29.33*** join/#asterisk-dev [TK]D-Fender (~joe@64.235.216.2)
22:48.55gtjosephso this is weird...  i can't delete a WIP review.  The page you requested was not found, or you do not have permission to view this page.
22:49.56*** join/#asterisk-dev snuff-work (~blatus@203.87.61.22)
22:49.56*** mode/#asterisk-dev [+o snuff-work] by ChanServ

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.