mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-14 20:59:53 +05:00
INCOMPLETE - shared cgrates configuration for three different scenarios - every scenario has its own opensips configuration. For more info check README or read comments inside the configuration - added script for converting unix time to suitable Event-Timestamp format - added a dictionary.opensips entry for making Credit-Control diameter requests possible
11 lines
266 B
Bash
Executable File
11 lines
266 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# To be used inside opensips.cfg to convert unix time
|
|
# to 32bit before sending it inside a diameter request
|
|
# payload as Event-Timestamp.
|
|
|
|
read unix_time
|
|
ntp_offset=2208988800
|
|
ntp_time=$((unix_time + ntp_offset))
|
|
printf "%08x" "$ntp_time" | xxd -r -p
|