TT#10151 PartyCallControl apply url placeholders

* url placeholders are replaced with the values

Change-Id: Id2a811882dbf6b9039c04dff2d393b5af05dda98
changes/47/11347/2
Kirill Solomko 9 years ago
parent 1fa7492f2f
commit 197653554b

@ -17,6 +17,22 @@ sub dispatch {
my $text = $args{text};
my $token = $args{token};
my %url_ph_map = (
caller => $from,
callee => $to,
callid => $id,
token => $token,
prefix => $type,
suffix => 'in',
);
# apply known placeholders to the url
foreach my $v (qw(caller callee callid token prefix suffix)) {
my $t = $url_ph_map{$v} // "";
$t .= $t ? "/" : "";
$url =~ s/(\$\{$v\})/$t/g;
}
# TODO: dispatch asynchronously!
my $ua = LWP::UserAgent->new(
#ssl_opts => { verify_hostname => 0, SSL_verify_mode => 0 },

Loading…
Cancel
Save