blob: 60414a644781e7b65c3b3bcbfc19170a089330a4 (
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'} && $curuser->option('vonage-username') ) {
<% include('/elements/popup_link.html',
'action' =>
'https://secure.click2callu.com/tpcc/makecall'.
'?username='. uri_escape($curuser->option('vonage-username')).
'&password='. uri_escape($curuser->option('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 $curuser = $FS::CurrentUser::CurrentUser;
( my $vonage_number = $curuser->option('vonage-fromnumber') ) =~ s/\D//g;
$vonage_number =~ /^1/ or $vonage_number = "1$vonage_number";
</%init>
|