IRC log for #asterisk on 20210210

00:28.02*** join/#asterisk sinaowolabi (~Sina@102.134.114.1)
01:13.35*** join/#asterisk tsal (~tsal@87.122.234.79)
01:15.56*** join/#asterisk Typhon (~Typhon@dslb-088-066-100-118.088.066.pools.vodafone-ip.de)
01:33.28*** join/#asterisk guerby (~guerby@april/board/guerby)
01:48.19*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
01:48.34*** join/#asterisk tsal (~tsal@i59F5F574.versanet.de)
02:14.36*** join/#asterisk Typhon (~Typhon@dslb-088-067-128-095.088.067.pools.vodafone-ip.de)
02:41.42*** join/#asterisk sinaowolabi (~Sina@102.134.114.1)
02:43.40*** join/#asterisk NightMonkey (~NightMonk@pdpc/supporter/professional/nightmonkey)
02:48.17*** join/#asterisk _Posterdati_ (~posterdat@host-79-36-198-96.retail.telecomitalia.it)
02:49.28*** join/#asterisk tsal (~tsal@i59F4A272.versanet.de)
03:15.11*** join/#asterisk Typhon (~Typhon@dslb-088-067-128-234.088.067.pools.vodafone-ip.de)
03:21.22*** join/#asterisk FH_thecat (~FH_thecat@75.11.25.212.ftth.as8758.net)
03:42.41*** join/#asterisk electronic_eel (~quassel@213.240.182.236)
04:34.08*** join/#asterisk jmordica_ (uid18332@gateway/web/irccloud.com/x-trceniekexmtgvbe)
04:42.20*** join/#asterisk irrgit (~ch33se@192.241.175.183)
04:42.20*** join/#asterisk maximCH (~maximCH@mail.swill.org)
04:42.20*** join/#asterisk pvoigt (~Linux@unaffiliated/pvoigt)
04:42.20*** join/#asterisk sbingner (~sam@phathack/sbingner)
04:42.20*** join/#asterisk Chainsaw (~chainsaw@gentoo/developer/chainsaw)
04:48.41*** join/#asterisk tsal (~tsal@i59F4A272.versanet.de)
05:18.05*** join/#asterisk Ner0Zer0 (~Ner0Zer0@87.253.63.54)
05:48.46*** join/#asterisk FH_thecat (~FH_thecat@75.11.25.212.ftth.as8758.net)
06:30.41*** join/#asterisk puzzola (~puzzola@unaffiliated/puzzola)
07:15.25*** join/#asterisk forgotmynick (uid24625@gateway/web/irccloud.com/x-wlbvtbzulywbudks)
07:19.47*** join/#asterisk john2gb (~john2gb@94-225-47-8.access.telenet.be)
07:35.16*** join/#asterisk Ner0Zer0 (~Ner0Zer0@87.253.63.54)
07:51.37*** join/#asterisk Jesterboxboy (~Thunderbi@84-115-150-8.cable.dynamic.surfer.at)
09:04.09*** join/#asterisk akp55 (~akp55@c-73-148-15-31.hsd1.va.comcast.net)
09:16.56*** join/#asterisk defsdoor (~Andrew@cpc120650-sutt6-2-0-cust43.19-1.cable.virginm.net)
09:30.00*** join/#asterisk sa02irc (~mbax@155-079-043-212.ip-addr.inexio.net)
12:10.37*** join/#asterisk sinaowolabi (~Sina@102.134.114.1)
12:15.16*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
14:01.28*** join/#asterisk paulgrmn (~paulgrmn@c-98-250-183-21.hsd1.mi.comcast.net)
14:06.43sibiriais it a known quirk that haungup cause codes don't map symmetrically in both directions between two asterisk setups?
14:07.18SamotPardon?
14:08.46sibiriain the context of using HANGUPCAUSE() to explain the disposition, i mean
14:09.16SamotYou mean between two systems?
14:09.30SamotYou want to know why A and B have different codes between?
14:09.39sibiriae.g. when we Hangup(20) ("Subscriber absent") Asterisk sends "480/Temp unavailable" and q.850 cause 20, but on the Asterisk instance receiving this response HANGUPCAUSE(,ast) reports this as "User alerting, no answer"
14:10.15sibiriawhich sounds like cause code 19, "No answer from user (user alerted)"
14:10.27SamotOK so PBX A makes a call out..
14:10.34SamotThe device making the call got a 480 reply
14:10.46SamotAnd PBX B actually sent back user alerted.
14:10.57SamotIs that what you are saying?
14:11.49sibiriaasterisk A calls asterisk B, and receives 480 + Q.850 20
14:11.53SamotBecause 480 maps to Hangup Cause Code 19
14:12.04*** join/#asterisk rpifan (~rpifan@p200300d2671bda003836ac30b39637fa.dip0.t-ipconnect.de)
14:12.55SamotAsterisk is mapping the SIP Code not the Q.850 code
14:12.57SamotBecause it's SIP
14:12.59sibiriabut asterisk A using HANGUPCAUSE(,ast) determines that response as "User alerting, no answer"
14:13.06SamotBecause that's a 480
14:13.18sibiriaasterisk A sees the correct cause code. it sees 20
14:13.26sibiriabut 480 seems to take priority
14:13.29SamotShow a call.
14:13.43SamotAgain, one is a SIP code and one is a q.850 code
14:13.46SamotYou're using SIP
14:13.56SamotOf course the SIP code is going to be checked first.
14:14.35sibiriait's not entirely a problem, as we can map the returned cause code to the larger cause code list. it's just that asterisk's internal mapping through HANGUPCAUSE(,ast) seems a bit off
14:15.28SamotWell I would need to see a call to see what is actually being done on all sides.
14:15.35SamotSince this is a B2BUA.
14:16.09SamotThe channel making the call to PBX B may not be sending the same thing back to the channel of the device that requested it
14:19.39sibiriathis is what we're seeing directly on the asterisks' ends when enumerating the channel's data
14:20.19sibiriaseems it's only a case of HANGUPCAUSE(,ast) being quirky
14:20.55SamotLike I said, I can't say much without seeing what is actually happening.
14:21.50SamotI just replied to a thread in FreePBX about something like this and all the people missed one line output that had the "mystery cause code" no one could figure out what it was there
14:30.07sibiriahttps://pastebin.com/raw/BX4eqmst
14:30.14KobazSamot: hangup codes regularly get lost in translation
14:30.25sibiriai think it's just a case of HANGUPCAUSE(,ast) locking onto the SIP response code, rather than the cause code
14:30.27Kobazsibiria: ^^
14:30.44KobazAsterisk has to convert the q codes to SIP
14:30.53Kobazwhich don't match exactly
14:30.59KobazI used to have this problem all the time
14:31.07SamotBecause its f'in sip
14:31.17SamotI only said that twice
14:31.19sibiriai sort of assumed HANGUPCAUSE(,ast) would use the cause code when available
14:31.26Kobazwhen available
14:31.32sibiriait is available
14:31.38Kobazwell your Q.850 code is only available on the other asterisk that got it
14:31.42sibiriaHANGUPCAUSE() just doesn't care for it
14:32.10KobazWhen it goes SIP over the wire unless you do something special, all bets are off you'll get a mirror of the hangup cause
14:32.36sibiriaB responds 20, A sees 20 and makes 20 available in the channel data
14:32.58sibiriaHANGUPCAUSE(,ast) <- does not care for channel's cause code
14:33.09KobazOn which asterisk?
14:33.23KobazThe one with the Q code or the one receiving the sip call
14:33.43sibiriaA receives the cause code, A has it in its channel data
14:33.51KobazRight
14:34.08sibiria15:32 <sibiria> HANGUPCAUSE(,ast) <- does not care for its channel's cause code, only its SIP response code
14:34.20KobazAlso on the A box?
14:34.28sibiriait's just the A box i'm concerned about here
14:34.44KobazOh, why bring in the B box to the picture at all then
14:34.58sibiriasomeone wanted to know what it responded
14:35.02Kobazah
14:35.02Kobazokay
14:35.06Kobazwell, i would ignore that
14:35.22Kobazif stuff's not working on A, focus on A
14:35.28sibiriathe SIP parts are just fine. it's all about HANGUPCAUSE() being quirky
14:35.45Kobazand sorry, jumping in the middle here as usual
14:35.54Kobazbut.. what's your tech HANGUPCAUSE at the same time?
14:36.13sibiriathe tech response has the actual SIP response
14:36.36Kobazbut you're missing the Q.850
14:36.39Kobazright?
14:36.42sibiriano, it's there
14:36.50KobazSO it's there in tech, but not in ast
14:37.08sibiriaHANGUPCAUSE() ast response seems to be produced *only* from the SIP code response. the cause response appears to be ignored
14:37.18sibiriawhich i find confusing
14:38.04Kobazthat does seem odd
14:38.06Kobazwhat version?
14:38.10sibiria16.15.0
14:38.37sibiriahow HANGUPCAUSE(,ast) behaves isn't spelled-out black on white in the documentation
14:38.45sibiriabut my assumption about it felt natural
14:39.14sibiriaseems reasonable that it would go for the cause code first to produce the "ast" response
14:39.33sibiriaand use the SIP response code as a fallback
14:39.36Kobazdocumentation, sorry about that
14:39.41KobazIt's lacking for sure
14:39.56KobazThe bane of existance
14:40.11KobazSo... Since 16 is a stable long term
14:40.25KobazPut in a bug report, for the odd HANGUPCAUSE mismatch
14:40.30Kobazgive lots of examples (issues.asterisk.org)
14:40.41sibiriai wonder if the behavior is perhaps intentional
14:40.53sibiriafile and seanbright look like two dudes who might know
14:41.06SamotCan we see a call?
14:41.06KobazI doubt 16.x will get a fix like that, core response codes changing in minor point releases is frowned upon
14:41.25Kobazbut that could very well be a fix for 19.
14:41.26sibiriaSamot: my pastebin above shows the invitation and response
14:41.35SamotSorry missed it. Let me look.
14:42.01Kobazsibiria: Hangup tracking has been a problem for many years
14:42.08sibiriait's indeed a bit "hairy"
14:42.16Kobazoej's project, I think it was 'whohungup' was thousands of lines of changes
14:42.24Kobazto track why and where a channel hung up
14:43.07SamotOh wait.
14:43.10SamotThat's a different header.
14:43.11Kobazit never got merged
14:43.26SamotYou want to pull from the Reason header.
14:43.33Kobazsibiria: also don't use pastebin, it's got ads
14:43.46Kobazsibiria: dpaste or a bajillion others are much sleeker
14:44.03SamotThe q.850 code is in the Reason header
14:44.09SamotThat's your problem.
14:44.28sibiriathe hangup cause code is also available in the ${HANGUPCAUSE} channel variable
14:44.39sibiriano need to read out any of the headers
14:44.46Kobazright
14:44.55KobazSamot: the issue is HANGUPCAUSE is fuzzy-matching here
14:45.07SamotWhen PBX B sends back the 480 reply
14:45.11Kobazfor the 'ast' option
14:45.15SamotPBX A isn't looking at the REASON header.
14:45.20SamotIt's looking at the SIP code.
14:45.33sibiriayes it seems that's what HANGUPCAUSE(,ast) is doing
14:45.34SamotWhich it then maps to something on its end.
14:45.43Kobaz${HANGUPCAUSE} = 20, but HANGUPCAUSE(..ast) is showing 19
14:45.56SamotBecause it is irrelevant that the other side is Asterisk.
14:45.59Kobazsibiria: that's your problem, right?
14:46.10SamotOr that there is a q.850 code being sent in the Reason header.
14:46.28SamotI think you're focusing on the wrong thing.
14:46.46SamotPBX A doesn't care that PBX B is 1) a PBX or 2) It's Asterisk.
14:46.46sibiriaKobaz: correct. my assumption was that HANGUPCAUSE(,ast) will interpret first from the hangup cause code, otherwise from the SIP response
14:47.17KobazSamot: Asterisk is mapping 19 for.... what reason?
14:47.20sibiriayes it's entirely irrelevant what PBX B is. i never stated this had any impact on anything
14:47.24SamotJFC.
14:47.31SamotBecause 480 = Cause Code 19
14:47.32KobazSamot: that's his question
14:47.41SamotSo PBX A is getting a 480 and thus using Cause Code 19
14:47.53SamotDespite the code 20 being in the Reason header sent back from PBX B.
14:47.55SamotThat's why.
14:48.09SamotIgnore the q.850 code in the reply.
14:48.16SamotIt's irrelevant for this.
14:48.20sibiriathe confusion is why HANGUPCAUSE() is mapping from SIP response when it has a Q.850 hangup cause code right infront of it
14:48.22SamotOnly the SIP code matters.
14:48.30SamotBECAUSE IT'S IN THE REASON HEADER
14:48.42SamotAsterisk isn't LOOKING THERE
14:48.46KobazSamot: it's just wack though
14:48.53SamotIt's SIP
14:49.00Samotq.850 does not apply
14:49.07KobazSamot: Cause code 20 for HANGUPCAUSE. you would think would cascade down to HANGUPCAUSE,ast
14:49.16SamotThis is like saying "Why is my PRI using 8.850 and not the SIP code?"
14:49.22KobazSamot: dude, it makes perfect sense that TECH is 480
14:49.25SamotIt's a DIFFERENT SYSTEM
14:49.28SamotFFS.
14:49.29KobazIt's a tech specific cause code
14:49.35filehush all
14:49.38SamotPBX B is generating the code 20 on ITS side
14:49.45SamotSending back a 480 SIP Code
14:49.50KobazSamot: stop talking about PBX B
14:49.52SamotThat is what PBX A cares about.
14:50.00SamotWell that's where the cause code 20 is coming from
14:50.06sibiriafile: save me
14:50.09SamotThat is what generates it
14:50.15sibiriahelp/hilfe/hjälp etc.
14:50.16SamotNaw, you're fine.
14:50.23SamotI'm done repeating  myself.
14:50.28filesibiria: https://github.com/asterisk/asterisk/blob/16/res/res_pjsip_rfc3326.c#L87 is where it is supposed to examine the Reason header in a response and apply it as the hangupcause on the channel itself
14:50.40Kobazfile: thank you
14:50.59sibiriaso the behavior is intended after all
14:50.59fileyou can add a log message and see if it's executing, if it is then a later handler could be overwriting the mapping
14:51.18Kobazsibiria: that's not what he said
14:51.26Kobazsibiria: monkey up the code and see if it's working as intended
14:51.28SamotI think a later handler is overriding it.
14:51.35filethe module is supposed to read the Reason header, extract the Q.850 cause code, and set it as the hangup cause
14:51.50sibiriawhich it does
14:51.57SamotOh
14:51.58Kobazit sets HANGUPCAUSE
14:51.59SamotBTW.
14:52.07SamotThere's no SIP code for cause code 20
14:52.22Kobazwhich matches... but HANGUPCAUSE,ast... is set to 19... is the question
14:52.26Samot18 or 19 would be the closest
14:52.40fileoh that's the who hung up code
14:52.44fileum
14:52.53fileit uses a control thingy... let's see
14:53.18Kobazwhere is seanbright to tell Samot to stop arguing with sibiria
14:53.39seanbrighti know when to avoid a conversation
14:53.44Kobazhaha :)
14:53.45sibiriaD"leave sibiria alone!!!!"
14:53.56Samotsibiria: There was a 100 Trying in all this, right?
14:54.01SamotBefore the 480?
14:54.10sibiriaSamot: yeah i omitted the obvious parts
14:54.13SamotAhhh
14:54.27Samot19 = user not answering after a provisional reply
14:54.37Samot18 = user not answering no provisional reply
14:54.43filehttps://github.com/asterisk/asterisk/blob/16/channels/chan_pjsip.c#L3119
14:54.47filethere you go, likely due to that
14:55.19filedepending on execution order changing the setting of ast_cause to use the hangupcause on session->channel might do something
14:56.16SamotSo that little function sets it based on the SIP code, right?
14:56.49filefor the querying of the information sibiria is referring to, yes
14:57.07fileeach dialed channel queues up the information (protocol and ast), in PJSIP that function does it
14:57.32filethe information goes back to the caller who stores it away for later inspection using the dialplan functions
14:57.59SamotWhich would cause the 19 then right?
14:58.03fileyes
14:58.05SamotSince 480 maps to 19
14:58.05*** join/#asterisk tripleslash (~triplesla@unaffiliated/imsaguy)
14:58.23fileyes
14:59.59sibiriaso i guess the documentation is ultimately at fault here, combined with my assumptions
15:00.13sibiriait does state "...or translated Asterisk cause code information..."
15:00.40fileit is a reasonable expectation that the Reason header value would be present instead of using SIP mapping, as the Reason header value is used elsewhere
15:00.57sibiriain this case i'm calling HANGUPCAUSECODE(,ast) in an AGI script invoked by a hangup handler
15:01.45sibiriaHANGUPCAUSE()*
15:02.12Kobazhangup handlers!
15:02.20Kobazoh how i love hangup handlers
15:03.42*** join/#asterisk kharwell (uid358942@gateway/web/irccloud.com/x-kuhedtwvbsakvqfy)
15:03.42*** mode/#asterisk [+o kharwell] by ChanServ
15:17.46*** join/#asterisk Janos (~textual@201.204.94.76)
15:17.59*** join/#asterisk mahafyi (2d7f2fb4@45.127.47.180)
15:35.09*** join/#asterisk bford (uid283514@gateway/web/irccloud.com/x-sujdrtgiuachspcr)
15:35.09*** mode/#asterisk [+o bford] by ChanServ
16:15.04*** join/#asterisk zgu (~steve@2603-7080-b744-4900-16ad-d120-de49-dc8b.res6.spectrum.com)
16:32.22igcewielingKobaz: Hangup handlers are the best thing in Asterisk.
16:38.41Kobaz:)
16:38.47KobazThanks, I wrote it
16:39.18igcewielingReally?
16:39.26KobazYup
17:16.26*** join/#asterisk ttys000 (~ttys000@50.92.215.114)
17:28.15*** join/#asterisk thansen (~thansen@192.74.130.86)
17:42.39*** join/#asterisk sinaowolabi (~Sina@154.66.16.36)
18:19.50KobazI promise I will finish the rest of my addons too.  So much going on, ugh, no time
18:23.18*** join/#asterisk rpifan (~rpifan@p200300d2671bda003836ac30b39637fa.dip0.t-ipconnect.de)
18:32.26SamotCool, in another 10 years?
18:32.31*** join/#asterisk saint_ (~saint_@unaffiliated/saint-/x-0540772)
18:39.34seanbrightharsh
18:47.01igcewielinghangup handlers are even more useful thanchan_local
18:47.25*** join/#asterisk rwb (~Thunderbi@65.183.138.202)
18:49.32seanbrightthey certainly simplify a lot of things
18:53.17igcewielingI've been reworking my dialplan and AGIs so I've been dealing with them a lot recently.
19:06.24KobazSamot: yup
19:06.33KobazSamot: sounds about right
19:07.05SamotJust curious. The handlers have been around for about 10 years.
19:07.16KobazYup
19:07.27KobazI wrote them for 1.6
19:07.52KobazGot it comitted around that timeframe.  Some digium folks reworked it a little bit and pushed it to mainline
19:08.02SamotYeah, they didn't get added until 11.
19:08.16KobazIt was in trunk for a while, yeah
19:08.35KobazI migrated it to 1.8, did some more testing and then got it in for 11
19:08.58KobazIt just didn't make sense that I had to do an 'h' for everywhere the channel might go
19:09.04KobazThere just had to be a better way
19:14.02Kobazi do feel bad i haven't finished my other work, letting all you guys down
19:14.29KobazGroup Variables is one, and more improved group functions and searching, and also a metric crap ton of console logging improvements
19:15.13Kobaznow that we're (me) finally working on migrating to 16 and we'lll get a good solid amount of testing of all this stuff on 16 it will be a straighter shot to get this into trunk
20:00.23*** join/#asterisk hfb (~hfb@45.152.182.240)
20:12.09*** join/#asterisk sa02irc (~mbax@155-079-043-212.ip-addr.inexio.net)
20:13.35igcewielinghanguphandlers is what convinced me to move to Asterisk 11
20:22.28Kobaznice
20:23.34zgucan i get the name of the channel being called from within a pre-dial (Dial(,b(...))) context?
20:23.42Kobazyup
20:23.52Kobazthat's exactly what it's for
20:24.12Kobazigcewieling:  and speaking of patting myself on the back, i wrote that one too :)
20:24.34Kobazzgu: it's literally in the example
20:24.52Kobazzgu: https://wiki.asterisk.org/wiki/display/AST/Pre-Dial+Handlers
20:25.38KobazDial(SIP/bar&SIP/baz,,b(default^callee_handler^1))            <SIP/bar-124> In callee pre-dial handler!
20:25.42zguoh i didn't see that page
20:25.59KobazWhen you're calling SIP/bar, and you want to know what channel name will be created... when SIP/bar calls the predial handler, now you have it
20:26.10Kobazand all this happens *prior* to actually calling anyone in Dial()
20:26.47Kobazpredial handlers are also nice for adding SIP headers before the call goes out
20:27.03zgubut how do i get a value i can GotoIf() on?
20:27.18Kobazshare data with your parent channel
20:27.30Kobazif you want your parent channel to have it
20:28.01Kobazif you want to GotoIf... based on the channel name you just created... predial might not be the correct solution
20:28.17KobazYou may want AMI or something like that, monitoring what's going on outside of asterisk
20:28.46KobazOnce you're in Dial() you mostly lose control of what's going to happen.  Dial() takes over
20:28.55igcewielingthe pre dial handler runs on the outgoing channel.   Using MASTER_CHANNEL(myvar) will allow you to get the channel variable value from the parent channe..
20:28.58zgucan i just pass something as an argument to the pre dial handler?
20:29.15Kobazset an inherited variable
20:29.20KobazSet(__foo=1234);
20:29.27Kobazand then access ${foo} in your predial handler
20:29.40Kobazdo the set prior to the dial, and your callee channel will have it
20:30.14Kobazor MASTER_CHANNEL, depends what you want to do
20:30.39zguthat seems to work with Set(__
20:31.09Kobazzgu: also, if you're doing a lot of GotoIf
20:31.24Kobazyou may want to look into AEL (https://wiki.asterisk.org/wiki/display/AST/Introduction+to+AEL)
20:31.41KobazIt's a more structured version of extensions.conf, with actual If/Else blocks, and such
20:32.12*** join/#asterisk scampbell (~scampbell@mail.scampbell.net)
20:32.13zguactually what would really clean this up is if i could define a variable in the channel definition and look it up from the dialplan
20:32.29Kobazyou sure can
20:33.04seanbrightdo not use AEL
20:33.07Kobazlook at setvar
20:33.21seanbrightas someone who uses AEL i encourage you to not use AEL
20:33.24Kobazseanbright: there's nothing wrong with ael
20:33.40zguor even better, access the SIP user agent registered to the extension
20:33.50Kobazhttps://www.voip-info.org/asterisk-config-sipconf/
20:33.59Kobazsetvar = variable=value : Channel variable to be set for all calls from this peer/user.  (if you're using chan_sip)
20:34.18Kobazset_var also works in pjsip as well,
20:34.50Kobazseanbright: what would be your reason to not use ael?
20:36.05seanbrightit is not good
20:36.13Kobazdefine 'good' ?
20:36.32seanbrightyou need me to define 'good?'
20:36.47seanbrightimo, ael is not good
20:36.59KobazI define good as, far superior visual structure
20:37.24seanbrightso if a cake is good, it's because of it's superior visual structure?
20:37.31seanbrightseems off
20:37.31Kobazit's all of the benefits of a structured language with logical blocks, and none of the drawbacks of 1989 BASIC programming
20:39.24seanbrightk
20:40.58Kobazanecdotally I find it faster to teach ael than extensions.conf.  It's easier to follow if (a) { dostuff }... then GotoIf(a=1?1:10)
20:41.35Kobazeven if you're using labels, to... it's all flat and hard to follow
20:42.05*** join/#asterisk post-factum (~post-fact@vulcan.natalenko.name)
20:43.07KobazI've introduced a lot of long time users of extensions.conf to AEL and they are immediately blown away... "omg we can actually see what's going on now"
20:48.08zguah i need to say GotoIf($["${var}" = "value"] if value has something like / in it apparently
20:48.27Kobazyeah $[] converts to a logical expression
20:48.42Kobazwhere in ael, it does that for you
20:48.54Kobazif ($"{var}" == "val") { dostuff }
20:48.57zgubut without the quotes it will parse and look like it's working, except it tries to interpret / as division
20:49.07Kobazquotes are interesting in asterisk
20:49.08zguso AEL has a grammar that actually makes sense? :P
20:49.25Kobazquotes in modern asterisk are treated literally as characters
20:49.37KobazSo, if you do Set(foo="bar")
20:49.57KobazYou're actually setting the value of foo, to = "bar"  ... it literally contains " characters
20:50.31Kobazsorry zgu i wrote that totally wrong
20:50.39Kobazif ("${var}" == "val") { dostuff }
20:50.46zguyeah i had other things like $[${READEXTENSTATUS} = INVALID] that worked without quotes. and $[${var} = "PJSIP/foo"] which would be valid in sh or perl (with only one side quoted) didn't work
20:50.56KobazCorrect
20:51.07Kobazbecause you're comparing everything on the left, with everything on the right
20:51.11Kobazthere is no concept of quoting
20:51.32zgui notice in the log messages it collapses to something like "GotoIf(1?label)"
20:51.34KobazYou need:   ${var} = PJSIP/foo       or  "${var}" = "PJSIP/foo"
20:51.45Kobazor ==
20:52.25zguand PJSIP/foo with no quotes tries to divide PJSIP by foo? i was seeing "op_div: non numeric argument"
20:52.25KobazI like to use == because of the semantic meaning
20:52.45KobazOh, right... it will since $[] convers it into basically a math expression
20:52.50zguyeah i hate languages where = is both assignment and comparison
20:52.55KobazIt's been a while since i had to use that stuff
20:53.01Kobazsince AEL does it for you
20:53.19*** join/#asterisk thansen (~thansen@192.74.130.86)
20:53.44zgui'll have to try converting this to AEL when i have more time to mess with it
20:59.36Kobazi'm one of the few who promotes AEL, so... let me know if you have an issue
21:00.11igcewielingI like AEL, but it makes debugging the dialplan hell.  I've moved away from it.
21:00.31Kobazit can if you don't know how it converts
21:00.44seanbrightigcewieling: he just called you dumb
21:00.47KobazIt does require knowing a little more about the internals
21:01.03igcewielingseanbright:  happens all the time.
21:01.13KobazNo, just saying more work is needed
21:01.16KobazIt's not a smartness thing
21:01.21seanbrightI KNOW
21:01.22seanbrightCHRIST
21:01.26Kobaz: /
21:03.50seanbrightgood times
21:05.56Kobazthe phrase good times always reminds me of 'good times with weapons' https://i.ytimg.com/vi/Ux1lxqjoRHY/maxresdefault.jpg
21:07.28seanbrighti got it from adam corolla of love line back in the day
21:07.49seanbrightcallers would call in with absolutely horrific stories and he would respond 'good times, good times...'
21:07.51Samothttps://static.wikia.nocookie.net/goodtimes/images/c/c3/Good-Times-1.jpg
21:08.11SamotDYN-O-MITE!
21:29.02*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
22:08.58*** join/#asterisk thansen (~thansen@192.74.130.86)
22:10.13*** join/#asterisk gerhard7 (~gerhard7@86-87-238-48.fixed.kpn.net)
22:17.44*** join/#asterisk jkroon (~jkroon@165.16.203.102)
22:35.49*** join/#asterisk gerhard7 (~gerhard7@86-87-238-48.fixed.kpn.net)
22:51.40*** join/#asterisk jkroon (~jkroon@165.16.203.102)

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