IRC log for #asterisk on 20210214

00:00.55*** join/#asterisk Janos (~textual@201.204.94.76)
00:04.10*** join/#asterisk clarjon1 (~clarjon1@unaffiliated/clarjon1)
00:04.48*** join/#asterisk opal (~wowaname@volatile/founder/wowaname)
00:21.54*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
00:23.27catphishi have another question: can a pjsip channel sanely act like a FXS? by which i mean can it answer a sip invite but then behave like an analog line that hasn't dialled anything yet, playing a dial tone, and accepting dtmf into a dialplan? i'm sure this could be hacked together, but is this a standard thing to do at all?
00:28.20catphishthis may seem an odd request, the reason is that i'm considering whether users might get a better experience with ATAs if they dialled asterisk immediatly when they went off hook, and asterisk took over the process
00:36.06[TK]D-FenderThat is not a SIP thing period.  PJSIP is no different
00:36.17[TK]D-FenderNormally you dial a completed number b the time the client is hapy with it
00:36.54[TK]D-FenderOtherwise you need the phone to literally dail on "anything" then hit an IVR regtardles of what then send and emulate the experience
00:41.22sibiriayou can simulate the experience with some dial plan magic
00:42.11catphishthanks, i thought i could simulate it with a dialplan context, but wondered if i was missing anything more native / standard
00:42.33catphishhopefully this won't be necessary and ATA hardware will handle it well enough
00:43.10[TK]D-FenderATA = FXS devide that DOES the dialtone, etc
00:43.26SamotYeah, why does Asterisk need to do that?
00:44.26catphishmy thought was only that it would avoid the need to manage dialplans on ATA devices, particularly where they may vary between customers
00:45.14[TK]D-FenderMaybe you should follow standards rather than let each invent their own and have that imposed on your hardware
00:46.00*** join/#asterisk pvoigt (~Linux@unaffiliated/pvoigt)
00:46.01catphishstandards?
00:50.23SamotYou can either do it in the dialplan of the device
00:50.27SamotOr you do it in Asterisk.
00:50.43SamotYou really shouldn't be letting everything just pass through.
00:51.30catphishcan ATAs send INVITEs for each digit and get back a "this number isn't complete yet"?
00:51.38SamotNo.
00:51.40catphishshame
00:51.43SamotThat's not how it works.
00:51.50SamotThat's not even how POTS works.
00:52.16catphishwhat did you mean by "Or you do it in Asterisk"?
00:52.22SamotIn the dialplan.
00:52.48catphishoh, well sure, the issue is purely the ATA knowing when to send the invite
00:53.07SamotIt sends the INVITE when its digit timeout is reached
00:53.16[TK]D-FenderSo enable the auto-dialout feature if it has it
00:54.10catphishtimeout isn't a nice user experience imo, so i'm hoping i can avoid that (at least nationally) with good dialplans
00:54.18SamotWhat do you mean?
00:54.31SamotPeople pick up the phone, they dial digits, it goes out.
00:54.49SamotIf you want to limit the timeout, you make it that way in the device dial patterns.
00:55.00catphishthy dial digits, then they have to wait before the call it initiated
00:55.07SamotWhat do you mean?
00:55.20SamotThey dial the digits, it gets sent, the call is processed, they are hearing ring back
00:55.34SamotOr whatever that might happen.
00:55.37catphishyou just said it, It sends the INVITE when its digit timeout is reached
00:55.48SamotRight?
00:55.50SamotAnd?
00:55.52catphishie they have to dial fast, and then wait
00:55.55SamotEven POTS had digit timeouts
00:56.05SamotThen you set the patterns.
00:56.17catphishright, and that's what this conversation is about
00:56.30catphishwhether those patterns could be managed in asterisk
00:56.36SamotOK.
00:56.43catphishor whether i have to push them out to the ATAs
00:56.53SamotThe pattern in the phone is "10digits, send immediately"
00:57.07SamotNot if that person has the right to call that destination.
00:57.08catphishright, but sadly it's nowhere near that simple
00:57.13SamotYou still need to deal with that.
00:57.25catphishbut hopefully i can come up with one that works for everyone
00:57.33SamotIt's not that hard.
00:57.36SamotSeriously.
00:57.46SamotI've been doing this for almost two decades.
00:58.25SamotHow fast you want the device to send digits is up to you.
00:58.31SamotThe standard timeout is 3 seconds.
00:58.41SamotIn a lot of devices.
00:58.52catphish3 seconds is reasonably sane
00:59.16catphishworst case i can probably match some numbers to dial instantly, and make shorter ones have to time out
00:59.58*** join/#asterisk Dovid (~dovid@ool-2f10fdb3.dyn.optonline.net)
01:00.51catphishuk phone numbers are an unforgivable mess
01:01.09SamotBut what you're suggesting is that when the device goes off hook it "hotlines" to Asterisk.
01:01.15SamotIt still needs to dial something
01:01.19SamotIt just does it auto dial
01:01.47SamotSo now it dials 000 and Asterisk takes the call. Now everything that happens is in a call
01:01.55catphishyes, i was assuming the ATA was configured to auto-dial into something
01:01.59SamotOr you're giving them an IVR to enter things into.
01:02.17catphishyeah, that was the hack i was considering, but thought i'd ask for thoughts on it
01:02.33catphishfrankly, i hate the idea, so i think i'm going to put it out of my mind :)
01:30.06catphishso, i have one more question before i sleep, i need to associate an area code with each of my sip endpoints so that when they dial a local number, i know what area they mean, am i best off 1) having a context per customer (endpoint) 2) a context per area code 3) some kind of file based lookup of this information? or is this one of those things that asterisk simply has no opinion on and i need to work out what works for me?
01:32.15catphishi suspect a context per area code is going to be the most efficient solution for now, unless there's a way to have pjsip set arbitrary channel variables from its own endpoint config, i looked but didn't find such a thing
01:33.39Samotcatphish: I would use the AstDB.
01:33.54catphishcan i push data into astdb statically?
01:34.05Samotcatphish: When user A makes a call load their prefix
01:34.12SamotYes.
01:34.49catphishwell that's ideal if i can do that, i love astdb, but have only ever stored data in it dynamically, not from my config
01:35.24SamotI write out numerous entries for users/tenants.
01:37.33catphishhow do you populate it?
01:38.00catphishi found someone doing it with individual asterisk shell commands
01:41.33catphishyep, people seem to suggest just sending a script to asterisk -rx with "database put" commands
01:41.42catphishseems reasonable enough
01:43.43SamotAMI
01:47.21catphishoh ok, that is extremely useful, i think for this requirement i will find a way to do it with static config (ie more contexts), but being able to manage astdb via ami will very likely be useful for other things later
01:48.18catphishthanks for your help today! it's great to talk through configs sometimes, if only to realise why they're a bad idea :)
03:01.02*** join/#asterisk Janos (~textual@201.204.94.76)
03:01.28*** join/#asterisk akp55 (~akp55@c-73-148-15-31.hsd1.va.comcast.net)
03:31.03*** join/#asterisk sa02irc (~mbax@155-079-043-212.ip-addr.inexio.net)
03:42.36*** join/#asterisk electronic_eel (~quassel@213.240.182.167)
05:24.02*** join/#asterisk stux16777216Away (stux@endurance.xzibition.com)
05:31.10*** join/#asterisk sa02irc (~mbax@155-079-043-212.ip-addr.inexio.net)
05:42.33*** join/#asterisk scampbell (~scampbell@mail.scampbell.net)
06:15.30*** join/#asterisk yokel (~yokel@unaffiliated/contempt)
06:21.43*** part/#asterisk jeev (~j@unaffiliated/jeev)
10:55.00*** join/#asterisk fling (~fling@fsf/member/fling)
10:55.06flingCan you invite me to #voip?
10:55.19flingShould I use linphone or prefer another client?
11:12.50*** join/#asterisk rpifan (~rpifan@p200300d2671bda0093f42637773b0214.dip0.t-ipconnect.de)
12:05.25*** join/#asterisk rpifan (~rpifan@p200300d2671bda0056818a151195aa23.dip0.t-ipconnect.de)
12:07.45*** join/#asterisk jkroon (~jkroon@165.16.203.102)
12:22.23*** join/#asterisk opal (~wowaname@volatile/founder/wowaname)
12:33.48flingWhere to get a free did? ipkall is not around anymore
12:37.36*** join/#asterisk opal (~wowaname@volatile/founder/wowaname)
12:59.11*** join/#asterisk sinaowolabi (~Sina@102.134.114.1)
14:15.47*** join/#asterisk [TK]D-Fender (~joe@modemcable142.109-203-24.mc.videotron.ca)
14:49.09*** join/#asterisk saint_ (~saint_@unaffiliated/saint-/x-0540772)
15:01.07*** join/#asterisk Janos (~textual@201.204.94.76)
15:15.35*** join/#asterisk gerhard7 (~gerhard7@86-87-238-48.fixed.kpn.net)
15:23.19*** join/#asterisk rpifan (~rpifan@2003:d2:671b:da00:4ecd:14c5:505:a2cc)
15:46.32*** join/#asterisk Janos (~textual@201.204.94.76)
15:57.25*** join/#asterisk opal (~wowaname@volatile/founder/wowaname)
16:13.43*** join/#asterisk Dovid (~dovid@ool-2f10fdb3.dyn.optonline.net)
16:31.19*** join/#asterisk Janos (~textual@201.204.94.76)
16:35.02*** join/#asterisk saint_ (~saint_@unaffiliated/saint-/x-0540772)
17:19.06*** join/#asterisk pchero (~pchero@211.178.226.108)
17:46.50*** join/#asterisk rpifan (~rpifan@p200300d2671bda0074deffacc38cda5d.dip0.t-ipconnect.de)
18:03.59*** join/#asterisk sa02irc (~mbax@155-079-043-212.ip-addr.inexio.net)
18:11.03*** join/#asterisk forgotmynick (uid24625@gateway/web/irccloud.com/x-flaorfhhqnafsqzq)
18:23.31*** join/#asterisk akp55 (~akp55@c-73-148-15-31.hsd1.va.comcast.net)
18:32.05igcewielingAny ideas what might cause Asterisk to send a SIP 480 reply?
18:39.17SamotUser is busy
18:40.43SamotWell Asterisk could use that four no answer
18:40.53SamotFor*
18:46.09igcewielingReturn a busy when there is no answer?
18:47.39igcewielingOur hosted platform returns a 486 instead of a 404 on calls to DIDs not loaded into the system. 8-|
18:47.59igcewielingAnyway, I'll track the cause of the 480 eventualy, I was just wondering if there is a common cause.
18:48.24Samot480 is Temporarily Unavailable
18:48.35SamotSome devices send that when in DND
18:49.07igcewielingAt least with Asterisk / FreePBX there is a chance to making a change.   Our Bicom hosted service runs EVERYTHING inside an encrypted php AGI.
18:49.24igcewielingGawd, I hate that system.
18:49.33SamotSo this was an unallocated number?
18:49.54igcewielingin my 480, I don't know yet.      for the 486 on hosted, yes.
18:52.10igcewielingfor now I'll send a busy on 480
19:57.55*** join/#asterisk towser (~towser@unaffiliated/towser)
19:58.01*** join/#asterisk ghoti (~paul@bras-base-ptldon0102w-grc-03-76-66-164-87.dsl.bell.ca)
19:58.17towserhow do I find the ip address of my server when running astrisk on deepin?
20:01.58SamotThe same way you find it without Asterisk running on the server.
20:02.40*** join/#asterisk gerhard7 (~gerhard7@86-87-238-48.fixed.kpn.net)
20:04.18towserwell I did try ifconfig but the boradcast ip didn't access the gui when I went to it
20:05.17fileAsterisk has no GUI.
20:08.44*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
20:09.42*** join/#asterisk fling (~fling@fsf/member/fling)
20:10.11*** join/#asterisk akp55 (~akp55@c-73-148-15-31.hsd1.va.comcast.net)
20:23.13Kobazgoooooey
20:23.26Kobaztowser: what gui are you using? perhaps freepbx?
20:24.12towserKobaz, I'm trying to add a gui
20:24.22Kobazsounds fun
20:35.17*** join/#asterisk catphish (~charlie@unaffiliated/catphish)
20:35.51igcewielinggenerally you get the hostname, then lookup the IP of the hostname using DNS.
20:36.38igcewielingtowser: don't create a general use GUI for Asterisk.   Use FreePBX.   The only case where that is not the case is where you have specific tasks/applications for which you want a custom gui.
20:37.29Kobaztowser: what's your use case?
20:38.50towsertrying to install a freepbx to use with astrisk
20:41.32igcewielinguse the distro and be done with it.
20:52.30towserthe question is. can the distro be used as regular linux as well [normal desktop pbx in backgorund[
20:52.41SamotNo.
20:52.44SamotThe distro is a distro
20:52.53SamotLike deepin
20:53.15SamotHowever, the original issue was about finding the IP of the server.
20:53.34SamotThat has nothing to do with Asterisk or FreePBX. If you can't find the IP of the server, you have bigger issues to work out.
20:58.11catphishcan i trigger a pjsip reload (ie reload endpoints, auths, aors) via AMI?
20:59.12igcewielingPerhaps you are asking if you can run CLI commands from a script?
20:59.14catphishi guess i need to choose between "reload" or "command(pjsip reload)"
20:59.59catphishwell ami has a native reload command that (i assume) does a core reload, but i now realise i can run arbitrary cli commands, so i can just reload it with the "pjsip reload" command
20:59.59igcewielinglike this, for example:  $response = $asm->command("sip show peers");
21:00.37catphishigcewieling: thanks, so in my case: command(pjsip reload)
21:01.54SamotNo.
21:01.56igcewielingpjsip reload isn't really a command.
21:02.02*** join/#asterisk paulgrmn (~paulgrmn@c-98-250-183-21.hsd1.mi.comcast.net)
21:02.14Samotmodule reload res_pjsip.so
21:02.26SamotOr the pjsip module you need to reload
21:02.53igcewielingperhaps you aliases it in cli_aliases.conf to module reload res_pjsip.so
21:03.04Samot*CLI> pjsip reload qualify
21:03.04Samotaor       endpoint
21:03.08catphishreally? that command works for me, it reloads all the pjsip modules
21:03.18Samotpjsip reload *is* a command, just not for what you think.
21:03.24catphishoh okay
21:03.41Samotpjsip reload qualify aor <aor>
21:03.44Samotor
21:03.53Samotpjsip reload qualify endpoint <endpoint>
21:04.05catphishi specifically want to reload pjsip.conf, specifically *all* endpoints, aors and auths
21:04.16Samotmodule reload res_pjsip.so
21:04.44catphishideal, thanks
21:04.49SamotOr like igcewieling said, cli_aliases.conf and make a command that does that plus any other pjsip modules you want to reload.
21:04.56SamotLike mwi, etc.
21:05.09catphishpjsip reload seems to reload all of them
21:05.09Kobaztowser: so you *are* using freepbx. that was my first question
21:05.30towserKobaz, no I have deepin with astrisk installee
21:05.40Kobaza what?
21:05.42towserinstalled*
21:05.45Samot*CLI> pjsip reload
21:05.45SamotNo such command 'pjsip reload' (type 'core show help pjsip reload' for other possible commands)
21:05.52SamotThat by itself does nothing.
21:05.58SamotUnless it's been aliased.
21:06.02Kobazyeah module reload res_pjsip
21:06.08catphishSamot: weird, maybe it's aliased in my default config
21:06.12Kobazwhich, is a little silly IMO
21:06.19SamotThat's not a default setting
21:06.23SamotWhich means someone had to do it.
21:06.28Kobazpjsip reload would be more expected
21:06.33igcewieling"cli show aliases" will tell you.
21:06.35SamotUnless this is some odd distro based release of Asterisk.
21:06.51catphishpjsip reload                                       module reload res_pjsip.so res_pjsip_authenticator
21:07.01catphishit's an ubuntu package
21:07.47catphish<PROTECTED>
21:07.56catphishthere it is, part of ubuntu's default config
21:08.10catphishgood to know
21:08.37catphishi'm using ubuntu's default config as a starting point, i plan to strip it back one file at a time as i develop
21:08.54KobazSamot:  what's the reason for all the extra module reloads... doesn't reloading res_pjsip do the trick
21:09.12SamotNo.
21:09.25Kobazinteresting
21:09.34catphishi'm still dangerously on the fence between using realtime, and using a static file for my pjsip config
21:09.45KobazI use static-realtime
21:09.50igcewielingyou don't want to use realtime.
21:10.05Kobazmy configs are generated from the db, but they are statically loaded
21:10.13catphishigcewieling: any particular reason? it appears to work very well, and i'm definitely using it for ps_contacts
21:10.24igcewielingwrite a little script to generate pjsip configs from the database.
21:10.43SamotThere is a cost
21:10.43igcewielingcatphish: qualify doesn't work until the first packet from the endpoint arrives.
21:10.47SamotWe've talked about this.
21:11.07SamotThe is a resource cost for hitting the database for everything.
21:11.11catphishigcewieling: are you sure? i'm sure i tested this and it does
21:11.26catphishie it loads all contacts in at startup, my config depends on this in fact
21:11.52SamotLoading all the contacts doesn't mean they qualify
21:12.00igcewielingperhaps static realtime is different.   Samot, Kobaz any comments?
21:12.02catphishmy very reason for putting ps_contacts in the database is so that peers are immediately reachable after a failover to a different server
21:12.19SamotYou're confusing things.
21:12.32catphishactually this is easy to test, i will kill and start asterisk and see if it qualifies
21:12.39SamotBeing able to send a request to the endpoint is not the same as Asterisk qualifying it.
21:12.47catphishi know :)
21:12.51SamotOK.
21:13.12igcewielingthen immediatly do a "pjsip show contacts"
21:13.57igcewielingthat shows you the qualify status in a simple format
21:15.12catphishmy setup is a mess right now, but i'll retest that asap
21:29.48catphishigcewieling: tested, the contacts load immediately from realtime, they show up as "NonQual" for the first qualify period, then all qualify
21:32.53catphishinterestingly, peers not qualifying until first packet is why i stopped using pjsip with chan_sip about 10 years ago, but i'd definitely say it's fixed now
21:33.09catphish*stopped using realtime with chan_sip
21:34.10*** join/#asterisk KaiHerlemann (~kai@2001:638:513:fe00::4:10fb)
21:34.25Kobazigcewieling: static realtime is no different than hard coded config files in terms of end-result functionality
21:34.44Kobazall the behefits of realtime-db-generated configs, with none of the drawbacks of having just static files
21:34.57Kobazyou could generate the static files of course from the db and do it that way
21:34.59SamotIn other words, it's word salad.
21:35.11Kobazbut i like the consistency of having one and only one official configuration
21:35.17SamotBecause anything that stores config details in a database then writes out static configs is "static realtime"
21:35.23Kobazno
21:35.43KobazSamot: static-realtime is specifically enabled by using extconfig.conf
21:35.53SamotOK. That's mixing the two
21:36.04KobazEverything else, ie: generating config files, is just that... generating config files
21:36.30Kobazsome things are more realtime than others, ie: voicemail is true realtime
21:36.43SamotSo..
21:36.45Kobazusing extconfig... and then pjsip/sip/extensions.conf etc, needs a reload to trigger anything interesting
21:36.54SamotI have customers who's configs haven't changed in years.
21:37.00SamotIs there a benefit to realtime for that?
21:37.19KobazIt completely removes the possability of hand-editing config files, so i would say yes
21:37.30Kobazyou can be assured that your database matches your "config files"
21:37.33SamotNo, I can store information in a database and write it out to a file
21:37.48Kobazand then those files can be later hand-edited, and be out of sync with the db
21:37.57catphishthe benefit to me is that guarantee that the config matched the database, and only having to push config to one place in a cluster
21:38.25SamotOK
21:38.31SamotSo I have multiple servers, right now.
21:38.34Kobazyup
21:38.42SamotAll using static config files with data stored in a database.
21:38.44catphishbut on the other hand, since "the database" isn't actually my primary data source, (another database is), i'm actally swaying towards generating and pushing out files
21:38.54SamotI can push that data from the database to any of those servers.
21:38.57SamotWRite out the configs
21:39.29Kobazsure
21:39.36catphishright, i think my use case is more liek Samot describes, i have a central management database, then i want to push config out to multiple clsusers (in my case 2 servers per cluster in pairs)
21:39.37KobazSamot: are you the only one with access to these machines?
21:39.42SamotNo.
21:39.58SamotBut you're confusing non technical problems with technical solutions.
21:40.02KobazDo you have a well-defined process for updates?
21:40.07SamotYes.
21:40.14KobazOkay, so, you're fine then
21:40.22SamotSo basically this is a solution for idiots.
21:40.26KobazNo
21:40.31KobazIt just removes a step
21:40.41catphishthe downside to realtime is that i'd have to actually synchronize 2 databases (the central database, and the asterisk database) which is more complicated than just writing a replacement static config
21:40.48Kobaz16:40:35 <seanbright> Stop argueing with Kobaz
21:40.50SamotWhat?
21:41.03Samotcatphish: I write out data to config files, I write out data to AstDB
21:41.18Samotcatphish: This is also how major PBX systems using Asterisk work.
21:41.37KobazSamot: Some are worse than others
21:41.52SamotThe AstDB is not needed for static configs
21:41.58KobazSamot: Ie: Xorcom with 1000 extensions takes like, 5 minutes to perform a reload
21:42.05SamotThat's a problem on their end
21:42.08catphishSamot: yeah, that's making a lot of sense to me too as i trial both options, the only thing i'm in some doubt about is how to accurately sync the astdb
21:42.11SamotI don't have those problems.
21:42.17Kobazour system can reload 2000 extensions in less than 10 seconds
21:42.20SamotHow to sync it?
21:42.23SamotYou write to it
21:42.37catphishSamot: write it in what way?
21:42.47catphishi mean, what mechanism?
21:42.50KobazA lot has to do with how they generate their dialplan, it's all like c++ template-style.  They generate the same code for every extension
21:42.51SamotAMI
21:42.56SamotI said this already.
21:43.02SamotAsked/answered.
21:43.03catphishSamot: so just push a script that replaces every value?
21:43.16SamotHow you decide to do that is up to you
21:43.27SamotYou only want to modify things being modified at the moment, do it that way
21:43.35catphishthe only issue there is old/abandoned values
21:43.37SamotWant to just push everything out on an update, do it that way
21:43.39catphishi don't want to flush it
21:43.45SamotWhat?
21:43.59*** join/#asterisk gerhard7 (~gerhard7@86-87-238-48.fixed.kpn.net)
21:44.06SamotYou don't want to update the old data?
21:44.17SamotWhat do you need to flush?
21:44.19catphishwhat happens with deleted values? when i generate a new config file, deleted values disapear on their own
21:44.33catphishbut with astdb, deleted data would have to be actively removed, right?
21:44.37SamotThese are two separate processed.
21:44.40SamotThese are two separate processes.
21:45.28catphishso, the thing i love about config files, is that entries deleted from my database simply don't appear in a newly generated config file
21:45.31SamotA user logs into the portal.
21:45.39SamotThey want to set themselves to DND.
21:45.50SamotThey push a button, the AstDB is updated to show they are DND
21:45.59SamotI push an AMI command to update their devicestate
21:46.09SamotDone.
21:46.14catphishand if that user account is deleted, the astdb entry that they're DND stays forever?
21:46.23SamotUhm.
21:46.26KobazSamot: does your dnd survive asterisk restarts?
21:46.31SamotI remove a user, it sends delete commands.
21:46.33catphishor do you have a method to actively purge it?
21:46.35catphishok
21:46.36SamotIt's the AstDB
21:46.40SamotOf course.
21:47.22SamotIt's an sqllite database guys
21:47.35SamotDo those lose all their data when things are restarted?
21:47.40catphishi thought it was berkley
21:47.40Kobazright yeah, custom device state saves in astdb
21:47.47Kobazcatphish: depends on the asterisk version
21:47.55SamotIt hasn't been for years.
21:48.01Kobaz1.8 uses berkley, 11+ use sqlite
21:48.04KobazI don't recall what 10 uses
21:49.25SamotSee I can understand the use case of catphish on real time
21:49.37SamotBut at the same time, this is also the reason I use Kamailio.
21:49.59SamotIt just handles this scenario way better.
21:50.24catphishthe truth is that kamailio is a complexity that i would love to avoid, and having tested asterisk 16, pjsip, and realtime, i'm convinced that realtime contacts is plenty good enough
21:50.36SamotIt could be.
21:50.59SamotBut honestly dude, after some of your suggestions lately complexity is not the hill you want to die on with that arguement
21:51.17Kobazheh
21:51.23SamotI defer to the whole hotlining Asterisk conversation from yesterday.
21:51.38Kobazhotlining?
21:51.50catphishwasn't asterisk literally designed to do that with PCI FXS cards?
21:52.10SamotThen you'll need to do that with FXS.
21:52.21Kobazcatphish: Samot just likes to argue
21:52.22catphishi realise it's unusual with SIP, but i maintain that it's not insane :)
21:52.26SamotBut you're also conflating PBX features with POTS service.
21:52.37Kobazyou can hotline with SIP
21:52.39SamotFFS.
21:52.39SamotJFC.
21:52.40SamotThat wasn't the point at all.
21:52.42SamotAT ALL
21:52.45KobazSet your SIP phone to 'autodial on pickup'
21:52.58SamotIt was to also wait to accept digits from the user
21:53.10KobazWaitExten() or Read()
21:53.12SamotSo if they wanted to make a regular phone call, the device would autodial into an IVR.
21:53.15Kobazor whatever
21:53.19SamotFOR HOME SERVICES
21:53.25SamotAS A REPLACEMENT FOR POTS
21:53.28SamotJFC.
21:53.29KobazYelling doesn't make it right
21:53.31catphishKobaz: the question i asked yesterday was whether i could have my ATA dialdial SIP on pickup, then defer to an asterisk dialplan to process digits
21:53.39SamotNot something a user wants to experience.
21:53.39Kobazcatphish: sure can
21:53.45catphishKobaz: as a relacement for POTS for home users
21:53.46SamotThat was my whole comment about the hotlinging.
21:54.04catphishmy idea was slated :)
21:54.16Kobaz[2021-02-14 16:52:21] <Kobaz> catphish: Samot just likes to argue
21:54.20SamotBecause not telecom company uses IVRs for every call.
21:54.35KobazSamot: that's a pretty baseless assertion
21:54.41Samot...
21:54.44KobazI'n sure there's at least one that does
21:54.46SamotIt's 20 years of experience at telecoms.
21:54.53SamotBut OK.
21:55.05Kobaz'No telecom'?  Remember,  Don't use 'never' and 'always'
21:55.11catphishin any case, i agree that if i can get the dialplan into the ATAs accurately, that will be the better choice
21:55.18catphishso i'll try that first
21:55.36SamotKobaz: Please don't argue on behalf of poorly done things.
21:55.50SamotYes, there are exceptions. They are at the low end of the bar.
21:55.54KobazI'm just playing devils advocate here.  You can't assume 100% of anything for anywhere doing anything
21:55.56SamotThe wrong way to go.
21:56.08SamotNo but in the context of catphish starting a voip service
21:56.15KobazYeah don't do that
21:56.18SamotLet's not encourage bad practices.
21:56.19KobazThe whole ivr thing sounds... weird
21:56.20SamotFFS.
21:57.45catphishanyway, as said, i'm only interested in maximizing reliability and customer experience in simulating a POTS, so will be keeping things largely as simple as possible
21:58.36SamotSo you can do fun things like offer custom ringing.
21:58.50Kobazwhy do you want to simulate pots again?
21:58.52SamotSo when a caller is calling my number, instead of ringing they hear my custom ringing.
21:58.58SamotPOTS is a level of service.
21:59.02Kobazthe ATA does a pretty good job of that
21:59.11SamotPOTS is a level of service.
21:59.17SamotPlain Ole Telephone Service
21:59.19Kobazright
21:59.23Kobazwe know what it means
21:59.23catphishKobaz: indeed, and and ATA will be the main component in doing so
21:59.34Kobazthe ATA will play dialtone and ringing
21:59.40Kobaz...and all that fun stuff
21:59.47SamotYou totally are missing what I just said
21:59.59KobazYes you can do custom ringing, why do you want to?
22:00.01SamotSome mobile services allow you, as the customer, to set a custom ringback
22:00.15SamotSo that when a friend calls you, they hear that ringback
22:00.18KobazYou can do custom ringing without an ivr
22:00.22Kobazyeah true, but you don
22:00.23SamotI know
22:00.27Kobaz't need an ATA for that
22:00.27SamotI know that
22:00.37SamotI was suggesting that as a service feature
22:00.40KobazRight
22:00.42KobazFair enough
22:01.07SamotIf you want to provide basic phone service for people and have some extra features, that is one thing you can do
22:01.17catphishKobaz: likely an ATA built into a fiber OTU, the aim here is to replace customer copper lines with fiber ones
22:01.36SamotI'm not sure how the UK market is but trying to be a residential provider in the US is a self abuse action.
22:01.41Kobazyeah, speaking of fiber
22:02.19KobazVerizon went and sent a letter to one of our customers, we're upgrading your pots to fiber, they subsequently shut off the pots lines and never installed the fiber, so they have no fax line anymore
22:02.23catphishbasically dumb phone lines for people who are giving up their POTS but want to keep their phone line
22:02.33SamotI left the residential market 7 years ago...
22:02.49SamotI understand that but all the major players offer it
22:02.51KobazWe are strictly non-residential
22:03.00SamotAnd will bundle it with services like Fiber/TV
22:03.14catphishi've been doing hosted business PBX for 10 years, but i've just moved to a FTTH provider, so naturally i'm looking at phone provision
22:03.15SamotMaking it really cheap if not even close to free
22:03.33Samotwell if you are the one also offering fiber, that's the bonus.
22:03.36catphishbut i haven't been that hands on with it since chan_sip stopped being cool
22:03.37Samotthe voice is a add on
22:03.53catphishso making sure to relearn everything
22:04.12Kobazchan_sip was always a bit of a pain
22:04.13SamotBecause I'm guessing at the end of the day if I had a choice of fiber or voice with you, you'd want me to take fiber.
22:04.42catphishso now i only sell fiber internet, voip is just a necessity
22:05.04SamotYes, see if I was an ISP I would do residential services again.
22:05.18SamotBut I'm not an ISP so not going to waste the effort on it.
22:05.22catphishits not so bad when it's properly designed
22:05.33SamotIt's about market saturation.
22:05.36catphishi wouldn't do home voip if i wasnt doing the fiber
22:05.42Samot^^^^
22:05.44SamotExactly
22:06.57catphishso anyway, i just need simple lines with an inbound number, and voicemail, asterisk is overkill, but it does a good job of voicemail
22:07.18catphishand deploying in mysql replicate realtime pairs seems the simplest configuration to me
22:08.39Kobazi would highly recommend not using mysql
22:08.44catphishi think i'll come down to using static config files, pushed to both servers in the pair, and database replication only for contacts, and voicemail messages
22:08.59catphishwhy not mysql? i'm extremely comfortable with mysql optimization and replication
22:09.13KobazPostgres > *
22:09.35catphishpostgres is supposed to be good, but i don't have the experience with it that i do wit mysql
22:10.04KobazMysql has been used for plenty of heavy lifting, but i've had a long history of my pet peves and issues with it
22:10.25KobazBut if you want to use what your comfortable with, that's fine
22:10.51catphishit's not perfect, i have had some issues with its optimization, but not enough that i ever learned postgres
22:11.07Kobazi've had my issues like, silent truncation and all that stupid stuff
22:11.13catphishand this was only when running many-TB SaaS databases on it
22:11.17Kobazyou can turn on warnings now for that, but it drives me nuts it's not standard
22:11.35Kobazhttps://sql-info.de/mysql/gotchas.html
22:11.36catphishyeah, luckily silent truncation is very much considered a legacy mode now, that was awful
22:12.38KobazSome of these things have been fixed since, but... just, irks me like Visual Basic 5-6 was a complete rewrite
22:12.56Kobazand Python 2>3... but anyway.... </rant>
22:13.05catphishyeah, makes sense, i strongly suspect postgres was better from day 1
22:13.30catphishbut i know i can make mysql (mariadb now) work well for me
22:13.43KobazIt's been built with enterprise in mind, whereas mysql half way through was like oh, we need to half-ass bolt on some enterprise stuff... like you need a new storage engine to support transactions
22:14.02catphishat least it's not as bad as PHP :)
22:14.15catphishin which doing anything properly was an afterthought :)
22:14.47catphishi'm not familiar with python at all, so the 2/3 thing is just a mild annoyance for me when i get the wrong one
22:15.06Kobazas a developer it sucks
22:15.20KobazThey were like, f--- backwards compatability, sucks to be you
22:17.18catphishon a more on-topic note, i have just one outstanding question about my config - how to get arbitrary data about SIP clients (specifically their numeric area code) from my central database into the dialplan, it would be lovely if i could upload a database file, right now the best ideas i have are 1) put every peer into a context based on its area code 2) push all the mappings into astdb and look up in dialplan 3) push mappings into mysql and
22:17.18catphishlook up in dialplan
22:17.57Kobazcontext based on area code?
22:18.03catphishwhen a client phones a local number, i need to map it to a national number, based on *their* area code, which sadly isn't a fixed length at the start of their callerid
22:18.06igcewielingset_var in pjsip.conf won't help?
22:18.09Kobazare you trying to do, on-net is free, type stuff?
22:18.27catphishKobaz: not billing related, just want to allow "short" dialing
22:18.33Kobazcatphish: use includes
22:18.36igcewielingHAHAHAHHA!
22:18.52igcewielingwhere do you live, montana?
22:18.59Kobazour routing system is like this.  we have a 'class of service', which includes all the routes they can dial.. like 1XXXXXXXXXX and XXXXXXX type stuff
22:19.06catphishKobaz: use includes? do you mean use a different context for each area?
22:19.13Kobazso i would define a new context like, customerid-route-ld7
22:19.30Kobazand they would have their own ld7 route, which would prefix +1212 or whatever their area code is
22:19.34Kobazlet me show you
22:19.40catphishi can use a context for each customer, that would solve it
22:19.51catphishbut the dialplan will be needlessly huge and need reloading
22:19.51Kobazcorrect
22:20.03Kobazyou need to reload anyway typically
22:20.06Kobazdepending on what you're doing
22:20.13Kobazunless you do a lot of stuff dynamically
22:20.29catphishyou're right, i will probably need to reload it anyway
22:20.51igcewielingWrite your dialplan so it doesn't need to keep changing.
22:21.06catphishi can go either way
22:21.11Kobazhttps://dpaste.com/E6EPXA4V7
22:21.16catphishi can make my dialplan totally dynamic (ie do it doesn't need changing)
22:21.38Kobazso, if this customer needs international calling, add an include in the routes list for intl
22:21.42Kobazotherwise, they can't
22:22.19igcewielingI block international calling by setting a flag in a database table then checking that flag in the dialplan.
22:22.36*** join/#asterisk sinaowolabi (~Sina@102.134.114.1)
22:22.40Kobazlots of ways to skin the cat
22:22.41catphishfor example, my [inbound] can dial PJSIP customers simply by looking up their contacts by phone number PJSIP_DIAL_CONTACTS($EXTEN)
22:22.54igcewielingThat is the sort of thing I meant by "write your dialplan so you don't need to reload the dialplan all the time"
22:22.58catphishthere's no need to hardcode every customer
22:23.35igcewielingKobaz: 's way is a very traditional way, using includes and contexts.
22:23.43Kobazyup
22:23.46catphishsimilarly, voicemail can be looked up in mysql do see if it's enabled or not
22:23.50Kobazwe started doing it this way 12 years ago, so
22:23.54Kobazit's kind of baked in
22:24.02catphishthis means it kinda makes sense to do the area codes from the database too
22:24.21igcewielingcatphish: why not set the area code in the pjsip endpoint/
22:24.28Kobazit works pretty well actually
22:24.31catphishigcewieling: oh, you mentioned that, how do i do it?
22:24.32Kobazeven with enormous systems
22:24.35catphishthat would be better
22:24.36Kobazthe reloads happen pretty quick
22:25.05catphishif i can set arbitrary channel variables in pjsip endpoints, i'll be happy
22:25.15igcewielingsee set_var
22:25.18Kobazigcewieling: it depends what you want to optimzie for
22:25.29Kobazigcewieling: i like the idea of having as much stuff in memory to avoid db lookups as possible
22:25.38igcewielingI use set_var to specify a failsafe callerid for the peer.
22:25.42Kobazigcewieling: it really helps with high-concurrency
22:25.52catphishoh yeah https://www.asterisk.org/did-you-know-you-can-use-variables-in-pjsip-conf/
22:26.00catphishi couldn't find that when i looked before
22:26.15catphishigcewieling: thanks, that 100% solves my area code problem
22:26.38catphishset_var=AREACODE=01234
22:26.42Kobazright, you can set variables and then use them in dialplan
22:26.45igcewielingKobaz: I run an agi when the call arrives and when it ends.   Since I'm doing at least a few database lookups anyway, I don't worry TOO much about it.
22:27.02Kobazigcewieling: yeah we're using AGI as well for most call-routing related things
22:27.47igcewielingMy AGI sets a bunch of dialplan variables which the dialplan uses -- much like FreePBX.
22:28.02catphishjust need to decide where to store "voicemail enabled", something the users can change by dialing a code, and i'll be done
22:28.08Kobazwe're the opposite, dialplan is the glue that puts steps from AGI to AGI
22:28.30Kobazlike dialplan is the necessary evil in between calls to AGI, heh
22:30.06igcewielingcatphish: could you instead check for the existance of the mailbox in the dialplan.
22:30.46Kobazyeah
22:30.53KobazVM* functions
22:31.04catphishi think the mailbox will always exist, it's just a simple enabled/disabled flag
22:31.29igcewielinghave you read the output of "core show functions" and "core show applications"?
22:31.53catphishi have not, i will give it a go
22:38.51*** join/#asterisk paulgrmn (~paulgrmn@c-98-250-183-21.hsd1.mi.comcast.net)
22:39.58KaiHerlemannHi. I added an announcement to play a custom recording. If I play it from our 1st extension, it works. If I play it from the 2nd extension (per follow me → time condition or destination "if not reachable"), it says in the log "file.c: File custom/exmp does not exist in any format". What could be reason for this?
22:40.29KaiHerlemannIt's the same announcement.
22:42.33Kobazcodec most likly
22:43.05Kobazexample: first extension is using ulaw and the second extension is using gsm... you might have custom/exm.ul but not custom/exm.gsm
22:43.44Kobazfor highest compatability, use .sln files or .wav files, or make sure you convert to each codec format you intend to use
22:44.16Kobazand .wav being pcm 8khz mono... considering .wav is just a container for what could be many different formata
22:45.09Kobazyou can use 'core show channel xxxxx' to see what codec(s) are currently being used
22:45.29Kobazthrow the channel in a Wait(10) to keep it open long enough to inspect
22:45.38Kobazor something similar
22:46.35KaiHerlemannIt was the same announcement, so also the same file. (Actually two different files, but I tried it out with the same file/announcement on both extensions to find out where's the problem)
22:47.11Kobazalso, could be permissions
22:47.25Kobazmake sure asterisk has read permissions to the file and +x to the entire path to get to that file
22:47.50KobazI don't recall if file.c will report back permission issues or just not-exist
22:50.16KaiHerlemannSecond message in the log was "file.c: Unable to open custom/AB (format (alaw)): No such file or directory", means actually the same like the first message.
22:50.24KaiHerlemannThis was immediately after the first one.
22:50.27igcewielingIf you were using Asterisk and not FreePBX, I'd suspect you added the file extension in the Playback
22:50.54KaiHerlemannNo, I use FreePBX.
22:51.04KobazKaiHerlemann: at this point... use dpaste and show your dialplan, and show ls -al on your custom/ files
22:51.18KobazKaiHerlemann: you'll be better served in #freepbx
22:51.23Kobaz!freepbx
22:51.29Kobaz~freepbx
22:51.29infobot[~freepbx] FreePBX is unable to be supported here. It is made up of complex dialplans and scripts which can't be easily supported by people who aren't deeply involved. Try joining #freepbx and asking there
22:51.56Kobazit uses asterisk, but there's many many many layers added
22:56.28KaiHerlemannKobaz: thanks for the advice… yes, I was in the past also sometimes unsure if I should ask in the FreePBX or asterisk forum. There were problems in which case I had to add something extensions_custom.conf, it's not always clear if I need to choose a solution like that.
22:59.51KaiHerlemannI ask usually at first in the asterisk community if I'm not sure, because the very basic function is based on Asterisk.
23:00.05Kobazyeah, but... freepbx is controlling what asterisk is doing
23:00.33igcewielingIf you do it in the GUI, then it is "FreePBX"
23:02.00SamotSo the files exist right?
23:02.03KaiHerlemannWhat would you advise in such a case? It's not always clear to me at first whether I need a custom-made solution, I notice that after work deeper into it/after ask.
23:02.08KobazKaiHerlemann: basic functions are not always so obviously basic if there's configuration settings or other environmental things going on, and it's typically more complicated than "this one function dosn't work"
23:02.09KaiHerlemannSamot: yes
23:02.16SamotIn the right format?
23:02.35KaiHerlemannSamot: yes… it works with the other extension
23:02.42KobazKaiHerlemann: did you do what i suggested before?  check your channel for the codecs in use
23:03.28SamotWhat format where these files uploaded in?
23:03.45Kobazwhen you're checking code and such, when one thing works and the other thing doesn't and it seems everything matches and is all the same... there's the problem..  the thing that's not working has a difference of *some kind*
23:04.18SamotWell the errors say the files couldn't be find in the right or any format.
23:04.25Kobazright
23:04.28SamotThat looks more like something on the system
23:04.32SamotNot codecs.
23:04.56SamotKaiHerlemann: ls -l /var/spool/asterisk/sounds/custom
23:04.57Kobazit could be codecs for sure, one device plays the announcement and the other does not
23:05.07SamotThe system can't find the file.
23:05.12SamotThat's what the errors state
23:05.24SamotOne can't be found in ulaw, so sure a codec issue in a form.
23:05.31SamotThe other wasn't found in any format.
23:05.33Kobazit also could be playing a different file.. something is different
23:05.42Kobazyeah true, maybe some non-printable character in there
23:05.46SamotLet's see if the files exist and what formats.
23:05.50SamotKaiHerlemann: ls -l /var/spool/asterisk/sounds/custom
23:06.00KobazSamot: yeah I asked for that a while ago
23:06.07KobazKaiHerlemann: dpaste ^^^^
23:06.30SamotI will look after dinner
23:07.54KaiHerlemannSamot: the folder doesn't exist at all, do you mean /var/lib/asterisk/sounds/custom?
23:08.12SamotYes
23:08.14SamotSorry
23:08.22SamotGood catch
23:09.15KaiHerlemannSamot: there's also no file, the files are in /var/lib/asterisk/sounds/de_DE/custom/
23:09.44KaiHerlemannright language is set for the extension… but this is probably FreePBX-specific ;)
23:10.55KobazKaiHerlemann: show the console right before the error
23:12.55KaiHerlemannKobaz: I read what you wrote regarding codecs, I just didn't believe the codec is the problem, because it's the same file/announcement (and DAHDI card, although not the same ISDN line)… I didn't want to ignore you ;)
23:13.10KobazOkay thanks
23:13.13KobazJust sanity checking
23:13.43KaiHerlemannKobaz: the line in the log before that was "pbx.c: Executing [s@app-announcement-2:5] BackGround("DAHDI/i2/0015128053848-12", "custom/AB,nm") in new stack"
23:13.56KaiHerlemannOh shit, I should xxxx that
23:14.01Kobaztoo late
23:14.29Kobazbut anyway... so, and what's your channel language set to?
23:14.31igcewielingno, you shouldn't.   phone numbers are not secret.
23:15.17KaiHerlemannigcewieling: on the blacklist are anyway already 60 numbers ;)
23:15.17Kobazyeah but, some troublemaker could very well go through the log for #asterisk and dial known numbers to be a pain
23:15.25KaiHerlemann*numbers = extensions
23:15.37igcewielingKobaz: how would that be different than random scammers calling you?
23:16.17Kobazit's not
23:16.30Kobazjust one less source of random scammers
23:17.08*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
23:19.39KaiHerlemannKobaz: one moment please, I check the channel language… but FreePBX says, it's set to "German (Germany)"
23:20.09Kobazit sounds like it's playing from custom/AB and not de_DE/custom/AB
23:25.46KaiHerlemannIt think I need to execute "core show channels" to see the channel name?
23:26.17KaiHerlemannThen enter the channel name in "dialplan show chanvar"?
23:26.44Kobazyou can see channel variables/settings via 'core show channel ...'
23:27.56SamotSo almost 30 minutes later I still haven't seen a list of files.
23:29.40KaiHerlemannSamot: "AB.wav  dd.wav  test-vw.wav"
23:30.08SamotSo the files didn't exist.
23:30.17SamotAB did but not in ulaw.
23:31.28KaiHerlemannsorry, I had here several advices how to solve it, because of that I didn't posted the list of files.
23:31.37KaiHerlemann(Thanks for the advices!)
23:31.47KaiHerlemann*post
23:32.34Samot<PROTECTED>
23:32.52KaiHerlemannexmp = example in this case
23:33.03SamotSigh.
23:33.13SamotSo this was the only problem?  "file.c: Unable to open custom/AB (format (alaw)): No such file or directory"
23:39.03KaiHerlemannIn the case of the other extension (it works on this one), the log says: "file.c: <DAHDI/i1/xxxxxxx-19> Playing 'custom/AB.slin' (language 'de_DE')"
23:39.11KaiHerlemannSuch a file doesn't exist, but it work.s
23:39.42KaiHerlemannProbably I really should ask in the FreePBX channel.

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