Could not determine Asterisk version (got: Asterisk GIT-master-2fd0a875d4 built by root @ myhost on a x86_64 running Linux on 2018-06-30 16:00:25 UTC). Please report this

I have installed Naf’s modified asterisk with GVsip code:

I am getting this error:
Could not determine Asterisk version (got: Asterisk GIT-master-2fd0a875d4 built by root @ myhost on a x86_64 running Linux on 2018-06-30 16:00:25 UTC). Please report this

The only relevant post I found for this error is here:

The post says that If you checkout using a branch that you wont have this error, I did use the gvsip branch but maybe I didn’t do it right?

git clone https://github.com/naf419/asterisk.git --branch gvsip
cd asterisk
./configure
make
make install

here is the output when installing freepbx:

/usr/src/freepbx# ./install -n
Assuming you are Database Root
Checking if SELinux is enabled...Its not (good)!
Reading /etc/asterisk/asterisk.conf...Done
Checking if Asterisk is running and we can talk to it as the 'asterisk' user...Error!
Could not determine Asterisk version (got: Asterisk GIT-master-2fd0a875d4 built by root @ myhost on a x86_64 running Linux on 2018-06-30 16:00:25 UTC). Please report this.

The other post says “Force Asterisk Version” can be used, but I think that option is only available after freepbx is installed, and I am getting hung up on installation of FreePBX.

If I could change the way I am using github to correctly report the version of Asterisk that would be preferable, or maybe there is a way to specify the asterisk version when building it so that it reports that info instead of Asterisk GIT-master-2fd0a875d4

I appreciate any help, thank you.

You are ‘off the reservation’’ :slight_smile: The file

freepbx/installlib/installcommand.class.php

checks for your version here

// Parse Asterisk version.
                        if (preg_match('/^Asterisk (?:SVN-|GIT-)?(?:branch-)?(\d+(\.\d+)*)(-?(.*)) built/', $astver, $matches)) {
                                $determined = true;
                                if ((version_compare($matches[1], "11") < 0) || version_compare($matches[1], "16", "ge")) {
                                        $output->writeln("<error>Error!</error>");
                                        $output->writeln("<error>Unsupported Version of ". $matches[1]."</error>");
                                        $output->writeln("<error>Supported Asterisk versions: 11, 12, 13, 14, 15</error>");
                                        exit(1);
                                }
                                $output->writeln("Yes. Determined Asterisk version to be: ".$matches[1]);
                                break;
                        }

so it is checking for “11, 12, 13, 14, 15” in the string .

if you want to go renegade, a quick but dirty way might be to ‘comment out’ the exit(1) and short circuit the logic.

// exit(1);
$determined = true;
$astver=‘14’; //or whatever

If you do that you are definitely on your own though :wink:

Perhaps a cleaner way would be to install your system regularly with an accepted asterisk version, then build and install the patched asterisk after FreePBX is up and running, you will loose a couple of patches that FreePBX does to to it’s own version of asterisk of course .

Naf is using master so there is no way to determine the version from “master”

just do this

fwconsole set ASTVERSION 13.21.0

1 Like

Thank you both!

I have FreePBX installed now, still chugging away at setting things up to test out GVsip.

I appreciate the help :slight_smile:

1 Like

Is that not a catch-22 on a fresh install? fwconsole would not be there until FreePBX is one way or another installed. Am I wrong?

Please keep us informed of your progress there are a few here waiting with bated breath, tick tock . . .

I installed using your method dicko:

nano /usr/src/freepbx/installlib/installcommand.class.php
----------Change Below-----------
$astver = trim(array_pop($tmpout));

// Parse Asterisk version.
if (preg_match('/^Asterisk (?:SVN-|GIT-)?(?:branch-)?(\d+(\.\d+)*)(-?(.*)) built/', $astver, $matches)) {
				$determined = true;
				$astver = "15";
				if ((version_compare($matches[1], "11") < 0) || version_compare($matches[1], "16", "ge")) {
								$output->writeln("<error>Error!</error>");
								$output->writeln("<error>Unsupported Version of ". $matches[1]."</error>");
								$output->writeln("<error>Supported Asterisk versions: 11, 12, 13, 14, 15</error>");
								exit(1);
				}
				$output->writeln("Yes. Determined Asterisk version to be: ".$matches[1]);
				break;
}
sleep(1);
------------To This--------------
$astver = "15";
$determined = true;
sleep(1);
---------------------------------

That was prior to receiving Andrews message, however after the install I went ahead and issued the fwconsole command to see if it might take care of any lingering issues.

I have one unresolved issue, the dashboard has a retrieve_conf error

Reload failed because retrieve_conf encountered an error: 1

I figured out I could modify retrieve_conf like this (find the first line, add the two lines below):

$engineinfo = engine_getinfo();
$engineinfo['engine']="asterisk";
$engineinfo['version']="15";

The problem with this solution is that the dashboard and module admin will see a “tampered file” so you cannot update the core, it will have you redownload the current version, before updating the core, but soon as you get the current version, retrieve_conf will be broken again and no updates/config apply will work.

I am wondering if there is anywhere either in the UI, code change, or fwconsole, that I can set the info to make retrieve_conf happy without modifying retrieve_conf.

Once I have successfully made inbound and outbound calls I will post a full writeup of all the commands and edits used.

I just found this answer, maybe it is the simplest solution?
but not having to modify retrieve_conf is preferable.

fwconsole ma refreshsignatures

You’ll never make it be “happy” until you only use “kosher code” and change nothing (or go through a multistage (and needlessly complicated IMHO) process documented somewhere around here).

You can disable the warnings by unchecking

Enable Module Signature Checking

in Advanced settings, but be prepared to do that whenever you update anything.

Awesome, thank you.

I need to include pjsip_custom.conf

however when I went to edit /etc/asterisk/pjsip.conf

right at the top of the file it says:

Do NOT edit this file as it is auto-generated by FreePBX.

what in the GUI need to be changed so that it is not commented out:

#include pjsip_custom.conf
to
include pjsip_custom.conf

For now, im just gonna edit the file anyway and see what happens.

It is not commented out but rather included,
; is used to comment a line in asterisk, add any customizations in the ‘custom’ file.

1 Like

I just tried my first test call, I can see monitoring the Asterisk CLI that the call is attempting to use the implemented gvsip from pjsip_custom, however it says No channel type registered.

here is snippet from the CLI while attempting to place a call:

  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Executing [[email protected]:1] Dial("SIP/5001-00000003", "PJSIP/[email protected]") in new stack
[2018-07-01 14:53:30] WARNING[3416][C-00000004]: channel.c:6108 request_channel: No channel type registered for 'PJSIP'
[2018-07-01 14:53:30] WARNING[3416][C-00000004]: app_dial.c:2516 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 66 - Channel not implemented)
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [[email protected]:2] NoCDR("SIP/5001-00000003", "") in new stack
    -- Executing [[email protected]:3] Progress("SIP/5001-00000003", "") in new stack
    -- Executing [[email protected]:4] Wait("SIP/5001-00000003", "1") in new stack
    -- Executing [[email protected]:5] Playback("SIP/5001-00000003", "silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer") in new stack
    -- <SIP/5001-00000003> Playing 'silence/1.ulaw' (language 'en')
    -- <SIP/5001-00000003> Playing 'cannot-complete-as-dialed.ulaw' (language 'en')
    -- <SIP/5001-00000003> Playing 'check-number-dial-again.ulaw' (language 'en')
    -- Executing [[email protected]:6] Wait("SIP/5001-00000003", "1") in new stack
    -- Executing [[email protected]:7] Congestion("SIP/5001-00000003", "20") in new stack
  == Spawn extension (from-internal, 13604276226, 7) exited non-zero on 'SIP/5001-00000003'
[2018-07-01 14:53:38] WARNING[3416][C-00000004]: pbx.c:2906 pbx_extension_helper: No application 'Macro' for extension (from-internal, h, 1)
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/5001-00000003'

I am thinking maybe I should make a new thread outlining what I have done so far to get to this point.

You are probably better matched with the piaf forums, as GV is.more.that.audience, Also follow Naf’s.git, it sometimes changes.by the.hour.

I have this up and running now.

The final piece is modifying modules.conf and changing the noload entries to load for all pjsip related entries, I am not even sure why these were set to noload, I dont remember doing that.

EDIT: I figured out why, it has to do with the version, I set this up again much cleaner without any of these edits required by editing the build file, will post a full writeup for those interested in setting up and testing out gvsip.

write up here: How-To Guide for Google Voice with Freepbx 14 & asterisk gvsip, Ubuntu 18.04

1 Like

Cannot access your write up link (newbie here). Am I missing something?

1 Like

It has been about a week since I have tested the install, let me know in the other thread if you run into problems. (My system is still up and running)

You can just sign the module yourself. Generate a GPG key, and then run ‘sign.php --local your_key_id’ – obviously, your changes will be overwritten when you upgrade core, but hopefully by then the asterisk issue will be resolved.

Also tampered modules don’t prevent updates or upgrades. If you’ve read that somewhere you’ve been deceived.

Good to know, but this was one of my first posts, and is no longer an issue.

A long string of problems were all solved by just doing this:

sudo sed -i 's/MAINLINE_BRANCH=.*/MAINLINE_BRANCH=15/' build_tools/make_version