Voximal - Cannot test the application - voximal

I've just installed the app on my asterisk 14 and i got some problems.
I've created this account in voximal.conf
[account2]
number=8000
name=test1
url=file:///var/lib/voximal/test.vxml
This is the content of my test.vxml
<?xml version="1.0"?>
<vxml version = "2.0" xmlns="http://www.w3.org/2001/vxml">
<form>
<block><audio src="hello.wav"/></block>
</form>
</vxml>
This is the content of my extensions.conf file
exten => 8000,1,Answer
exten => 8000,n,Wait(2)
exten => 8000,n,Voximal(test1)
exten => 8000,n,Hangup
And this is what I get when I call 8000 on my softphone
Executing [8000#from-internal:1] Answer("PJSIP/marc-00000005", "") in new stack
> 0x7fcbfc150140 -- Strict RTP learning after remote address set to: 192.168.79.1:40034
> 0x7fcbfc150140 -- Strict RTP switching to RTP target address 192.168.79.1:40034 as source
-- Executing [8000#from-internal:2] Wait("PJSIP/marc-00000005", "2") in new stack
> 0x7fcbfc150140 -- Strict RTP learning complete - Locking on source address 192.168.79.1:40034
-- Executing [8000#from-internal:3] Voximal("PJSIP/marc-00000005", "test1") in new stack
[Jan 3 09:15:56] ERROR[48508][C-00000006]: app_voximal.c:20285 vxml_exec: Cannot open new session, allocating context!
-- Executing [8000#from-internal:4] Hangup("PJSIP/marc-00000005", "") in new stack
I've tried this to identify the error:
exten => 8000,1,Voximal()
exten => 8000,n,NoOp(${VOXIMAL_ERROR})
exten => 8000,n,GotoIf($["${VOXIMAL_ERROR}" == ""]?hangup)
exten => 8000,n,Busy()
exten => 8000,n(hangup),Hangup()
And I got this:
Executing [8000#from-internal:1] Voximal("PJSIP/marc-00000000", "") in new stack
[Jan 3 09:28:08] ERROR[48842][C-00000001]: app_voximal.c:20285 vxml_exec: Cannot open new session, allocating context!
-- Executing [8000#from-internal:2] NoOp("PJSIP/marc-00000000", "LICENSE") in new stack
-- Executing [8000#from-internal:3] GotoIf("PJSIP/marc-00000000", "0?hangup") in new stack
-- Executing [8000#from-internal:4] Busy("PJSIP/marc-00000000", "") in new stack
Please help me!

The error : vxml_exec: Cannot open new session, allocating context!
It is because you didn't have enable the free 1 port of Voximal.
Have a look to your Voxiaml Licence with :
CLI> voximal show license
The default configuration needs an Internet connection to get the license.
If you are testing in a secure network, you need to set the key=evaluation (in the voximal.conf file or from the Web Interface) to enable localy the test/dev/free license.

Related

puppet migration: v3.8.5 -> v5.4.0 "Could not find template"

I'm migrating a from puppetmaster on Xenial (v3.8.5) to Bionic (v5.4.0) and have run into an issue. So far I've copied the node and modules files from the old server to the new and had a client connect. I keep getting the following error on the client and master:
Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Could not find template 'ntp/client_ntp.conf.erb' (file: /etc/puppet/code/environments/production/manifests/modules/ntp/manifests/init.pp, line: 17, column: 20) on node owain18.dimerocker.com
The template file exists at: /etc/puppet/code/environments/production/manifests/modules/ntp/templates/client_ntp.conf.erb
The contents of ntp/manifests/init.pp:
class ntp {
package { "ntp": }
file { "/etc/ntp.conf":
mode => "644",
content => template("ntp/client_ntp.conf.erb"),
notify => Service["ntp"],
require => Package["ntp"],
} # file
service { "ntp":
ensure => running,
enable => true,
require => Package["ntp"],
} # service
} # class ntp
(I removed some comments from the top of the file so the line number in the error doesn't match, but there's no code missing.)
Any pointers on how to fix this issue? Thanks for your help.

Problem connecting to Azure Service Bus using rabbitmq-amqp1.0-client

I'm trying to connect Azure Service Bus (AMQP 1.0) using this erlang client: https://github.com/rabbitmq/rabbitmq-amqp1.0-client
The elixir wrapper library https://github.com/pma/amqp doesn't seem like using AMQP 1.0. So I'm trying to use the erlang client directly.
I did the following:
git clone https://github.com/rabbitmq/rabbitmq-amqp1.0-client.git
cd rabbitmq-amqp1.0-client
make
make shell
Then I created a config as per the README file at https://github.com/rabbitmq/rabbitmq-amqp1.0-client
OpnConf = #{address => Hostname,
port => Port,
hostname => <<"abc-shankardevy.servicebus.windows.net">>,
tls_opts => {secure_port, [{versions, ['tlsv1.1']}]},
container_id => <<"test-container">>,
transfer_limit_margin => 100,
sasl => {plain, User, Password}}.
When I try to open the connection as in the README, I get the following error. I'm not able to follow the erlang error message. Any help is appreciated.
{ok, Connection} = amqp10_client:open_connection(OpnConf).
** exception exit: {noproc,{gen_server,call,
[amqp10_client_sup,
{start_child,[#{address =>
'abc-shankardevy.servicebus.windows.net',
container_id => <<"test-container">>,
hostname => <<"abc-shankardevy.servicebus.windows.net">>,
notify => <0.111.0>,port => 5671,
sasl =>
{plain,'RootManageSharedAccessKey',
'mykey'},
tls_opts => {secure_port,[{versions,['tlsv1.1']}]},
transfer_limit_margin => 100}]},
infinity]}}
in function gen_server:call/3 (gen_server.erl, line 223)
in call from amqp10_client_connection:open/1 (src/amqp10_client_connection.erl, line 110)
Try "starting" the application first:
application:ensure_all_started(amqp10_client).
It's complaining about not finding a certain process (noproc), namely the one called amqp10_client_sup. This process is started when the application is started, by this piece of code:
-module(amqp10_client_app).
-behaviour(application).
-export([start/2,
stop/1]).
start(_Type, _Args) ->
amqp10_client_sup:start_link().

Puppet: how many times an exec block with creates run?

I have the below two exec resources and would like the exec resource run the script to run whenever the file /var/lib/my-file is not present. I'm wondering what would happen if the file never gets created. Would the exec resource check if file exists run forever in a loop until it gets created?
exec { 'run the script':
command => "python my-script.py",
path => '/bin:/usr/bin:/usr/local/bin',
timeout => 900,
subscribe => File["my-settings.yaml"],
refreshonly => true,
}
exec { 'check if file exists':
command => 'true',
path => '/bin:/usr/bin:/usr/local/bin',
creates => '/var/lib/my-file',
notify => Exec['run the script']
}
A resource is only applied once per catalog application, which occurs once per catalog compilation per node. You can verify this for yourself by trying it out.
If the Python script fails to create the file, the resource would simply be applied again during the next catalog application. Otherwise, idempotence prevails and the resource is not applied because the file already exists.
Additionally, you should simplify your resources into:
exec { 'run the script':
command => 'python my-script.py',
path => '/bin:/usr/bin:/usr/local/bin',
timeout => 900,
creates => '/var/lib/my-file',
subscribe => File["my-settings.yaml"],
refreshonly => true,
}
This is functionally the same as what you have in your question and is more efficient and easier to read.

SaltStack: Create a server via salt-cloud and set endpoints autmatically in Azure?

I'm a bit stuck with my server deployment recipes...
So far, I can create and provision my servers via commandline:
First I run salt-cloud and afterwards I provision it via salt-ssh...
But since I'm using some special ports (https,...) I also have to set/open input/endpoints (=ports) on Microsoft Azure.
This is where I stuck: is there any way of telling salt-cloud, to automatically execute a script, which opens the endpoints automatically?
My preferred result would be:
run salt-cloud => sets up new machine and opens all necessary ports
run salt-ssh to provision them
I have already looked at salt orchestration, but it looks like it's more for server fleets, instead of single (external) server configuration.
Any hints?
You could write a custom bootstrap script that would open the ports that you want.
As Utah_Dave said, I wrote a ruby script to add the ports...
# ruby
# execute with ruby startscript.rb
require 'json'
PROVIDER = "yourprovider"
SERVER = "yourserver"
ENDPOINTS = {
"SSH2" => 17532,
"HTTPS" => 443,
"HTTP" => 80,
"SlangerHTTP" => 8080,
"Slanger" => 4567,
"CouchDB" => 5984
}
def get_missing
service_existing = false
while !service_existing
begin
res = `salt-cloud --out=json -f list_input_endpoints #{PROVIDER} deployment=#{SERVER} service=#{SERVER}`
result = JSON.parse(res)
service_existing = true
rescue => e
puts e
end
end
existing_services = result[PROVIDER]["azure"].keys
missung_services = ENDPOINTS.keys - existing_services
end
missung_services = get_missing
while missung_services.any?
print "#{Time.now} [#{SERVER}] Services missing: #{missung_services.join(", ")}"
missung_services.each do |m|
print "."
`salt-cloud --out=json -f add_input_endpoint #{PROVIDER} name=#{m} port=#{ENDPOINTS[m]} protocol=tcp deployment=#{SERVER} service=#{SERVER} role=#{SERVER}`
end
print "\n"
missung_services = get_missing
end

Asterisk GoSub() function not working

I've recently started to read about Asterisk and I really liked the idea of using the GoSub() function, but for some unknown to me reason I it seems that it is not installed:
Im using Asterisk 11.5.1
Below is my extensions.conf file:
[default]
exten => _.,1,Hangup()
[internal]
exten => 101,1,Noop(Going to internal contex exten:${EXTEN})
same => n,GoSub(sub-logger,start,1())
same => Dial(SIP/stefan)
exten => 102,1,Noop(Going to internal contex exten:${EXTEN})
same => n,GoSub(sub-logger,start,1())
same => n,Dial(SIP/nasko)
exten => 103,1,Noop(Na babati fyr4iloto)
exten => _9.,1,Dial(SIP/${EXTEN:1}#planet-phone)
exten => _.,1,Hangup()
[external]
exten => _.,1,Hangup()
[sub-logger]
exten => start,1,Noop(inside the subroutine)
;same => n,Noop(Channel : ${CHANNEL})
;same => n,Noop(Context : ${CONTEXT})
;same => n,Noop(Extensions : ${EXTEN})
;same => n,Noop(Date/time call : ${DATETIME})
same => n,Return()
When I register and try to call 101 or 102 I receive the following in the console:
== Using SIP RTP CoS mark 5
-- Executing [101#internal:1] NoOp("SIP/nasko-00000033", "Going to internal contex exten:101") in new stack
[Sep 22 19:47:41] WARNING[18071][C-00000025]: pbx.c:4621 pbx_extension_helper:No application 'GoSub' for extension (internal, 101, 2)
== Spawn extension (internal, 101, 2) exited non-zero on 'SIP/nasko-00000033'
-- Executing [h#internal:1] Hangup("SIP/nasko-00000033", "") in new stack
== Spawn extension (internal, h, 1) exited non-zero on 'SIP/nasko-00000033'
I searched a lot on in google but I wasnt able to find any explanation for this problem.
If someone has any idea please share it here!
THanks!
Did you load the app_stack module?
Maybe you want to add autoload on in modules.conf

Resources