curl -X GET http://your-service-url.com/webhook.php?parameter1=<call log value>¶meter2= <another call log value> |
// If you have set Query string parameters, you can still get them here too. $some_value = $_GET['parameter1']; |
myoperator= { '_ai': '5f114f490dbe2437', '_so': '1', '_ci': '5cd40f6554442586', '_cr': '9711636496', '_cm': '', '_cl': '+919711636496', '_cy': '91', '_se': 'DL, IN', '_ts': 1594969967, '_st': 1594969929, '_ms': 1594969929000, '_ss': 25929, '_et': 1594969968, '_dr': '00:00:39', '_drm': 0.65, '_ty': 1, '_ev': 1, '_fn': 'e673ba2e1747cb32960b19275f459c1869776c7b673901bb1f20ddd779117e93b148825cb28ce1d0.mp3', '_fu': 'http:\\/\\/app.myoperator.co\\/audio\\/e673ba2e1747cb32960b19275f459c1869776c7b673901bb1f20ddd7 79117e93b148825cb28ce1d0', '_ns': '0', '_su': 1, '_dn': 'sales', '_di': '5cd40f6559784843', '_pm': [{'ky': 'ui', 'vl': 'd5.1594969927.2496720'}, {'ky': 'is', 'vl': '0'}, {'ky': 'vt', 'vl': '2'}, {'ky': 'ic', 'vl': '1'}, {'ky': 'ia', 'vl': '0'}, {'ky': 'ib', 'vl': '1'}], '_cn': [{'_tx': 'asdfg', '_cd': '5f114f54741cc966', '_ce': 1594969940, '_id': '5cd40f6556f2f124', '_na': 'Sumit', '_em': 'sumit.arya@myoperator.co', '_ex': '10', '_ct': '8586848544', '_nr': '+918586848544'}], '_ld': [{'_rst': '2020-07-17 07:12:28', '_ds': 'ANSWER', '_did': '1161568087', '_rr': [{'_id': '5cd40f6556f2f124', '_na': 'Sumit', '_em': 'sumit.arya@myoperator.co', '_ex': '10', '_ct': '8586848544', '_nr': '+918586848544'}], '_tt': [], '_su': '1', '_st': 1594969959, '_et': 1594969968, '_dr': '00:00:09', '_ac': 'received'}], '_an': 0, '_bp': [{'_tm': [{'type': 'local', 'use': 1}], '_ti': [{'type': 'local', 'use': 0}], '_ta': [{'type': 'local', 'use': 0}], '_tr': [{'type': 'local', 'use': 1}]}], '_us': [{'ky': '5cd40f6556f2f124', 'vl': 'received'}], '_tc': [{'ye': '5cd40f6556f2f124', 'yf': 9}], '_ri': '', '_ji': '', '_ivid': '', '_cri': ''} |
curl -X POST http://your-service-url.com/webhook.php -d myoperator=<call log> |
$call_data = $_POST['myoperator']; /* The data is in this string format: {"_ai": "xyz", "_ci": "123abc", ...} Hence you should decode it to array to get particular call data */ $call_data_array = json_decode($call_data, true); // get caller's number $caller_number = $call_data_array['_cr']; /* Remember, POST request doesn't mean you won't get query parameters. If you have set Query string parameters, you can still get them here too. */ $caller_numer = $_GET['caller_number']; |
["my-super-secret-token: abc123def"] |
curl -X POST http://your-service-url.com/webhook.php -H 'my-super-secret-token: abc123def' |
$my_secret_header = $_SERVER['HTTP_my-super-secret-token']; if( $my_secret_header == 'abc123def' ) { // Request come from MyOperator webhook echo "Good"; } else { // Request didn't came from MyOperator webhook echo "Bad"; } |
{"username": <your username>, "password": <password>} |
{"username": "admin", "password": "123456"} |
curl -u admin:123456 http://your-service-url.com/webhook.php |
curl -XGET http://your-service-url.com/webhook.php?caller_number=+919876543210 |
$caller_number = $_GET['caller_number']; echo $caller_number; //+919876543210 |
curl -XPOST http://your-service-url.com/webhook.php?caller_number=+919876543210 -d myoperator= <call log> |
Log Field name |
Description |
Example |
_an |
Is Anonymous User |
1=yes, 0=no |
_ai |
Call log id (unique for each call) |
abcdef123 |
_cl |
Caller's number (formatted) |
+919876543210 |
_cr |
Caller's number (raw) |
919876543210 |
_cm |
Caller's contact name (if found) |
My Contact |
_cy |
Caller's contact country code* |
My Contact |
_ev |
Call event type (1=incoming/2=outgoing) |
1= incoming, 2= outgoing |
_fu |
Call recording file link |
|
_fn |
Call recording file name |
abc.mp3 |
_ts |
Log timestamp (unix epoch) |
1572505408 |
_ms |
Log timestamp (unix epoch) in milliseconds |
1572505408000 |
_st |
Call start time |
1572505408 |
_et |
Call end time |
1572505438 |
_ss |
diff b/w call end time and start time in seconds |
31131 |
_ns |
Notification Status |
1 = clickocall, 2 = obd, 3 = webrtc |
_se |
call location* |
RJ,IN |
_su |
Status of call |
1 =connected, 2 =missed, 3 =voicemail |
_so |
Call source (IVR/Mobile) |
1 =IVR, 2 =Mobile |
_ci |
Company id |
abc123 |
_dr |
Call duration (hh:mm:ss) |
00:06:23 |
_drm |
Call duration (in minutes) |
6.38 |
_di |
Department id |
5c80e49e7d452564 |
_dn |
Department name |
sales |
_ty |
Call log type |
1 =call, 2 =sms |
_ri |
Reference id (obd v2 calls) |
abcdef123 |
_ji |
Obd v2 job id |
abcdef123 - obd v2 call, empty - otherwise |
_ivid |
Public IVR ID |
abcdef123 |
_cri |
Client reference id (obd v2 calls) |
abcdef123 - obd v2 call, empty - otherwise |
_ld._rst |
Ring start time(In GMT) |
2019-12-04 11:22:30 |
_ld._rr._na |
Agent Name |
Agent Sharma |
_ld._rr._id |
Agent id |
abcdef123 |
_ld._rr._em |
Agent email id |
|
_ld._rr._ct |
Agent contact number |
9876543210 |
_ld._rr._nr |
Agent contact number with country code |
+919876543210 |
_ld._su |
Status of call |
1= connected, 2= missed, 3=voicemail, 4=success |
_ld._st |
Call start time |
1572424745 |
_ld._et |
Call end time |
1572424750 |
_ld._dr |
Call duration |
00:00:05 |
_ld._ds |
Dial String |
ANSWER/NOANSWER/CANCEL |
_ld._did |
Last Caller Id (used in callback) |
abcdef123 |
_ld._ac |
Call status |
received/missed/transferred |
_ld._tt._na |
Transferred Agent Name |
Agent Sharma |
_ld._tt._id |
Transferred Agent id |
abcdef123 |
_ld._tt._em |
Transferred Agent email id |
|
_ld._tt._ct |
Transferred Agent contact number |
9876543210 |
_ld._tt._nr |
Transferred Agent contact number with country code |
+919876543210 |
_pm._ky |
ui = Call UID |
s4.1572424727.994 |
_pm._ky |
is = Is Call starred |
0 = not starred, 1 = starred |
_pm._ky |
ic = Is Commented |
1 = yes, 0 = no |
_pm._ky |
ia = Is archived log |
1 = yes, 0 = no |
_pm._ky |
ib = Is Billable log |
1 = yes, 0 = no |
_pm._ky |
vt = View Type |
1 - personal, 2 - public/corporate |