diff --git a/voice-client/files/usr/libexec/rpcd/voice.asterisk b/voice-client/files/usr/libexec/rpcd/voice.asterisk index f9f17635f..833623ab8 100755 --- a/voice-client/files/usr/libexec/rpcd/voice.asterisk +++ b/voice-client/files/usr/libexec/rpcd/voice.asterisk @@ -104,11 +104,13 @@ case "$1" in from="$(echo $line | cut -d',' -f2)" to="$(echo $line | cut -d',' -f3)" callok=0 - uci show voice_client | grep user | grep -wq "$from" && callok=1 - uci show voice_client | grep user | grep -wq "$to" && callok=1 + uci show voice_client | grep user | grep -wq "$from\|$to" && callok=1 [ $callok -eq 0 ] && continue account="$(echo $line | cut -d',' -f4)" - uci show voice_client | grep sip_service_provider | grep -wq "$account" || continue + actok=0 + uci show voice_client | grep sip_service_provider | grep -wq "$account" && actok=1 + [ "$account" == "call_line" ] && actok=1 + [ $actok -eq 0 ] && continue timestart="$(echo $line | awk -F',' '{print $(NF-8)}')" timend="$(echo $line | awk -F',' '{print $(NF-6)}')" startdate=$(date -u -d "$timestart" +"%s")