How to do CSV upload of route/trunk dial rules?

I could have sworn that a few days ago I saw on either this forum or the PBX in a Flash forum that there’s now a fix or module or something in 2.9 that allows upload of a large number of route/trunk dial patterns from a csv file, and that it was backported to 2.8, but I’m looking at a FreePBX 2.8 installation and I don’t see it, and all the modules are up-to-date. Are we looking in the wrong place, or does something additional need to be downloaded?

Alternately, is there some other quick way to import a bunch of patterns from an earlier version of FreePBX running on a different machine?

Done, at http://www.freepbx.org/trac/ticket/4445 . Hope that was the right one. Thanks.

please post feedback in the ticket associated with this feature so that we can track its progress and issues. Thanks.

Thanks, Philippe. I’d be happy to give it a shot. Got a URL for those files handy, by any chance?

edit: Found them at http://www.freepbx.org/trac/browser/modules/branches/2.9/core but didn’t realize you had to click through to the page and then download the original format files at first. I’m going to test them as soon as I get them downloaded and moved.

second edit: Just tried uploading a single list of patterns that did not contain any | characters, etc. into a new route - all I did was add a line at the top of the file that said “match pattern” (I didn’t even use the quotes) and it uploaded them correctly. There was one small glitch, though - since I was creating a new route, even though I had uploaded the pattern, I still got a popup saying “No dial pattern, there must be at least one.” So I just put an X character in the third field and created the route, and clicked “Submit changes”, and bam, there it was (and no line with the “X” pattern). So maybe you just need to set a flag bit of some kind when a CSV file has been uploaded and then skip the popup when that flag is set, or if that’s too difficult, maybe add a note to the popup that says that if you’ve uploaded a CSV file, just put an X in the match pattern field.

I am going to try a few other things but maybe not tonight. Thanks much for this addition!

It has not been back ported to 2.8 as last I had looked there was no more than a few people who had given feedback about it when the patch was first done some time ago.

It is in 2.9, if you want to test it, you should be able to just pull the page.routing.php and page.trunks.php from core’s 2.9 and replace yours with those two files.

If recall correctly the added functionality is 100% in those two files and I think as of right now, there aren’t any other dependencies or issues (though make a backup of the two files just in case).

You access the CSV upload through the Dial Rules/Patterns Wizard select dropdown.