01:37.25 | *** join/#asterisk yoink (~yoink@unaffiliated/yoink) |
02:01.07 | *** join/#asterisk tsal (~tsal@i59F5F4B5.versanet.de) |
02:41.05 | *** join/#asterisk hfb (~hfb@cpe-75-82-92-216.socal.res.rr.com) |
03:15.37 | *** join/#asterisk nix8n82 (~AndChat58@67-130-74-235.dia.static.qwest.net) |
03:39.47 | *** join/#asterisk sh_smith (~sh_smith@cpe-172-88-21-24.socal.res.rr.com) |
05:10.07 | *** join/#asterisk ghoti (~paul@bras-base-ptldon0102w-grc-04-76-66-167-162.dsl.bell.ca) |
05:38.07 | *** join/#asterisk tomaluca95 (~quassel@kde/developer/tomaluca) |
06:04.07 | *** join/#asterisk Iamnach0 (~Iamnacho@ip68-102-131-177.ks.ok.cox.net) |
06:05.13 | *** join/#asterisk Samot (sid133316@gateway/web/irccloud.com/x-hbsqfnvfiirnybct) |
06:05.20 | *** join/#asterisk idtentee (sid101023@gateway/web/irccloud.com/x-udibabwcehupdkgs) |
06:05.28 | *** join/#asterisk jkroon (~jkroon@165.16.204.98) |
06:05.34 | *** join/#asterisk john2gb (~john2gb@94-225-47-8.access.telenet.be) |
06:05.35 | *** join/#asterisk tuxd00d (sid401305@gateway/web/irccloud.com/x-xdujwbjvranrqefx) |
06:05.37 | *** join/#asterisk drmessano (drmessano@pdpc/supporter/active/drmessano) |
06:06.25 | *** join/#asterisk stux|work (stux@endurance.xzibition.com) |
06:52.16 | *** join/#asterisk MarcinWieczorek (~marcin@212.182.24.66) |
07:02.50 | *** join/#asterisk AsteriskRoss (~AsteriskR@37.157.48.2) |
07:15.33 | *** join/#asterisk spatel (~spatel@pool-96-237-230-175.bstnma.fios.verizon.net) |
07:15.58 | *** join/#asterisk MarcinWieczorek_ (~marcin@212.182.24.81) |
07:41.42 | *** join/#asterisk Barbosa (~barbosa@177.148.189.176) |
07:50.43 | *** join/#asterisk rjt (~anon@wsip-70-184-216-165.om.om.cox.net) |
08:17.34 | *** join/#asterisk fstd_ (~fstd@unaffiliated/fisted) |
08:52.17 | *** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir) |
09:36.51 | *** join/#asterisk Jesterboxboy (~Thunderbi@84-115-150-8.cable.dynamic.surfer.at) |
09:40.12 | *** join/#asterisk dym (~patrick@unaffiliated/dym) |
09:41.23 | dym | Hi guys! I'd like to throw out an idea for feedback. I'm trying to find a way to provide a call queue for another business. So basically instead of the user ringing into the business itself, the user rings one of my extensions and is then put on hold while the businesses extension is called. |
09:41.59 | dym | Im wondering if there is any other clever method to this. I would need a dedicated number at the business, so no external caller can interfere with the queue and the mode of the queue contacting the business needs to be set. |
09:42.10 | dym | basically the business could be an agent extension in the queue, right? |
09:43.53 | dym | I would like to keep it as seperated as possible, so i dont have to put up a phone or anything at the business, but as i understand it an agent that is set in a queue is tried when a caller is on the queue. Could this be an external number too? |
09:48.50 | sibiria | it's just a matter of Dial() inside a flow |
09:48.53 | sibiria | basic attended transfer |
09:49.06 | sibiria | keep in mind you will be the one doing the transfer, i.e. it's on your bill |
09:50.17 | dym | sibiria: yeah, i get that |
09:50.29 | dym | sibiria: we mostly have flatrates here. |
09:51.16 | dym | sibiria: What would it be like on the businesses side, if a call is initiated? Would the "agent" hear an announcement first? |
09:51.27 | dym | Or would the call be connected directly? |
09:51.39 | dym | (havent worked extensively with queues before, so excuse my questions) |
09:52.25 | sibiria | that depends on how you want to manage the call |
09:52.38 | sibiria | if you do a straight-up dial() without any specifics, it will be just a normal call |
09:52.48 | sibiria | when called party answer the two lines are bridged at once |
09:53.40 | dym | Well, i do want to use the queue system of asterisk. doesnt this have some pre-made functions? |
09:53.46 | sibiria | dial() can also do stuff like send DTMF before bridging the call, and play a sound file first etc. |
09:54.04 | dym | sibiria: but isnt this already built into the queue functions? |
09:54.11 | dym | do i have to initiate a specific dial myself |
09:54.12 | dym | ? |
09:54.20 | dym | i dont want to simply forward the calls |
09:54.24 | dym | i want to use the queue |
09:54.59 | sibiria | you said you want to provide the queue for another business. i interpret it as you wanting to sit in the middle of it, and call the actual business to forward what comes in on your end |
09:55.11 | dym | sibiria: exactly, but queued |
09:55.28 | dym | as in caller 1 calls, business is contacted, while caller 2 sits in the queue until business is free again |
09:55.40 | dym | same for caller 3,4,5,6 |
09:55.40 | sibiria | queues then |
09:55.50 | dym | well, yeah :D as mentioned |
09:56.08 | dym | maybe i just need to do some reading and testing :) |
09:56.11 | dym | thanks buddy! |
09:57.19 | sibiria | the asterisk wiki has a lot on the topic already |
09:57.40 | sibiria | normal answer/dispatch type thing |
09:57.51 | dym | Also with external Queue Members? :) |
09:58.31 | sibiria | not sure, i've never dug into the details of those tutorials |
10:34.45 | *** join/#asterisk Samot (sid133316@gateway/web/irccloud.com/x-hbsqfnvfiirnybct) |
10:34.45 | *** join/#asterisk pchero (~pchero@211.178.226.108) |
10:34.45 | *** join/#asterisk smkelly (~smkelly@mykonos.smkelly.org) |
10:34.54 | *** join/#asterisk nix8n82 (~AndChat58@67-130-74-235.dia.static.qwest.net) |
10:54.51 | *** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir) |
11:12.29 | *** join/#asterisk john2gb (~john2gb@94-225-47-8.access.telenet.be) |
11:25.46 | *** join/#asterisk tomaluca95 (~quassel@kde/developer/tomaluca) |
11:30.09 | *** join/#asterisk paulgrmn (~paulgrmn@c-98-250-183-21.hsd1.mi.comcast.net) |
12:04.29 | *** join/#asterisk MarcinWieczorek (~marcin@212.182.24.66) |
12:40.53 | *** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir) |
13:00.32 | *** join/#asterisk khobo (~khobo@cpe-72-225-199-101.nyc.res.rr.com) |
13:23.43 | *** join/#asterisk rpifan (~rpifan@p200300d267177e43aa4a14ffe3cee5c2.dip0.t-ipconnect.de) |
13:33.32 | *** join/#asterisk bford (uid283514@gateway/web/irccloud.com/x-clxsoqmcjpxhsmok) |
13:33.33 | *** mode/#asterisk [+o bford] by ChanServ |
13:43.35 | *** join/#asterisk kharwell (uid358942@gateway/web/irccloud.com/x-koqffqxqgzhgrhum) |
13:43.36 | *** mode/#asterisk [+o kharwell] by ChanServ |
13:47.37 | *** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir) |
14:44.57 | *** join/#asterisk themayor (~themayor@unaffiliated/themayor) |
14:59.08 | *** join/#asterisk Barbosa_ (~barbosa@177.148.189.176) |
15:05.00 | *** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir) |
15:25.58 | *** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir) |
16:06.44 | *** join/#asterisk tripleslash (~triplesla@unaffiliated/imsaguy) |
16:12.23 | *** join/#asterisk rpifan_ (~rpifan@p200300d267177e30df1a8dbb7c190d68.dip0.t-ipconnect.de) |
16:15.30 | *** join/#asterisk electronic_eel (~quassel@213.240.182.42) |
16:17.19 | electronic_eel | what is the proper way to match really all extensions in a dialplan context? |
16:18.16 | electronic_eel | for example I want to catch all calls from internal handsets and want to always set some variables on them, before the actual extension specific handling begins |
16:19.04 | electronic_eel | so i have a context "from-internal-start" and I'm currently using "exten => _." there |
16:19.25 | electronic_eel | but asterisk warns me "The use of '_.' for an extension is strongly discouraged and can have unexpected behavior." |
16:21.30 | electronic_eel | using something like "exten => _X.", as suggested in the warning, doesn't get me what I want, because the user could for example dial international with a +, like +41123456 |
16:23.10 | Samot | Nope. |
16:23.18 | Samot | + is a character that has to be match |
16:23.26 | Samot | X is 0-9 |
16:24.00 | Samot | _X. is match any length that starts with 0-9 |
16:24.04 | electronic_eel | exactly. but how can I match everything, including + |
16:24.10 | Samot | You add the + |
16:24.15 | Samot | _+X. |
16:24.43 | electronic_eel | but then it does not match extensions that do not have a + in it |
16:24.49 | Samot | OK |
16:24.54 | Samot | So you need two matches |
16:25.09 | electronic_eel | I want to avoid that, because then I have to duplicate the code |
16:25.17 | Samot | Really? |
16:25.40 | Samot | Are your extensions the same length as PSTN destinations? |
16:26.01 | electronic_eel | the extensions can be any length I do not know |
16:26.08 | electronic_eel | in this block of code I mean |
16:26.09 | Samot | If you're extensions are 4 digit and someone dials + then 15 digits they are calling the PSTN |
16:26.38 | Samot | Unless you are creating extensions that collide with PSTN routable patterns.... |
16:26.50 | Samot | Then if they dial specific types of patterns they are calling the PSTN |
16:26.53 | Samot | Not another extension. |
16:27.36 | electronic_eel | let me explain what I want to do: I want to always execute some code when someone dials any extension |
16:27.54 | Samot | OK |
16:27.57 | Samot | I got that |
16:28.08 | electronic_eel | so I could add that piece of code to any extension specific block, but I'd need to duplicate the code over and over |
16:28.13 | electronic_eel | I want to avoid that |
16:28.23 | Samot | What do you consider an extension? |
16:29.01 | electronic_eel | what matches the "exten =>" |
16:29.09 | Samot | OK. |
16:29.19 | Samot | Well you can't do what you want then. |
16:29.29 | Samot | _X. will not match _+X. |
16:30.44 | electronic_eel | my idea was to have a context "from-internal-start", there I use "exten => _." to catch everything, use my piece of code that should always be run and then do a Gosub(from-internal-real,${EXTEN},1) |
16:31.04 | electronic_eel | and the exten specific handling is in from-internal-real |
16:31.31 | electronic_eel | this seems to work on the first glance, but I get this warning message, so I'm not sure if it is the right way to go |
16:31.52 | *** join/#asterisk cation21 (cation21@gateway/vpn/protonvpn/cation21) |
16:31.53 | Samot | The warning message is from using X. |
16:31.57 | Samot | Because that's lazy |
16:32.16 | electronic_eel | I think it is not from "X." but "_." |
16:32.24 | Samot | Sorry _X. |
16:32.30 | Samot | Because it basically matching everything. |
16:32.45 | electronic_eel | exactly, I want to match everything |
16:32.53 | Samot | OK so you're going to get the warning |
16:33.21 | Samot | Oh wait.. _. |
16:33.23 | Samot | Yeah... |
16:33.29 | Samot | That's just asking for trouble. |
16:33.33 | electronic_eel | the question is if I can ignore the warning in this case, or if some corner case will not work properly |
16:33.42 | Samot | You can ignore it. |
16:34.32 | electronic_eel | "That's just asking for trouble." -> you mean for regular uses, not for my specific usecase? or for my usecase too? |
16:35.44 | Samot | Well I don't know. |
16:35.49 | Samot | I haven't seen your dialplan. |
16:35.59 | Samot | But you're allowing everything in and then processing it. |
16:36.10 | Samot | Is it being processed properly? Will things slip through? |
16:36.29 | Samot | Will you end up with someone pwning the box or a phone and dialing things that you don't want? |
16:36.52 | Samot | You're using a gosub |
16:37.00 | Samot | So you're not "duplicating" things. |
16:37.36 | Samot | exten => _+X.,1,gosub(start,${EXTEN:1},1) |
16:37.49 | Samot | exten => _X.,1,gosub(start,${EXTEN},1) |
16:37.54 | Samot | Look at that |
16:38.09 | Samot | Two pattern matches being sent to the gosbu. |
16:38.12 | Samot | Two pattern matches being sent to the gosub. |
16:39.03 | Samot | Here's the thing, in general most PBX systems have things for internal dialing |
16:39.10 | Samot | And then they have things for external dialing. |
16:39.27 | Samot | Because those are two different things. |
16:39.48 | electronic_eel | yeah, that would be a possibility. but then I'm just catching numbers and international + calls. but what happens with * codes? always when I extend the regular context, I now also have to check the start-dialplan and add the patterns there. I'd like to avoid that |
16:40.28 | Samot | Is this a PBX ? |
16:40.35 | Samot | Or just being used to send calls to the PSTN? |
16:40.54 | electronic_eel | about external and internal dialing: yeah, I have that. it is in the real context that I gosub to |
16:41.34 | electronic_eel | this is a pbx, with lot's of internal handsets, several external pstn gateways and so on |
16:42.08 | Samot | So just do _. and accept the fact its going to warn you. |
16:42.12 | Samot | Then do what you do in your gosub. |
16:42.54 | electronic_eel | so you said one problem could be proper fallthrough for illegal numbers |
16:43.09 | Samot | Well you're accepting anything from the endpoints |
16:43.26 | Samot | But you're saying your gosub will hve internal/external logic |
16:43.35 | Samot | So there must be proper pattern matches there. |
16:44.06 | Samot | _. doesn't stop Internaltional dialing |
16:44.12 | Samot | _X. doesn't either. |
16:44.13 | electronic_eel | exactly. what I'm doing is accepting everything, set some variables there, do some logging, and then the gosub |
16:44.27 | Samot | I get you're accepting everything. |
16:44.44 | Samot | The problem with that is you aren't controlling what you are accepting. |
16:44.51 | *** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir) |
16:45.01 | electronic_eel | I'd say the _.,1,gosub(real,${EXTEN},1) should then do the regular fallthrough in the real context |
16:45.11 | Samot | So that means if your dialplan is being made to "reduce code lines" and just is catch all all the way through..bad things can get through. |
16:45.21 | Samot | I haven't see what that does |
16:45.48 | Samot | Can't say it would be right, it could have something wrong you're not checking/catching |
16:46.04 | electronic_eel | should I pastebin a snippet of the dialplan? |
16:46.09 | Samot | Sure. |
16:49.13 | electronic_eel | https://pastebin.com/CiuM6uxD |
16:49.54 | electronic_eel | so this is just a snippet, not the complete thing. but I think it shows how I plan to use it |
16:49.57 | igcewieling | You almost never want to use _. |
16:50.34 | electronic_eel | igcewieling: yeah, the warning message makes that clear. the question is if my usecase is one of the few sensible ones or not |
16:50.39 | Samot | This looks bad. |
16:50.43 | Samot | Also macro is dead. |
16:50.51 | Samot | Show these macros. |
16:51.08 | igcewieling | electronic_eel: I cannot think of any use case for _, |
16:51.26 | igcewieling | use _X. if you must |
16:52.10 | electronic_eel | igcewieling: did you read the conversation with Samot above? I'd like to catch all numbers dialed, without duplicating the code |
16:52.53 | Samot | Show the macro-trunkdial |
16:57.07 | electronic_eel | https://pastebin.com/JiKFq3i2 |
16:57.22 | electronic_eel | this is macro-trunkdial and the context that is called from it |
16:57.54 | electronic_eel | don't remember why it is called macro-*, probably it evolved from some older example |
16:58.24 | Samot | Yeah, this is bad stuff. |
16:58.39 | electronic_eel | could you elaborate? |
16:59.07 | Samot | It's just catch all patterns. |
16:59.35 | electronic_eel | but why is this bad? |
16:59.45 | Samot | I mean, it will work. Nothing I would ever do. |
16:59.48 | electronic_eel | the local handsets are allowed to call all kinds of numbers |
16:59.56 | electronic_eel | international and so on |
17:00.10 | Samot | It will work. |
17:00.22 | Samot | It's not something I, or probably most in here, would do. |
17:00.29 | electronic_eel | why not? |
17:00.34 | Samot | Control. |
17:01.52 | igcewieling | The most common problem with _. is that, while it matches 1234, it also matches 'h' |
17:02.02 | electronic_eel | Samot: hmm, I don't really get it yet. |
17:02.09 | Samot | What you're doing will work. |
17:03.01 | electronic_eel | Samot: in [macro-trunkdial] I limit what kind of numbers are allowed to be used outbound. so for example sending * codes outbound is forbidden |
17:03.22 | Samot | We have different methods. |
17:03.29 | Samot | You're will work. |
17:03.37 | electronic_eel | sending * codes outbound is the thing I'm worried about most, bc it means the user could change setup of the trunk |
17:03.43 | Samot | You'll get warnings for some of those catch alls but it will work. |
17:04.32 | electronic_eel | hmm, I don't want it to "just work" and walk away, I want to do it properly. but for this I'd like to understand your concerns |
17:04.49 | Samot | PBX's aren't written with "minimal code" in mind. |
17:05.12 | Samot | Sure you want to no dupliacte certain functions over and over again. So that's what GoSubs are for. |
17:05.29 | igcewieling | The normal practices of good programming don't generally apply to the Asterisk Dialplan. |
17:05.36 | Samot | And i isn't going to do much for you anyways. |
17:09.05 | electronic_eel | hmm, so you prefer to do very detailed exten matches and a gosub from each? |
17:09.37 | Samot | If that's even needed. |
17:10.12 | Samot | Sometimes a few lines a dialplan in a context, exten does what you |
17:11.06 | Samot | +want |
17:11.22 | electronic_eel | but if it is like 3 lines of the same code I need for every number pattern, and I have like 10 patterns or so, do you really duplicate these 3 lines over and over again? what if I need to change them? |
17:12.21 | Samot | OK |
17:12.38 | Samot | You don't want a lot of dialplan, do what you're doing. |
17:12.55 | Samot | This is why people generally do it by sections/features |
17:13.12 | Samot | Use include => statements. |
17:15.03 | electronic_eel | hmm, but include includes the stuff from another context. it does not allow me to include something and give it a new exten match pattern |
17:15.17 | Samot | You're missing the point. |
17:16.41 | Samot | https://www.irccloud.com/pastebin/HOU2EEBB/ |
17:16.49 | *** join/#asterisk opal (~wowaname@volatile/founder/wowaname) |
17:18.02 | Samot | So now I want to change how they access voicemail. I change the voicemail context |
17:18.11 | Samot | I want to change what featurecodes, I change that context |
17:18.57 | Samot | I want to add something new I make a new context for it and add an include statement to that from-phones context |
17:19.28 | Samot | Not here's one giant context that could have all the patterns they could send me and I deal with it that way |
17:19.29 | electronic_eel | ok, but how are these included blocks brought into the correct order then? |
17:19.39 | Samot | How you order them. |
17:19.49 | Samot | That order is how they would be extecuted. |
17:20.13 | Samot | If not match continue to the next. |
17:21.23 | electronic_eel | when I do exten => _X,1 I have the first line to be executed for the matched extensions. when I include lot's of contexts and they all have their stuff start at 1, I get a conflict |
17:21.46 | electronic_eel | or not? |
17:22.30 | igcewieling | not really |
17:26.29 | electronic_eel | what happens if I include several contexts and they all contain exten => _X.,1,SomeAppliaction(), each context wanting to execute a different application? |
17:27.43 | Samot | The first context that has it, wins. |
17:27.53 | Samot | This is why people don't do catch alls. |
17:27.56 | Samot | Control. |
17:28.28 | electronic_eel | but how will using the includes help me then? |
17:28.43 | Samot | Because you put the pattern matches in those contexts. |
17:29.06 | Samot | If *97 is how they haccess voicemail....then the voicemail conext has *97,1, |
17:29.13 | Samot | And that's it. |
17:29.20 | Samot | Exact match. |
17:29.50 | electronic_eel | yeah, but I often need to do stuff that is for all calls. like setting a variable which controls setting the caller id. or one that controls the ringtone. and so on |
17:29.59 | Samot | Yeah |
17:30.04 | Samot | So use AstDB. |
17:30.16 | Samot | Store the information there. |
17:30.32 | Samot | Call on it based on criteria. |
17:31.50 | electronic_eel | I have lots of conditions I need to check to be able to set the correct headers in a dial() |
17:32.33 | Samot | https://www.irccloud.com/pastebin/EeRPD2ja/ |
17:32.40 | Samot | And? |
17:32.53 | Samot | My accounts have 2 dozen plus AstDB entries. |
17:32.57 | Samot | Each |
17:33.21 | Samot | Do they want to auto anwer, what do they want to do when paged |
17:33.32 | Samot | What's their callerID, internal/external/emergency |
17:33.46 | Samot | What is their endpoint location ID (for emergency) |
17:33.53 | Samot | What is their ring timer |
17:34.01 | Samot | Do they have voicemail enabled or not |
17:34.14 | electronic_eel | hmm, the stuff I need is usually not by account, but by call. what is the context of this call? set the correct ringtone. did the user select to hide the caller id? and so on |
17:34.33 | Samot | OK that can be done too |
17:34.44 | Samot | Is this PSTN call being recorded? |
17:34.50 | Samot | Is this a International call |
17:34.54 | Samot | Is this an emergency call |
17:35.09 | Samot | Again, you break up your dialplan but what functions it needs to serve. |
17:36.56 | electronic_eel | yeah, I do checks like these for all calls and set the specific variables using Set(). then I can use these in the context I call in the b() option of dial to set the correct headers |
17:37.12 | electronic_eel | as most stuff can only be set there |
17:37.36 | electronic_eel | I mean setting specific pjsip headers |
17:37.49 | electronic_eel | and they are what control the ringtone, caller-id privacy and so on |
17:39.45 | Samot | OK so it seems your way will work fine. |
17:41.01 | Samot | Just keep in mind something you asked earlier: "what if i need to change it" |
17:41.18 | Samot | By using AstDB to hold settings, I don't touch the dialplan to change those settings. |
17:41.47 | electronic_eel | I want to change it only in one place, not having to look up hundreds of places and forgetting a few |
17:41.57 | Samot | OK. |
17:42.38 | electronic_eel | and since most of the complicated stuff I do is not per account, but per call, I want to put it in dialplan |
17:42.49 | Samot | Sure. |
17:43.58 | electronic_eel | and to put all variables in a consistent state, I usually want all calls proceed through the bunch of the same functions. and the issue with that is what started this conversation... |
17:45.46 | Samot | And what I described with the includes does exactly that |
17:45.58 | Samot | Each call goes through the same checks all the time. |
17:47.30 | electronic_eel | but what you call "checks" is just by extension. what if I want to look into specific pjsip headers of all calls and decide based on that? |
17:47.53 | Samot | I put in it a context where it is needed and do that. |
17:48.08 | Samot | BTW, I do that already with a gosub. |
17:48.21 | Samot | I pull the PAI, custom headers and deal with whats in them. |
17:48.34 | Samot | It's a Gosub I call on *when needed* |
17:49.37 | Samot | electronic_eel: I run Asterisk in a multi-tenant setting. |
17:49.42 | electronic_eel | ok, but with your method you can't do it on really all calls in that context, you have to individually match their extensions |
17:49.57 | Samot | Each call comes in and loads Tenant settings, user settings and deals with the type of call it is. |
17:50.06 | Samot | What? |
17:50.20 | Samot | _1NXXNXXXXXX <-- call on it then. |
17:50.33 | electronic_eel | with "individually" I mean what is possible to match with asterisk dialplan matches |
17:50.54 | electronic_eel | and there is nothing that matches all letters and special chars that are allowed to be dialed in sip |
17:50.55 | Samot | I have matches based on what is allowed. |
17:51.19 | Samot | How often are users sending alpha characters? |
17:51.26 | Samot | I can match * or + |
17:52.18 | electronic_eel | yeah, probably I will end up duplicating the gosub for numbers and + * # |
17:52.34 | Samot | How are you duplicating the gosub? |
17:52.41 | Samot | You're going to write a gosub for each? |
17:53.22 | electronic_eel | I mean match and call the same gosub, so I need an extra context and 4 gosub lines |
17:53.45 | Samot | OK |
17:53.50 | Samot | I said your method would work. |
17:54.03 | Samot | You want minimal dialplan, do it. |
17:54.30 | Samot | But how people who design PBX systems would not be your way. |
17:56.35 | electronic_eel | hmm, I still don't get why pbx designers wouldn't do it that way. I mean I have access controls that allow what kinds of numbers are allowed to be dialed. they are just packed together in just one place, and not duplicated all over |
17:57.29 | Samot | I said it before: Control |
17:57.47 | Samot | Do you have anything do deal with Intercom settings? |
17:57.55 | Samot | Setting up auto-answering, paging? |
17:57.57 | Samot | Parking? |
17:58.00 | Samot | Ring Groups? |
17:58.05 | Samot | FollowMe? |
17:58.19 | Samot | Any sort of Class of Services to control how the user can dial? |
17:58.24 | Samot | What they can dial? |
17:59.25 | Samot | A PBX could have 10 Paging Groups each with different settings |
17:59.42 | electronic_eel | I put the calls into contexts based on the devices they come from. there I check what they can dial, and then the calls proceed from there |
17:59.45 | Samot | But each of those paging groups still call on the same core GoSubs for settings, etc. |
18:00.00 | Samot | That's not really how a PBX works. |
18:00.51 | Samot | It's part of how a PBX can work. But not all of it. |
18:01.00 | electronic_eel | this is a single tenant pbx |
18:01.11 | Samot | I'm talking about a single tenant PBX |
18:02.23 | Samot | Which will handle things based off of various factors. |
18:03.04 | Samot | What endpoint is making the call (or user if hotdesking or both), what type of call they are making and what permissions for the user/endpoint and the feature they are using... |
18:03.34 | Samot | So Bobby is extension/user 200 |
18:03.48 | Samot | Bobby could log into Device A, B or C because hotdesking |
18:04.09 | Samot | It doesn't matter if it's A, B or C, Bobby can only dial certain things. |
18:04.21 | Samot | Perhaps he can't dial international |
18:04.35 | Samot | Perhaps he can't use certain feature codes. |
18:05.58 | electronic_eel | yeah, I have something similar. but you log in on the phone and then the phone config is updated through autoprovisioning, so in the end the registration on asterisk is always from the same user, regardless which phone they use |
18:07.01 | electronic_eel | so I just need one entry in the pjsip config and can set the context for the user there. the context is what then controls their rights |
18:07.57 | Samot | Then I'm going to say this one last time on the matter. Your setup with work just fine. But this feels like a giant circle conversation right now. |
18:09.32 | electronic_eel | ok, so I think my difference to other pbx implementors is that I just need a limited set of flexibility. so I can get by with a simpler dialplan |
18:17.38 | electronic_eel | Samot: you wrote "macro is dead" before. is using macro() deprecated or something? |
18:18.10 | Samot | Yes. |
18:18.24 | electronic_eel | I just realized that I need Macro() when I want to have multiple matches going to the same context without losing the original extension |
18:18.26 | Samot | It's slated for removal. |
18:19.30 | Samot | file: Doesn't not get installed anymore by default? |
18:19.38 | file | what what |
18:19.39 | file | Macro? |
18:19.42 | Samot | Macro() |
18:19.51 | file | correct, not built by default |
18:19.59 | Samot | As of 16? |
18:20.31 | Samot | electronic_eel: It is slated for removal from Asterisk. Don't count on it. |
18:20.31 | electronic_eel | strange, there is no notice of deprecation or anything here: https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Application_Macro |
18:20.47 | file | 16 sounds about right |
18:21.57 | electronic_eel | so wouldn't it make sense to add some warning about this to the wiki page I linked above? |
18:22.11 | Samot | It would be in the changelogs |
18:22.22 | Samot | When Asterisk 16 was released. |
18:22.43 | Samot | electronic_eel: Did you have to select app_macro when you installed Asterisk? |
18:23.22 | electronic_eel | I don't know, I haven't used Macro() yet. I was just thinking about it |
18:23.36 | electronic_eel | don't know if I have it installed it or not |
18:23.49 | Samot | https://wiki.asterisk.org/wiki/display/AST/app_macro+Deprecation |
18:23.57 | igcewieling | You don't want to use Macro |
18:24.25 | Samot | It's been deprecated since Asterisk 11 |
18:24.40 | Samot | It's no longer installed by default in Asterisk 16 and is slated for removal. |
18:25.07 | Samot | I'm going to guess the next LTS (not 18) won't have it. |
18:25.20 | file | is presently trying to clean up removal policy, standardize process, yada yada |
18:26.13 | electronic_eel | I suggest to add a note about this to https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Application_Macro so that you don't have to browse old changelogs, but immediately see it in the docs of your ast version |
18:26.28 | Samot | Because you can do: exten => _X.,1,Gosub(mysub,${EXTEN},1()) |
18:26.40 | Samot | It's been since 11! |
18:26.43 | Samot | Version 11 |
18:26.50 | Samot | This isn't new breaking news. |
18:26.57 | file | you can file an issue about it, it's not as easy as just doing that |
18:27.22 | file | wiki page is generated so it requires a code change, plus that information is already stored in the module so pulling it out would be best - otherwise having it in two places means it could be missed or go out of sync |
18:28.07 | electronic_eel | if this part of the wiki was a traditional, manually edited wiki, I'd have changed it myself |
18:28.37 | Samot | You know Chan_SIP is deprecated too? |
18:28.46 | electronic_eel | I know, everything is pjsip |
18:28.53 | Samot | So that just happened |
18:29.10 | Samot | You know that but not something that happened years ago |
18:29.36 | electronic_eel | yeah, because I didn't use asterisk 11, I started with 16, so I did not read the old changelogs |
18:33.09 | electronic_eel | so how do I do this without Macro(): I have 4 exten matches: _X., _+., _*., _#. I want to gosub/macro/whatever from each of them into a context and execute some code there which is really written only once (so just one context macht), and then when that code is done, return to the original context? |
18:33.24 | Samot | 2:26:28 PM <Samot> Because you can do: exten => _X.,1,Gosub(mysub,${EXTEN},1()) |
18:33.38 | Samot | Unlike Macro(), you're not confined to just the s extension |
18:34.32 | electronic_eel | but when I Gosub(mysub,${EXTEN},1()), I still need either _. there or copy the code several times there |
18:36.01 | Samot | Then use s, send the exten as a argurment and return back |
18:36.01 | electronic_eel | so if _. is dangerous and to be avoided how to work around it without having to copy the code 4 times? |
18:36.28 | electronic_eel | ok, guess that should work |
18:36.36 | Samot | No, it does work. |
18:39.29 | *** join/#asterisk Testeree (1b07906f@27.7.144.111) |
18:41.58 | Testeree | I am trying to setup a browser(webrtc-jssip) based dialer, i'm able to make calls from the browser, but incoming calls are throwing an invalid 'From' header on the dialer end. seems like asterisk is sending an invalid hostname for the |
18:43.30 | Testeree | I am trying to setup a browser(webrtc-jssip) based dialer, i'm able to make calls from the browser, but incoming calls are throwing an invalid 'From' header on the dialer end. seems like asterisk is sending an invalid hostname like `From: "USERNAME" <sip:1000@39fafcebb19e>;tag=9dDgi8DUjTATYPlthnbv4fp8NhU-zIRv` |
18:44.53 | Testeree | here `39fafcebb19e` seems invalid. and it seems like the same issue mentioned here https://github.com/versatica/JsSIP/issues/560 |
18:48.23 | *** join/#asterisk sa02irc (~mbax@155-079-043-212.ip-addr.inexio.net) |
18:48.35 | Testeree | the suggested fix was to `In my case i use "-h" in the run statement to fix it` not sure what it means though. |
18:59.48 | igcewieling | A dialer, eh? |
19:00.10 | *** join/#asterisk pchero (~pchero@211.178.226.108) |
19:01.53 | seanbright | it means that the user from that issue was running asterisk in a container (docker maybe?) and had to pass -h to make it use a good hostname |
19:02.13 | seanbright | if you are running asterisk in a container, you need to set up a valid hostname - how you do that is beyond the scope of this channel |
19:02.53 | Testeree | ok. passing -h isn't for asterisk then i hope :) |
19:03.50 | Testeree | is there a way to override the hostname asterisk will use? |
19:05.59 | *** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir) |
19:06.24 | Testeree | maybe `default_realm` |
19:16.38 | Testeree | nope |
19:30.35 | *** join/#asterisk sa02irc (~mbax@155-079-043-212.ip-addr.inexio.net) |
19:36.12 | Testeree | not even `systemname` in asterisk.conf |
19:41.48 | *** join/#asterisk Jesterboxboy (~Thunderbi@84-115-150-8.cable.dynamic.surfer.at) |
19:46.04 | Testeree | it is either a bug or bad design without providing the ability to override the hostname being used(random string is a valid hostname, it is invalid asterisk is trying to put it in From header without validating). can't find any documentation on it. |
19:46.38 | file | it will usually put the IP address of the system in, if that can't be determined then it resorts to the hostname |
19:46.48 | file | from_domain on the endpoint can be used to override the domain portion of the From |
19:46.51 | file | or fromdomain in chan_sip |
19:47.04 | file | if using Docker then the -h argument allows setting an explicit hostname |
19:48.21 | Testeree | file, even if it uses the hostname before asterisk puts it in the 'From' header to something mangled to make it valid. |
19:48.59 | igcewieling | always have every IP on the system listed in /etc/hosts |
19:49.52 | Testeree | setting the docker hostname feels like cutting the foot to fit into a shoe :P |
19:53.22 | Testeree | half a day wasted 𤦠|
19:54.10 | igcewieling | Stop using half-assed virtualization and use a real VM like VMWare or KVM. |
20:17.23 | *** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir) |
21:38.47 | Samot | RIP Eddie Van Halen |
21:47.23 | *** join/#asterisk forgotmynick (uid24625@gateway/web/irccloud.com/x-rpznddfvfwawkxyz) |
22:51.44 | gry | sibiria: hi, see config mappings here: https://dpaste.com/43ML3S5M2.txt (it is "Config Engine: curl" followed by "Config Engine: sqlite3" and that's it) |
23:18.03 | *** join/#asterisk [TK]D-Fender (~joe@64.235.216.2) |