IRC log for #asterisk-dev on 20200220

10:04.59*** join/#asterisk-dev infobot (ibot@c-174-52-60-165.hsd1.ut.comcast.net)
10:04.59*** topic/#asterisk-dev is Take the March 2019 Asterisk User Survey! https://goo.gl/forms/xL1VUHRsf95saly13 -- Asterisk Development Discussion -=- http://www.asterisk.org/developers -=- Tier 2 and 3.14159265 support is in #asterisk -=- Check out our blog! blogs.asterisk.org -=- Follow on Twitter at @AsteriskDev
10:23.29*** join/#asterisk-dev jkroon_ (~jkroon@41.113.104.109)
11:36.44*** join/#asterisk-dev DanJenkins[m] (dannimblea@gateway/shell/matrix.org/x-lcmzxllfxqosywyj)
11:36.44*** mode/#asterisk-dev [+o DanJenkins[m]] by ChanServ
11:37.32DanJenkins[m]Hello!
12:46.42*** join/#asterisk-dev jkroon (~jkroon@41.113.104.109)
12:48.03jkroonso ... with mysql-connector-c my_bool is no longer exposed ... i can implement a fix, but I'm afraid it'll break backwards compatibility with older versions - someone that can help test on that front?
12:48.43jkroonalso, fix compile error separately from warnings or all the related things in a single patch?
12:48.52filewhat is exposed?
12:49.01filethere is configure logic to check for "bool" and "my_bool"
12:50.09fileany change in that regard would need to do similar to determine the correct choice
12:50.22fileand all related is fine
12:51.10jkrooni note there is a fix in master, sorry for the noise, so just warnings about my_ulonglong should be using %lu instead of %llu ... go figure.
12:51.29jkroonchecks 13 branch specifically.
12:51.42filethe configure change went into all applicable supported branches
12:52.37jkroonthanks.
12:53.50jkroonDoes this make sense:  https://gerrit.asterisk.org/c/asterisk/+/13816
12:54.34filedon't know, would have to dig in deeper
13:15.32*** join/#asterisk-dev jkroon (~jkroon@41.113.95.26)
13:22.53seanbrightthey dropped my_ulonglong in favor of uint64_t but kept a #define there for backwards compat
13:23.15seanbrighti think they even recommend the cast that you put there
13:23.20seanbrightor suggest it, at least
13:24.08seanbright// Legacy definition for the benefit of old code. Use uint64_t in new code.
13:24.11seanbright// If you get warnings from printf, use the PRIu64 macro, or, if you need
13:24.13seanbright// compatibility with older versions of the client library, cast
13:24.16seanbright// before printing.
13:28.03seanbrightso... i think that PRIu64 will work regardless of the mysql version, but that would need to be tested
13:28.18seanbrightthat might be a cleaner patch. i don't like casts.
13:28.50seanbrightup until about a month ago i thought if you cast a larger integer to a smaller one that you would saturate to the upper/lower bound of the smaller type
13:29.45seanbrightbut that is so blatantly wrong it's embarassing
13:35.36coreyfarrelldoes that consistently get the LSB's of the larger int or does it depend on endian?
13:36.03*** join/#asterisk-dev jkroon_ (~jkroon@41.113.22.253)
13:39.32seanbrightthat's a good question that i don't know the answer to
13:40.22seanbrighton LE it just takes the LSBs and lops off the rest
14:14.38seanbrighti don't have a BE machine to test with. anyone have a sparc?
14:19.14*** join/#asterisk-dev tmoore (~tmoore@2600:1702:4110:3d10:e9dc:6920:c1b0:9136)
14:20.38gtjosephI do but it's fairly dusty and probably rusted solid.
14:20.53gtjosephqemu?
14:22.57gtjosephseanbright: isn't "memcpy(ext, ".WAV", sizeof(".WAV"))" going to change the extension from wav49 to WAV49?  Was that what was intended?
14:26.53*** join/#asterisk-dev spatel (~spatel@static-71-174-102-210.bstnma.fios.verizon.net)
14:28.05seanbrightit's not
14:28.22seanbrightsizeof(".WAV") == 5
14:29.14seanbrightsorry, the "it's not" was an answer to your first question, not the "was that intended?" part
14:30.45gtjosephOh I gotcha.  the null byte is included in the memcpy.
14:30.52seanbrightindeed.
14:30.55gtjosephdidn't catch that
14:31.05seanbrightif it's too "clever" i can just change it to a strcpy()
14:31.34gtjosephnah.  i'm fine with it.
14:31.38seanbrightalrighty
14:34.49seanbrighti also tested, which is unusual for me, but it did work :P
14:35.10seanbrightthe more i think about that particular patch the more i want to make it master only
14:35.39seanbrightsince X-Rob opened it, i'm thinking there might be freepbx code that relies on the broken behavior?
14:36.42gtjosephhmmmm
14:37.05seanbrighthttps://github.com/FreePBX/core/commit/fba815ba2ea111165716be3059bf39ddd55403fb
14:37.17gtjosephif you want ot make it master only, i need to kill the jenkins jobs quickly.
14:37.34seanbrightoh
14:37.39seanbrightdidn't realize you +2d it
14:37.43seanbrighti think it will be fine
14:37.49seanbrightit's technically a bug fix
14:38.24gtjosephkk
14:58.22*** join/#asterisk-dev kharwell (uid358942@gateway/web/irccloud.com/x-fmnbgiwndiynlvyg)
14:58.22*** mode/#asterisk-dev [+o kharwell] by ChanServ
15:01.17*** join/#asterisk-dev bford (uid283514@gateway/web/irccloud.com/x-ldppdaaxlzeaxjpu)
15:01.17*** mode/#asterisk-dev [+o bford] by ChanServ
17:06.54DanJenkins[m]if i make an external media issue with 16.2 version of asterisk am i just going to get told to upgrade ?
17:10.06cresl1nI think we all know the answer to that question
17:10.07cresl1n:-P
17:10.44file16.2 didn't have external media
17:10.49DanJenkins[m]say it aint so
17:10.56DanJenkins[m]yes it does
17:11.12DanJenkins[m]sorry
17:11.13DanJenkins[m]im tired
17:11.14DanJenkins[m]i meant 16.6.2
17:11.24DanJenkins[m]too many 6's
17:11.47fileI don't think anything was touched since then
17:12.04DanJenkins[m]i take back my "yes it does" short response an apologise
17:12.07DanJenkins[m]ok :)
17:12.11DanJenkins[m]thanks file
17:25.03DanJenkins[m]ok issue submitted
17:25.09DanJenkins[m]hopefully with pcaps that worked
17:26.48fileoh god, slin
17:28.42DanJenkins[m]google can take it in quite a few formats but pretty much only gives it back in slin
17:29.16DanJenkins[m]Opus encoded audio wrapped in an ogg container., MP3 audio at 32kbps, Uncompressed 16-bit signed little-endian samples (Linear PCM). Audio content returned as LINEAR16 also contains a WAV header.
17:32.13DanJenkins[m]whereas they can take ulaw, flac etc in - https://cloud.google.com/dialogflow/docs/reference/rest/v2beta1/QueryInput#audioencoding
17:39.22seanbright118 is dynamic
17:39.33seanbrighthard-coded or not
17:39.47seanbrightwell, i should speak to it, because i'm not sure
17:39.51seanbrightshouldn't*
17:40.23DanJenkins[m]so i'd agree with you based on the specs
17:40.31DanJenkins[m]but asterisk sends me type 118
17:40.58DanJenkins[m]if i cant send back 118...... of the same type of audio... thats very counterintuitive
17:41.09DanJenkins[m]theres no sdp setup because its external media
17:41.46seanbrighti have theories but i don't want to throw them out there because i will inevitably be proven wrong
17:42.13DanJenkins[m]and if its dynamic.... why are any of these static payloads in rtp_engine.c ? https://github.com/asterisk/asterisk/blob/master/main/rtp_engine.c#L3675
17:42.24DanJenkins[m]hahaha seanbright
17:42.49DanJenkins[m]im 100% out of my comfort zone - ive no idea what ive done is right etc
17:43.02seanbrightthe static assignments are a fallback (see comment about 25 lines up)
17:43.50DanJenkins[m]soooo it should fallback to the list and say, look its slin16 16k
17:43.53DanJenkins[m]right?
17:44.01seanbrightsure?
17:44.05DanJenkins[m]because there was no sdp setting up the session etc
17:44.10DanJenkins[m]haha
17:44.17seanbrightthat might work for stuff going out of asterisk but not coming in
17:44.27seanbrightagain, these are just my knee-jerk thoughts
17:44.33DanJenkins[m]oh i hadnt thought of that
17:44.49seanbrightluckily this code is trivial and we can just trace right throu...
17:44.52seanbrightwait
17:44.55seanbrightheh
17:45.02DanJenkins[m]yeah 100%
17:45.07DanJenkins[m]you know who i blame.....
17:45.16seanbrightmark spencer
17:45.17seanbrightme too
17:45.21DanJenkins[m]that amazing guy gtjoseph who gave me just enough info to hang from :D
17:45.28DanJenkins[m]lol
17:45.41seanbrightit is his fault we are all in this position
17:46.10DanJenkins[m]wait mark spencer or gtjoseph  ?
17:46.13gtjosephuhm who?
17:46.18seanbrightmspencer
17:47.19DanJenkins[m]that is indeed fair.
17:47.21DanJenkins[m]the most important thing though.... did i get the components right in the jira?
17:48.04gtjosephClose enough :)
17:48.32DanJenkins[m]omg
17:48.37DanJenkins[m]thats an achievement in itself
17:48.49*** join/#asterisk-dev kharwell (uid358942@gateway/web/irccloud.com/x-sqbsahoagcewvmhv)
17:48.49*** mode/#asterisk-dev [+o kharwell] by ChanServ
17:50.20gtjosephDanJenkins[m]: I should be able to work my way through your scenario in the next day or so.
17:51.34DanJenkins[m]sweet, thanks gtjoseph
17:51.36DanJenkins[m]i hope ive given you everything you need in those two repos
17:51.46DanJenkins[m]if not, shout!
17:52.16DanJenkins[m]this one im less bothered by - because i can at least get it working with 8k audio
17:52.38DanJenkins[m]the non made issue because it'll be something my end..... the lack of audio from linux
17:52.45DanJenkins[m]although thats going to be an issue for you isnt it!
17:53.04gtjosephheh
17:53.09DanJenkins[m]so you may have to fix my main issue in my code before you can figure out whats wrong with 16k :D
17:53.16DanJenkins[m]double win
17:53.21seanbrightso... the slin formats have a smoother on them
17:53.39seanbrightwhich should be doing the byte order stuff already
17:54.03gtjosephgoes off to have a liquid lunch
17:54.10DanJenkins[m]youre talking dutch to me seanbright ;)
17:54.21seanbrightyou said you swapped byte orders
17:54.34DanJenkins[m]you think i shouldnt have to do little to big endian
17:54.35seanbrightthe endians
17:54.46seanbrighti'm thinking
17:55.01DanJenkins[m]right - I wouldnt have even known to do that but gtjoseph did that on the way out of asterisk in his original demo code
17:55.12seanbrightinteresting
17:55.46DanJenkins[m]google wants it in a particular way and i can only assume from george's code..... asterisk does the opposite
17:55.46gtjosephyeah had to
17:56.13DanJenkins[m]so i can only assume that i have to swap it before sending it back
17:56.18DanJenkins[m]and i can get 8k slin16 working
17:56.26DanJenkins[m]so the swapping must work
17:56.48seanbrighthttps://github.com/asterisk/asterisk/blob/16/res/res_rtp_asterisk.c#L7240-L7242
17:56.53DanJenkins[m]it wouldnt suprise me if the endians had something to do with not getting any audio from linux
17:57.22seanbrightso on the way in we do the swap
17:57.31seanbrighton the way out, the smoother should be doing the swap
17:57.32DanJenkins[m]oohhh
17:57.54seanbrighttry not changing the endianess of the packets going _to_ asterisk
17:57.55DanJenkins[m]i seem to recall trying not swapping and it made no difference
17:58.01seanbrightjust as a silly guess
17:58.03seanbrightok
17:58.08DanJenkins[m]on 8k or 16?
17:58.13seanbrightthe one that doesn't work
17:58.21DanJenkins[m]no ill give it a go now :)
17:59.14DanJenkins[m]oh actually its not easy to do before i clock off
17:59.23DanJenkins[m]i just relised... i dont swap the endians in my basic test
17:59.41DanJenkins[m]because im using a sound file from Asterisk's lib
17:59.47DanJenkins[m]so i presumed that was "in the correct format"
18:00.07seanbrightok... maybe ast_frame_byteswap_be is broken
18:00.07DanJenkins[m]although saying that.... im swapping the endians on the wav file
18:00.28DanJenkins[m]it gives me a headache
18:01.11seanbrightit's going to end up being a byte order issue
18:01.17seanbrighti am officially putting $11 on it
18:01.40seanbrightwhich i think is like £1
18:01.41DanJenkins[m]a whole $11?!
18:01.52gtjosephI'm betting that the source of the audio makes a difference.  I tested with live audio transcoded by asterisk
18:02.16gtjosephplaying from a sound file takes a different path
18:02.33seanbrighti always bet on gtjoseph, so whatever he says
18:03.59gtjosepha fool and his money are soon parted
18:04.27seanbrighti'm COUNTING ON IT
18:04.29seanbrightno wait
18:05.08DanJenkins[m]Woot!
18:05.17DanJenkins[m]It'll 100% be my code other than the 118 thing
18:05.22DanJenkins[m]Maybe
18:06.38seanbrightnice, closed as WONTFIX
18:08.01DanJenkins[m]Hahahaha
18:10.20seanbrightyou'd think being in the business of phones that it wouldn't drive me absolute bonkers to hear a phone ring
18:10.30seanbrightyet here we are
18:10.43fileseanbright: or... hear we are
18:11.03seanbrighttouch‌é
18:11.06seanbrightdoh
18:11.11seanbrightyou know what i mean
18:19.20gtjosephjust for reference...   signed linear over RTP is always network byte order (BE) and google expects LE hence the byte swap in my sample.
18:20.37gtjosephgoes back to lunch
18:30.49DanJenkins[m]ah ha!
18:31.29seanbrightbecause L16 <> signed linear
18:32.00seanbrightDanJenkins[m]: eureka?
18:32.22DanJenkins[m]which makes my wav slin16 8k audio read -> send even weirder
18:32.34DanJenkins[m]nope
18:33.04DanJenkins[m]because my actual slin16 16k from dialogflow doesnt play
18:33.33DanJenkins[m]my demo repo for not needing dialogflow might be a little skewiff
18:33.40DanJenkins[m]but the actual problem is still a problem
18:34.26DanJenkins[m]unless my mory is failing and i didnt actually try not swapping
18:34.36DanJenkins[m]but im 99% certain i did
18:36.32DanJenkins[m]but more curious... i want to know whats in gtjoseph 's liquid lunch
18:36.55seanbrightwell, he'll probably have to talk to his sponsor after lunch, so...
18:37.44DanJenkins[m]so i was thinking about submitting a talk about dana to astricon
18:41.11seanbrighti approve
18:41.15seanbrighti also have no say
18:42.29DanJenkins[m]would mean having to fix it ;)
18:42.43seanbrightwell... you're always there when you need us
18:42.48seanbright<3
18:43.06DanJenkins[m]not sure what else to talk about other than maybe a detailed dialogflow one with external media
18:43.35DanJenkins[m]oh yioure too kind seanbright  ;)
18:55.13*** join/#asterisk-dev coreyfarrell (~coreyfarr@68-114-57-249.dhcp.davl.vt.charter.com)
18:55.13*** mode/#asterisk-dev [+o coreyfarrell] by ChanServ
19:04.04seanbrightDanJenkins[m]: just so i'm clear...
19:04.19seanbrighti downloaded 16k.pcap and extracted the audio streams
19:04.30seanbrightboth should be slin16?
19:04.48DanJenkins[m]yes i think so
19:04.59seanbrightok, the allison side sounds great
19:05.04DanJenkins[m]this is where you say its not?
19:05.07seanbrightthe other sid... does not sound great
19:05.10seanbrightside*
19:05.44DanJenkins[m]so the non allison side is the audio coming out of asterisk
19:06.01seanbrightok, then it must not be slin16
19:06.27DanJenkins[m]but it is.....
19:06.43DanJenkins[m]or at least thats what i asked for
19:06.44DanJenkins[m]:D
19:07.41DanJenkins[m]and thats what i tell google it is... and google does speech to text on it fine
19:07.50seanbrightinteresting
19:08.05DanJenkins[m]and its interesting that you hear zombies fine
19:08.17seanbrightyou're swapping the byte order before sending to google though, yes?
19:08.22DanJenkins[m]because i hear nothing on my phone
19:08.36DanJenkins[m]yes
19:08.42seanbrightok, let me try to do that
19:10.09seanbrightthe smoother flags on the asterisk side should swap the byte order for you, so that part of the code must not be firing
19:10.18seanbrightare you in a position to add some debug code and re-run your test?
19:11.33DanJenkins[m]not right now, about to put my son to bed but could after
19:12.04seanbright"should've just heard 16k zombies... but... ya didn't"
19:16.34seanbrighthttps://pastebin.com/raw/BRKnNHBC
19:17.23seanbrightif you never see "DJ wants a smoother" then asterisk is not creating a smoother and therefore not swapping byte order
19:19.07DanJenkins[m]👍
19:19.21seanbrightmy local branch name is dj-smooth
19:19.32seanbrightwhich you are free to use on your business cards if you wish
19:19.38DanJenkins[m]Ofc
19:21.59seanbrightbut that is really a secondary issue. i'll go back to my previous guess, it doesn't like 118 because it's not static and there is not SDP.
19:22.25seanbright... which is why i brought up a configurable payload code when external media was going in but no one listens to me
19:23.18DanJenkins[m]I mean all this wouldn't have been an issue if I could just write slin16 to a websocket, no headers needed ;)
19:23.24DanJenkins[m]Right?
19:23.25DanJenkins[m]Hahaha
19:23.26DanJenkins[m]I jest
19:23.39seanbrightstop trying to make media over TCP happen
19:24.23seanbrightif someone implemented such a thing, i don't see many people putting up a fight against it going in
19:24.35seanbrighti just have 0 interest in working on it
19:24.58DanJenkins[m]Haha, I'll never stop going on about it
19:25.05DanJenkins[m]And that is your perogative ;)
19:26.32seanbrightactually, sean bright industries will get it implemented for $15k
19:26.39seanbrightreach out to my people
19:27.04filewho let you have people?
19:27.30DanJenkins[m]sounds fair
20:18.22*** join/#asterisk-dev electronic_eel (~quassel@HSI-KBW-46-223-65-185.hsi.kabel-badenwuerttemberg.de)
20:18.45DanJenkins[m]so seanbright
20:18.56DanJenkins[m]with how thngs were I get "[2020-02-20 20:17:37] ERROR[22401]: res_rtp_asterisk.c:5028 ast_rtp_write: DJ see smoother run!"
20:21.04DanJenkins[m]if i swap endianness I also see "DJ see smoother run!"
20:21.06DanJenkins[m]neither give me audio
20:28.40kharwellwho thinks it would be a lost cause to start const'ing things
20:29.15filetry, try, try?
20:49.51seanbrightmaybe not a lost cause, but other than warm and fuzzies i don't think it buys you much
20:50.29seanbrighti guess the compiler could get more aggressive with optimizations? i dunno
20:51.44seanbrightDanJenkins[m]: interesting
20:52.32DanJenkins[m]so it could well be that i need to swap the endianness etc but it doesnt understand 118
20:52.39DanJenkins[m]shrug
20:53.12seanbrighti think whether it is right or wrong to swap the endianess, you should still hear _something_, even if is just noise/garbage
20:53.34seanbrightand my "doesn't understand the payload code" theory is just that, a theory
20:53.43seanbrightgtjoseph is going to get to the bottom of this if it is the last thing that he does
20:54.14DanJenkins[m]i shall comment
20:54.17DanJenkins[m]on the ticket
21:01.26DanJenkins[m]thanks so much for checking it out seanbright !
21:01.30seanbrightsure
21:02.06DanJenkins[m]and confirming the audio im sending back is indeed "good"
21:02.26seanbrightwell, that is arguable
21:02.41DanJenkins[m]you should see a recording of what dialogflow actually sends bck in their 8k version
21:02.42seanbrightwhen you get asterisk to play it and it sounds correct, then it is "good"
21:03.12DanJenkins[m]if you just play it back its full of static
21:03.19DanJenkins[m]but if you just play back one of the 2 channels.... its fine
21:03.26DanJenkins[m]i just send it to asterisk and its fine
21:03.48DanJenkins[m](hence why im using "known" good audio from asterisk's own audio files)
21:04.33seanbrightit's just a confusing set of circumstances because i find the notion of 'signed linear' be me a nebulous thing
21:04.40seanbrightto be*
21:05.11DanJenkins[m]ya
21:05.22seanbrighteither way, i'm done talking about it. i look forward to gtjoseph's diagnosis.
21:05.34DanJenkins[m]if i understood enough about how to remove an ogg container from opus I'd have tried that
21:05.38DanJenkins[m]but alas im an idiot
21:07.10seanbrightdon't be so hard on yourself
21:07.26seanbrightyou can't compare yourself to people like... oh i dunno... me
21:07.34seanbrighti'm a pretty special person, dj.
21:08.12kharwellseanbright: I agree, and maybe constness might get us some optimization. I mostly like it though as a way to keep the potential side effects down on an object. Or modifying said object outside its scope
21:08.25seanbrightjust think about how dumb an average person is and then remember that half of people are dumber than that
21:08.59DanJenkins[m]but youre my idol seanbright
21:09.04seanbrightbro i know
21:09.42seanbrightkharwell: i'm all about immutability
21:09.56kharwellexactly
21:10.01seanbrightso rather than modifying a member of a struct, you duplicate the entire struct and return it
21:10.05seanbrightheh
21:10.15kharwellwell there are some drawbacks I suppose
21:10.46kharwellif only the compiler implemented copy on write
21:11.08seanbrighti started looking at ast_channel a while ago and was like, ok, let's find some members that never change and then we won't have to lock around them. oh! the channel name doesn't change, so that's a good candidate! oh wait, you can change it. ok, well i give up.
21:12.07seanbrightwell, then you have to think about deep copying, because everything has a pointer to something else
21:12.10seanbrightgets very hairy
21:12.22kharwellyeah ao2'ing everything makes it hard too. The ref count is kinda embedded in the object now so if passing around and inc/dec'ing the ref then blargh
21:15.14kharwellI guess it's a problem that will remain...constant even :-P
21:22.47seanbrighti see what you did there
22:08.34*** join/#asterisk-dev spatel (~spatel@pool-96-237-230-175.bstnma.fios.verizon.net)
23:32.51*** join/#asterisk-dev spatel (~spatel@pool-96-237-230-175.bstnma.fios.verizon.net)

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