IRC log for #asterisk on 20210309

01:57.00*** join/#asterisk pchero (~pchero@211.178.226.108)
02:14.34*** join/#asterisk tsal (~tsal@i59F4A376.versanet.de)
03:49.09*** join/#asterisk gschanuel (~gschanuel@201.89.125.40)
03:50.12*** join/#asterisk fstd_ (~fstd@unaffiliated/fisted)
03:51.02*** join/#asterisk akp55_ (~akp55@c-73-148-15-158.hsd1.va.comcast.net)
03:51.16*** join/#asterisk ketas- (~ketas@0011-0000-0000-0000-d7dc-830e-07d0-2001.dyn.estpak.ee)
03:51.58*** join/#asterisk rwb1 (~Thunderbi@65.183.138.202)
03:52.07*** join/#asterisk Gugge_ (gugge@guggemand.dk)
03:53.43*** join/#asterisk fling_ (~fling@fsf/member/fling)
03:55.01*** join/#asterisk javi404_ (~quassel@unaffiliated/javi404)
03:55.27*** join/#asterisk ashka (~postmaste@pdpc/supporter/active/ashka)
03:57.03*** join/#asterisk electronic_eel_ (~quassel@electroniceel.org)
03:58.40*** join/#asterisk dobson` (~dobson@static.38.6.217.95.clients.your-server.de)
03:59.37*** join/#asterisk smkelly (~smkelly@mykonos.smkelly.org)
04:00.47*** join/#asterisk tris (tristan@camel.ethereal.net)
04:01.00*** join/#asterisk leifmadsen (~leifmadse@asterisk/documenteur-extraordinaire/blitzrage)
04:01.01*** mode/#asterisk [+o leifmadsen] by ChanServ
04:01.45*** join/#asterisk tsal (~tsal@i59F4A376.versanet.de)
04:02.17*** join/#asterisk Posterdati (~posterdat@host-87-21-221-219.retail.telecomitalia.it)
04:02.19*** join/#asterisk mrtnt (~martint@martint.data.ee)
04:02.40*** join/#asterisk mmlj4 (~mmlj4@ip174-69-111-70.no.no.cox.net)
04:04.41*** join/#asterisk TriJetScud (~TriJetScu@23.172.144.5)
04:10.30*** join/#asterisk sibiria (~sibiria@c-774571d5.013-383-79736414.bbcust.telenor.se)
05:05.31*** join/#asterisk life_of_e (~life_of_e@108-95-189-245.lightspeed.irvnca.sbcglobal.net)
05:12.48*** join/#asterisk gschanuel (~gschanuel@201.89.125.40)
05:21.39*** join/#asterisk gregf (~gregf@unaffiliated/gregf)
05:23.50gregfHi, I switched my setup over to transport-tls tonight, and my client is connecting. I see my asterisk server is registered to my provider over tls. When i try to dial any extensions though I get the following error. 200: Couldn't negotiate stream 0:audio-0:audio:sendrecv (nothing)
05:27.59gregfwell if I comment out media_encryption=sdes from my pjsip.conf it connects just fine, but there's no audio.
05:32.53*** join/#asterisk Ner0Zer0 (~Ner0Zer0@87.253.63.54)
05:37.50*** join/#asterisk pchero (~pchero@211.178.226.108)
05:52.18*** join/#asterisk maristo (~maristo@109.174.114.229)
08:11.15*** join/#asterisk joako (~joako@opensuse/member/joak0)
08:15.05*** join/#asterisk BakaKuna (~Thunderbi@2a02-a446-ae46-1-6632-418b-1ca9-b0f4.fixed6.kpn.net)
08:36.59wyrewhat's the proper location for en sounds?
08:37.17wyreI've got a clean install of asterisk and the folder is not in /var/lib/asterisk
08:37.27wyrebut /usr/share/asterisk 🤔
08:49.31*** join/#asterisk mrtnt (~martint@martint.data.ee)
08:57.29*** join/#asterisk EmleyMoor (42b789682f@firthpark.tinsleyviaduct.com)
09:05.22wyreapparently the /var/lib/asterisk/sounds/en is not owned by the asterisk package in debian 🤔
09:05.40wyreare those sounds generated in the first start of asterisk?
09:12.55*** join/#asterisk stux|work (stux@endurance.xzibition.com)
09:15.32*** join/#asterisk stux16777216Away (stux2@grid9.quadspeedi.net)
10:11.22*** join/#asterisk fling (~fling@fsf/member/fling)
11:37.37*** join/#asterisk rpifan (~rpifan@p200300d2671bda00d7dadc80b2148f9c.dip0.t-ipconnect.de)
12:12.58*** join/#asterisk BakaKuna (~Thunderbi@86-89-65-191.fixed.kpn.net)
13:19.34Kobazweird issue all of a sudden... yealink phones aren't trusting a godaddy starfield G2 cert provisioning server
13:19.38Kobazand it's not expired
13:38.15SamotThe certs aren't working for what reason?
13:41.12*** join/#asterisk sibiria (~sibiria@unaffiliated/sibiria)
13:44.20*** join/#asterisk retentiveboy (~retentive@c-24-125-16-104.hsd1.ga.comcast.net)
13:46.11*** join/#asterisk kerouac[m] (kerouacmat@gateway/shell/matrix.org/x-wiqdgfzlobphtxwg)
13:54.21*** join/#asterisk rwb (~Thunderbi@65.183.138.202)
14:00.46*** join/#asterisk paulgrmn (~paulgrmn@c-98-250-183-21.hsd1.mi.comcast.net)
14:05.10*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
14:08.08nbjoergKobaz: do you have any intermediate certs?
14:17.08*** join/#asterisk sa02irc (~mbax@155-079-043-212.ip-addr.inexio.net)
14:27.59*** join/#asterisk craigify (craigify@iceland.sdf.org)
14:30.45Kobazyeah
14:30.57KobazSamot: syslog on the yealink says like cert validation error, or something like that
14:31.08Kobazi had to reboot my pc, i don't have the exact log entry but I can get that again
14:31.17Kobazyeah i have all the certs in the chain server-side
14:32.50Kobaznbjoerg: yes on intermediates
14:33.02Kobazthey all expire waaaay in the future too, and the phone has the correct time
14:33.12SamotHold on
14:33.17Kobazholds
14:33.26SamotAre these self gen?
14:33.33Kobaznope, godaddy starfield g2
14:33.46SamotWhat is waay in the future?
14:33.58Kobazlike uhh 2033 is the earliest expire
14:34.03SamotUhhh
14:34.11SamotThey changed rules
14:34.13Kobazversus your normal like 1-2 year certs
14:34.33Kobazthese are signing key expirations
14:35.02Kobazand I wouldn't think a yealink phone that's had the same firmware for... months, isn't going to suddenly follow new rules
14:35.15Kobazmaybe?... depends on implementation, but that would be odd
14:35.33Kobazlemme dump you the cert chain
14:36.53SamotI was talking about TLS
14:38.01Kobazright but, whatever firmware is in use, i would think has tls rules at the time it was written/build
14:38.17Kobazbut anyway, lemme get the chain real quick
14:40.12SamotWhat firmware?
14:40.33Kobazgood question
14:43.11Kobaz[Yealink SIP-T46G 28.81.0.110
14:43.42KobazSo it's definitely a bit old.  It's been sitting around a while
14:44.08KobazI know older firmware might have trust issues... but I'm (pretty sure?) that this was working on this server
14:45.15SamotWell that's an EOL model these days.
14:46.31Kobazfor sure
14:46.42Kobazone that's alive and well out in the real world, in plenty of places
14:50.41SamotOK.
14:50.49SamotSo 28.81.0.110 is from 2017
14:50.51Kobazimma update the firmware and see
14:50.53KobazI know
14:51.07SamotConsidering that TLS was overhauled in 2020, I'd say you might be out of date.
14:51.09KobazJust curious if anyone else has had similar issues with ssl certs going untrusted
14:51.17KobazYeah, fair enough
14:51.22SamotSo sure, the firmware supported TLS as it was in 2017.
14:51.29SamotYes.
14:51.42Samot*A lot* did. In 2020.
14:51.57SamotFor all the same reasons, the CA's didn't have the proper updates.
14:52.09SamotOld protocols like SSL and TLS 1.0 where removed.
14:52.13Kobazright
14:52.24SamotAny CA's still supporting them got hit.
14:52.53SamotTLS certs are no longer being considered valid past 36 months.
14:53.12SamotSo having 10 year certs isn't going to be a thing.
14:53.31*** join/#asterisk thansen (~thansen@192.74.130.86)
14:53.35Kobazyeah makes sense
14:54.17SamotSo the T-46G went EOL on 4/1/2020, it still gets one year of updates.
14:55.31sibiriathe limit isn't even 36 months now. most browsers are now complaining on certs older than 13 months
14:57.20sibiriaprobably just a matter of time before various ssl/tls libraries tags along
14:57.41SamotWell there's no point in SSL anymore.
14:57.58SamotIf you're still running things over SSL then you really don't care about security.
15:00.49nbjoergsibiria: unlikely to be ever enforced by default on tls layer
15:01.07nbjoergsibiria: since TLS is used in a lot of environments with completely different constraints than the web
15:01.33sibiriano but through the verification, e.g. when using libssl
15:06.04*** join/#asterisk kharwell (uid358942@gateway/web/irccloud.com/x-htoohyvnogqcnvwv)
15:06.04*** mode/#asterisk [+o kharwell] by ChanServ
15:07.27nbjoergsibiria: it will at most be an option
15:07.54nbjoergthe existing moves are already harmful enough for embedded environments...
15:08.35sibiriait's a bit of a bitch for internal environments and agreements yes
15:09.12SamotNo one will ever be satisified.
15:09.43sibiriabound to happen when one or two big orgs. make decisions for open standards that affect everyone
15:09.45*** join/#asterisk igcewieling (~ewieling@199.27.202.86)
15:10.01SamotI'm not sure one or two big orgs made that decision.
15:10.13SamotIt was also something that was pretty well communicated.
15:10.19sibiriaapple and google were the largest driving forces behind it
15:10.25sibiriamozilla foundation tagging along as third
15:10.43nbjoergwell, yes. that's like 90% of the web browsers
15:10.45SamotMy point still stands.
15:10.56SamotNo one will ever be satisified.
15:11.03SamotWhich I find amusing.
15:13.25igcewielingare they going to break web browsing or something?
15:13.51nbjoergigcewieling: have you followed web browser development the last decade at all
15:14.31KobazSamot: what part of SSL shows someone doesn't care about security?
15:14.35Kobaz*citation needed
15:15.09*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
15:15.22sibiriaigcewieling: they're making it more secure by limiting ssl/tls certificates' acceptable life span, with the risk that non web browsing also using ssl/tls may get some mud splashed on them
15:15.24igcewielingnbjoerg: not really.
15:15.28SamotKobaz: SSL is dead.
15:15.34igcewielingAh, that.
15:15.41SamotKobaz: SSL was replaced with TLS. Nothing supports SSL or TLS 1.0 anymore.
15:16.00KobazOh, you're just talking about the low level
15:16.03igcewielingIf it breaks web sites, people will use something else.
15:16.15seanbrightsaying SSL is fine
15:16.20seanbrighteveryone knows that this is
15:16.23nbjoergSamot: not true, but also not relevant
15:16.24seanbrightstop it.
15:16.46sibiriassl will be the colloquial term for many years more. just accept it :)
15:16.48KobazSSl/TLS you're just being needlessly pedantic
15:16.49nbjoerg"No current software uses SSLv3 or TLS 1.0 by default"
15:17.17Kobazthere's nothing wrong with TLS 1.3 in terms of security (that we know of).  I'
15:17.18nbjoergas usual, there are still valid cases for the legacy support in special cases
15:17.25KobazI'm sure the NSA has something to say about that
15:17.37*** join/#asterisk gschanuel (~gschanuel@201.89.125.40)
15:17.43SamotOK.
15:18.03nbjoergand no, the protocol deficits are not necessarily relevant for those cases either
15:18.07SamotSo this all started because of something "weird" with certs not working anymore.
15:18.11igcewielingSo, has anyone seen stir/shaken headers on calls arriving from carriers?
15:18.29SamotTurns out it's most likely due to the fact that the firemware is almost 4 years old and in the last 18 months changes have happened.
15:18.40SamotSuch as SSL protocol being dead and using TLS
15:18.45SamotBecause they are different.
15:19.30seanbrightright, they are different
15:19.48nbjoergtry enabling TLSv1
15:19.57nbjoergthat would be the easiest to test?
15:24.55SamotKobaz: Did you update the firmware?
15:25.57nbjoergI mean if the provisioning server no longer supports a common TLS version with the phone, that could happen without a firmware update
15:26.06nbjoergand error reporting of phones often is depressing
15:26.33Kobaznot yet, working on adding buttons for a new hire in our office
15:27.00Samotnbjoerg: Yealink has also updated their default trusted CA list in their firmware in the last 4 years.
15:27.20Samotnbjoerg: This could be an issue with changes on one side and the phone lacking updates to support the changes on its side.
15:27.38KobazRight
15:28.43nbjoergyeah
15:29.09*** join/#asterisk bford (uid283514@gateway/web/irccloud.com/x-ymwmfpcfsnmzeima)
15:29.10*** mode/#asterisk [+o bford] by ChanServ
15:30.09sibiriawhen using call files and hangup handlers i'm running into a little quirk when the other end isn't picking up and the call expires, i.e. when the call file's WaitTime is reached and asterisk gives up by sending a CANCEL
15:30.40sibirianormally this would send asterisk to the "failed" extension and set REASON to 3 (remote end ringing, or so)
15:31.13sibiriabut with a hangup handler, REASON is never set, and i cannot find an easy way in the handler to find out that the call actually expired without pick-up
15:31.39sibiriathe hangup handler happens *before* asterisk sends CANCEL and gets a response to that
15:32.17sibiriaso asterisk considers the call "Normal Clearing" instead, with the last known SIP response for the channel being 18x ringing/progress/forwarded etc.
15:33.48Kobazyou need to put the hangup handler on the outgoing channel to get the cause code
15:34.20sibiriait is set on the outbound channel, from within the call file. the handler's context happens just fine
15:34.23*** join/#asterisk fling (~fling@fsf/member/fling)
15:34.37Kobazthen you should be able to get the cause then
15:34.40Kobazonce that channel hangs up
15:34.46Kobazhttps://wiki.asterisk.org/wiki/display/AST/Hangup+Cause
15:35.45sibiriathe cause for an outbound call that times out is always 0
15:36.03sibiriaand this can happen in more cases than just an expired call attempts
15:36.12Kobazpaste your log?
15:36.30sibiriayeah, hold on a minute
15:37.00igcewielingif all else fails you could put a wait, or even wait, check to see if hangupcause is set, if not ,wait some more, repeat.
15:37.48igcewielingWhen I did that with my call files, I realized I was setting the hangup handler on the wrong channel.
15:37.52sibiriathe "failed" extension was handy for these particular cases, but i have to omit it because with a hangup handler in place the handler will happen first, then the "failed" extension afterwards. a bit messy
15:38.00nbjoergbtw, does someone here have a ticket account for snom by chance?
15:38.21igcewielingsibiria: try not using a hanguphandler and do it in the failed extension?
15:38.59sibiriaigcewieling: this comes with its own share of problems. migrating towards hangup handler for good reasons
15:39.08Kobazsibiria: so your issue is... on cancel, you don't know it's a cancel cause?
15:39.13KobazDIALSTATUS will tell you that
15:39.27igcewielingsibiria: hanguphandlers are good.   call files are weird and don't always fit within the dialplan model you use.
15:39.42Kobazyou'll need to check DIALSTATUS on the original caller channel before checking the hangup cause
15:40.10sibiriaKobaz: correct. the call is sent to the handler *before* asterisk cancels it, so inside the handler asterisk still only knows cause 0 / Normal Clearing / 180 Ringing (or 183 Session Progress etc.)
15:40.23Kobazew
15:40.36Kobazthat doesn't seem right
15:40.42sibiriai would insist that it's better the handler is called *after* asterisk cancelled the call
15:40.47igcewielingDidn't Kobaz write hanguphandlers?   Blame him. 8-|
15:40.54Kobazi didn't write the final version
15:41.02SamotLOL
15:41.09Kobaz:P
15:41.13sibiriamust be that sean bright guy, or that man with the crazy hats
15:41.34fileI didn't touch 'em
15:41.38KobazIt was redone to use autoservice so it can stay alive for more than one line of dialplan
15:41.44Kobazand some other changes
15:42.14Kobazsibiria: I can look into that
15:42.58igcewielingsibiria: are you calling the channel directly in your .call file or are you using dialplan on both legs of the call?
15:43.09igcewielingi.e. Local/
15:43.30KobazYeah you still didn't show you log
15:43.40sibiriaKobaz: this is a slightly older ast version, 16.15.0. still gathering the log
15:43.54fileit wouldn't surprise me if it's because of the more asynchronous nature of PJSIP
15:43.56sibiriayes the call file contains the channel to call
15:44.12sibirianot jumping into a context which in turn calls Dial()
15:47.13Kobazwhy does having a slightly older asterisk version make gathering the log take longer?
16:07.46sibiriajuggling work tasks s'all, sorry for the delay
16:09.17sibiriaKobaz: http://paste.debian.net/hidden/e4d88450/
16:10.16sibiriathe interesting part is the channel variable dump on lines 110 to 130 or so
16:12.54sibiria"pbx_spool.c: Call failed to go through, reason (3) Remote end Ringing"
16:12.59sibiriathis part is teasing
16:13.13sibiriathis data is not available on the channel
16:13.29sibiriait is when using the "failed" extension
16:13.37SamotSo this is a timeout?
16:13.48SamotThe other end didnt answer?
16:13.50sibiriayes the outbound call expires since nothing is picking up
16:14.26sibiriahangup handler is invoked *before* asterisk tells the remote to CANCEL, so the handler hasn't got an accurate view of what actually happened
16:14.46sibiriaor well, it has a partial view of it...
16:14.54SamotAnd what is the dialstatus?
16:21.49sibiriaDIALSTATUS isn't available unless using Dial() - in my case the destination is set directly in the call file
16:25.09igcewielingHave you considered using Local/?
16:26.22sibiriafor now i'm just looking at temporary work-arounds
16:27.05*** join/#asterisk rpifan (~rpifan@p200300d2671bda0057872916dc050a4f.dip0.t-ipconnect.de)
16:29.31sibiriai wonder if there's a potential risk for a race condition of sorts here. say that the handler is taking a very long time, and the channel is answered in the middle of it
16:29.48sibiriabefore asterisk gets going with CANCEL etc.
16:31.01filePJSIP would terminate the call
16:31.53sibiriabut would it first pick up and bridge the channel? i.e. a prank call
16:32.13sibiriabefore hanging up once it's done with the hangup handler
16:35.03fileno.
16:35.57sibiriaso it ignores any SIP responses coming in during the handler
16:36.13sibiriaor just instantly knee-jerks with something
16:36.44SamotSo this is timing out because you set a timer right?
16:37.15sibiriayes, it uses WaitTime in the call file
16:37.37fileI don't think it's exactly doing what you think it's doing
16:37.44fileit is hanging up, but PJSIP is done asynchronously
16:37.52fileit gets queued up as a task to do
16:38.06file(that's what I suspect)
16:38.43sibiriayes i figured that the log portions may also be dumped out of order, but nevertheless the handler has no idea that we've sent off CANCEL, and the last thing it knows is 183 Sess Prog
16:38.53fileeither way, it will be hung up
16:39.02fileeven if it got an answer in there, it would be hung up
16:39.42sibiriayeah, but what happens between getting an answer and exiting the handler?
16:39.49sibiriasay the handler takes 6 seconds to finalize
16:40.12sibiriawill pjsip reciprocate on SIP responses while asterisk is in the handler?
16:40.14fileI haven't looked closely, either it would quickly get hung up, or the channel would stay up and then be hung up after 6 seconds
16:40.15fileyes.
16:41.28sibiriaok. well, either way, i feel that the handler shouldn't definitely not happen until asterisk shot off CANCEL etc.
16:41.33sibiriashould*
16:41.42Kobazsibiria: k checking now
16:42.31Kobazsibiria: the handler could take an hour, pjsip is done at that point
16:42.59Kobazbut the dialog could stay open until the handler is done
16:43.28Kobazyou can test that pretty easily, put a Wait(10) in the handler, Wait(20) and see if the cancel waits that long
16:43.58fileit will, because according to le reading of the code the channel driver isn't told to hang up until after
16:44.03sibiriait does
16:44.09sibiriai already tested it
16:44.28Kobazyeah based on the log, it does look like that
16:44.35Kobazso you tested it for much longer intervals?
16:44.41sibiriaseveral seconds
17:06.45KobazHungup channel detected, running agi in dead mode.
17:06.51Kobazpjsip CANCEL should be kicking off here
17:07.20Kobazor even prior
17:24.02*** join/#asterisk fling (~fling@fsf/member/fling)
17:26.49*** join/#asterisk pchero (~pchero@211.178.226.108)
17:29.27*** join/#asterisk rpifan (~rpifan@p200300d2671bda009ace00fc35072318.dip0.t-ipconnect.de)
17:50.28*** join/#asterisk murdick (~murdick@noon.nas.net)
17:54.31*** join/#asterisk sa02irc (~mbax@155-079-043-212.ip-addr.inexio.net)
18:06.44*** join/#asterisk driz (~driz@joinsg.net)
18:34.37*** part/#asterisk SenseiSama (~whoa@ool-ad0244e9.dyn.optonline.net)
18:44.48*** join/#asterisk BakaKuna (~Thunderbi@86-89-65-191.fixed.kpn.net)
18:57.05*** join/#asterisk clarjon1 (~clarjon1@unaffiliated/clarjon1)
19:11.39*** join/#asterisk rpifan (~rpifan@p200300d2671bda009ace00fc35072318.dip0.t-ipconnect.de)
19:20.11*** join/#asterisk eXistenZ (~pectic@bzq-79-183-200-96.red.bezeqint.net)
19:23.45sibiriawant me to try wrap that up in a bug report on the ol' jira?
19:23.52sibiria(the premature hangup handler thing)
19:23.55Kobazyeah sure
19:56.30SamotQuestion: Does this happen with non-callfile generated calls?
20:23.49sibirianot sure, haven't tried it by originating calls over the console or so
20:28.36SamotThat would probably be a helpful troubleshooting data point or two.
20:28.51SamotDoes console do this? Does dialing from phone to phone do this?
20:32.04SamotPlus it is using the last reply received. Since you are canceling the call with a dialer timeout, there are not more replies.
20:33.17sibiriathat's sort of the problem. the last response of a cancelled call should be 200 Canceling or 487 Request Terminated
20:33.31SamotDifferent request
20:33.39SamotA cancel is a new request
20:35.05SamotThen cancel will get back a 200 ACK
20:35.23sibiriasame cseq = same request?
20:36.14SamotBYE and CANCEL are new SIP requests.
20:36.24SamotSeparate of the INVITE
20:37.08sibiriaah ok, they are in the same cseq but different method
20:37.16SamotRight
20:37.24SamotThey are related
20:37.54SamotSo the Invite received a 183 as its last reply
20:38.30SamotIf early media wasn't happening it would have been a 100 Trying
20:39.05SamotBut you stopped the call. There is no reply needed to tell you the reason.
20:39.55sibiriaasterisk stopped the call, but i cannot know why at this point
20:40.02sibiriabecause i can't see the last SIP response of the channel itself
20:40.08SamotYour time expired
20:40.26SamotHow long is the wait?
20:40.40sibiria25 seconds
20:41.08SamotAnd that is how long it takes for the cancel to happen?
20:42.41sibiriayes. the total time of the request can be used to infer what has happened, but ideally the channel should, at hangup, contain the last known SIP response of the channel, but this isn't the case here with hangup handlers
20:43.14SamotThat is the last known response for the INVITE
20:43.46sibiriathat's less relevant i think. the handler is tied to the channel, not the invitation
20:44.03sibiriain my case, the channel is still busy and conversing after the hangup handler has run its course
20:44.06sibiriait's premature
20:44.31SamotRight which means it doesn't care that it is PJSIP?
20:44.37SamotThe channel hung up
20:44.53SamotIf it was an IAX channel you hangup handler would run at the same point.
20:45.05SamotNo SIP replies.
20:45.26SamotDAHDi, same thing.
20:45.35sibiriai would guess the same problem would happen with chan_sip, but i haven't tried
20:45.46SamotWhat about the others?
20:45.52SamotYou're focused on a SIP reply
20:46.08sibiriathis is an "app to phone" application. no handsets invovled
20:46.21SamotI understand that.
20:46.26SamotBut a hangup is a hangup.
20:46.34SamotThus hangup handlers are executed if set.
20:46.47SamotDoesn't matter if it's PJSIP, SIP, IAX, Local, etc.
20:47.26SamotIt can't give you the reply to the CANCEL until the CANCEL is fired.
20:47.30sibiriathe bigger point with this problem is that it's only possibly to try infer why the hangup handler was executed, since it has an incomplete view of the channel
20:47.36SamotThe CANCEL can't be fired until the channel is hung up.
20:47.58sibiriafailed/h extension has a complete view, because they happen last, after CANCEL
20:48.14sibiriano need to guess what happened, as the channel variables show the full picture
20:48.38sibiriathey will contain the last known SIP response of the channel, the correct HANGUPCAUSE etc. etc.
20:49.16sibiriaif the channel is answered and then hung up normally, the hangup handler will execute correctly at the end
20:49.47sibiriait's jsut this case, when the call file expires, where it seems to be invoked prematurely and end up presenting a half-baked set of channel variables
20:50.27igcewielingI suspect most people use Local/ channels
20:52.18sibiriaat least in my view an unanswered call should be viewed as 487 / Q.850 = 19 or so
20:52.52sibirianot "Normal Call Clearing"
21:03.06SamotSo what is this calling?
21:03.11SamotAn actual phone?
21:04.49SamotOr more to the point, does the destination have its own timeout?
21:05.48sibiriait's calling a phone on the PSTN, a phone which can ring for much longer than 25s
21:05.55SamotOK
21:05.59SamotDoes it have a timeout?
21:06.14SamotIf I was to call it directly would it time out at 45s and hang up on me?
21:06.19SamotOr would it send me some place?
21:07.00sibiriait hangs up on the attempt, and that case won't shoot the hangup handler off prematurely
21:07.12SamotBut you would get back a 408 reply.
21:07.12sibiriaso far i've only been able to see this happen when the call file times out
21:07.15SamotUser Timeout
21:07.30sibiriayes
21:07.40SamotOK so you're looking at this wrong.
21:07.59SamotIn all the scenarios is which this works for you, the other side is telling you something.
21:08.09SamotYou're looking for responses from them.
21:08.32SamotWhen it fails, it is because you told the other side "I'm done."
21:08.58SamotSo now the other side is responding with "OK, we accept you're done"
21:09.40sibiriayes this is technically correct, but the disposition of this case would better be "NO ANSWER" instead of "FAILED" combined with "Normal Clearing". those two contradict eachother, and the latter is the opposite of the reality of the invitation
21:09.40SamotBy telling the other side you are done, you triggered a CANCEL which will not give you a response back on your INVITE
21:09.48SamotWhich is what 4XX replies do.
21:09.54SamotThey are replying to the INVITE
21:10.07SamotNo
21:10.12SamotIt wouldn't be a NO ANSWER
21:10.27SamotYou didn't give the other side the option of answering.
21:11.43SamotIf I butt dial my mom and realize it 3 seconds in, I hangup.
21:12.18SamotShe still could pick up that call before it was told to cancel. She'll get nothing because the call was terminated..
21:12.27SamotThat wasn't a case of NO ANSWER
21:12.31SamotThat was a termination.
21:12.42SamotWhich is a 487 and 4XX are failures.
21:13.23SamotWell users responses..but in this cause..it was a failure in the sense you made a bad call.
21:13.38SamotOr you terminated the call because it didn't answer fast enough.
21:14.01SamotAre you getting HANGUPCAUSE 0 on anything else?
21:15.21sibiriacan't say off the top of my head, not at work right now so i can't access call logs to see specific cases where the cause is 0
21:15.57SamotBased on the logging you showed it looks like channel.c is destroying the channel before the pjsip_sessions are doing the cleanup of the dialog.
21:19.19SamotOh wait. I was looking at the 200 OK to the cancelling.
21:20.56*** join/#asterisk hvxgr (~wl2v_usrn@n7s.org)
21:24.03SamotAre you mapping the sip response in your agi script?
21:25.45sibiriait's the unaltered "tech" response from HANGUPCAUSE()
21:33.19*** join/#asterisk SSlater (~simon@203.214.65.15)
21:36.28SamotYeah, the hangup handlers are being executed when the channel is hung up.
21:38.37SamotAnd at the time of the hangup that 183 Session Progress was the last SIP code reply on the channel.
21:38.43*** join/#asterisk rpifan (~rpifan@p200300d2671bda009ace00fc35072318.dip0.t-ipconnect.de)
21:56.41*** join/#asterisk electronic_eel (~quassel@electroniceel.org)
22:04.34Kobazyeah the hangup handler is running prior to complete teardown
22:04.44Kobazand at this point you don't have the cause
22:04.51KobazAs far as I gather, on this
22:13.27SamotWell, the cause is there.
22:14.27SamotDial() stopped because 25 seconds elapsed before another response was received.
22:14.52SamotThe last SIP Code is 1XX which is a provisional response.
22:14.59SamotNot an error.
22:15.10SamotNot a 408 timeout.
22:15.54SamotNot getting a 1XX response = other side not responding at all.
22:16.51sibiriathere is no cause at all. it's just that asterisk produces an integral response, so it will be 0 rather than null/empty
22:16.53SamotSo all the data provided at the end of the call points to no one answered in 25s but they were alerted.
22:17.57SamotIn the world of hangup cause codes 0 is the null/empty
22:18.14Samot"Can't relate this to something, it's unknown"
22:18.30SamotWhich is would null/empty would mean as well.
22:18.35Samotwhat*
22:21.34SamotThe way I see is your call logic is looking for a non-1XX user response which the 25 second timer doesn't allow for because the destination takes longer to respond with a 408 or an answer.
22:29.49sibiriait assumes some amount of coherence. failed/h extensions will happen when the channel is finalized, and the "ast" hangup cause at that point will report what actually happened
22:30.08sibiriawith a hangup handler, it happens before the channel is finalized, and the "ast" hangup cause will be "normal clearing"
22:31.00sibiriait's both inconsistent and erroneous
22:53.54Samothangup handlers can happen before or have h
22:54.00Samots/have/after/
22:54.50igcewielingWhich is why you shouldn't use both.
23:03.04SamotHow are you setting the hangup handlers?
23:10.12sibiriadirectly in the call file, through Setvar
23:10.54sibiriai.e. Setvar: CHANNEL(hangup_handler_push)=etc
23:44.40*** join/#asterisk Cyrillax (~Cyrillax@unaffiliated/cyrillax)

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