IRC log for #asterisk on 20210114

00:00.12grummundit gets response 100 Trying, then 200 OK.
00:00.25Kobazthat's also good
00:01.08grummundin fact i can complete a call to the provider's test number
00:01.18Kobazso what's the issue?
00:01.47grummundbut any other call is dropped right after it is set up
00:02.25Kobazsounds like you need to get the entire trace and show your transports configuration
00:02.34Kobazsounds like a NAT issue
00:03.39grummundmaybe, i had the same issue with plain sip.conf and got it fixed but forget how ;-/
00:04.04Kobazit's good to keep notes on what works and what doesn't
00:04.13grummundyeah ;-)
00:04.18*** join/#asterisk sinaowolabi (~Sina@102.134.114.1)
00:04.41grummundthe history of changes in is svn, but somehow that point was missed.
00:05.32grummundso i was inspecting the INVITE packet and wondering what to see there.
00:06.11Kobazyou'll see the from, the to, and the SDP which sets up media
00:06.40Kobazanything you ITSP needs to create a call will be in there, including authentication (encrypted using challenge-response)
00:06.54grummunddoes authentication happen there?  (reason for my orginal question)
00:06.55Kobazthe very first INVITE, is typically unauthenticated
00:07.00grummundok ok
00:07.27Kobazwhich will provide you with the nonce token that the auth will be generated from in the second invite
00:07.33Kobazthat's why you need the first one
00:08.07Kobazsome systems try and short cut it, by storing an old nonce and sending an authenticated first invite, which can work, but asterisk will complain
00:08.46grummundthat may explain why the provider's test number works fine
00:09.01grummund(which is kind of ironic)
00:09.55Kobazit's better to know for sure... if you paste up some logs (dpaste is good), someone can figure it out
00:11.46grummundwill do, i just wanna be careful not to post any credentials...
00:12.06Kobazyou wont
00:12.17grummundthat's the INVITE - http://paste.debian.net/1181038/
00:12.25Kobazif you're showing just logs, none of the password information would show up, it's encrypted
00:12.36Kobazbut you can xx out usernames or some of the ip address if you're paranoid
00:12.59Kobazo=- 310657538 310657538 IN IP4 11.22.33.44
00:13.05Kobazis that a real public ip there, in the real log
00:13.18grummundno, but the rest is verbatim.
00:13.34Kobazthat's a problem
00:14.00Kobazyou're talking to a public ITSP, and giving it an incorrect media address to send you audio
00:14.04Kobazif that's the case
00:14.25SamotThis the completed test number call?
00:14.39Kobazit may be treating you as a NAT'd peer
00:14.44Kobazand ignoring your SDP media ip
00:15.37Kobazgrummund: that's the INVITE that your provider sends an OK for?
00:15.38grummundwait, ignore the 11.22.33.44 (/me should have put xx.xx.xx.xx)
00:15.52Kobazif you're paranoid just change one part
00:15.59grummundeverything else is exactly as per the log
00:16.02SamotIs this the test number invite?
00:16.03Kobazxx.128.44.45
00:16.07Kobazor whatever
00:16.10Kobazso it looks legit
00:16.12Samotgrummund: ^^
00:16.21grummundok wait
00:16.45SamotIs 154 the test number?
00:17.11Kobazgrummund: remember how it sends one unauthenticated invite and one with auth... are you showing us the wrong one?
00:17.32SamotCan I get an answer?
00:17.34Kobazalthough the SDP media and etc should be basically the same rules in the second one, but it's nice to work with the *actual* invite
00:17.50grummund154 is for "Balance check".
00:17.53grummund155 is the test number (it reads back saying succefully setup).
00:18.00SamotOk and that works?
00:18.34Samotgrummund:  have you tried presenting proper caller id?
00:18.40grummund155 works, all others appear to get so far then receive a BYE.
00:18.48Kobazyeah could be callerid
00:18.59Samot1 is not valid
00:19.10grummund1 is the internal extension no.
00:19.30SamotThen you need proper callerid for PSTN calls
00:19.50grummundfwiw, not plain old sip.conf and the same account.
00:19.51Kobazyou'll want some form of 'From:' or pai or ppi or rpi for callerid
00:19.56SamotYou should have the basics covered first
00:20.31SamotBefore going off on SDP
00:20.48grummundso, it's working with sip.conf and didn't need the callerid there.
00:20.49KobazSamot: that was glaring at me, without even looking at anything else
00:21.12SamotPjsip is not the same
00:21.22SamotWell show a failed call
00:21.25SamotIn full
00:21.32SamotLets see what actually happens
00:21.51grummundis the Contact: ok?  "asterisk" happens to be the name of the box it is running on.
00:22.03SamotA single INVITE doesnt paint the whole picture
00:22.16SamotShow a call that doesnt complete
00:22.28SamotFull call
00:22.54grummundok, but the callerid should be fixed first
00:23.03SamotJust show it as is
00:31.30*** join/#asterisk pppingme (~pppingme@unaffiliated/pppingme)
00:31.53*** join/#asterisk nix8n82 (~AndChat19@205-170-75-78.dia.static.qwest.net)
00:37.14grummundthis is the call that fails - http://paste.debian.net/1181042/
00:44.16grummundmaybe something obvious in the config - http://paste.debian.net/1181043/
00:44.49grummundfwiw, incoming calls succeed.
00:46.14fileadd from_user=<username> to the endpoint.
00:46.19SamotShould there be a from user?
00:46.24SamotYeah..that
00:48.29grummundthat works
00:50.10grummundin the INVITE, From: and Contact: both now have the username@...
00:50.14SamotRight, because that setting takes that 1 in the from header and replaces it with whatever from_user is
00:50.42grummundthanks
00:51.03grummundthat's it's kinda where i started from ;)
01:01.25*** join/#asterisk fstd_ (~fstd@unaffiliated/fisted)
01:03.05*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
01:04.42*** join/#asterisk EmleyMoor (42b789682f@firthpark.tinsleyviaduct.com)
01:18.51*** join/#asterisk sinaowolabi (~Sina@102.134.114.1)
02:19.36*** join/#asterisk sinaowolabi (~Sina@102.134.114.1)
02:37.47*** join/#asterisk tsal (~tsal@i59F4A013.versanet.de)
02:39.09*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
02:43.58*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
02:48.37*** join/#asterisk sinaowolabi (~Sina@169.159.69.42)
02:48.38*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
02:52.53*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
02:55.48*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
02:58.00*** join/#asterisk zgu (~steve@2603-7080-b744-4900-16ad-d120-de49-dc8b.res6.spectrum.com)
02:58.44*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:01.44*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:05.14*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:08.09*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:12.42*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:13.01*** join/#asterisk pvoigt (~Linux@unaffiliated/pvoigt)
03:14.27*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:18.42*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:21.52*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:25.02*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:26.27*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:29.29*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:32.39*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:35.44*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:40.34*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:42.47*** join/#asterisk electronic_eel_ (~quassel@213.240.182.13)
03:43.34*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:46.49*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:49.59*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:53.14*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:56.24*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
03:59.34*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
04:03.04*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
04:06.09*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
04:09.34*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
04:12.34*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
05:06.06*** join/#asterisk electronic_eel (~quassel@dslb-088-066-187-171.088.066.pools.vodafone-ip.de)
05:23.39*** join/#asterisk ckb (~ckb@unaffiliated/ckb)
05:23.53ckbhey guys is there a way I can hook into 911 calls?\
06:06.44*** join/#asterisk hfb (~hfb@cpe-75-82-92-216.socal.res.rr.com)
06:10.16*** join/#asterisk electronic_eel_ (~quassel@213.240.182.52)
06:11.00jkroonKobaz, we store recordings long term on gluster, and yes we did run into the sqlite blocking stuff, ramdisk sorted that out.
06:24.10jkroonKobaz, no, the lock wasn't our issue, the fsync() was ... with chap_sip it was (is) an absolute killer.  http://jkroon.blogs.uls.co.za/it/voip/asterisk-massively-speeding-up-those-register-requests (we clocked some REGISTER frames in at over 300ms, move astdb to ramdisk, sub 1ms)
06:25.49jkroonyour patch basically abandon the update after 500ms ... which is also not an acceptable solution.  How frequently do you hit that abandon?
06:29.42jkroonckb, depends on what you mean with "hook into"
07:05.06*** join/#asterisk mmlj4 (~mmlj4@ip174-69-111-70.no.no.cox.net)
07:17.12*** join/#asterisk FH_thecat (~FH_thecat@75.11.25.212.ftth.as8758.net)
07:21.16*** join/#asterisk electronic_eel (~quassel@213.240.182.52)
07:33.30*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
07:35.46*** join/#asterisk mmlj4 (~mmlj4@ip174-69-111-70.no.no.cox.net)
07:37.03*** join/#asterisk mmlj4 (~mmlj4@ip174-69-111-70.no.no.cox.net)
07:56.42*** join/#asterisk sa02irc (~mbax@155-079-043-212.ip-addr.inexio.net)
08:02.16*** join/#asterisk retentiveboy (~retentive@2601:cf:4500:5ea3:509f:3ecd:4bbe:e783)
08:10.03*** join/#asterisk AndChat|19361 (~AndChat19@2600:100e:b05d:c7bf:4d0c:ad13:76cf:6d56)
08:17.46*** join/#asterisk spatel (~spatel@pool-96-237-230-175.bstnma.fios.verizon.net)
08:28.05*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
09:13.54*** join/#asterisk puzzola (~puzzola@unaffiliated/puzzola)
09:15.21*** join/#asterisk sinaowolabi (~Sina@169.159.125.133)
09:18.20*** join/#asterisk nix8n82 (~AndChat19@205-170-75-78.dia.static.qwest.net)
09:21.37*** join/#asterisk Dovid (~dovid@ool-2f10fda7.dyn.optonline.net)
09:28.57*** join/#asterisk sinaowolabi (~Sina@169.159.125.133)
09:39.23*** join/#asterisk AndChat|19361 (~AndChat19@2600:100e:b05d:c7bf:34b8:f256:1430:5d2e)
10:07.50*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
10:08.39*** join/#asterisk ih8wndz (jwpierce3@mail.zero.svr.trnkmstr.com)
10:12.28ckbjkroon, sorry I was in the matrix, are you still here?
10:14.26ckbI'm asking if there's a way I can have a webhook whenever asterisk outbounds to emergency?
10:18.18jkroonckb, i am
10:18.26jkroonCURL()
10:19.12jkroonasterisk -rx "core show function CURL" should tell you what you need to know.
10:19.21ckbI know what curl is, but that's vague
10:19.30ckbah ok
10:19.52ckbwill that give me every ongoing call?
10:21.31ckbjkroon, this is just a curl function built into asterisk?
10:21.52ckbhow does this show me that a 911 call was places?
10:22.00ckbs/places/placed
10:22.18kjetilhoyou can put all sorts of actions into your dialplan
10:22.55ckbI'm actually trying to learn how to create a dialplan syntax.
10:23.33ckbkjetilho, I tried adding something to the config, but it didn't work. (I possibly could have not reloaded it)
10:25.27ckbI will say that I think I reloaded FreePBX with a new "extension" and it didn't show up in the FreePBX GUI.
10:25.53ckbSo, without to say, I'm new to this and would love all the help I can get.
10:27.18ckbAnd I'm not inept, and can definitely understand, but after a year of working for this company, I just found out about both Asterisk and FPBX CLI..
10:28.54ckbI also don't get how asterisk's cli "curl" can help solve my question?
10:30.18fileAsterisk itself doesn't have "webhooks" for specific actions, it doesn't even have a concept of emergency calls, those are all things that something higher up create (such as FreePBX, or individual users)
10:30.32fileAsterisk gives the primitives, the building blocks, and then those get used
10:31.02*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
10:31.04ckbfile, understood. it's primitive.
10:31.34ckbcan I get help understanding the syntax of an "extension"?
10:31.49filethat depends what you mean by extension
10:32.00ckbwell...
10:32.02filesince you're using FreePBX, it has its own definition in the GUI
10:32.08filebut there's also a definition for Asterisk in the dialplan
10:32.27filewithin the dialplan an extension is a set of steps/instructions which are executed when a call is placed to it
10:33.06ckbI was already chastised for calling "extensions" as they are
10:33.35ckbrealistically they're just aliases?
10:33.45fileI told you what an extension within the dialplan is
10:34.01fileit's literally a set of steps - "do this, do this next, then that" etc
10:34.41ckbokay, I halfway understand this.\
10:34.55ckbas a call and "extension" is what someone dials.
10:35.07ckbhow does this differ?
10:35.31filedepends on what you mean by "extension" within that context
10:35.56filedevice dials extension 1000
10:36.04ckbI dial "47458589" during the call
10:36.07fileinstructions for extension 1000 in the dialplan may include dialing another device
10:36.40ckbI'm literally trying to understand this, so bare with me, please :(
10:37.32ckbAsterisk picks up the call, plays a system message "Dial x for y, z for a, y for b"
10:37.42ckbx z and y would be what?
10:37.58fileextensions in the dialplan, which execute other logic
10:38.14fileor it could be done a different way, yet again with dialplan logic
10:38.38ckbI'm pretty sure we're dealing with extremely simple logic rn
10:38.50filethe only association between an extension you dial (or an option) is through the dialplan which is controlled by either an individual or something else (like FreePBX)
10:39.07fileAsterisk comes as blank slate, the logic is written
10:39.15ckb(I'm trying to move my company away from FreePBX)
10:39.28ckbthis is why I'm asking for help
10:40.25ckbso in this case x, z, y are extensions?
10:40.35filethat is the most common way to do it, yet
10:40.36fileer yes
10:41.39ckbokay so if we're using FPBX, would I use extensions_custom.conf?
10:41.52fileI don't work on FreePBX or know it
10:42.10ckbmeh
10:42.25ckbextensions_override_freepbx.conf is literally an override?
10:42.54ckbAlso, what is the best way for me to learn the syntax of Asterisk?
10:42.54fileyet again, I don't work on FreePBX or know it
10:43.22filethe book covers stuff, an old version is at asteriskdocs.org but dialplan hasn't changed
10:43.25ckband does asterisk need to be restarted if you edit extensions.conf?
10:43.35fileno, it just has to be reloaded
10:44.08ckbso, could you give me a sample of what I'm trying to do?
10:44.16jkroonckb, http://ftp.openbsd.org/pub/OpenBSD/distfiles/9780596510480.pdf <-- i can highly recommend this book ... just see if you can find a newer version of it.
10:44.21fileI don't have a sample handy
10:44.33ckboutbound to 911 -> CURL(URL)?
10:45.11jkroonckb, extension ????,n,NoOP(CURL(https://someserver/some_path?cli=${CALLERID(all)}))
10:45.35jkroonckb, it depends on what's already there and how you're integrating into it.
10:45.37ckbjkroon, I think I can work with that.
10:46.04jkroonthis is very much like how do you explain programming/software development to someone who has never worked with computers.  where do you start?
10:46.56ckbjkroon, I have been a developer for almost 24 years (since I was 8) but this cli and asterisk config is brand new to me
10:47.41ckbjust trying to get basics before I dive into the docs, that's all
10:48.28ckbin my conf it's exten => ?
10:48.59ckbwhat is exten => _.,....?
10:49.25ckbwhat is exten => s,....?
10:50.27kjetilho"<ckb> just trying to get basics before I dive into the docs, that's all"  *facepalm*
10:50.39kjetilhothat is the most ass-backwards thing I have heard today
10:50.46ckbkjetilho, it's simple questions :(
10:51.02kjetilhosimple questions tend to be answered in books ...
10:52.16filehttp://asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/asterisk-DP-Basics.html
10:52.19ckbcould be much easier answered by someone than having to dive through 20 paragraphs
10:52.56kjetilho20 paragraphs.  oh my, I feel your pain
10:53.38ckbyou know.. I could ask why you're even in a help channel.
10:53.52ckbBut I will go read, fine.
10:55.04*** join/#asterisk forgotmynick (uid24625@gateway/web/irccloud.com/x-bafusfqwfpnbuvit)
10:55.55jkroonckb, read the above book, if you've been developing that long you'll catch onto it very quickly, or perhaps you might be more comfortable with the LUA dialplan code.
10:56.56jkroonckb, it's tricky to explain in less, if you're a dev, you'll get that, juts read the book, the channel isn't here to hand-hold you, it's here to help when you get stuck.
10:57.02ckbjkroon, I understand, and I will, I just want to get this simple project done. Do these .confs only handle incoming calls? I'm trying to deal with OUTGOING.
10:57.33filethere is no difference.
10:57.38ckbIn the grand scheme of things, I will have to look over this.
10:57.51jkroonincoming and outgoing is a concept that conceptual in nature only, all calls hit the dialplan upon creation of a channel, and will usually eventually create a brige to another channel.
10:58.35ckbso, if there's already 911 in FreePBX, do I need to search their configs?
10:58.45jkroonthree is unlikely to be.
10:58.53jkroonsince it's just a call, like any other.
10:59.15jkroonalmost no one here (at least, that I'm aware of) use freepbx.
10:59.34ckb(I'm trying to move away from freepbx and asking for help)
10:59.53jkroonbest move (in my very much not as humble as it should be) you could make.
11:00.22jkroondo you understand the concept of a channel?
11:00.38ckbI would say about 20%
11:00.45ckbthis is why I'm asking for help
11:00.56ckbsighs
11:01.10jkroonchannel gets created upon incoming "INVITE" (or similar if not using SIP).
11:01.27ckbwe only use PJSIP and SIP
11:01.27jkroonthat "channel" is then placed in the dialplan, where stuff happens, the recipe is followed.
11:02.01jkroonSo you'll have say PJSIP/foo-XXXXXX that's busy executing some point in the dialplan (eg, NoOP(CURL(...)))
11:02.09ckbokay so from provider to asterisk
11:02.15ckbcan we start there
11:02.17jkroonno, from ANYWHERE
11:02.27jkroonprovider sends INVITE.
11:02.57jkroonchan_(sip|pjsip|iax2|h232|...) will action required authentication and then create a channel.
11:03.14ckbthe channel is an "active" call?
11:03.14jkroonchannel is then passed off to the dialplan to the configured context.
11:03.25jkroonwell, what's a call?
11:03.51jkroonso no, channel is simply a signalling method for the most part between two parties involved in "the call"
11:04.03jkroonprovider <=> pbx is one such signalling channel.
11:04.11jkroonpbx <=> phone is another such channel.
11:04.37ckbokay lets say I'm using bandwidth here
11:04.47jkroona bridge transmits RTP (audio data) between related channels, so a bridge really links two (or more potentially) channels for audio transmission.
11:05.14jkroonhow does bandwidth fit in?
11:05.43ckbI call one of bandwidths numbers, that gets sent to my asterisk server, the asterisk server then does thing (play system recordings and listens for menu options, etc) -> then dials a hardware phone
11:06.36jkroonbandwidth == provider?
11:06.41ckbidk... I've been asking him to explain these things to me, but I literally didn't know asterisk had a CLI until 2 days ago.
11:06.53ckbyes... bandwidth, twilio, whoever
11:07.06jkroonlet's just call entity "provider" shall we?
11:07.12jkroonprovider sends INVITE => pbx.
11:07.13ckbsure
11:07.49ckbpbx or asterisk here?
11:07.59ckbagain I want to get rid of pbx
11:08.06ckbfreepbx*
11:08.19jkroondepending on settings that will cause the channel driver to respond in some way resulting in one of three things (as far as I'm concerned):  1.  telling the remote side to get lost, 2 telling the remote side to authenticate, or 3 ok, I'll try that (100 Trying response).
11:08.28jkroonasterisk is your pbx.
11:08.35jkroonwell, the software driving your pbx.
11:08.59ckbasterisk is the unix and pbx is the linux?
11:09.09ckbright?
11:09.37jkroonlinux is the OS, asterisk is akin to apache, but instead of serving web pages it does voice related stuff.
11:09.50ckbokay it was a relative remark
11:10.06jkroonin case (1) and (2) nothing further really happens, but in case (3) a channel is created and placed in the dialplan at the configured context.
11:10.42ckbthe channel is a UDP connection between provider and server?
11:11.05jkroonso provider will usually To: <registered_contact@your.ip> kind of thing, so dialplan will enter into registered_contact@${context} where if context isn't configured for the SIP peer or PJSIP endpoint, is default.
11:11.25jkroonchannel is a concept, and yes, a "UDP connection" is one way.
11:12.17jkroonit really is just a struct in the asterisk world (internally) with some code that determines what to do when certain events (like ANSWER) needs to be signalled, which will then send required over TCP/UDP/TLS/whatever.
11:12.38ckbright
11:12.45ckbI'm following here
11:13.15ckbso (111) 111 1111 gets delivered to asterisk
11:13.25jkroonok, so provider has now sent INVITE and you've got a channel.  dialplan determines what to do with that channel.
11:13.34jkroonEg Playback(some&audio&files)
11:13.48ckbright
11:13.52ckblike a menu
11:13.58jkroonwhere the recipe started depends on the [context] the channel is placed into, and the start extension
11:14.25jkroonso inside a [context] you can have zero more more blocks of exten => _pat,s,Application
11:14.27ckbthey hit "1" and then I want another menu
11:14.42ckbooof you lost me here
11:14.55jkroonthose are achieved with the Background() application.
11:15.00jkroonthis is long before you get there.
11:15.08ckbyeah I need simple rn
11:15.16ckbgetting ahead of myself
11:15.25jkroonno, I refuse.  You can't run before you walk.
11:15.45ckbI agree 100% and I love you for helping me
11:16.18jkroonpatterns can start with _ to indicate it's a pattern, eg _12[0-9] will match destinations starting with "12" followed by any digit.
11:16.32ckbOH
11:16.35ckbit's regex
11:16.45ckbkind of?
11:16.46jkroonthere are special characters here, so _12X is equivalent.  Z and N are also options here.
11:17.00jkroonvery far from, glob is probably closer, but yes, it's similar.
11:17.18ckb_12[0-9] won't match _12X?
11:17.28jkroonno, they're equivalent.
11:17.55jkroonso one very nice hack if you're using 3-digit extensions not starting with a zero:
11:17.58ckbtbh I don't know how 12X could be a thing?
11:18.13jkroonX is shorthand for [0-9]
11:18.21jkroonN for [2-9] and Z [1-9]
11:18.29ckboh I'm thinking actual regex
11:18.33ckbok go go
11:18.52jkroon[my_extensions] exten => _ZXX,1,Dial(SIP/${EXTEN})
11:19.18jkroonso anything sent to that context will match if, and only if it's a three-digit sequence, not starting with 0.
11:19.38ckbone sec
11:19.52jkroonand will result in asterisk looking for a SIP peer with a name matching that sequence, and try to connect the calling channel with that peer (using a new channel).
11:19.59ckbjust reading over this
11:20.51ckbso ZXX is only 1 digit a piece?
11:21.27ckbexten => 1234132434,..... is valid?
11:22.33ckbthen (I know I need to read the docs and tell me to just bugger off) what is SIP/{$EXTEN}
11:23.06ckbALSO the ,1,
11:24.09ckb<jkroon> and will result in asterisk looking for a SIP peer with a name matching that sequence, and try to connect the calling channel with that peer (using a new channel).
11:24.24ckbso the original channel would disconnect?
11:24.45jkrooneach character in the patter will match exactly 1 character yes.
11:25.10jkroon! will match zero or more, and . will match one or more (and must be the last character in the pattern afaik)
11:25.26ckb! = 1?
11:25.27*** join/#asterisk spatel (~spatel@pool-96-237-230-175.bstnma.fios.verizon.net)
11:26.06jkroon,1, is the priority, so for each pattern the priorities are executed sequentially, starting at 1.
11:26.07ckb_ZXX,1, <<<<<<< this
11:26.15ckbgotcha
11:26.18ckbI know this
11:26.23jkroon! and . can form part of the pattern.
11:26.53jkrooneg, _Z. is in regex terms:  ^[1-9].+$ where _Z! is ^[1-9].*$
11:26.59ckbokay the SIP/{$EXTEN} is the last
11:27.16ckbthen I think I'm okay, I will likely be back
11:27.41ckbPJSIP and SIP is what I'm dealing with right now
11:27.52jkroonthat's the syntax for channels, in this case it tells Dial() to get the SIP channel driver to create a channel to a peer called ${EXTEN} where ${EXTEN} is a variable containing the currently executing extension.
11:27.53ckb(I would love to know the difference)
11:28.07jkroontwo different channel drivers both implementing SIP.
11:28.28jkroonyou should probably prefer PJSIP over SIP unless you have a very specific reason to use chan_sip rather than chan_pjsip.
11:28.34ckbfrom what I know multiple devices on PJSIP and one on SIP
11:28.57jkroonmultiple Contact's (AORs) on PJSIP per endpoint.
11:29.12jkroonBut you need to specifically adjust Dialplan() to use all of them instead of only the firt.
11:29.14jkroonBut you need to specifically adjust Dialplan() to use all of them instead of only the first.
11:29.24ckbPJSIP 1:N and SIP 1:1?
11:29.30jkroonok, that's worded badly.
11:29.59jkroonPJSIP supports multiple registrations per endpoint yes, chan_sip only one.  so 1:N and 1:1 is one way of looking at it yes.
11:30.18ckbokay that's what I understand
11:30.35ckbsoooo
11:30.51ckbwhen it finds that new "channel" does it kill the old channel?
11:31.02ckbwhat specifically is a channel? just a UDP connection?
11:31.16ckbUDP from provider -> server -> device?
11:31.40ckb2 channels in a sip situation?
11:31.50jkroonno, you can have multiple channels on the same udp/tcp connection.
11:32.15jkrooni guess one of the stranger ways to think of a channel is a "half call"
11:32.23jkroonor "one leg of a call"
11:32.55ckbwell yes, but a single call.... will have a channel to the provider (brandwidth)... then bandwidth to server.... then server to hardware?
11:33.15jkroonif you think in terms of a traditional pure analog PBX ... a channel would be a pair of wires capable of carrying exactly one call between two directly connected parties.
11:33.55jkroonso in the case of the PBX a channel would be that pair of wires to an extension, or to the PSTN provider.
11:33.56ckband then swapping switches like old school operators?
11:34.15jkroonNow enters ISDN and suddenly you can have multiple (2 or 30) channels on the same pair of wires.
11:34.29ckb(DSL)
11:34.45jkroonyes, if you want to go back that far, a "bridge" would be exactly that, a set of wires inserted between two channels.
11:35.08ckbI went to GT and built an 8 bit computer using a breadboard
11:35.12ckbplz :D
11:35.14ckbD:
11:35.37jkroonISDN => SIP|IAX|H.232 and suddenly that single "connection" can carry signalling for N channels, where N can be a really large number.
11:35.44jkroonok, i've got to go now.
11:35.55jkrooncheers, read the book.  it really explains it better than I ever could.
11:35.58ckbjkroon, thank you so much
11:36.20ckbjkroon, you helped me much more than trying to read a text book
11:36.28ckbjkroon, you're the best.
11:38.27jkroonpleasure, but still read the book, it'll clarify a few things.
11:39.22ckbjkroon, I already said I need to, just wanted the basics.
11:39.56jkroonI'm just making sure you truly realize that.
11:39.58ckbjkroon, you gave me a nitrous boost
11:40.17ckbjkroon, I think I can get it from here. Thank you.
11:40.42ckband I likely will be back but not like this
11:41.07ckb<3
11:42.55ckbjkroon, actually, one last question, how does this apply to outbound calls? don't need to get in depth
11:43.46ckband can you have multiple "contexts" for "extensions"
11:43.50jkroonas myself and file have said, there is no difference between inbound and outbound.  they're the same thing.
11:44.20ckbso 911 as a context would STILL apply?
11:44.37jkroonin your head - please take a really, really big imaginary gun, and take aim at the concept of inbound vs outbound.
11:44.39ckbif someone called in and dialed 911
11:45.01jkroonwell, your ITSP will send the call To: <foo@your.ip>
11:45.13jkroonan extension will use To: <911@your.ip>
11:45.20ckbI call my asterisk server and dial 911, and it'll do the same as if a hardware phone dialed 911?
11:45.37ckbITSP?
11:45.45jkroondepends on the contexts that you place incoming channels into.
11:46.06jkroonoh, I think of channels as incoming or outgoing (as seen from the perspective of the server/pbx/asterisk)
11:46.11ckbbut you said they were the same?
11:46.21jkroonso a channel gets created due to external action towards asterisk (incoming INVITE)
11:46.26jkroon^^ incoming channel
11:46.30ckbok
11:46.39ckbI'm looking to hook into outgoing 911\
11:46.44ckbzzzz
11:46.44jkroonor a channel gets created as a result of something happening in the dialplan - outgoing channel.
11:47.09ckbwhat's the difference? can we go over that real quick?
11:47.19ckbor just give me a sample or a link?
11:47.48ckbI want to make a webhook (CURL) whenever 911 gets dialed
11:47.56ckbvery simple
11:48.25ckb(send a text when 911 gets dialed from any SIP/PJSIP)
11:48.41ckbthat was my original question, tbh
11:49.41ckb(what you already gave me is worth 100 years of my life, but we went down a rabbit hole when I just wanted this answered)
11:50.13ckbalso if you PM a cashapp, I'll send you some dollas
11:52.26ckbjkroon ^^^
11:53.26jkroonckb, sorry man, what I would suggest, enable the full log, and look at what gets generated when you make calls.
11:53.36jkroonit logs exactly each application being executed.
11:53.51jkroonthat way you can find the best place to adjust the dialplan to add the CURL() call.
11:54.00ckbjkroon, I just want something executed upon dial?
11:54.15ckbis that not a thing?
11:54.17jkroonyou want something executed from the dialplan, prior to Dial()
11:54.48ckboutbound calling is still in the conf, jkroon ?
11:54.48jkroonincoming channel will start executing in the dialplan, once you hit Dial() the outgoing channel will be created, and if that answers the two channels will be bridged.
11:54.59jkroonall dialing is in the conf.
11:55.22ckbjkroon, ok I shall research
11:55.38ckbjkroon, if you would like a donation, pm me
11:55.43ckbjkroon, thank you
11:56.09jkroonothers have over the last 15 years helped me, and so my request is this:  pay it forward by helping others.
11:56.40ckbjkroon, what would an outbound conf look like?
11:56.54ckbcontext...
11:57.13jkrooni gave you an example above.  outbound to extensions most likely.
11:57.34jkroonagain, don't think of inbound/outbound CALL, think in terms of inbound/outbound CHANNELS
11:57.55jkroonALL inbound channels executes the dialplan.
11:58.09jkroonALL outbound channels are as a result of Dial() application.
11:58.14ckbbut yes. hardware phone -> asterisk -> bandwidth -> receiving -> phone
11:58.47jkroon[make_em_go_out] exten => _0X.,1,Dial(PJSIP/bandwidth/${EXTEN:1})
11:59.07jkroonvery simple and very much insufficient, but probably working, example.
11:59.08ckboh wait
11:59.37ckbexten => ????,PRIORITY,CMD
11:59.49ckbdoesn't matter in or out?
12:00.04jkroonthat's what we've been saying.
12:00.18ckbjkroon, shit I love you
12:00.19jkroonit's about matching the patterns in the context, which will then execute CMDs in PRIORITY order.
12:00.24ckbI will pay this forward
12:00.44ckbI thought .conf was only inbound
12:01.01ckbone last question jkroon
12:01.19ckbdo I need to search for the 911 in current configs?
12:01.27ckbare they overwritable?
12:01.55ckbI guess that's a FPBX question but maybe you know
12:02.20jkroonfrom my perspective, yes, all configs are just that, configs, from a freepbx perspective ... be careful.  Most of them will get regenerated as far as I know.
12:02.35ckbok one sec
12:02.49jkroonIIRC (2007) you should only customer files with _custom in the name.
12:03.10jkroonthat never did sit well with me.
12:03.31ckbI have 4 files
12:06.37ckbjkroon,  I found an article online that said edit a file... pretty sure (just being deductive) is extensions_override_freepbx.conf
12:07.52ckbI have extensions_additional.conf extensions.conf extensions_custom.conf and extensions_override_freepbx.conf
12:08.06jkroonckb, ¯\_(ツ)_/¯
12:08.11grummundDo i understand this correctly? - for a device to register with us, then in pjsip.conf 1) the ['endpoint'] and ['aor'] sections must share the same name, and 2) that name being the user id the device registers as.
12:08.36ckbjkroon, will I need to restart? or something after I make changes?
12:08.54ckbreload? or idk
12:08.55jkroonasterisk -rx reload should be adequate.
12:09.10ckbjkroon, okay thank you so much. love you
12:11.00filegrummund: depends on the endpoint itself, when a REGISTER occurs it says "add my contact to this AOR", and some endpoints for simplicity just assume that the AOR is the same name as the username and such
12:11.57*** join/#asterisk gerhard7 (~gerhard7@86-87-238-48.fixed.kpn.net)
12:11.58grummundfile: thanks that resolves some confusion
12:13.31grummundis that the difference between 'User ID' and 'Auth ID' on the phone?
12:14.02fileprobably? but you're asking a phone behavior question there, of how exactly they are used
12:14.20fileUser ID might go into the "From" header while Auth ID is used for the actual authentication
12:14.39grummundsome experimentation requied
12:16.40*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
12:40.14*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
13:06.20*** join/#asterisk post-factum (~post-fact@vulcan.natalenko.name)
13:06.43*** join/#asterisk aness (~aness@cm-84.209.131.103.getinternet.no)
13:13.42*** join/#asterisk spatel (~spatel@pool-96-237-230-175.bstnma.fios.verizon.net)
13:25.35*** join/#asterisk paulgrmn (~paulgrmn@c-98-250-183-21.hsd1.mi.comcast.net)
13:51.00*** join/#asterisk mmlj4 (~mmlj4@ip174-69-111-70.no.no.cox.net)
14:00.46*** join/#asterisk spatel (~spatel@pool-96-237-230-175.bstnma.fios.verizon.net)
14:04.11*** join/#asterisk overyander (~overyande@216.163.21.11)
14:13.07*** join/#asterisk Ner0Zer0 (~Ner0Zer0@87.253.63.54)
14:18.57SamotAuth ID is only used when Auth is required.
14:19.34SamotIt is pretty rare to see the User ID (from user) and Auth ID be different these days.
14:32.48*** join/#asterisk mmlj4 (~mmlj4@ip174-69-111-70.no.no.cox.net)
14:40.33*** join/#asterisk gerhard7 (~gerhard7@86-87-238-48.fixed.kpn.net)
14:50.58*** join/#asterisk bford (uid283514@gateway/web/irccloud.com/x-cgbroyjhprqhpomz)
14:50.58*** mode/#asterisk [+o bford] by ChanServ
14:53.05*** join/#asterisk kharwell (uid358942@gateway/web/irccloud.com/x-mhrvhzxyyegkaopl)
14:53.05*** mode/#asterisk [+o kharwell] by ChanServ
14:54.52ckbokay guys I have a question about additional config
14:56.11ckbexten => 11111111111,2,curl(https://worker.domain.co/test.php)
14:57.05ckbas like an extra config /etc/asterisk/extensions_override_freepbx.conf
14:57.40ckbI've tried fwconsole reload and /etc/asterisk/extensions_override_freepbx.conf
14:57.46ckberrr
14:58.00ckbasterisk -x "core restart now"
15:02.26SamotIs that the only line/
15:04.04ckbyea?
15:04.12ckbI don't know how else to do it
15:04.34ckbHALP
15:05.45*** join/#asterisk mmlj4 (~mmlj4@ip174-69-111-70.no.no.cox.net)
15:14.26SamotWell it needs a priority of 1
15:14.48SamotLike any other dialplan context
15:39.32*** join/#asterisk CatCow97 (~mine9@c-73-96-109-206.hsd1.or.comcast.net)
15:40.47ckbSamot, but there's already a priority 1
15:42.40SamotI asked if that was the only line
15:42.45SamotYou said yes
16:26.09*** join/#asterisk hfb (~hfb@47.139.22.184)
16:43.17*** join/#asterisk yokel (~yokel@unaffiliated/contempt)
16:43.18*** join/#asterisk overyander (~overyande@216.163.21.11)
16:52.39grummundIs it normal to set 'from_domain' on a siptrunk endpoint to the provider's own domain name?
16:58.08grummundputting 'from_domain=asterisk' works just as well, afaict.
16:58.48jkroongrummund, yes it is, and sometimes required, usually not, depends on the provider.
16:58.52grummundwithout it, the internal ip addr appears in the invite message.
16:59.15*** join/#asterisk nix8n82 (~AndChat19@2600:100e:b043:7500:b5da:73c5:587c:5d91)
16:59.18jkrooneg, they could have an SBC that dispatches to internal hosts based on that domain name or something.
17:00.03grummundi see, thanks.
17:01.10grummundhmm, but it would be more sensible for them to use the To: field, no?
17:01.56ckb<PROTECTED>
17:02.00ckbwhat
17:02.22ckbdisregard <3
17:03.28*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
17:03.34Samotgrummund: To check the from/sender details? No.
17:07.11grummundSamot: no, to do what jkroon said.
17:14.49*** join/#asterisk hfb (~hfb@45.152.182.239)
17:15.31Samotgrummund: Not really. They could be routing on the from domain.
17:23.09*** join/#asterisk gerhard7 (~gerhard7@86-87-238-48.fixed.kpn.net)
17:36.33grummundSamot: it seems counter intuitive to set the From: domain to the entity you are sending to.
17:37.03SamotNo, it does not.
17:37.19grummundto me, it does.
17:37.25grummundhence the question ;-)
17:37.35SamotIt's part of security as well.
17:38.32SamotIt proves you are who are you.
17:39.05grummundwonders if we are talking cross-purposes
17:39.45SamotWell, the TO header is generally not used for this kind of stuff.
17:40.00SamotBecause the TO header contains the original digits.
17:40.16SamotNot the manipulated/final digits.
17:41.07SamotSo if you dial 1234567 and they want +1234567 and you are prepending that + before you send it out...
17:41.13SamotThe TO will be 1234567
17:41.22SamotThe INVITE/REQUEST will be +1234567
17:44.56grummundINVITE, From:, and To: all have the same domain.
17:45.10grummundthat is normal?
17:45.39SamotIt can be, yes.
17:54.08fileas with many things in SIP, usage and how stuff appears is not standard/consistent
17:56.37*** join/#asterisk scampbell (~scampbell@mail.scampbell.net)
17:57.02grummundhas the 'sip' side of things pretty much all done now
18:01.03*** join/#asterisk hfb (~hfb@47.139.16.87)
18:39.18*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
18:41.17grummundIs 'allow=alaw,ulaw' a thing, or must the options be defined on separate lines?
18:41.56grummundit does seem to work, but unable to find the documentation saying so.
18:42.54SamotYes, it is.
18:44.06avbguys will json parsing ever go to asterisk core? :)
18:44.14avbsomething like https://github.com/drivefast/asterisk-res_json
18:52.07fileif someone contributed something and it was reviewed, it could
18:52.49avbinteresting
18:53.32avbill test out in prod this module and will engage my guy in upstreaming
18:53.46avbfile: can I ping you once its done? :)
18:53.58filedid you write the code?
18:54.37avbnop, but my team say they are pretty much comfortable maintaining it
18:55.19fileit can't be accepted without a license agreement from original author
18:55.25avbthe only concern I have with this code is that its shipping cJSON with it, i believe that will be a problem with upstreaming it?
18:55.25fileas you do not have the right to license it on their behalf
18:55.52avbi can try to contact an author if he dont mind
18:56.29avband in reality I do not see many problems writting a module from scratch if you think it can be upstreamed
18:56.55filethere is already JSON support in the core using jansson
18:57.02fileso adding a dependency on another library would not be best
18:57.42avbyeh, i think the best way is to just write a new module using jansson
19:21.46*** join/#asterisk retentiveboy (~retentive@2601:cf:4500:5ea3:42ed:458a:969d:6a0b)
19:23.38*** join/#asterisk hfb (~hfb@45.152.182.235)
19:32.06*** join/#asterisk retentiveboy (~retentive@c-24-125-16-104.hsd1.ga.comcast.net)
19:45.26*** join/#asterisk retentiveboy_ (~retentive@2601:cf:4500:5ea3:9085:b615:c97:336)
20:15.34*** join/#asterisk fstd_ (~fstd@unaffiliated/fisted)
20:16.41*** join/#asterisk drathir_tor (~drathir@gateway/tor-sasl/drathir)
20:34.11*** join/#asterisk sa02irc (~mbax@155-079-043-212.ip-addr.inexio.net)
21:05.04*** join/#asterisk thansen (~thansen@192.74.130.86)
21:32.24*** join/#asterisk lambda (~xiretza@mail.xiretza.xyz)
21:43.08*** join/#asterisk saint_ (~saint_@unaffiliated/saint-/x-0540772)
21:55.10*** join/#asterisk lwlvl (~lwlvl@62.54.177.118)
23:00.14ckbis there any chance I could get a small sample of a context for an outbound call?
23:00.53ckbalso can I overwrite contexts in satellite configs?
23:02.24ckbrealistically I want to just add exten => 911,n,CURL(...) to whatever settings I have already
23:44.37*** join/#asterisk Milos (~Milos@pdpc/supporter/student/milos)
23:47.32SamotWhat's the actual issue?
23:48.00grummundIs there an equivalent to ${CHANNEL(peerip)} for pjsip?
23:50.20Samothttps://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Function_CHANNEL
23:54.48grummundpjsip/dialplan_functions.c:843 channel_read_pjsip: Unrecognized argument 'peerip' for 'pjsip' information
23:54.51grummundfunc_channel.c:463 func_channel_read: Unknown or unavailable item requested: 'pjsip,peerip'

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