IRC log for #asterisk on 20210426

00:21.25*** join/#asterisk sinaowolabi (~Sina@102.134.114.1)
01:14.49*** join/#asterisk tsal (~tsal@i59F4DB94.versanet.de)
02:12.35*** join/#asterisk mr44er (~mr44er@dynamic-046-114-004-195.46.114.pool.telefonica.de)
02:41.57*** join/#asterisk pvoigt (~Linux@unaffiliated/pvoigt)
02:43.20*** join/#asterisk fstd_ (~fstd@unaffiliated/fisted)
03:00.59*** join/#asterisk Janos (~textual@201.204.94.76)
03:33.26*** join/#asterisk Enitin (enitin@gateway/vpn/privateinternetaccess/enitin)
03:41.16*** join/#asterisk sa02irc (~mbax@155-079-043-212.ip-addr.inexio.net)
04:04.25*** join/#asterisk forgotmynick (uid24625@gateway/web/irccloud.com/x-vhmsxzsagbbchphc)
04:05.32*** join/#asterisk hfb (~hfb@193.36.225.22)
04:21.30*** join/#asterisk AsteriskRoss (~AsteriskR@37.157.48.2)
05:21.34*** join/#asterisk Janos (~textual@201.204.94.76)
06:54.35*** join/#asterisk BakaKuna (~Thunderbi@2a02-a446-ae46-1-fd4c-8933-8bcd-a822.fixed6.kpn.net)
07:08.15*** join/#asterisk dakudos (~dakudos@c-73-229-175-50.hsd1.co.comcast.net)
07:51.38*** join/#asterisk sekil (~sekil@nat-73.net011.net)
07:52.50*** join/#asterisk sekil (~sekil@nat-73.net011.net)
08:01.32*** join/#asterisk DodgeThis (~DodgeThis@246.102.90.149.rev.vodafone.pt)
08:14.40*** join/#asterisk sinaowolabi (~Sina@102.134.114.1)
08:30.26*** join/#asterisk idtentee (sid101023@gateway/web/irccloud.com/x-lrehoultaylbwwzp)
08:30.30*** join/#asterisk gregs (sid160074@gateway/web/irccloud.com/x-hblhsmjkwigkdzwl)
08:33.10*** join/#asterisk lankanmon (~LKNnet@cpeb4fbe4e331bd-cm64777d632380.cpe.net.cable.rogers.com)
10:26.22*** join/#asterisk HannaM (~quassel@p54849510.dip0.t-ipconnect.de)
10:50.55*** join/#asterisk sinaowolabi (~Sina@102.134.114.1)
12:00.14*** join/#asterisk gerhard7 (~gerhard7@86-87-238-48.fixed.kpn.net)
12:07.42*** join/#asterisk riddlebox (~riddlebox@2600:6c42:7900:f1e1::1b8b)
12:16.29*** join/#asterisk irrgit (~ch33se@192.241.175.183)
12:46.43*** join/#asterisk Enitin (enitin@gateway/vpn/privateinternetaccess/enitin)
12:47.25*** join/#asterisk Enitin (enitin@gateway/vpn/privateinternetaccess/enitin)
13:24.33*** join/#asterisk rpifan (~rpifan@p200300d2672b5d00ed6fae8b2bffb0f9.dip0.t-ipconnect.de)
13:26.59*** join/#asterisk CatCow97 (~mine9@c-73-96-109-206.hsd1.or.comcast.net)
13:42.04*** join/#asterisk nglpx1 (971b3689@151.27.54.137)
13:42.31nglpx1hi
13:44.28nglpx1I need to change country code, the prefix for outbound calls
13:44.49nglpx1someone can help me please?
13:45.51nglpx1I've compiled asterisk from source, it works but country code is wrong
13:47.34SamotYou set the country code.
13:47.42SamotSo if it is wrong,  you've set it wrong.
13:47.46nglpx1where?
13:47.54SamotIn the dialplan?
13:48.13nglpx1no setting for country code, I use asterisk 13.8
13:48.22SamotWhat?
13:48.29SamotThe country code is part of a pattern match.
13:48.39SamotYou make the proper pattern matches based on the digits presented.
13:48.59nglpx1in extensions.conf?
13:49.07SamotYes.
13:49.20SamotHow is this call being made?
13:49.25SamotWith the wrong prefix?
13:50.36nglpx1outbound calls work only if I call an american number
13:51.40nglpx1no outbound calls for different countries
13:52.19SamotDo you have the right patterns for international calls outside the US?
13:54.03nglpx1please, I am totally new in Asterisk, I need prefix +39 to all outbound calls
13:55.12igcewielingChupahora?
13:57.36nglpx1I don't know the pattern format, I need to modify only extensions.conf?
13:58.01*** join/#asterisk AsteriskRoss (~AsteriskR@37.157.48.2)
13:58.07Samotnglpx1: There's no default config for Asterisk.
13:58.11SamotYou have to write extensions.conf
13:59.30nglpx1the provider sent me extensions.conf but I need to modify the prefix for outbound calls from us prefix to it (+39)
14:00.49Samothttps://wiki.asterisk.org/wiki/display/AST/Pattern+Matching
14:01.01nglpx1; send all other numbers to outbound trunk
14:01.02nglpx1exten => _[0-9].,1,NoOp(#### [from-internal] ####)
14:01.02nglpx1exten => _[0-9].,n,Set(CALLERID(num)=39800303303)
14:01.03nglpx1exten => _[0-9].,n,Dial(SIP/+${EXTEN}@trunk)
14:01.03nglpx1exten => _[0-9].,n,Hangup()
14:01.09seanbright~pb
14:01.10infobotpastebin is a web-based service where you should paste anything over 3 lines so you don't flood the channel. Here are links to a few: https://pastebin.com, https://paste.ubuntu.com, http://paste.debian.net; or install pastebinit with yum or aptitude.
14:01.15nglpx1this is the part to modify?
14:02.12nglpx1http://paste.debian.net/1195225
14:03.17SamotAre you allowed to make International calls?
14:03.36SamotBecause if that pattern lets you call to the US but no where else, buddy you have US calling only.
14:03.38nglpx1yes
14:03.53SamotShow us a call.
14:04.14nglpx1I can call everywhere
14:04.16SamotSSH into the asterisk server, do: asterisk -rvvvvvvvvvvv
14:04.24SamotOK, so what's problem?
14:04.44SamotYou can't prefix +39 to US/Canada calls.
14:05.00SamotYou can't prefix +39 to anything but to +39 destinations.
14:05.29nglpx1but I need +39 destination 99% of times
14:05.55SamotSo take what you have already
14:06.08Samotand put 39 between the + and ${EXTEN}
14:06.27SamotIt will mean you can only call Italy.
14:06.41SamotSo if that's all you need, then you're fine.
14:06.42nglpx1In the cli don’t show any error, when i call in us the call go out when i type any other country, the softphone show me that “Service Unavaible 403”
14:07.06SamotYou need to make sure you can dial those from the provider.
14:07.26Samotexten => _[0-9].,n,Dial(SIP/+${EXTEN}@trunk)  << to >> exten => _[0-9].,n,Dial(SIP/+39${EXTEN}@trunk)
14:07.39SamotEvery call will be  prefixed with +39
14:08.03nglpx1I am sure
14:09.05SamotWell that was the answer to your need to prefix everything with +39
14:12.52nglpx1I tryed to call a number after changing configuration, result “TemporarlyUnavaible(403)”
14:14.12*** join/#asterisk kharwell (uid358942@gateway/web/irccloud.com/x-brxfhiuifigakcie)
14:14.12*** mode/#asterisk [+o kharwell] by ChanServ
14:15.14nglpx1403 Forbidden
14:16.07SamotI guess we'll need to se a call.
14:16.15SamotSSH into the box and do the following
14:16.18Samotasterisk -rvvvvvvvvv
14:16.24Samotsip set debug on
14:16.37SamotThen pastebin the output so we can see it.
14:17.44*** join/#asterisk bford (uid283514@gateway/web/irccloud.com/x-mspacwlkmqdknzjc)
14:17.44*** mode/#asterisk [+o bford] by ChanServ
14:18.45nglpx1nothing changed, same error as before, I think it's not the right section, can I pastebin the content of extensions.conf?
14:19.00SamotShow us the output.
14:19.07SamotWe understand it.
14:19.19SamotWe'll know what to look for.
14:29.10nglpx1there are a lot of messages in the log, but I think that for asterisk it's all right, because it's a valid configuration. The softphone error code is 480
14:32.44seanbrightnglpx1: would you like help resolving this issue?
14:33.07nglpx1yes, please
14:33.20seanbrightnglpx1: sure thing. you should provide Samot with the information he is asking for.
14:37.30Samotnglpx1: Your provider is rejecting the call. There could be various reasons as to why they are. Us seeing this information will help us see any glaring issues that stand out. Otherwise, you'll have to ask them why they are rejecting your calls.
14:47.36*** join/#asterisk riddlebox (~riddlebox@2600:6c42:7900:f1e1::1b8b)
14:52.22SamotAlright then.
14:52.45nglpx1no.... it's difficult, many many messages..
14:52.55*** part/#asterisk igcewieling (~ewieling@199.27.202.86)
14:53.03SamotHow can there be many many messages?
14:53.52nglpx1I don't know, there are a lot of messages in the asterisk -r
14:54.09SamotUhm, is this some VPS in the cloud?
14:54.09SamotDirectly on the Internet?
14:54.41nglpx1Asterisk is on a vps in the cloud
14:55.12SamotDid you at least secure it?
14:55.30nglpx1100%
14:56.01nglpx1aaah secure it..... no at the moment
14:56.55nglpx1it's on a public ip asddres
14:56.59SamotThen your box could be just getting hit with spam.
14:57.08SamotPeople trying to send calls through the box.
14:57.12SamotYou need to secure it.
14:58.41nglpx1there is a password to know in sip.conf
15:00.58*** join/#asterisk Janos (~textual@201.204.94.76)
15:02.09nglpx1you mean that many messages are spam?
15:04.43SamotYes. People who shouldn't be able to send calls through your system are trying to.
15:05.03SamotPlus if you don't  have anything secured, that means SSH and everything else is open for them to get at.
15:09.34nglpx1how to sicure? VPN?
15:15.11zambais the Hangup() command the final command in an extension?
15:15.46zambai have this very simple thingy: https://dpaste.org/VeyA
15:16.11zambai basically want to dial in to an extension, record a message and when it's done it'll hang up and then i want it to dial me back and then playback the same message
15:16.27zambabut i guess the Hangup() is the final part and the extension is then completed?
15:16.58sibiriain your example nothing except the Record() will be invoked
15:17.08zambasibiria: oh? why?
15:17.18sibiriabecause you hang up afterwards
15:17.26zambayeah, that's what i was expecting
15:17.33zambaso how can i do what i want with this?
15:17.46sibiriaremove the hangup() right after record()
15:17.57zambasibiria: yeah, but i still want to terminate the first call
15:19.03seanbrightok, so someone calls in and records a message and then you want to hang up on them and call someone else and play that recording to them
15:19.04sibiriathe channel can't continue to live on its own when you hang it up
15:19.05zambaand also, nothing is played back to me
15:19.13zambaseanbright: that is correct
15:19.29sibiriasomething else will need to place the second call
15:19.41zambasibiria: yeah, i was guessing that.. but how?
15:19.57sibiriasomething else means something outside asterisk, which uses asterisk to make calls
15:20.16zambabut i want this to happen immediately.. not a cron job or something like that
15:20.32*** part/#asterisk maximCH (~maximCH@mail.swill.org)
15:20.40sibiriamake it a systemd unit with a tight timer, or a permanently running job
15:20.52sibiriamonitoring e.g. your call recording directory
15:21.33sibiriastore the calling number and some unique identifier with the recording, so the processor knows who to call and replay the message
15:21.57zambawhat kind of interface should this have to asterisk? agi?
15:22.10sibiriai'd use call files
15:24.08sibiriaa second option is to do this with a hangup handler, but that poses a few other kludges; you still need something that picks up the recording and makes it available to asterisk etc.
15:24.44zambaok, maybe i should describe my challenge in full first.. what i want to create is a method for people on a work shift to call a number to ask for more personnel.. the person should then leave a message and then asterisk should start dialing a list of number in sequence and play back this message.. if the person on the other side is available and can come to work then they should press 1 or
15:24.46zambasomething.. and then the personell hunt should stop
15:24.58zambathat's my end goal here
15:25.25sibiriaand just like that the echo server task description grew to something different
15:27.53zambasibiria: of course.. i have to start somewhere.. and the first step was to just see if i was able to record a message and then dial someone else to play back this message
15:31.18sibiriayou can play around with using hangup handler, to contain everything to asterisk for now. just to wet your feet so to speak
15:31.25zambai'm trained to tackle a big problem in smaller problems :)
15:36.21*** join/#asterisk overyander (~overyande@50.45.0.107)
15:39.56zambacould AGI potentially be used for this?
15:41.08zambabecause i really want to interface using python.. i don't really want to use loops and stuff directly in dialplans :)
15:41.24sibiriadepends on if you want an easier time to programmatically handle some things
15:41.41sibiriabut just a simple echo callback test is doable entirely within the dialplan
15:43.19EnitinQuick question: What is wrong with my Asterisk setup when only the caller can hear audio?
15:43.34EnitinIt automatically hangs up after a few seconds.
15:44.04zambaEnitin: usually firewall issues, i'd guess
15:44.14zambado you see stuff like retransmission timeout issues in the console?
15:45.10Enitin"Packet timed out after 32000ms with no response"
15:45.20seanbrightfirewall/nat
15:46.19zambaEnitin: yeah, firewall/nat.. the packets are not allowed in a certain direction.. it's UDP, so it's not like with tcp where you have the session established and you are able to communicate bidirectionally
15:47.30Samotzamba: I do what you described.
15:47.58zambaSamot: what do you mean? you have something like this already running?
15:48.25SamotYes. That is exactly what I meant.
15:48.34EnitinOh. That was it. Thank you. :)
15:48.41zambaSamot: do you mind sharing?
15:50.28SamotIt's really not that hard. Caller calls in, records message, approves message, enters group it should go to, triggee system call to backend, hang up callm
15:50.53SamotBack end starts to send AMI originates to system.
15:51.50SamotCall users, use AMD to detect humans or machine and handle accordingly
15:52.13*** join/#asterisk sa02irc (~mbax@155-079-043-212.ip-addr.inexio.net)
15:52.51zambayeah, i know what i want to accomplish.. the challenge is how :)
15:53.15SamotHow what?
15:53.21sibiriazamba: can you share the link you gave earlier to your dialplan?
15:53.35zambahttps://dpaste.org/VeyA <- this?
15:53.35sibiriaand i'll give you a quick modification which should be a working thing to play around with
15:53.45zambasibiria: awesome! thanks :)
15:53.47sibiriaright, 1 min
15:54.09zambaSamot: how to actually tie everything together.. but it seems like you mind sharing, so that's ok enough, i guess :)
15:54.23SamotI don't do python
15:54.57zambathat doesn't matter.. i'm just looking for pseudo code.. it's the interfaces i'm wondering about, not the actual algorithms
15:55.09zambathe algorithm to do this in python is very simple
15:55.33SamotI have no idea what data you want to send.
15:55.53SamotWhen they approve the recording a make a System() call
15:56.05sibiriazamba: https://dpaste.org/2A9R
15:56.21sibiriathat may work just to get you started
15:56.35SamotThats kinda shoddy
15:56.52sibiriano, it's exactly what's needed as a starting prototype based on his first example
15:56.53SamotDoesnt even put it in the right language directory.
15:57.05sibiriaand what language would that be? :D
15:57.08sibiriawe don't know
15:57.20sibiriaand none needed to play back audio that isn't categorized as IVR stuff
15:57.43SamotThats a piece.
15:58.14SamotNow there needs to be the part the makes the call, plays back and accepts DTMF
15:58.30sibiriamhm
15:59.44SamotLike I dont playback the recording twice in voicemail
15:59.54SamotBut I do if a human answersm
16:02.03SamotPlus there are no options for the caller to verify the recording or rerecord it
16:03.20sibiriasounds like a perfect 1 minute prototype
16:04.14SamotIt's a poor prototype.
16:04.27SamotConsidering I just gave an outline of how I have it working in production.
16:04.39zambaSamot: then please share how you did it :)
16:04.50SamotShare what?
16:04.51seanbrighti'm not sure how describing something is helpful
16:05.03seanbright"i need something that does X"
16:05.04SamotOK so you want my code?
16:05.07seanbright"i have something that does X"
16:05.09sibiriait's a prototype, not a production ready piece of work :D
16:05.12seanbright"can i see it?"
16:05.13seanbright"no
16:05.13seanbright"
16:05.22zambaSamot: that would really be helpful
16:05.29SamotThe caller calls in, what do you do to verify that?
16:05.40SamotSo you want me to just hand over hours of work?
16:05.53seanbrightzamba: your are learning an important life lesson right now
16:05.57seanbrightyou*
16:06.02zambaseanbright: oh? :)
16:06.09seanbrightyes, you shouldn't come to #asterisk for help
16:06.11*** join/#asterisk Janos (~textual@201.204.94.76)
16:06.13zambaseanbright: hehehehe
16:06.19Samotzamba: Are you doing any caller verification on the caller that can leave a recording?
16:06.37zambaSamot: yes, i was intending to add that as well.. only a set of numbers are allowed to call in to trigger this
16:06.58SamotOK so you know how to do that?
16:07.35zambaSamot: i actually believe i have some code from my previous encounter with asterisk, some years ago
16:08.00SamotOK, so you don't have an actual method figured out yet.
16:08.12SamotYou just know X callers can make recordings.
16:09.17zambai first want to make a proof of concept.. then i finalize it.. and add stuff like security before i make it public
16:09.28SamotSecurity is part of the proof of concept.
16:10.07SamotAnd how does the recording get sent to destinations?
16:10.31SamotIs there going to be a database holding user data for sending to?
16:10.33seanbrightthere is only one right way to implement a proof of concept and that is to design, develop, test, and deploy a 100% complete application
16:10.38seanbrightobviously
16:10.48zambasibiria: thanks a lot for your help.. i'll try and see if i can figure something out
16:10.49seanbrighti think we all  know this implicitly
16:11.01SamotI'm asking real questions here.
16:11.09seanbrightyou certainly are
16:11.13seanbrightthey have question marks and everything
16:11.22SamotSee when I described the whole "caller calls in to make recording..."
16:11.41SamotThere's callerID verification and a PIN code they need to enter.
16:11.56seanbrighti must be a file in source control cuz i am totally checked out
16:12.01seanbright(just made that one up)
16:12.25zambaSamot: yeah, that makes sense.. but this is not something i need beforehand.. the important part is having the calling everyone-thingy set up..
16:12.34SamotOK and how are you doing that?
16:12.47zambai don't know yet.. that's what i'm trying to figure out
16:12.52SamotWhere is the information for the destination group stored?
16:13.11zambafor the PoC i'd probably just hardcode this into the dialplan
16:13.12SamotHow will this be triggered once the recording is finished?
16:13.16zambaas it's a PoC...
16:13.29SamotBecause right now your PoC dialplan handles the recording on hangup.
16:13.33SamotThat's poor.
16:13.45SamotThe caller should be able to re-record and approve the recording.
16:13.51seanbrightzamba: you will not be getting help from Samot
16:13.58seanbrightyou will only get belittled
16:14.03zambaseanbright: yeah, i'm quickly realizing it..
16:14.19SamotOn the approval, that should be when your trigger for the destination group should be called.
16:14.33SamotSo you can call the proper call recording information over.
16:14.41SamotOh, I'm sorry. None of this is helpful?
16:14.44SamotI'll stop then.
16:15.12seanbrighti don't see how any of your repsonses in regards to zamba's question could be deemed helpful
16:15.43SamotWell then I'll just stop.
16:15.47seanbrightsounds good
16:16.15SamotI guess the only real help I can give is to just hand over my dialplan and scripts.
16:16.31SamotSo a PoC can be made from something already proved.
16:16.37SamotTotally makes sense.
16:16.59zambaSamot: why are you even active in an open source community?
16:17.12seanbrightsorry - this is "just stop[ping]?"
16:17.28Samotzamba: Don't.
16:18.04sibiriaasterisk may be open source, but the products people build around/next to it doesn't have to be part of that
16:18.20seanbrightcorrect. samot's code is his code.
16:18.30zambasibiria: yeah, i totally understand that..
16:18.44seanbrighthow about we all just move on?
16:18.49zambayeah, i guess
16:19.13zambai'll make a stab on this with sibiria's help.. and see if i'm able to get any further
16:25.57*** join/#asterisk riddlebox (~riddlebox@2600:6c42:7900:f1e1::1b8b)
16:27.00zambahm: [2021-04-26 18:26:32] NOTICE[19175][C-00000013]: app_stack.c:1082 gosub_run: SIP/marius-00000018 Abnormal 'Gosub(vikar_callback,s,1)' exit.  Popping routine return locations.
16:27.11zambai tried adding a Return() to the callback, but to no avail
16:34.59zambaif i just have Return in it, then it works fine.. but if i have anything else before it, then it fails with that error message
16:35.58zambaVerbose() works
16:36.34zambabut doing a Wait(2) returns an error
16:38.45Samothrm.
16:39.42zambarunning a pretty old version of asterisk.. trying to upgrade now
16:40.04zamba(version 13.18.3)
16:43.12*** join/#asterisk lbazan (~LoKoMurdo@fedora/LoKoMurdoK)
16:54.47zambasibiria: i'm really stuck now.. i'm not able to trigger that callback context
16:55.17zambasibiria: if i do Verbose() then i'm able to print out something to the console.. but if i do anything else, even Wait() then i'm getting that error above
16:56.01SamotOK.
16:56.09SamotSo this is because what was provided is incorrect.
16:56.26zambawhat was wrong about it?
16:56.38Samot1. The channel is gone
16:56.46Samot2. You can run Wait() on an non-existing channel
16:56.50Samotcan't*
16:57.01Samot3. You can't Dial() from a non-existing channel.
16:57.22Samot4. Playback() won't work because it will only execute after the Dial() is completed. So it never plays during the call.
16:57.31Samot5. None of this will accept actual input from the caller.
16:57.33Samot5. None of this will accept actual input from the callee.
16:58.04zambaok.. so what do i do, then?
16:58.59SamotWell you need to be using local channels to initiate the calls to the destinations.
16:59.16SamotSo it can flip the channel to accept DTMF input from the callee.
16:59.36SamotNone of this should be done from the hangup handler of the caller making the recording.
17:00.05SamotYou need to trigger a proper way to roll through the numbers that need to be called.
17:01.15zambaand again: how? :)
17:01.26zambayou're saying a lot of whats, but no hows
17:02.07zambai realize WHAT i want to do.. that is what i started out describing.. i know what i want to do, but not *how* i can do this
17:02.07SamotYou will need to make a System() or some other execution call to trigger this.
17:02.43SamotYou can then send AMI Originate commands to process the outbound call.
17:02.59SamotSo it can Dial() the number out the trunk...
17:03.09zambaaha, ok
17:03.19SamotI said all this earlier.
17:03.29zambaso basically a system call that will then trigger the ami directly to make the call?
17:03.36SamotRight.
17:03.59SamotSo that when the call is answered it can be sent to the context that does the recording playback and accepts DTMF.
17:04.27SamotLike I said earlier, I use AMD to determine human or machine and handle it accordingly.
17:07.00*** join/#asterisk Nglpx1 (6d351148@109.53.17.72)
17:08.04*** join/#asterisk TriJetScud (~TriJetScu@2602:fca7:1:6:5733:d000:1111:1111)
17:10.39Nglpx1Hi, i was configuring asterisk, when i realized by testing making an outgoing call, that only american numbers go out.  I remember that in version 16, during the configuration it asked me to set the telephone prefix by default. I have version 13.8, when I actually try to make a call to Italy (+39) the client says nothing, while the softphone says
17:10.39Nglpx1"Temporality Unavaible 480" while if I call in the US it goes. how do i change this?
17:14.04SamotNglpx1: Did you setup a distro release of Asterisk?
17:14.34SamotNglpx1: Who is the provider you signed up with?
17:17.14Nglpx1Is use Gotrunk provider, when i used the asterisk 16 I could call to all countries, it's not a provider problem in my opinion
17:18.18SamotWhat version are you using now?
17:18.41Nglpx1i don't use an asterisk distro i use a cloud vps with ububtu server 16.04 because i noticed that it reacts well
17:18.42SamotOh 13.8...
17:18.42Nglpx1i use asterisk 16.8
17:18.58Nglpx113.8***
17:18.59Nglpx1sorry
17:19.05SamotNglpx1: How did you install Asterisk?
17:19.11SamotNglpx1: apt install asterisk?
17:19.55Nglpx1No, wget > ./configure > menuselect > make > make install > make samples > make config
17:20.24SamotOK, so then a 480 means it was busy/rejected.
17:20.46SamotSo far every error has been a rejecting from the other side.
17:21.06Nglpx1asterisk work, but i think i need to change something in the configurations to allow me to forward call 39 to the provider (
17:21.07SamotOr at least we think it's the other side. You still haven't shown any call debugs for us to actually see what is going on.
17:21.15SamotI gave you that.
17:21.32SamotYou pasted the stuff in extensions.conf, I showed you have to update that.
17:21.46SamotBut if calls to the US work but no where else, then something else is wrong.
17:22.11Nglpx1the problem is that there is no error in debugging.
17:23.26Samot480 is the error
17:23.30Samot403 is the error
17:23.43SamotWe want to see how the call is being processed in Asterisk and sent to the provider.
17:23.59SamotBecause otherwise you need to call your provider and find out why they are rejecting your calls.
17:25.39Nglpx1Ok pls wait
17:33.14Nglpx1https://pastebin.com/mggyhV0r
17:35.36SamotWell the "181 Call is being forwarded" isn't a good sign.
17:37.00SamotNglpx1: Are you calling from 201?
17:37.29sibiriazamba: i'm sure it triggers just fine, but something else in it is going wrong. maybe it cannot find the file (or even move it to asterisk's sounds directory)
17:38.02sibiriazamba: if you enable verbose logging for the console, what does asterisk say?
17:39.23sibiriaare you sure the channel uses gsm, just so that you're not running into a transcoding failure or similar?
17:40.04*** join/#asterisk Nglpx1 (6d351148@109.53.17.72)
17:40.07SamotHow does that address Wait() causing the issue?
17:41.49Nglpx1sorry i lost the connection and therefore the previous answers. did you see the log?
17:42.05SamotNglpx1: You're calling from 201?
17:42.28Nglpx1Yes
17:43.43zambaSamot: there's no Dial command throught AMI, is it?
17:43.52SamotOK well these are all 480 replies that Asterisk is trying to send to 109.53.x.x IP
17:43.56SamotWhat IP is that?
17:44.13Samotzamba: No, it's called Originate. Like I've said before.
17:45.36Nglpx1I believe it is the provider, if not me. sorry for my ignorance, but I believe that if asterisk sends the request it sends it to the provider or to the soft
17:46.02SamotNglpx1: Well I'm going to guess this is Asterisk sending it to the softphone and it keeps retransmitting.
17:46.08SamotWhich means it's not getting replies.
17:46.18SamotBut this isn't a full call. The original INVITE is missing.
17:46.23SamotThis is just a bunch of replies.
17:47.02SamotAnd really, it's the same reply to an INVITE over and over again.
17:47.10SamotShow a call that works.
17:47.19SamotIf you can call the US, show a call to the US that works.
17:47.55SamotAsterisk PBX certified/13.8-cert1 <-- Also not sure why you need a certified version.
17:48.37*** join/#asterisk Nglpx1 (6d351148@109.53.17.72)
17:49.54Nglpx1among the confusion of the work I have not found the NOT certified version.
17:49.54Nglpx1now i send you a debug call to the united states
17:57.01zambaargh.. and now i can't get the manager authentication working
17:57.10zambaResponse: Error
17:57.12zambaMessage: Authentication failed
17:57.44zambamanager show users lists the admin user
17:57.53zambaand manager show user admin also lists the admin user
17:57.58zambaand that the password is set
17:58.22zambait has both read and write perm set to: system,call,log,verbose,command,agent,user
17:58.28SamotYou have originate listed as an allowed service?
17:58.38SamotNo. You don't. Add that
17:58.46zambanow i just attempted to login
17:59.03zambahttps://wiki.asterisk.org/wiki/display/AST/AMI+Examples
17:59.07zambalike the first example there
18:00.00SamotDid you just create the account?
18:00.11zambathe manager account?
18:00.16SamotYes
18:00.24zambanope, it has been here a while
18:00.34zambai believe i used it for something else some years ago :)
18:02.28SamotChange the password, reload manager and try again
18:03.48zambanope, same.. authentication failed
18:04.30zamba[2021-04-26 20:03:36] NOTICE[10085]: manager.c:3418 authenticate: 127.0.0.1 failed to authenticate as 'admin'
18:04.32zambathat in console
18:04.44*** join/#asterisk thansen (~thansen@192.74.130.86)
18:05.02SamotShow how you are sending the login
18:05.19zambatelnet to the port.. and then just paste in the following:
18:05.42zambait's basically just the first example, but with username and secret changed
18:05.51zambaand then two newlines
18:07.36zambahttps://dpaste.org/XpdA
18:08.22sibiriazamba: use the hangup handler to invoke an AGI script instead, that will work
18:08.50zambasibiria: can the AGI script perform the actual dialup?
18:08.56sibiriayes
18:09.20sibiriaas mentioned before you can also do it with call files if you built asterisk with pbx_spool
18:09.44sibiriaAGI/spool are generally a bit simpler methods than AMI, but usability between these differ
18:10.22seanbrightSecret
18:10.28seanbrightzamba: Secret, not Password
18:10.55SamotYup. That would be an issue.
18:10.58zambaah!
18:11.12zambawhere did i get Password from...?
18:11.23seanbrightlet me check
18:11.35zambabut yeah, now it works :)
18:12.38Samotzamba: What was the old version of Asterisk you pulled this from?
18:13.15zamba13.18.3
18:15.01zambaok, i got the originate to work
18:15.10zambabut a bit rudimentary for now
18:18.52*** join/#asterisk rpifan (~rpifan@p200300d2672b5d00bf3d03edccbc8d97.dip0.t-ipconnect.de)
18:23.41*** join/#asterisk Nglpx1 (6d3503e2@109.53.3.226)
18:23.56Nglpx1:Samot
18:24.12Nglpx1@Samot
18:24.23Nglpx1i can wrote you in private?
18:26.52*** join/#asterisk thansen (~thansen@192.74.130.86)
18:30.30*** join/#asterisk Nglpx1 (6d3503e2@109.53.3.226)
18:30.41Nglpx1Samot
18:31.07Nglpx1Are you here?
18:31.14sibiriazamba: so here is an actually working prototype: https://dpaste.org/hZ1u
18:31.25sibiriaseems SHELL() absolutely wants to be collected during invoking, or it croaks
18:31.57sibiria(don't forget to make the agi script executable)
18:32.12Nglpx1Sibiria
18:32.17sibiriaNglpx1:
18:32.36Nglpx1Who helped me 10 m ago?
18:32.51Nglpx1samot?
18:33.04sibiriait was Samot
18:35.46SamotYes?
18:36.06Nglpx1I can write you in private?
18:36.37SamotNo.
18:37.13Samotsibiria: How does DTMF get collected?
18:38.38sibiriaprototype
18:38.56sibiriacall, say blah blah, hang up
18:39.02Nglpx1Samot Ok, in this Moment i can’t give you the debug of us calling becouse i think someone has penetred my server. The log is    full of login attempts and the call now gives error 404
18:39.47SamotNglpx1: I told you almost 4 hours ago to secure your server. Did you do anything?
18:40.37Samotsibiria: So it's a prototype that doesn't do the actual thing it should?
18:41.06sibiriait echoes a call recording. take it from there, maestro
18:41.18sibiriaand more than anything, it's a demo of how to use a hangup handler and call files
18:42.58Nglpx1Samot I am not an expert on this I have not been able to do it. I'm uploading a snapshot. what do you advise me to do? should i change vps? the accesses of the sip.conf
18:43.24SamotNglpx1: What do you need to use this for?
18:44.05Nglpx1Samot :asterisk?
18:44.18SamotYes.
18:44.35Nglpx1Make a outbound call
18:44.40Nglpx1in italy
18:45.03Samothttps://www.freepbx.org/downloads/
18:45.16SamotJust go get the FreePBX ISO, use that.
18:45.22SamotIt's all GUI based and has a firewall.
18:45.32SamotBecause, you need something that will do the work for you.
18:46.06Nglpx1I can’t use that, becouse i need to use a custom configurations from my provider
18:46.33SamotWhat custom configuration?
18:46.59Nglpx1Samot github.com/Gotrunk/asterisk-config
18:47.28SamotBud.
18:47.40SamotFreePBX uses a GUI for you to do all that.
18:47.45Nglpx1css.conf
18:47.45Nglpx1dsp.conf
18:47.46Nglpx15 years ago
18:47.46Nglpx1dsp.conf
18:47.47Nglpx1extensions.conf
18:47.47Nglpx15 years ago
18:47.48Nglpx1extensions.conf
18:47.48Nglpx1features.conf
18:47.49Nglpx15 years ago
18:47.49Nglpx1features.conf
18:47.50SamotSTOP
18:47.50Nglpx1indications.conf
18:47.50Nglpx15 years ago
18:47.51Nglpx1indications.conf
18:47.51Nglpx1manager.conf
18:47.52Nglpx15 years ago
18:47.52Nglpx1manager.conf
18:47.53Nglpx1modules.conf
18:47.53Nglpx15 years ago
18:47.54SamotJESUS.
18:48.29SamotYou don't need Asterisk for this.
18:48.37Nglpx1In the gui i can sostitute this file?
18:48.37SamotYou can create the extensions in FreePBX.
18:48.43SamotYou can create the outbound routes.
18:48.53SamotIt does all the work of creating dialplan and conf files.
18:48.58SamotAnd it has a firewall.
18:49.02Nglpx1I can edit my Custom sip.conf?
18:49.11SamotYes.
18:49.20SamotThere's no custom.
18:49.24SamotThey gave an example.
18:49.29SamotA basic config to make it work.
18:49.53SamotThere's nothing special in those configs. They are just examples.
18:50.37Nglpx1in the version I install the files are totally different.
18:50.56Nglpx1I checked it out
18:53.48SamotWell i am giving you a solution to the problem of you not knowing how to do things.
18:54.35SamotBecause you not knowing how to secure a VPS is not an Asterisk problem. And you need to secure the box.
18:55.03SamotIm not even 100% this box is clean anymore either. Depending on how long it has been up.
18:56.59SamotNglpx1: https://gotrunk.com/docs/ippbxconfiguration/freepbx/
19:06.18zambasibiria: ok, i've gotten that working now :)
19:09.56zambasibiria: but now you use AGI just to create the call files, right?
19:10.50sibiriazamba: yes, just as a way of triggering the application instead of having something outside asterisk monitoring the recordings directory
19:11.06*** join/#asterisk Jesterboxboy (~Thunderbi@84-115-150-8.cable.dynamic.surfer.at)
19:12.55zambasibiria: and i can perform several tasks inside here? like playback the audio.. then ask for DTMFs and then return the result back to for instance the AGI script?
19:13.11zambai guess i could all another AGI script in the call file.. or..? :)
19:13.15zambai'm going a bit inception here
19:14.12sibiriayou can run AGI() as an application of the call file, but you can also point the call file to a dial plan context
19:14.36sibiria(then asterisk will jump to there if the call is bridged)
19:16.06zambaah, that sounds better, yes.. kind of like i did with the originate command through AMI
19:16.39sibiriathrough AGI you can do pretty much the same things you can with the available applications/functions directly in the dial plan
19:16.54zambawhat i really wanted to do was to do all the logic through python
19:17.14sibiriawhat's not available as a dedicated AGI call you can do with the "exec" method
19:17.35sibiriayeah, sure
19:17.45sibiriaperl and lua are a bit more common for that, i'd say
19:17.55sibiriamostly because of python being slow as hell both for starting up and for executing
19:18.21sibiria(doesn't scale vertically very well, if the platform is to see much load)
19:19.10sibiriaFastAGI can bridge that problem if absolutely neccessary
19:19.17zambanah, i don't think it's needed
19:19.17sibiriabut comes with its own share of complications
19:19.56zambabut.. let's say i wanted to dial through AGI..? how is that then done? and if i then wanted to get the DTMF status from that call? for instance if a user actually enters 1?
19:21.18sibiriaAGI doesn't have a dial method, so you'd invoke it through exec
19:22.45zambai guess what i really need to decide is what is going to determine if we need to keep calling someone
19:22.57zambawhat is going to be the "master" process here
19:23.26zambai get a bit of an house of cards feeling with dialplan calling hangup calling agi script which then creates a call file
19:23.30zambaand then rince and repeat :)
19:24.16sibiriathere are advanced methods for these things, like ring groups as Samot suggested
19:24.20zambaso the ideal thing would be to have some kind of coordinator sitting outside of asterisk making these calls and then getting the feedback from each of the calls
19:24.24sibiriabut you can also specify multiple recipients when dialing
19:24.35zambasibiria: no, it's very important that i call them sequentially
19:24.52zambasibiria: so that only one person at a time is able to respond if they can take the shift
19:25.04SamotOh wait, this is so they can verbally respond?
19:25.12SamotYou want them to answer?
19:25.16zambano, DTMF
19:25.32SamotOK so then you want to hunt them.
19:25.42zambawith respond i meant through DTMF.. sorry if that was ambiguous
19:25.51SamotAnd only hunt if the current callee denies the call/request
19:25.59zambayeah, exactly
19:26.02zambaand then move next in line
19:26.16SamotThat's not how it was originally explained.
19:26.23SamotSo yeah, this does change it a bit.
19:26.34sibiriaiirc when you dial in parallel, asterisk will hang up on all other channels but the first responder
19:26.43sibiriabut it still poses some problem to dial in parallel, of course
19:26.47SamotThis isn't a parallel.
19:26.55SamotThis is going to be a hunt.
19:27.05zambai believe that's what i wrote at 15:24z
19:27.10Samot1 call, 1 response, if caller accepts call no others.
19:27.22zamba"if the person on the other side is available and can come to work then they should press 1 or something.. and then the personell hunt should stop"
19:27.58SamotIt broke up in the another message.
19:28.03zambaah, yeah, true
19:28.15SamotSo pretty close to what I do still.
19:28.16sibiriadialing sequentially can be preferrable for obvious reasons, but do make a mental note of how dial() operates when you provide it multiple recipients
19:28.19SamotJust one at a time.
19:28.45zambayeah..
19:29.22zambaso i'm just wondering where and how i should coordinate the calls.. what should keep track of how many we've called and if we have gotten the positive response
19:29.43sibiriadialing loop
19:30.00zambasibiria: yeah, but where? in the AGI script?
19:30.03sibiriabut ironically dialing in parallel solves the same problem, just at the expense of having multiple outbound lines ringing at the same time :P
19:30.34sibiriaagain, dial() with multiple resources specifies will only bridge the first responder. the rest will be hung up
19:30.48sibiriaonly one single call will be connected
19:30.58sibiriathis can be a useful tool for some scenarios
19:31.04zambasibiria: hm.. i'm not sure it does.. because then all would be dialed at the same time.. but if one of them answers but THEN declines to come to work, then all, except the previously person who declined), would be dialed in parallel again
19:31.09zambait would be nightmare
19:31.23zambarepeat that for 40+ numbers
19:31.50sibiriaif you plan on dialing each recipient multiple times, with some delay between, then parallel will obviously not work
19:32.07zambai don't plan on dialing each recipient multiple times.. just once
19:32.27sibiriabut must they be dialed one after the other?
19:32.28zambaif after dialing everyone on the list and no one has responded that they can come to work, then manual intervention has to be used
19:32.32zambasibiria: yes
19:32.36sibiriais it a problem if someone gets a call but does not pick up, or cannot pick up?
19:32.45zambasibiria: then move on to the next in the list
19:33.05zambathat's why i want to use AMD as well.. to detect if it goes to voicemail.. if it does, then just hang up
19:33.10zambaand move on to the next
19:33.27sibiriayes that's one scenario where parallel dialing will not work
19:33.50sibiriaother than that it should for the recipient be no different than geting the call in the sequential scenario and just not picking up
19:33.58sibiriathe recipient doesn't know which is happening anyway
19:34.34sibiriaeither way, you can loop over a list in the dial plan. it's a bit messy to do programmatic work in there, but it's doable
19:34.47sibiriaan AGI script has the benefit of more lenient access to e.g. database functionality etc.
19:34.55zambasibiria: well, if the phone starts ringing, then stops.. and then does that for 40+ calls, then it would be a bit irritating... :)
19:35.24sibiriathe recipient who doesn't pick up still gets only one call that they don't pick up :)
19:35.30sibiriano matter if 39 other people are called at the same time
19:35.54sibiriabut if they must confirm within the call, then yes, you need to do this sequentially
19:36.05zambahm.. i'm not sure i follow.. let's say we dial in parallel.. 40 different people.. then in theory all 40 phones should start ringing at roughly the same time, right?
19:36.29SamotThat's not what you want.
19:36.31SamotAt all.
19:36.34sibiriayes, but again: asterisk will only bridge the first person who picks up. all the others will be hung up. there will never be *two* of these calls bridged
19:36.58SamotYou want to call a list of 40 numbers one at a time and only continue on certain conditions.
19:37.04zambathen callee #14 picks up.. the rest will then be hung up, right? the message is played back to #14 and that person then declines to come to work.. then the process will be repeated, but now only with 39 callees..
19:37.17SamotWell you have to track that
19:37.20zambait. would. be. a nightmare :)
19:37.22SamotAnd I would be pissed.
19:37.27SamotAs a person on that list
19:37.27zambayeah, exactly
19:37.31zambathat's what i meant
19:37.33sibiriaas said, when dialing in parallel you only issue ONE SINGLE DIAL()
19:37.35zambaso no, parallel won't work
19:37.36SamotSo do this the way it should be done.
19:37.59zambasibiria: yup, i understand how it's done, but for this it won't work
19:38.07sibiriaif there's a condition that must be met within an answered call, then parallel dialing is not applicable
19:38.15zambayup, agreed :)
19:38.21SamotPull a list of numbers to call. Cycle through it, Dial() each and continue if voicemail or rejected.
19:38.47zambaSamot: but where do you suggest to actually do that and keep track of it? in an AGI script?
19:39.03sibiriai'd do it in an AGI script
19:39.16SamotYou can call an AGI script to check things..
19:39.24SamotAnd submit things but you still need to do those things.
19:39.35zambado which things?
19:39.43SamotCall X number
19:39.46SamotTrack X number
19:40.05sibiriae.g. pull applicable recipients from a database; who's on call this day? maybe not everyone
19:40.08sibiriaetc.
19:40.22zambasibiria: you mean a single AGI script called by the hangup handler? would that script be running for the entirety of the process of finding an employee?
19:40.39sibiriathat is one way of doing it, yes
19:40.49zambayeah, but i'm trying to determine the best way of doing it :)
19:40.58sibiriayou may also use the hangup handler to simply signal the task for something outside to pick up on
19:41.21sibiriabut effectively there is nothing preventing you from letting an AGI script run for 45 minutes or whatever
19:41.42zambasibiria: well, in this case as long as it takes for the number of numbers in the list to be emptied
19:41.49zamba"number of numbers".. hehe
19:41.51SamotWhy?
19:41.53sibiriayes it works just fine
19:41.58SamotHoly hell why?
19:41.58zambaSamot: why what?
19:42.06SamotJust pull the numbers and loop them.
19:42.13zambaSamot: that's why we're having this "discussion".. i'm trying to figure out how to best do this
19:42.28zambaSamot: yeah, but *where*?
19:42.37zambaSamot: in the AGI? inside the dialplan? AMI?
19:42.57sibiriayou can dial from within an AGI script using the EXEC method of AGI
19:43.00zambasomething needs to control the iteration of this.. and keep track of who's been called and so on
19:43.13SamotUhm.
19:43.15sibiriayou'll get results of the dial as channel variables
19:43.17SamotPull list of numbers..
19:43.20SamotLOOP numbers
19:43.28zambaSamot: you're still not saying *where* to do this
19:43.30SamotIf someone ACCEPTs, break loop. done.
19:43.35zambai fully understand the algorithm
19:43.40SamotI'd just do it in the dialplan.
19:43.43zambathe question is not how, but where
19:43.59zambayeah, i was fearing you'd say that :)
19:44.03SamotWhy?
19:44.07SamotIt's not that hard.
19:44.25*** join/#asterisk AsteriskRoss (~AsteriskR@37.157.48.2)
19:44.43zambahttps://community.asterisk.org/t/asterisk-for-while-loop-to-read-lines-and-add-them-to-dial-plan/67505
19:44.50zambabecause this doesn't look readable OR debuggable
19:44.57sibiriazamba: if you're more comfortable working in python, then just do it in a python AGI script
19:45.01zambasibiria: yeah
19:45.18sibiriapyst is the common python AGI module
19:45.18SamotAnd?
19:45.28SamotThen why even ask?
19:45.40SamotWhy ask if you should use dialplan if you don't want to use it?
19:46.00SamotAnd what do you need to debug?
19:46.43SamotYou're just returning a delimited list of numbers back into the dialplan. I guess you could loop them all in the AGI and dial them each and keep jumping in and out of the AGI.
19:47.09sibiriamy advice:  get comfortable with using an AGI script to issue a single Dial and collecting its outcome etc.
19:47.32sibiriacheck out the pyst2 python module and the AGI reference on wiki.asterisk.org
19:47.42zambasibiria: ok, thanks! :)
19:48.07sibiria(or is it pyst3 by now.. i cannot recall)
19:48.28Samotzamba: For the record, that forum post is in no why a While loop
19:48.57SamotThere's actual while loop functions.
19:52.30*** join/#asterisk post-factum (~post-fact@vulcan.natalenko.name)
19:53.08zambapyst seems a bit broken
19:54.44zambaboth pyst2 and pyst3 are very old
19:55.57zambapyst2 works.. sweet
19:59.42sibiriayeah they're old, though they do work. i use it in one or two (E)AGI things written in python instead of perl which is my preference
20:28.27zambabut there's no authentication when using agi through python?
20:28.53zambaor is the agi thingy really just a wrapper around having to type out the commands directly? is it basically just stdout manipulation?
20:49.03zambasibiria: hm.. i attempted to do agi.exec_command("Dial", "SIP/marius,20")
20:49.14zambaand also .exec_command("Dial SIP/marius,20")
20:49.25zambaboth returned status code 200 but result=-1
20:52.45*** join/#asterisk Nglpx1 (05abd30e@5.171.211.14)
20:54.12Nglpx1I have installed freebpx how i can start?
20:54.46zambaNglpx1: start with what?
20:54.50zambaNglpx1: also check #freepbx
20:55.09Nglpx1For asterisk
20:56.47zambaNglpx1: i think you have to be a bit more specific in your question than that
20:57.59Nglpx1I have installed freebpx from a option in my vps cloud. “Install freebpx” and many minutes later.. “go to your freebpx server url “http://yourserverip” when i acces to my ip address i have the welcome test page of apache. “This page is used to test the proper operation of the apache http”
21:02.51zambathen you're not accessing the freepbx
21:03.31*** join/#asterisk ttys000 (~ttys000@50.92.213.208)
21:03.43Nglpx1So how do you do it?
21:04.30Nglpx1Or how i can call in italy with asterisk, becouse he only makes me call in america
21:05.00SamotNglpx1: Have you 100% checked with your provider on why this doesn't work?
21:05.06SamotNglpx1: Because it seems odd.
21:05.12Nglpx1100% checked
21:05.20Nglpx1 i have alredy tested
21:05.43Nglpx1becouse in the 16 version, i have been maked a internatinal call
21:05.55Nglpx1International
21:06.04SamotOK there's nothing wrong in 13 that can't make this call.
21:06.11SamotIt's all based on the dialplan you are using.
21:07.30Nglpx1so why make a mistake, I just can't understand
21:07.56Nglpx1looks like a nightmare.
21:08.22SamotPastebin the dialplan you are using to make this call.
21:08.43Nglpx1Dialogando?
21:08.51Nglpx1Dial plan **??
21:08.58zambaSamot: are you familiar with the exec_command thingy from AGI?
21:09.07Nglpx1Not really
21:09.18zambaand why this doesn't work: .exec_command("DIAL SIP/marius").. i have also tried .exec_command("DIAL", "SIP/marius")
21:09.27SamotNglpx1: Pastebin the dialplan you are using.
21:09.44zambai can see from the agi debug that it's showing.. but it's never performing any dial operation
21:10.03Nglpx1Samot how i can see this dialplain?
21:10.15zambaNglpx1: dialplan show
21:10.21Nglpx1Thanks
21:10.43zambaNglpx1: you may have to limit the output to just the dialplan you're interested in
21:10.52zambaor rather the context, or whatever it's called
21:15.05SamotOr you know just open the extensions.conf and copy the dialplan.
21:19.08sibiriazamba: no the parameters are separate. exec( 'Dial', 'PJSIP/somewhere,20' )
21:19.29sibiria(or SIP/blah if you still use chan_sip)
21:19.54*** join/#asterisk JonathanD (~JonathanD@freenode/staff/jonathand)
21:22.55zambasibiria: yeah, that's why i tried first.. didn't take
21:25.15sibiriaremember that if you just dial like that, what asterisk does is bridge the current channel you dial from
21:25.46*** join/#asterisk Nglpx1 (6d350b30@109.53.11.48)
21:25.55Nglpx1Samot wait now freebpx has installed correctly, if I go to my ip in chrome it opens the login of the centOS web console from here, do you know how to open freebpx?
21:26.29SamotIt should redirect you to the admin page.
21:26.52sibiriaif you want to try something more conclusive, you can feed Dial() options for jumping into a certain context on answer - for example one which plays a certain sound file
21:27.14Samothttp://yourip/admin/config.php
21:28.10Nglpx1Thanks
21:28.47Nglpx1“Not found”
21:28.59zambasibiria: ah, that could be it.. but how am i supposed to make the outgoing calls through agi then? :)
21:29.01Nglpx1http://prnt.sc/123vnxf This is login centOS
21:29.37SamotWhat VPS is this that had a FreePBX install?
21:30.35Nglpx1http://prnt.sc/123vt1z
21:30.44SamotBecause the FreePBX Distro is its own.
21:31.01Nglpx1it's called hostwind
21:31.14SamotWhy are you using 9090?
21:31.38Nglpx1I don’t know the install is automatically
21:32.23Nglpx1In the ssh terminal “web console: https://myip:9090
21:32.48SamotI have no idea why there is a port for 9090 being used
21:32.56SamotThe FreePBX distro doesn't use that
21:33.16Nglpx1Mm
21:33.39Nglpx1Is possibile download freebpx image and mount by ssh?
21:34.28zambasibiria: i need to have it attached to a channel.. but that kind of like a catch-22 if i'm not able to create channels from outside asterisk
21:34.46zambado i end up having to use AMI?
21:38.41sibiriazamba: no, you can dial directly from AGI, and you can do so both on a hung-up channel or a bridged channel
21:39.12zambasibiria: so how? :)
21:39.43zambaagi.exec_command("DIAL", "SIP/marius,20")
21:40.13zamba<SIP/marius-0000003c>AGI Rx << EXEC DIAL SIP/marius,20
21:40.15zamba<SIP/marius-0000003c>AGI Tx >> 200 result=-1
21:40.29sibiriacheck the channel variables for the call
21:40.36sibiriathe disposition etc.
21:40.46sibiriaand the SIP response
21:40.54sibiria(is marius busy?)
21:41.06zambano
21:41.11zambaagi_channel: SIP/marius-0000003c
21:42.14zambai believe it's the hung up channel i'm getting the agi variables for
21:42.21zambasince this is a hangup handler
21:42.43zambaso that should be called after the call was hung up
21:42.44fileDial() doesn't allow itself to be called from a channel that has been hung up.
21:43.11zambaso how do i make a NEW call from an agi script?
21:43.43sibirialike suggested before, call file with context
21:43.48fileOriginate dialplan application, AMI, or call file
21:44.02zambabut.. argh.. :)
21:44.30zambathen i can't do what you've been saying i can.. have all logic in the original agi script
21:44.35zambathen i need to redesign everything here
21:45.34zambacan i call AMI from a hangup handler script? and from there read in DTMF?
21:45.40SamotThis is what I said hours ago.
21:45.50zambaSamot: yeah, you have been saying that
21:45.52SamotYou cannot do this from a hang up
21:46.00SamotThe channel no longer exists.
21:46.19filethat is: you can't read in DTMF from the channel that is in the hangup handler
21:46.20sibiriayou're doing it from a script after hangup. the original channel shouldn't be maintained because then the caller has to hang around for 40+ calls to reach someone
21:46.38sibiriawhen you Originate() a call you can pull the results from it afterwards
21:47.21zambabut we've discussed this for the better part of the afternoon.. you know my requirements by now.. could you please just help me get started with the right building blocks.. if AGI can't do it, then please say so :)
21:47.41sibiriayou can originate a call from AGI, on a hung-up channel
21:48.06zambacan i interact with that new call?
21:48.15zambathrough agi?
21:48.45sibiriayou can interact with its status, other than that you need to send the call to a context which manages events in the call
21:49.03zambasibiria: exactly. and this i need to get BACK to the original agi script
21:49.39zambaso then AGI is probably not the right way to go about this?
21:50.09zambathe main script needs to know if the user inside the new call answered yes (pressed the correct DTMF)
21:50.28zambawith the main script i mean the AGI script that was called after the hangup of the original call
21:50.53sibiriayou can set channel variables in your dial plan, and read them from AGI
21:51.28sibiriaoriginate, too, sets its call disposition as a channel variable
21:51.45zambabut will that help me?
21:51.52zambai mean.. i'm nearly in the complete dark here
21:52.57zambaasterisk has yet again been able to give me a complete headache.. several years since the last time
21:53.44sibiriaif you originate a call, and send the bridged call to a dial plan context that does for example Background(yes-or-no,<options>), you can pull the extension and save it, then read it later
21:54.29zambasibiria: but the original agi script has sent the call and has lost all status of it.. how can i tie everything together
21:54.38sibiriachannel variables, still
21:54.52zambacould you possibly show me an example of this?
21:55.08zambabefore my head just simply explodes...
21:55.42zambathere's no originate command in agi
21:57.49zambaexec("originate" ... ?
21:59.09SamotOK so how many numbers are in this list?
21:59.26SamotAnd each time a recording is generated it must send to this lsit?
21:59.28Samotlist?
22:00.03zambafor the PoC it's maybe just 2-3
22:00.16zambabut i want this to be dynamic through a database backend
22:00.24zambabut that's work after the PoC
22:00.39SamotAnd this should all be triggered on a hangup?
22:02.00zambaSamot: yup..
22:02.25SamotAnd the caller will have options to re-record?
22:02.37zambaafter the PoC, but sure.. we want that as well
22:02.47SamotWhat are you trying to prove?
22:02.57SamotYou keep saying PoC but then everything comes after.
22:03.06SamotSo what is trying to be proved right now?
22:03.27SamotSomeone can call in and record a message?
22:03.35zambajust the flow.. that we can send the recording to all recipients sequentially.. and that we can receive the dtmf from the callers and then stop the sequential calling
22:03.47zambathat's the PoC for now
22:04.09SamotSo why does this need to be done in the hangup?
22:04.30sibiriahe doesn't want the caller to have to wait on the line while the application dials 40+ numbers to find a taker
22:04.38zambathen we'll add dynamic database lookup for the recipients, screening of the incoming call (maybe also with pin code).. and maybe also a callback to the person who first dialed in with a status
22:04.40sibiriadoing it in hangup is just one way of doing it
22:04.46SamotAnd who said they had to?
22:05.10zambayup.. the original caller should just leave the message and do something else.. the thought is that asterisk should do this work for the person
22:05.12sibirianobody. hence doing it after hangup
22:05.20SamotOK.
22:05.52SamotSo I'm sure the 40+ recipients will enjoy the false positives.
22:06.03zambawhat do you mean?
22:06.11SamotBecause if they are disconnect, or decide while recording they don't need this anymore and hang up..
22:06.20SamotThe hangup handler triggers the calling of all the list.
22:06.31SamotA hangup is a hangup
22:07.30zambaah, yeah, that could of course be an issue.. so it would be nice with a confirmation.. as you said.. an option to re-record and verify the recording before actually triggering everything
22:07.33zambagood point
22:07.58*** join/#asterisk Nglpx1 (6d350b30@109.53.11.48)
22:08.13Nglpx1Samot
22:09.16Nglpx1So, i have been deleted freebpx and i have restored the snapshot with asterisk
22:10.00Nglpx1Now, you asked me a particular log what was it?
22:10.12Nglpx1Dial what..
22:12.02SamotThe Dialplan you are using
22:12.09Nglpx1Yes yes
22:12.26zambaSamot: what other place do you suggest triggering this? instead of an hangup handler?
22:12.30Nglpx1how was the command?
22:13.05Nglpx1Dialplan show?
22:13.09*** join/#asterisk Typhon (~Typhon@ipservice-092-211-116-010.092.211.pools.vodafone-ip.de)
22:13.23SamotJust open extensions.conf and copy and paste it
22:13.42Nglpx1Okok
22:14.44Samotzamba: like I said I do a system call to trigger a script to start processing calls
22:15.18Nglpx1Samot: https://pastebin.com/iDXC8fjD
22:16.38Nglpx1Did you ask me to try making a call and show you a certain wrong memory dialplan?
22:16.56zambaSamot: ok, so i'm back to square one again... :)
22:22.43Nglpx1Samot are you here?
22:23.08sibiriazamba: uff, hold on, give me a minute or two and i'll make you an example
22:23.13sibiriabut it'll use Lua
22:23.23sibiriaso you'll have to "transcode" to python on your own
22:23.36zambawell, i have been looking for a way to learn lua, so :)
22:27.06Nglpx1Samot rip
22:27.15SamotIm trying to eat
22:27.24Nglpx1Sorry
22:34.33Samotzamba: How are you back to square one?
22:35.58*** join/#asterisk forgotmynick (uid24625@gateway/web/irccloud.com/x-qthjrppudcrytbad)
22:40.28*** join/#asterisk Nglpx1 (6d350b30@109.53.11.48)
22:40.34Nglpx1Samot have you done or not?
22:41.12SamotThere is nothing wrong with the dialplan.
22:41.23SamotIt should accept any digits being sent and prefix a + to it
22:41.56Nglpx1so why can't I call Italy
22:42.30SamotHow are you dialing it?
22:42.30Nglpx1Call only in us
22:43.16Nglpx1compilation? (I don’t understand)
22:43.38SamotWhen you pick up the handset and dial digits, how are you dialing?
22:43.58SamotAre you dialing 39XXXXXXXX
22:44.22Nglpx1For exemple, i call America 12053054567
22:44.26SamotGD.
22:44.33Nglpx1I call italy 393334445555
22:44.34SamotHow. Do. You. Call. Italy.
22:44.51SamotOK and you get rejections from the provider?
22:45.27Nglpx1“Temporarily Unavaible “
22:45.44SamotThen you need to call the provider and find out why calls to the US work but not to Italy.
22:47.05Nglpx1Not is that the problem. the other day i used asterisk version 16 and i could call any prefix the provider already knows i am calling internationally
22:48.35Nglpx1I need to choose "39" in the asterisk configuration, I'm sure that while I was doing the 16 I had a screen asking me the country !!
22:49.03SamotDude.\
22:49.09SamotStop with that because it's wrong.
22:49.21SamotYour dialplan will match that pattern just fine.
22:49.37SamotSo if your provider is sending back 4XX errors then they are rejecting the call.
22:51.36Nglpx1let's see, if I connect the provider's data directly to the softphone according to your theory, the call will be rejected? :)
22:52.07Nglpx1I tell you that the provider accepts call forwarding internationally
22:52.17Nglpx1I can show you that
22:59.09SamotShow me what?
23:03.30zambaSamot: well, maybe not exactly.. i now know what NOT to do :)
23:05.38zambaso i guess i was just wondering to do it non-elegant.. use ami and originate to dial into a context.. which then would run an AGI script.. and this will then write to disk the return value.. and then the main python script that was called from system or hangup handler or whatever, will monitor the disk and then follow up on stuff
23:05.49zambado that as a start and then we'll see
23:05.50zambaa proper PoC :p
23:07.06SamotWhat monitoring do you need?
23:07.14SamotYou're cycling through a list.
23:10.56zambayes, if i did it inside the dialplan, then i could probably skip it
23:11.33zambabut i don't want to get a migraine by trying to decipher the loop structure inside asterisk dialplan
23:11.57sibiriazamba: sorry, i'll have to backtrack to my initial suggestion earlier today to use the handler only to signal to something external, or just run something external monitoring for a recording to call - after testing a bit it seems Originate in a hung-up channel is always async instead of blocking, so there's no way in the AGI script to know the outcome of the call or the DTMF events received
23:12.56zambasibiria: ah, ok.. i'm thinking of just doing AMI calls to originate into a context and then let each of them call an agi script to "report" back to the main script
23:12.58sibiriathat is, executing Originate in a hung-up channel returns immediately instead of waiting until the dial plan has finished the way it behaves by default
23:13.16zambausing disk as IPC
23:13.32sibiriayeah dispatching job through hangup
23:13.50zambai'll start out with that and then i'll try and improve on it if the PoC turns out to be something that we want to follow up on
23:14.07zambasibiria: thank you for your efforts and help :)
23:14.32SamotLol
23:16.51*** join/#asterisk opal (~wowaname@volatile/founder/wowaname)
23:21.24sibiriafile: is that intended behavior, btw.
23:21.41sibiriaoriginate being non-blocking instead of blocking when invoked in a hung-up channel
23:22.15sibiriait originates calls just fine, as always, but it considers the call a "SUCCESS" immediately by just entering the destination context, while the new channel is still ringing
23:22.40sibiriai mean, by just seeing that the destination context/extension exists
23:23.02*** join/#asterisk nglpx1 (05abc946@5.171.201.70)
23:23.09nglpx1Samot
23:23.38nglpx1Your response? I lost connection
23:23.39Samot?
23:23.53sibiriaat first i thought the AGI Lua framework i use was misbehaving
23:24.21SamotI asked what you were going to show me.
23:25.37nglpx1I just tried it, I called my Italian number by connecting DIRECTLY to the sip provider from the softphone and it works. the provider does not reject calls as you say.
23:26.10SamotThen you arent presenting the call properly
23:26.27SamotWhich is also what I said could be the case
23:26.38nglpx1when i was 16 during the installation she asked me to set my country in this (13.8) she didn't ask me, does it have anything to do with it?
23:26.44SamotSo, again, you need to know why
23:26.58SamotWho is she?
23:27.37nglpx1then even the American number would not work if I did not present the call well
23:28.15nglpx1she? Asterisk 13.8
23:28.45nglpx1She in the sense the version
23:28.45SamotI guess I don't know what you are talking about.
23:29.07SamotCuz I have never had that on installs.
23:30.20nglpx1, I said, when I installed version 16, it asterisk me in the configuration asks THE COUNTRY WHERE YOU ARE.
23:30.21nglpx1While in 13.8 DOES NOT ASK
23:30.43SamotOk so run 16
23:31.03SamotWhy you are using 13 when it is pretty much dead is beyond me.
23:31.14Samot16 is current and solves your problem. Use it.
23:31.34nglpx1because I uploaded the part of packages that 16 does not load due to compilation errors, it's a bug you have to compile the library completely
23:31.46nglpx1Becouse my sip comunicate only with 11/13
23:31.48SamotWhat?
23:32.07SamotGotrunk only works with 11/13?
23:32.12nglpx1Yes.
23:32.17SamotThats wrong
23:32.25nglpx1Look on site
23:32.38SamotExamples are just examples
23:32.54SamotHow would they know they version?
23:33.19nglpx1even in 3xc configurations it says to be based on version 11 or 13
23:33.49SamotThen get a better provider.
23:34.00SamotBecause 11/13 of Asterisk is unsupported.
23:34.17nglpx1please, would you be able to log into my ssh and watch? please.
23:34.23SamotNope
23:35.03nglpx1(despair)
23:36.23nglpx1No have other ideas, so you telling me asterisk don’t work in any possibility? Asterisk is no possibile to fix? Incredible.
23:36.36SamotNo, that's not what I'm saying at all.
23:36.41SamotDon't be dramatic.
23:37.01nglpx1it seems so, you don't know how to fix it
23:37.06SamotOK.
23:37.12SamotSo you're going to play that game?
23:37.30nglpx1don't get dramatic? with tears after only losing 16k euros today??
23:37.37Samot16K?
23:37.37*** join/#asterisk overyander (~overyande@50.115.255.72)
23:37.48SamotHow did you loss 16K today?
23:38.37HannaMbitcoin ... !?
23:38.42nglpx1since it no longer works I have had these losses if the number does not go within 20 minutes they will remove 10k from the escrow today I have already lost 6k with no customer service
23:38.48nglpx1Yes, bitcoin.
23:39.03SamotThen I guess you should have hired someone that knows what they are doing.
23:39.07SamotIf it was that vital.
23:39.28SamotBut you won't even contact your provider to find out why they are rejecting the calls.
23:39.56SamotYou haven't provided a *full call debug* that has been requested multiple times.
23:39.59nglpx1I did but he asked me for a lot of money and kept putting it off and wasting fucking time......
23:40.33SamotSo don't cry to me about losing 16K in bitcoin. If it was that important, we wouldn't have wasted 10 hours on this.
23:40.38SamotWith complete bullshit.
23:40.42nglpx1I'm sending you a debug now.
23:53.39*** join/#asterisk nglpx1 (05abc946@5.171.201.70)
23:53.44nglpx1Samot
23:53.49nglpx1https://pastebin.com/F56vhcv6
23:54.01nglpx1I have included ALL.
23:54.21nglpx1From the frist time
23:55.05nglpx1I start asterisk, I put the debug, I call us, I call Italy
23:55.47nglpx1by the way what is the point .. missing 5 minutes now I have lost everything....
23:56.33SamotINVITE sip:+393515201769@23.254.225.86 SIP/2.0
23:56.39nglpx1it would be impossible to find the problem in time, but at least I know what it was
23:56.40SamotYou're using Bria, correct?
23:56.47nglpx1Yesyes
23:57.09SamotBria is already sending the +
23:57.19SamotYou don't have a pattern that matches +39
23:57.49SamotSo all those 4XX errors were actually Asterisk telling you it couldn't do anything.
23:57.51nglpx1So how I can fix?
23:58.02Samot[Apr 26 23:43:34] NOTICE[5978][C-00000006]: chan_sip.c:26224 handle_request_invite: Call from '201' (5.171.201.70:48077) to extension '+393515201769' rejected because extension not found in context 'from-internal'.
23:58.10SamotCreate a pattern that has a +
23:58.27SamotAnd doesn't add the + in the Dial()
23:58.42nglpx1Where I make this modify?
23:58.50nglpx1In one conf file?
23:59.50Samothttps://www.irccloud.com/pastebin/zYulKxOC/
23:59.58SamotJust add that to the from-internal.

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