mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-27 00:05:44 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
23
roles/freepbx/files/agi/jitsi_conf_pin
Normal file
23
roles/freepbx/files/agi/jitsi_conf_pin
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
use LWP::UserAgent;
|
||||
use JSON;
|
||||
|
||||
my $ret = 'error';
|
||||
|
||||
my $url = $ARGV[0] . '?id=' . $ARGV[1];
|
||||
my $ua = LWP::UserAgent->new(timeout => 10);
|
||||
$ua->env_proxy;
|
||||
|
||||
my $response = $ua->get($url);
|
||||
if ($response->is_success){
|
||||
my $json = from_json($response->content);
|
||||
if (defined $json and defined $json->{conference}){
|
||||
$ret = $json->{conference};
|
||||
$ret =~ s/@.*//;
|
||||
}
|
||||
}
|
||||
|
||||
print "SET VARIABLE JITSI_ROOM $ret\n";
|
Reference in New Issue
Block a user