mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-14 21:10:11 +01:00
voice-client: adapt voice.asterisk to incoming calls ending up in call_line context
This commit is contained in:
parent
320a49da86
commit
bcf34ec28a
1 changed files with 5 additions and 3 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue