Question : recording on click to call

Hi,
I have recording - always on all extensions and all queues. But when I use the click to call script below it does not record the call. I don't want to edit the _additional dialplan because freepbx will over-write it whenever an update is made, and I want to use the built-in namind convention for asterisk so that the CDR records in trixbox will find the recorded file.
Code Snippet:
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:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
\n";
} else {
fputs($oSocket, "Action: login\r\n");
fputs($oSocket, "Events: off\r\n");
fputs($oSocket, "Username: $strUser\r\n");
fputs($oSocket, "Secret: $strSecret\r\n\r\n");
fputs($oSocket, "Action: originate\r\n");
fputs($oSocket, "Channel: SIP/$strChannel\r\n");
fputs($oSocket, "WaitTime: $strWaitTime\r\n");
fputs($oSocket, "CallerId: $strCallerId\r\n");
fputs($oSocket, "Exten: $number\r\n");
fputs($oSocket, "Context: $strContext\r\n");
fputs($oSocket, "Priority: $strPriority\r\n\r\n");
fputs($oSocket, "Action: Logoff\r\n\r\n");
fclose($oSocket);
 }
//echo "Extension $strChannel should be calling $number." ;
else :
 exit() ;
endif ;
 
}
 
ClickToCall($_GET['number'], $_GET['ext']);
 
 
?>
 
 


Untitled Document
 





Answer : recording on click to call

You can specify other routes of course... it's just that the entry point  [custrack-click] has to match what you are sending....

Using this ... exten => _09.,n,Macro(dialout-trunk,1,${EXTEN:2},,)  ... allows you to send it as is, and it strips the 09 for you before sending it to dialout-trunk...
Random Solutions  
 
programming4us programming4us