blob: 1d62d182ea31b55aef2d72e976ca2872eca6aac8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<% include('/elements/init_overlib.html') %>
% if ( length($number) ) {
<% $number %>
% if ( $opt{'callable'} && $conf->config('vonage-username') ) {
<% include('/elements/popup_link.html',
'action' =>
'https://secure.click2callu.com/tpcc/makecall'.
'?username='. $conf->config('vonage-username').
'&password='. $conf->config('vonage-password').
"&fromnumber=$vonage_number".
"&tonumber=$snumber",
'width' => 240,
'height' => 64,
'actionlabel' => 'Initiating call',
'label' => qq!<IMG SRC="${fsurl}images/red_telephone_mimooh_01.png" BORDER=0 ALT="Call this number">!,
)
%>
% }
%
% } else {
% }
<%init>
my( $number, %opt ) = @_;
( my $snumber = $number ) =~ s/\D//g;
my $conf = new FS::Conf;
( my $vonage_number = $conf->config('vonage-fromnumber') ) =~ s/\D//g;
$vonage_number =~ /^1/ or $vonage_number = "1$vonage_number";
</%init>
|