agi-DID_route.agi fails to be executed by Asterisk

General and Support topics relating to ViciDialNow and GoAutoDial ISO installers

Moderators: enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, s0lid

agi-DID_route.agi fails to be executed by Asterisk

Postby cavagnaro » Thu Apr 04, 2019 9:08 pm

Hi guys
VIcidial version: 2.14b0.5
Asterisk: 13.25.0
OS: Ubuntu 14.04 EC2 AWS
Scratch install

So I configured 3 Trunks and was not working, I have breaking my head for days why incoming calls were not working, messed a lot with different dialplan options but none seemed to work. So I began to mess with the AGI script as I saw (had to purchase a non e164 phone number to discard was not it (+) the problem).
So I was doing some prints while debbuging the script in mention until arrived to where the log file agi.out is supposed to be created.
If I execute the script from outside asterisk (linux command line) it does create the file and print some dummy info), however inside the Asterisk itself it just don't do a thing...it breaks, and therefore doing nothing for the routing rules. So I went and commented out the lines:

Code: Select all
sub agi_output
   {
   if ($AGILOG >=2)
      {
      ### open the log file for writing ###
      #open(Lout, ">>$AGILOGfile")
      #      || die "Can't open $AGILOGfile: $!\n";
      #print Lout "$now_date|$script|$agi_string\n";
      #close(Lout);
      }
      ### send to STDERR writing ###
   if ( ($AGILOG == '1') || ($AGILOG == '3') )
      {print STDERR "$now_date|$script|$agi_string\n";}
   $agi_string='';
   }

sub did_output
   {
   if ($AGILOG >=2)
      {
      ### open the log file for writing ###
      #open(Dout, ">>$DIDLOGfile")
      #      || die "Can't open $DIDLOGfile: $!\n";
      #print Dout "$did_string\n";
      #close(Dout);
      }
   $did_string='';
   }


and bam! began to work...not the Asterisk cli didn't show the Die message that is supposed to happen...why???
Any idea or what to do???

Thanks
cavagnaro
 
Posts: 38
Joined: Thu Feb 28, 2019 1:39 pm

Re: agi-DID_route.agi fails to be executed by Asterisk

Postby mflorell » Fri Apr 05, 2019 12:23 am

My suggestion would be to install VICIbox on a regular machine and experiment with that. AWS is not a stable environment for VICIdial use.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: agi-DID_route.agi fails to be executed by Asterisk

Postby williamconley » Fri Apr 05, 2019 1:27 am

permissions issue. if the agi log can't be created, the script fails and there's no output EXCEPT in the actual console. Not asterisk -r or asterisk -R, but only in asterisk -vvvvvvvvvvvvvvvvvvvvvgcT which should be running in a screen.

and then comes the best part: you didn't post any links to your installation instructions and you didn't install from a Vicibox OR goautodial .iso installer.

yet you posted this support ticket in the goautodial forum even though it's not a CentOS (the goautodial distro) issue nor is it in any way related to goautodial.

you also didn't post your vicidial version With BUILD as required to get cool free advice on this site.

and you're not using a "-vici" asterisk version (or left that part out).

you likely have several more weeks of hair pulling to reinvent this wheel. so the advice given by matt is something you should take to heart. don't install on AWS or ANY virtualized platform (colocation is great, virtualized servers ... not so much).

Best advice I can give you? Install on a local server (hardware or virtual, doesn't matter) for testing only. Get that testing perfect. Then branch into a production server. And before you try a "scratch install" using ANY set of installation instructions, get yourself a nice "fully-functional" Vicibox.com .iso install running. Figure out how Vicidial works (with a single agent only if you install on a virtual server, that's all they can handle which is great for sandbox/development). Install it using the PDF on Vicibox.com. After the base install, switch to the Vicidial Manager's Manual (on EFLO.net, free version available) by starting at page one and NOT skipping anything (I did mention free, right? so don't skip anything in the Free manual). You'll end up with a fully functional system with all parts working ... to which you can compare anything else you build with "whatever" method in the future. Another way to say "sandbox". If you need it, you can even install it in a VMware server in your laptop and have zero investment in hardware. (Or virtualbox, or vSphere or proxmox if you feel more energetic). But for moe than one agent: Hardware. Look at the front of the Manual for scaling estimates.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: agi-DID_route.agi fails to be executed by Asterisk

Postby cavagnaro » Fri Apr 05, 2019 8:24 am

Hi guys
Well this is weird to get this kind of answers...doesn't work, will not work, get attached to the only way...however in other posts you say that it is a free distro software so should work...so, what is it then? Should we don't attempt to use other linux? I understand you are not familiar or don't have time to test or develop a project on AWS or similar and that is why you have your hosted version...but that quite contradicts. If it works at Internet why shouldn't work in another? I have several other products on Internet aka cloud aka Data centers far heavier and do work. Is HW a limitation...no...you need to reach a point of acceptance? Yes.

I already have a working Vicidial at lab and a GoAutoDial. Already bought the Admin manual, not the FREE one only. I expected more info from it but ok, can work with that. So far have worked. But can't compare low level apps. Your install script is not commented and reversing it would take far more time.

As far as I know this is a forum, I find amazing the job done with this software and would like to take it a little bit higher, not to get stuck with bare metal servers. I am Genesys and Alcatel guy and would like to make this work at same level. I find only frustrating the lack of technical information available on the HOW it works. Yes, login an agent, webRTC, SDP, etc etc is quite easy. But only you guys, the developers who stuck hours of your life with this little one know for example which Perl libraries are used on each perl script, the version you used of some X software, why didn't choose any other. I asked a question, I am not demanding for an answer. You say permissions, but then console should show the DIE message as was exactly not able to create the log file.

This is like the e164 format posts i have seen around. William says, delete it and force your carrier to remove the + sign. It is not supported and won't work.
In the other hand you have mflorell who says only "hey just modify your dialplan" and add the + _X dialplan.
And I honestly spent 2 days figuring out why William said that, even when Asterisk does support the e164 format as it is a standand that is becoming more and more used around the world for SIP Providers who work not only inside a country. I even bought a carrier who didn't work with e164 format, was quite difficult to find a cheap one and just for tests on this. So I can today say, it works fine! With + and without.
WebRCT on AWS side?? Working at 80%, I get voice, everything on both sides but Vicidial agent screen gets nothing...Can't blame asterisk or any core component that brings the voice, now I am trying to complete the circle.

You say that I didn't post a patch version. OK get it, thought I did it but seems is not quite the exact number. I totally understand william as his knowledge on this tool is quite big and for years and you may have seen a lot of poor questions. Yeah, I did it too. I also run a Genesys user forum and an Alcatel one, the biggests around and I have the same problem. But that is how it is.

So, I will kindly reject the advice to work only on local servers as technology is evolving and need to evolve together. Can't get stuck with something old like a physical PBX just because I know it is something I know quite well and would lose new opportunities.
I am not looking to the cheapest way, I am looking for a concept I can work on in the next 5 years or more. Physical servers is not it at all. At least not in the big leagues.

Cheers guys and thanks again for this truly amazing job.
cavagnaro
 
Posts: 38
Joined: Thu Feb 28, 2019 1:39 pm

Re: agi-DID_route.agi fails to be executed by Asterisk

Postby cavagnaro » Fri Apr 05, 2019 8:28 am

And Wiliam, what is an "vici asterisk"?? Special build? If so how?
From stickies:
UPDATE 2018-10-18: We now include Asterisk 13 by default in our ViciBox ISO installer, Asterisk 13 is fully supported and recommended for Vicidial use.
cavagnaro
 
Posts: 38
Joined: Thu Feb 28, 2019 1:39 pm

Re: agi-DID_route.agi fails to be executed by Asterisk

Postby mflorell » Fri Apr 05, 2019 12:03 pm

Yes, if you spend enough time, you can get VICIdial working on just about any distro you want, but it will probably take a lot of tinkering and trial and error to get there, and as different packages update and are modified you'll have to start all over again with the next set of revisions to your installation steps. As an example, we used to do a from-scratch install of VICIdial on Ubuntu several years ago as part of our Administrator training here in Florida that we conduct 3 times a year, and as of about 5 years ago we stopped doing it because it took so much time and none of our attendees were interested in it anymore. In contrast to this, a VICIbox install from first boot on bare hardware to production-ready takes less than an hour, and has very few manual steps.

Since we are an Open-Source project, we have limited resources, and we have decided to dedicate those resources to only supporting and maintaining one Linux Distro install path so that we can focus on the VICIdial application itself instead of focusing on a multiple-distro support path. The vast majority of our clients don't care what distro they use, they just want a reliable VICIdial system, and VICIbox(OpenSuSE) supplies that with much less effort than it would take to support and test multiple ever-changing distros.

As for bare hardware instead of virtual machines, we've been over that time and time again on these forums. VICIdial is a "Real-time" application, and the parts of Asterisk that it uses need to have a reliable system timer, which is not possible on even moderately loaded virtual machines. Yes, you can run VICIdial on VMs, but it will not be as reliable, stable, efficient or as high-capacity as it would be if you ran it on the same hardware without VMs. Yes, we have clients that use AWS, but they usually plan for double the hardware for the same capacity as they would use for a bare-metal install, and there is guaranteed to be more overall system downtime on AWS.

As for technical information about how VICIdial works, it's all open-source, you can't get any more technical than that. We don't have the resources to heavily document the back-end, and frankly there isn't the need to simply because the full source code is right there on every VICIdial server. If you have specific questions on why something was done the way it was, we're here, just start a new topic in the Development forum and ask away.

Also, on the topic of additional tech documentation, we do have an Administrator manual that we go through and give to attendees of our Administrator training, although we don't currently have them for sale on our web store. If you would like to buy one, we do sell them to select clients on a case-by-case basis for $200, just send in a request to sales@vicidial.com and we can discuss.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: agi-DID_route.agi fails to be executed by Asterisk

Postby cavagnaro » Mon Apr 08, 2019 11:02 am

Hey Matt
Thanks a lot for the information. I will love to see what that book has. I am trying to analyze the code but even I see some validators don't understand the purpose of them yet.

Question, what is the usage of that time sync used for? In short? Would like to understand the concept behind it.

I will then move to Suse to have a more standard build of the ViciDial and have less inconsistencies around.
cavagnaro
 
Posts: 38
Joined: Thu Feb 28, 2019 1:39 pm

Re: agi-DID_route.agi fails to be executed by Asterisk

Postby mflorell » Mon Apr 08, 2019 3:02 pm

The "time sync" is critical to a properly working system, especially if you have multiple servers in a VICIdial cluster. Basically, there are different functions that use Asterisk for time, the MySQL/MariaDB database for time, Apache webserver for time and Linux for time. All of those time sources on those different time servers need to be in sync for everything to work properly. They should be as tight as possible, but you can be off by as much as 8 seconds on any one of those before you see a time sync issue. The most common reason for a time sync issue is when a server or process crashes.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: agi-DID_route.agi fails to be executed by Asterisk

Postby cavagnaro » Mon Apr 08, 2019 5:50 pm

I found that 8 secs validation. Yet, can't determine the source of these data inputs. Will keep analyzing it.
Is the purpose of this to keep track of agent activity?
Thanks
cavagnaro
 
Posts: 38
Joined: Thu Feb 28, 2019 1:39 pm

Re: agi-DID_route.agi fails to be executed by Asterisk

Postby williamconley » Mon Apr 08, 2019 6:40 pm

cavagnaro wrote:I found that 8 secs validation. Yet, can't determine the source of these data inputs. Will keep analyzing it.
Is the purpose of this to keep track of agent activity?
Thanks

the agent screen, every second, sends a request packet for information so it can update the agent screen with any needed information (calls in queue, lead data, anything). As that packet is processed, it will update a live agent field and the sql server and php server will each store values based on the time they presently believe it is.

That process ensures that each agent's session is still in contact with the "Vicidial system". If that communication pathway fails, for any reason, this agent needs to be "cut off" until that communication is restored or BAD things can happen. I liken it to driving down the highway without a steering wheel. It's a good thing that there's an automatic braking system to stop that car until you get your wheel reinstalled (by logging out and back in again).

If this happens more than once every six months or so, it's due to a problem you need to fix. Either there's a problem with your installation, your agent's web browser is dropping packets to the web server, or the web server is having problems communicating with the database or there's actually a problem with time between the servers. Note that they don't have to have the correct time of day, but they MUST have the SAME time of day. So it's normal to use one of your local servers (such as the DB server) as the NTP master and have all the others feed off of it. During startup it's also useful to use "iBurst" to quick-sync after a reboot.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to ViciDialNow - GoAutoDial

Who is online

Users browsing this forum: No registered users and 19 guests