
рджреБрд░реНрдШрдЯрдирд╛рдУрдВ рдФрд░ рдЕрдиреНрдп рдШрдЯрдирд╛рдУрдВ рдХреЗ рдорд╛рдорд▓реЗ рдореЗрдВ рдПрдХ рдЖрдкрд╛рддрдХрд╛рд▓реАрди рдЖрд╡рд╛рдЬ рдЪреЗрддрд╛рд╡рдиреА рдкреНрд░рдгрд╛рд▓реА рдмрдирд╛рдирд╛ рдЖрд╡рд╢реНрдпрдХ рд╣реИред рдХрд╛рд░реНрдп рдХреА рдпреЛрдЬрдирд╛ рдЗрд╕ рдкреНрд░рдХрд╛рд░ рд╣реИ:
рдкреНрд░рднрд╛рд░реА рд╡реНрдпрдХреНрддрд┐ рдПрдХ рд╡рд┐рд╢рд┐рд╖реНрдЯ рдлреЛрди рдирдВрдмрд░ рдкрд░ рдХреЙрд▓ рдХрд░рддрд╛ рд╣реИ, рдПрдХ рдХреЛрдб рдбрд╛рдпрд▓ рдХрд░рддрд╛ рд╣реИ рдФрд░ рдЕрдзрд┐рд╕реВрдЪрдирд╛ рдкреНрд░рдгрд╛рд▓реА рдХреЗ рд╡реЙрдпрд╕ рдореЗрдиреВ рдореЗрдВ рдЬрд╛рддрд╛ рд╣реИред рд╡рд╣рд╛рдВ рдЙрд╕реЗ рдПрдХ рд╕рдВрджреЗрд╢ рд░рд┐рдХреЙрд░реНрдб рдХрд░рдиреЗ, рдЙрд╕реЗ рд╕реБрдирдиреЗ, рд╕рд╣реЗрдЬрдиреЗ рдХреЗ рд▓рд┐рдП рдЖрдордВрддреНрд░рд┐рдд рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ, рдФрд░ рд╕рд┐рд╕реНрдЯрдо рдХреЛ рдлрд╝рд╛рдЗрд▓ рдореЗрдВ рдкреВрд░реНрд╡рдирд┐рд░реНрдзрд╛рд░рд┐рдд рдлреЛрди рдирдВрдмрд░реЛрдВ рдкрд░ 5 рдЯреЗрд▓реАрдлреЛрди рд▓рд╛рдЗрдиреЛрдВ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рдХреЗ рдПрдХ рд╕рд╛рде рдХреЙрд▓ рдХрд░рдирд╛ рдЪрд╛рд╣рд┐рдПред рдЗрд╕рдХреЗ рдЕрд▓рд╛рд╡рд╛, рдпрджрд┐ рдЖрдкрдиреЗ рдлреЛрди рдирд╣реАрдВ рдЙрдард╛рдпрд╛ рд╣реИ, рддреЛ рдЕрдзрд┐рд╕реВрдЪрд┐рдд рд╡реНрдпрдХреНрддрд┐ рдХреЛ рд╡рд╛рдкрд╕ рдмреБрд▓рд╛рдПрдВред рдЕрдзрд┐рд╕реВрдЪрдирд╛ рдХреЗ рдЕрдВрдд рдореЗрдВ, рдлреЛрди рдирдВрдмрд░ рд╡рд╛рд▓реА рдПрдХ рдлрд╝рд╛рдЗрд▓ рдЬрд┐рд╕рдХреЗ рдорд╛рдзреНрдпрдо рд╕реЗ рд╡реЗ рдмрд┐рд▓реНрдХреБрд▓ рдирд╣реАрдВ рдорд┐рд▓ рд╕рдХрддреЗ рдереЗ, рд╕рдВрдХреЗрддрд┐рдд рдореЗрд▓ рдкрд░ рдЖрдирд╛ рдЪрд╛рд╣рд┐рдПред
рдпрджрд┐ рдЖрдк рд░реБрдЪрд┐ рд░рдЦрддреЗ рд╣реИрдВ рдХрд┐ рдпрд╣ рдХреИрд╕реЗ рдХрд╛рдо рдХрд░рддрд╛ рд╣реИ, рддреЛ рдореИрдВ рдПрдХ рдмрд┐рд▓реНрд▓реА рдХреЗ рд▓рд┐рдП рдкреВрдЫрддрд╛ рд╣реВрдВред
рддрд╛рд░рд╛рдВрдХрди рдореЗрдВ рдХреЙрд▓ рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдХреЙрд▓ рдлрд╛рдЗрд▓реЗрдВ рд╣реИрдВред рдЬрдм рдПрдХ рдлрд╝рд╛рдЗрд▓ рдХреЛ
/ var / spool / рддрд╛рд░рд╛рдВрдХрди / рдЖрдЙрдЯрдЧреЛрдЗрдВрдЧ рдирд┐рд░реНрджреЗрд╢рд┐рдХрд╛ рдореЗрдВ рд░рдЦрд╛ рдЬрд╛рддрд╛ рд╣реИ, рддреЛ рдпрд╣ рд╕реНрд╡рдЪрд╛рд▓рд┐рдд рд░реВрдк рд╕реЗ рдХреЙрд▓ рдХрд░рддрд╛ рд╣реИред рд╕рдмрд╕реЗ рдкрд╣рд▓реЗ, рдЖрдЗрдП рдЬрд╛рдиреЗрдВ рдХрд┐ рдХреМрди рд╕реА рдХреЙрд▓ рдлрд╛рдЗрд▓реЗрдВ рд╣реИрдВ рдФрд░ рдЙрдирдХреЗ рдЕрдВрджрд░ рдХреНрдпрд╛ рд╣реИред
рдкреНрд░рддреНрдпреЗрдХ рдлрд╝рд╛рдЗрд▓ рдХреЗ рдЕрдВрджрд░ рдХрдИ рдЪрд░ рд╣реЛ рд╕рдХрддреЗ рд╣реИрдВ:
Channel: -
CallerID: Name - ,
MaxRetries: - , 0, 1 .
RetryTime: - , , , - , - ( ). .
WaitTime: - . 60 , , .
Account:
- тАЬaccount codeтАЭ CDR,
Context: <context-name>
- ( )
Extension: - Extension .
Priority: - Extension, .
Set:
- .
Application:
- Asterisk, . - context, extension priority.
Data:
- . .
Archive: Yes/No
тАУ .call "outgoing_done" "Status: ", : Completed, Expired Failed. .
, :
Channel: Local/11%1%@from-internal/n
CallerID: <5102>
MaxRetries: 4
RetryTime: 60
WaitTime: 60
Context: startmessage
Extension: 5102
Priority: 1
. Local CDR ( - ). , 5 60 , 60 . - startmessage. extension 5102, 1.
11, . FreePBX Outbound route 11 . " " .
/etc/asterisk/extensions_custom.conf ( Elastix)
exten => 9876,1,Goto(testcontext,s,1)
, 9876 , .
2 . , . , , .
:
[testcontext]
exten => s,1,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/privet-zapis)
exten => s,n,Record(obzvon-message.wav)
exten => s,n,Playback(/var/lib/asterisk/sounds/obzvon-message)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/zapusk)
exten => s,n,WaitExten(10)
exten => s,n,Hangup()
exten => 999,1,System(echo "" > /var/log/asterisk/cdr-custom/Simple.csv)
exten => 999,n,System(/mnt/script/parser.bash /mnt/CallCenter/telefony.txt /mnt/script/main.call)
exten => 999,n,System(/mnt/script/startcall.bash)
exten => 0,1, Hangup()
- , 2 , /var/lib/asterisk/sounds/custom/privet-zapis , obzvon-message.wav , /var/lib/asterisk/sounds/custom/zapusk . 10 . 999, , - .
999, /var/log/asterisk/cdr-custom/Simple.csv ( ), /mnt/script/parser.bash , /mnt/CallCenter/telefony.txt - ( ), /mnt/script/main.call - call . call . /mnt/script/startcall.bash .
windows , .. , Notepad ++, Windows.
CDR - /etc/asterisk/cdr_custom.conf :
[mappings]
Simple.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},$$
.
/mnt/script/parser.bash :
#!/bin/bash # - , FILE=`cat $1 | sort -u` for I in $FILE do if [ -n "$I" ] then sed -e 's/\%1\%/'$I'/g' < $2 >> /mnt/script/tmp/$I.call fi done;
call %1%, /mnt/script/tmp/ " ".call .
/mnt/script/startcall.bash :
#!/bin/bash # - call OutDir="/mnt/script/tmp/" # call inDir="/var/spool/asterisk/outgoing/" # call ( ) CountIn=5; movefile () # inDir { CounFileInDir=$(find $inDir -name "*.call" | wc -l); # inDir - CountIn, . if (("$CounFileInDir" < "$CountIn")); then mv $I $inDir # 30 . else sleep 30; movefile; fi } # *.call OutDir. FILE=`find $OutDir -name "*.call"` # FILE, , movefile. for I in $FILE do if [ -n "$I" ] then movefile; fi done; # - . /mnt/script/result.bash
/mnt/script/result.bash :
#!/bin/bash # telefoni=/mnt/CallCenter/telefony.txt # . logfile=/var/log/asterisk/cdr-custom/Simple.csv; # . cp $telefoni telefoni.tmp # FILE . FILE=`cat telefoni.tmp | sort -u | uniq` # FILE , - logfile ANSWERED. # startmessage, , #, 11 ( ) @ temp for I in $FILE do if [ -n "$I" ] then rm temp.temp cat $logfile | grep "ANSWERED" | grep "startmessage" | grep $I | awk 'BEGIN{FS=","}{print $5}' | sed -e 's/.*\/11//g' -e 's/\@.*//g' | uniq >> temp$ fi done; # FILE1 temp.temp, . FILE1=`cat temp.temp | sort -u | uniq` # . for J in $FILE1 do if [ -n "$J" ] then cat telefoni.tmp | grep -v $J > telefoni1.tmp mv telefoni1.tmp telefoni.tmp fi done; rm temp.temp; cat telefoni.tmp | mail -s Ne_Dozvon testmail@example.com
- . Inbound routes CID . - , , . DID . destination Misc Destinations . Misc Destinations, 9876 dial. ( extensions_custom.conf? )
, , , , . , .
Channel: -
CallerID: Name - ,
MaxRetries: - , 0, 1 .
RetryTime: - , , , - , - ( ). .
WaitTime: - . 60 , , .
Account:
- тАЬaccount codeтАЭ CDR,
Context: <context-name>
- ( )
Extension: - Extension .
Priority: - Extension, .
Set:
- .
Application:
- Asterisk, . - context, extension priority.
Data:
- . .
Archive: Yes/No
тАУ .call "outgoing_done" "Status: ", : Completed, Expired Failed. .
, :
Channel: Local/11%1%@from-internal/n
CallerID: <5102>
MaxRetries: 4
RetryTime: 60
WaitTime: 60
Context: startmessage
Extension: 5102
Priority: 1
. Local CDR ( - ). , 5 60 , 60 . - startmessage. extension 5102, 1.
11, . FreePBX Outbound route 11 . " " .
/etc/asterisk/extensions_custom.conf ( Elastix)
exten => 9876,1,Goto(testcontext,s,1)
, 9876 , .
2 . , . , , .
:
[testcontext]
exten => s,1,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/privet-zapis)
exten => s,n,Record(obzvon-message.wav)
exten => s,n,Playback(/var/lib/asterisk/sounds/obzvon-message)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/zapusk)
exten => s,n,WaitExten(10)
exten => s,n,Hangup()
exten => 999,1,System(echo "" > /var/log/asterisk/cdr-custom/Simple.csv)
exten => 999,n,System(/mnt/script/parser.bash /mnt/CallCenter/telefony.txt /mnt/script/main.call)
exten => 999,n,System(/mnt/script/startcall.bash)
exten => 0,1, Hangup()
- , 2 , /var/lib/asterisk/sounds/custom/privet-zapis , obzvon-message.wav , /var/lib/asterisk/sounds/custom/zapusk . 10 . 999, , - .
999, /var/log/asterisk/cdr-custom/Simple.csv ( ), /mnt/script/parser.bash , /mnt/CallCenter/telefony.txt - ( ), /mnt/script/main.call - call . call . /mnt/script/startcall.bash .
windows , .. , Notepad ++, Windows.
CDR - /etc/asterisk/cdr_custom.conf :
[mappings]
Simple.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},$$
.
/mnt/script/parser.bash :
#!/bin/bash # - , FILE=`cat $1 | sort -u` for I in $FILE do if [ -n "$I" ] then sed -e 's/\%1\%/'$I'/g' < $2 >> /mnt/script/tmp/$I.call fi done;
call %1%, /mnt/script/tmp/ " ".call .
/mnt/script/startcall.bash :
#!/bin/bash # - call OutDir="/mnt/script/tmp/" # call inDir="/var/spool/asterisk/outgoing/" # call ( ) CountIn=5; movefile () # inDir { CounFileInDir=$(find $inDir -name "*.call" | wc -l); # inDir - CountIn, . if (("$CounFileInDir" < "$CountIn")); then mv $I $inDir # 30 . else sleep 30; movefile; fi } # *.call OutDir. FILE=`find $OutDir -name "*.call"` # FILE, , movefile. for I in $FILE do if [ -n "$I" ] then movefile; fi done; # - . /mnt/script/result.bash
/mnt/script/result.bash :
#!/bin/bash # telefoni=/mnt/CallCenter/telefony.txt # . logfile=/var/log/asterisk/cdr-custom/Simple.csv; # . cp $telefoni telefoni.tmp # FILE . FILE=`cat telefoni.tmp | sort -u | uniq` # FILE , - logfile ANSWERED. # startmessage, , #, 11 ( ) @ temp for I in $FILE do if [ -n "$I" ] then rm temp.temp cat $logfile | grep "ANSWERED" | grep "startmessage" | grep $I | awk 'BEGIN{FS=","}{print $5}' | sed -e 's/.*\/11//g' -e 's/\@.*//g' | uniq >> temp$ fi done; # FILE1 temp.temp, . FILE1=`cat temp.temp | sort -u | uniq` # . for J in $FILE1 do if [ -n "$J" ] then cat telefoni.tmp | grep -v $J > telefoni1.tmp mv telefoni1.tmp telefoni.tmp fi done; rm temp.temp; cat telefoni.tmp | mail -s Ne_Dozvon testmail@example.com
- . Inbound routes CID . - , , . DID . destination Misc Destinations . Misc Destinations, 9876 dial. ( extensions_custom.conf? )
, , , , . , .
Channel: -
CallerID: Name - ,
MaxRetries: - , 0, 1 .
RetryTime: - , , , - , - ( ). .
WaitTime: - . 60 , , .
Account:
- тАЬaccount codeтАЭ CDR,
Context: <context-name>
- ( )
Extension: - Extension .
Priority: - Extension, .
Set:
- .
Application:
- Asterisk, . - context, extension priority.
Data:
- . .
Archive: Yes/No
тАУ .call "outgoing_done" "Status: ", : Completed, Expired Failed. .
, :
Channel: Local/11%1%@from-internal/n
CallerID: <5102>
MaxRetries: 4
RetryTime: 60
WaitTime: 60
Context: startmessage
Extension: 5102
Priority: 1
. Local CDR ( - ). , 5 60 , 60 . - startmessage. extension 5102, 1.
11, . FreePBX Outbound route 11 . " " .
/etc/asterisk/extensions_custom.conf ( Elastix)
exten => 9876,1,Goto(testcontext,s,1)
, 9876 , .
2 . , . , , .
:
[testcontext]
exten => s,1,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/privet-zapis)
exten => s,n,Record(obzvon-message.wav)
exten => s,n,Playback(/var/lib/asterisk/sounds/obzvon-message)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/zapusk)
exten => s,n,WaitExten(10)
exten => s,n,Hangup()
exten => 999,1,System(echo "" > /var/log/asterisk/cdr-custom/Simple.csv)
exten => 999,n,System(/mnt/script/parser.bash /mnt/CallCenter/telefony.txt /mnt/script/main.call)
exten => 999,n,System(/mnt/script/startcall.bash)
exten => 0,1, Hangup()
- , 2 , /var/lib/asterisk/sounds/custom/privet-zapis , obzvon-message.wav , /var/lib/asterisk/sounds/custom/zapusk . 10 . 999, , - .
999, /var/log/asterisk/cdr-custom/Simple.csv ( ), /mnt/script/parser.bash , /mnt/CallCenter/telefony.txt - ( ), /mnt/script/main.call - call . call . /mnt/script/startcall.bash .
windows , .. , Notepad ++, Windows.
CDR - /etc/asterisk/cdr_custom.conf :
[mappings]
Simple.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},$$
.
/mnt/script/parser.bash :
#!/bin/bash # - , FILE=`cat $1 | sort -u` for I in $FILE do if [ -n "$I" ] then sed -e 's/\%1\%/'$I'/g' < $2 >> /mnt/script/tmp/$I.call fi done;
call %1%, /mnt/script/tmp/ " ".call .
/mnt/script/startcall.bash :
#!/bin/bash # - call OutDir="/mnt/script/tmp/" # call inDir="/var/spool/asterisk/outgoing/" # call ( ) CountIn=5; movefile () # inDir { CounFileInDir=$(find $inDir -name "*.call" | wc -l); # inDir - CountIn, . if (("$CounFileInDir" < "$CountIn")); then mv $I $inDir # 30 . else sleep 30; movefile; fi } # *.call OutDir. FILE=`find $OutDir -name "*.call"` # FILE, , movefile. for I in $FILE do if [ -n "$I" ] then movefile; fi done; # - . /mnt/script/result.bash
/mnt/script/result.bash :
#!/bin/bash # telefoni=/mnt/CallCenter/telefony.txt # . logfile=/var/log/asterisk/cdr-custom/Simple.csv; # . cp $telefoni telefoni.tmp # FILE . FILE=`cat telefoni.tmp | sort -u | uniq` # FILE , - logfile ANSWERED. # startmessage, , #, 11 ( ) @ temp for I in $FILE do if [ -n "$I" ] then rm temp.temp cat $logfile | grep "ANSWERED" | grep "startmessage" | grep $I | awk 'BEGIN{FS=","}{print $5}' | sed -e 's/.*\/11//g' -e 's/\@.*//g' | uniq >> temp$ fi done; # FILE1 temp.temp, . FILE1=`cat temp.temp | sort -u | uniq` # . for J in $FILE1 do if [ -n "$J" ] then cat telefoni.tmp | grep -v $J > telefoni1.tmp mv telefoni1.tmp telefoni.tmp fi done; rm temp.temp; cat telefoni.tmp | mail -s Ne_Dozvon testmail@example.com
- . Inbound routes CID . - , , . DID . destination Misc Destinations . Misc Destinations, 9876 dial. ( extensions_custom.conf? )
, , , , . , .
Channel: -
CallerID: Name - ,
MaxRetries: - , 0, 1 .
RetryTime: - , , , - , - ( ). .
WaitTime: - . 60 , , .
Account:
- тАЬaccount codeтАЭ CDR,
Context: <context-name>
- ( )
Extension: - Extension .
Priority: - Extension, .
Set:
- .
Application:
- Asterisk, . - context, extension priority.
Data:
- . .
Archive: Yes/No
тАУ .call "outgoing_done" "Status: ", : Completed, Expired Failed. .
, :
Channel: Local/11%1%@from-internal/n
CallerID: <5102>
MaxRetries: 4
RetryTime: 60
WaitTime: 60
Context: startmessage
Extension: 5102
Priority: 1
. Local CDR ( - ). , 5 60 , 60 . - startmessage. extension 5102, 1.
11, . FreePBX Outbound route 11 . " " .
/etc/asterisk/extensions_custom.conf ( Elastix)
exten => 9876,1,Goto(testcontext,s,1)
, 9876 , .
2 . , . , , .
:
[testcontext]
exten => s,1,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/privet-zapis)
exten => s,n,Record(obzvon-message.wav)
exten => s,n,Playback(/var/lib/asterisk/sounds/obzvon-message)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/zapusk)
exten => s,n,WaitExten(10)
exten => s,n,Hangup()
exten => 999,1,System(echo "" > /var/log/asterisk/cdr-custom/Simple.csv)
exten => 999,n,System(/mnt/script/parser.bash /mnt/CallCenter/telefony.txt /mnt/script/main.call)
exten => 999,n,System(/mnt/script/startcall.bash)
exten => 0,1, Hangup()
- , 2 , /var/lib/asterisk/sounds/custom/privet-zapis , obzvon-message.wav , /var/lib/asterisk/sounds/custom/zapusk . 10 . 999, , - .
999, /var/log/asterisk/cdr-custom/Simple.csv ( ), /mnt/script/parser.bash , /mnt/CallCenter/telefony.txt - ( ), /mnt/script/main.call - call . call . /mnt/script/startcall.bash .
windows , .. , Notepad ++, Windows.
CDR - /etc/asterisk/cdr_custom.conf :
[mappings]
Simple.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},$$
.
/mnt/script/parser.bash :
#!/bin/bash # - , FILE=`cat $1 | sort -u` for I in $FILE do if [ -n "$I" ] then sed -e 's/\%1\%/'$I'/g' < $2 >> /mnt/script/tmp/$I.call fi done;
call %1%, /mnt/script/tmp/ " ".call .
/mnt/script/startcall.bash :
#!/bin/bash # - call OutDir="/mnt/script/tmp/" # call inDir="/var/spool/asterisk/outgoing/" # call ( ) CountIn=5; movefile () # inDir { CounFileInDir=$(find $inDir -name "*.call" | wc -l); # inDir - CountIn, . if (("$CounFileInDir" < "$CountIn")); then mv $I $inDir # 30 . else sleep 30; movefile; fi } # *.call OutDir. FILE=`find $OutDir -name "*.call"` # FILE, , movefile. for I in $FILE do if [ -n "$I" ] then movefile; fi done; # - . /mnt/script/result.bash
/mnt/script/result.bash :
#!/bin/bash # telefoni=/mnt/CallCenter/telefony.txt # . logfile=/var/log/asterisk/cdr-custom/Simple.csv; # . cp $telefoni telefoni.tmp # FILE . FILE=`cat telefoni.tmp | sort -u | uniq` # FILE , - logfile ANSWERED. # startmessage, , #, 11 ( ) @ temp for I in $FILE do if [ -n "$I" ] then rm temp.temp cat $logfile | grep "ANSWERED" | grep "startmessage" | grep $I | awk 'BEGIN{FS=","}{print $5}' | sed -e 's/.*\/11//g' -e 's/\@.*//g' | uniq >> temp$ fi done; # FILE1 temp.temp, . FILE1=`cat temp.temp | sort -u | uniq` # . for J in $FILE1 do if [ -n "$J" ] then cat telefoni.tmp | grep -v $J > telefoni1.tmp mv telefoni1.tmp telefoni.tmp fi done; rm temp.temp; cat telefoni.tmp | mail -s Ne_Dozvon testmail@example.com
- . Inbound routes CID . - , , . DID . destination Misc Destinations . Misc Destinations, 9876 dial. ( extensions_custom.conf? )
, , , , . , .
Channel: -
CallerID: Name - ,
MaxRetries: - , 0, 1 .
RetryTime: - , , , - , - ( ). .
WaitTime: - . 60 , , .
Account:
- тАЬaccount codeтАЭ CDR,
Context: <context-name>
- ( )
Extension: - Extension .
Priority: - Extension, .
Set:
- .
Application:
- Asterisk, . - context, extension priority.
Data:
- . .
Archive: Yes/No
тАУ .call "outgoing_done" "Status: ", : Completed, Expired Failed. .
, :
Channel: Local/11%1%@from-internal/n
CallerID: <5102>
MaxRetries: 4
RetryTime: 60
WaitTime: 60
Context: startmessage
Extension: 5102
Priority: 1
. Local CDR ( - ). , 5 60 , 60 . - startmessage. extension 5102, 1.
11, . FreePBX Outbound route 11 . " " .
/etc/asterisk/extensions_custom.conf ( Elastix)
exten => 9876,1,Goto(testcontext,s,1)
, 9876 , .
2 . , . , , .
:
[testcontext]
exten => s,1,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/privet-zapis)
exten => s,n,Record(obzvon-message.wav)
exten => s,n,Playback(/var/lib/asterisk/sounds/obzvon-message)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/zapusk)
exten => s,n,WaitExten(10)
exten => s,n,Hangup()
exten => 999,1,System(echo "" > /var/log/asterisk/cdr-custom/Simple.csv)
exten => 999,n,System(/mnt/script/parser.bash /mnt/CallCenter/telefony.txt /mnt/script/main.call)
exten => 999,n,System(/mnt/script/startcall.bash)
exten => 0,1, Hangup()
- , 2 , /var/lib/asterisk/sounds/custom/privet-zapis , obzvon-message.wav , /var/lib/asterisk/sounds/custom/zapusk . 10 . 999, , - .
999, /var/log/asterisk/cdr-custom/Simple.csv ( ), /mnt/script/parser.bash , /mnt/CallCenter/telefony.txt - ( ), /mnt/script/main.call - call . call . /mnt/script/startcall.bash .
windows , .. , Notepad ++, Windows.
CDR - /etc/asterisk/cdr_custom.conf :
[mappings]
Simple.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},$$
.
/mnt/script/parser.bash :
#!/bin/bash # - , FILE=`cat $1 | sort -u` for I in $FILE do if [ -n "$I" ] then sed -e 's/\%1\%/'$I'/g' < $2 >> /mnt/script/tmp/$I.call fi done;
call %1%, /mnt/script/tmp/ " ".call .
/mnt/script/startcall.bash :
#!/bin/bash # - call OutDir="/mnt/script/tmp/" # call inDir="/var/spool/asterisk/outgoing/" # call ( ) CountIn=5; movefile () # inDir { CounFileInDir=$(find $inDir -name "*.call" | wc -l); # inDir - CountIn, . if (("$CounFileInDir" < "$CountIn")); then mv $I $inDir # 30 . else sleep 30; movefile; fi } # *.call OutDir. FILE=`find $OutDir -name "*.call"` # FILE, , movefile. for I in $FILE do if [ -n "$I" ] then movefile; fi done; # - . /mnt/script/result.bash
/mnt/script/result.bash :
#!/bin/bash # telefoni=/mnt/CallCenter/telefony.txt # . logfile=/var/log/asterisk/cdr-custom/Simple.csv; # . cp $telefoni telefoni.tmp # FILE . FILE=`cat telefoni.tmp | sort -u | uniq` # FILE , - logfile ANSWERED. # startmessage, , #, 11 ( ) @ temp for I in $FILE do if [ -n "$I" ] then rm temp.temp cat $logfile | grep "ANSWERED" | grep "startmessage" | grep $I | awk 'BEGIN{FS=","}{print $5}' | sed -e 's/.*\/11//g' -e 's/\@.*//g' | uniq >> temp$ fi done; # FILE1 temp.temp, . FILE1=`cat temp.temp | sort -u | uniq` # . for J in $FILE1 do if [ -n "$J" ] then cat telefoni.tmp | grep -v $J > telefoni1.tmp mv telefoni1.tmp telefoni.tmp fi done; rm temp.temp; cat telefoni.tmp | mail -s Ne_Dozvon testmail@example.com
- . Inbound routes CID . - , , . DID . destination Misc Destinations . Misc Destinations, 9876 dial. ( extensions_custom.conf? )
, , , , . , .
Channel: -
CallerID: Name - ,
MaxRetries: - , 0, 1 .
RetryTime: - , , , - , - ( ). .
WaitTime: - . 60 , , .
Account:
- тАЬaccount codeтАЭ CDR,
Context: <context-name>
- ( )
Extension: - Extension .
Priority: - Extension, .
Set:
- .
Application:
- Asterisk, . - context, extension priority.
Data:
- . .
Archive: Yes/No
тАУ .call "outgoing_done" "Status: ", : Completed, Expired Failed. .
, :
Channel: Local/11%1%@from-internal/n
CallerID: <5102>
MaxRetries: 4
RetryTime: 60
WaitTime: 60
Context: startmessage
Extension: 5102
Priority: 1
. Local CDR ( - ). , 5 60 , 60 . - startmessage. extension 5102, 1.
11, . FreePBX Outbound route 11 . " " .
/etc/asterisk/extensions_custom.conf ( Elastix)
exten => 9876,1,Goto(testcontext,s,1)
, 9876 , .
2 . , . , , .
:
[testcontext]
exten => s,1,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/privet-zapis)
exten => s,n,Record(obzvon-message.wav)
exten => s,n,Playback(/var/lib/asterisk/sounds/obzvon-message)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/zapusk)
exten => s,n,WaitExten(10)
exten => s,n,Hangup()
exten => 999,1,System(echo "" > /var/log/asterisk/cdr-custom/Simple.csv)
exten => 999,n,System(/mnt/script/parser.bash /mnt/CallCenter/telefony.txt /mnt/script/main.call)
exten => 999,n,System(/mnt/script/startcall.bash)
exten => 0,1, Hangup()
- , 2 , /var/lib/asterisk/sounds/custom/privet-zapis , obzvon-message.wav , /var/lib/asterisk/sounds/custom/zapusk . 10 . 999, , - .
999, /var/log/asterisk/cdr-custom/Simple.csv ( ), /mnt/script/parser.bash , /mnt/CallCenter/telefony.txt - ( ), /mnt/script/main.call - call . call . /mnt/script/startcall.bash .
windows , .. , Notepad ++, Windows.
CDR - /etc/asterisk/cdr_custom.conf :
[mappings]
Simple.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},$$
.
/mnt/script/parser.bash :
#!/bin/bash # - , FILE=`cat $1 | sort -u` for I in $FILE do if [ -n "$I" ] then sed -e 's/\%1\%/'$I'/g' < $2 >> /mnt/script/tmp/$I.call fi done;
call %1%, /mnt/script/tmp/ " ".call .
/mnt/script/startcall.bash :
#!/bin/bash # - call OutDir="/mnt/script/tmp/" # call inDir="/var/spool/asterisk/outgoing/" # call ( ) CountIn=5; movefile () # inDir { CounFileInDir=$(find $inDir -name "*.call" | wc -l); # inDir - CountIn, . if (("$CounFileInDir" < "$CountIn")); then mv $I $inDir # 30 . else sleep 30; movefile; fi } # *.call OutDir. FILE=`find $OutDir -name "*.call"` # FILE, , movefile. for I in $FILE do if [ -n "$I" ] then movefile; fi done; # - . /mnt/script/result.bash
/mnt/script/result.bash :
#!/bin/bash # telefoni=/mnt/CallCenter/telefony.txt # . logfile=/var/log/asterisk/cdr-custom/Simple.csv; # . cp $telefoni telefoni.tmp # FILE . FILE=`cat telefoni.tmp | sort -u | uniq` # FILE , - logfile ANSWERED. # startmessage, , #, 11 ( ) @ temp for I in $FILE do if [ -n "$I" ] then rm temp.temp cat $logfile | grep "ANSWERED" | grep "startmessage" | grep $I | awk 'BEGIN{FS=","}{print $5}' | sed -e 's/.*\/11//g' -e 's/\@.*//g' | uniq >> temp$ fi done; # FILE1 temp.temp, . FILE1=`cat temp.temp | sort -u | uniq` # . for J in $FILE1 do if [ -n "$J" ] then cat telefoni.tmp | grep -v $J > telefoni1.tmp mv telefoni1.tmp telefoni.tmp fi done; rm temp.temp; cat telefoni.tmp | mail -s Ne_Dozvon testmail@example.com
- . Inbound routes CID . - , , . DID . destination Misc Destinations . Misc Destinations, 9876 dial. ( extensions_custom.conf? )
, , , , . , .
Channel: -
CallerID: Name - ,
MaxRetries: - , 0, 1 .
RetryTime: - , , , - , - ( ). .
WaitTime: - . 60 , , .
Account:
- тАЬaccount codeтАЭ CDR,
Context: <context-name>
- ( )
Extension: - Extension .
Priority: - Extension, .
Set:
- .
Application:
- Asterisk, . - context, extension priority.
Data:
- . .
Archive: Yes/No
тАУ .call "outgoing_done" "Status: ", : Completed, Expired Failed. .
, :
Channel: Local/11%1%@from-internal/n
CallerID: <5102>
MaxRetries: 4
RetryTime: 60
WaitTime: 60
Context: startmessage
Extension: 5102
Priority: 1
. Local CDR ( - ). , 5 60 , 60 . - startmessage. extension 5102, 1.
11, . FreePBX Outbound route 11 . " " .
/etc/asterisk/extensions_custom.conf ( Elastix)
exten => 9876,1,Goto(testcontext,s,1)
, 9876 , .
2 . , . , , .
:
[testcontext]
exten => s,1,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/privet-zapis)
exten => s,n,Record(obzvon-message.wav)
exten => s,n,Playback(/var/lib/asterisk/sounds/obzvon-message)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/zapusk)
exten => s,n,WaitExten(10)
exten => s,n,Hangup()
exten => 999,1,System(echo "" > /var/log/asterisk/cdr-custom/Simple.csv)
exten => 999,n,System(/mnt/script/parser.bash /mnt/CallCenter/telefony.txt /mnt/script/main.call)
exten => 999,n,System(/mnt/script/startcall.bash)
exten => 0,1, Hangup()
- , 2 , /var/lib/asterisk/sounds/custom/privet-zapis , obzvon-message.wav , /var/lib/asterisk/sounds/custom/zapusk . 10 . 999, , - .
999, /var/log/asterisk/cdr-custom/Simple.csv ( ), /mnt/script/parser.bash , /mnt/CallCenter/telefony.txt - ( ), /mnt/script/main.call - call . call . /mnt/script/startcall.bash .
windows , .. , Notepad ++, Windows.
CDR - /etc/asterisk/cdr_custom.conf :
[mappings]
Simple.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},$$
.
/mnt/script/parser.bash :
#!/bin/bash # - , FILE=`cat $1 | sort -u` for I in $FILE do if [ -n "$I" ] then sed -e 's/\%1\%/'$I'/g' < $2 >> /mnt/script/tmp/$I.call fi done;
call %1%, /mnt/script/tmp/ " ".call .
/mnt/script/startcall.bash :
#!/bin/bash # - call OutDir="/mnt/script/tmp/" # call inDir="/var/spool/asterisk/outgoing/" # call ( ) CountIn=5; movefile () # inDir { CounFileInDir=$(find $inDir -name "*.call" | wc -l); # inDir - CountIn, . if (("$CounFileInDir" < "$CountIn")); then mv $I $inDir # 30 . else sleep 30; movefile; fi } # *.call OutDir. FILE=`find $OutDir -name "*.call"` # FILE, , movefile. for I in $FILE do if [ -n "$I" ] then movefile; fi done; # - . /mnt/script/result.bash
/mnt/script/result.bash :
#!/bin/bash # telefoni=/mnt/CallCenter/telefony.txt # . logfile=/var/log/asterisk/cdr-custom/Simple.csv; # . cp $telefoni telefoni.tmp # FILE . FILE=`cat telefoni.tmp | sort -u | uniq` # FILE , - logfile ANSWERED. # startmessage, , #, 11 ( ) @ temp for I in $FILE do if [ -n "$I" ] then rm temp.temp cat $logfile | grep "ANSWERED" | grep "startmessage" | grep $I | awk 'BEGIN{FS=","}{print $5}' | sed -e 's/.*\/11//g' -e 's/\@.*//g' | uniq >> temp$ fi done; # FILE1 temp.temp, . FILE1=`cat temp.temp | sort -u | uniq` # . for J in $FILE1 do if [ -n "$J" ] then cat telefoni.tmp | grep -v $J > telefoni1.tmp mv telefoni1.tmp telefoni.tmp fi done; rm temp.temp; cat telefoni.tmp | mail -s Ne_Dozvon testmail@example.com
- . Inbound routes CID . - , , . DID . destination Misc Destinations . Misc Destinations, 9876 dial. ( extensions_custom.conf? )
, , , , . , .
Channel: -
CallerID: Name - ,
MaxRetries: - , 0, 1 .
RetryTime: - , , , - , - ( ). .
WaitTime: - . 60 , , .
Account:
- тАЬaccount codeтАЭ CDR,
Context: <context-name>
- ( )
Extension: - Extension .
Priority: - Extension, .
Set:
- .
Application:
- Asterisk, . - context, extension priority.
Data:
- . .
Archive: Yes/No
тАУ .call "outgoing_done" "Status: ", : Completed, Expired Failed. .
, :
Channel: Local/11%1%@from-internal/n
CallerID: <5102>
MaxRetries: 4
RetryTime: 60
WaitTime: 60
Context: startmessage
Extension: 5102
Priority: 1
. Local CDR ( - ). , 5 60 , 60 . - startmessage. extension 5102, 1.
11, . FreePBX Outbound route 11 . " " .
/etc/asterisk/extensions_custom.conf ( Elastix)
exten => 9876,1,Goto(testcontext,s,1)
, 9876 , .
2 . , . , , .
:
[testcontext]
exten => s,1,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/privet-zapis)
exten => s,n,Record(obzvon-message.wav)
exten => s,n,Playback(/var/lib/asterisk/sounds/obzvon-message)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/zapusk)
exten => s,n,WaitExten(10)
exten => s,n,Hangup()
exten => 999,1,System(echo "" > /var/log/asterisk/cdr-custom/Simple.csv)
exten => 999,n,System(/mnt/script/parser.bash /mnt/CallCenter/telefony.txt /mnt/script/main.call)
exten => 999,n,System(/mnt/script/startcall.bash)
exten => 0,1, Hangup()
- , 2 , /var/lib/asterisk/sounds/custom/privet-zapis , obzvon-message.wav , /var/lib/asterisk/sounds/custom/zapusk . 10 . 999, , - .
999, /var/log/asterisk/cdr-custom/Simple.csv ( ), /mnt/script/parser.bash , /mnt/CallCenter/telefony.txt - ( ), /mnt/script/main.call - call . call . /mnt/script/startcall.bash .
windows , .. , Notepad ++, Windows.
CDR - /etc/asterisk/cdr_custom.conf :
[mappings]
Simple.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},$$
.
/mnt/script/parser.bash :
#!/bin/bash # - , FILE=`cat $1 | sort -u` for I in $FILE do if [ -n "$I" ] then sed -e 's/\%1\%/'$I'/g' < $2 >> /mnt/script/tmp/$I.call fi done;
call %1%, /mnt/script/tmp/ " ".call .
/mnt/script/startcall.bash :
#!/bin/bash # - call OutDir="/mnt/script/tmp/" # call inDir="/var/spool/asterisk/outgoing/" # call ( ) CountIn=5; movefile () # inDir { CounFileInDir=$(find $inDir -name "*.call" | wc -l); # inDir - CountIn, . if (("$CounFileInDir" < "$CountIn")); then mv $I $inDir # 30 . else sleep 30; movefile; fi } # *.call OutDir. FILE=`find $OutDir -name "*.call"` # FILE, , movefile. for I in $FILE do if [ -n "$I" ] then movefile; fi done; # - . /mnt/script/result.bash
/mnt/script/result.bash :
#!/bin/bash # telefoni=/mnt/CallCenter/telefony.txt # . logfile=/var/log/asterisk/cdr-custom/Simple.csv; # . cp $telefoni telefoni.tmp # FILE . FILE=`cat telefoni.tmp | sort -u | uniq` # FILE , - logfile ANSWERED. # startmessage, , #, 11 ( ) @ temp for I in $FILE do if [ -n "$I" ] then rm temp.temp cat $logfile | grep "ANSWERED" | grep "startmessage" | grep $I | awk 'BEGIN{FS=","}{print $5}' | sed -e 's/.*\/11//g' -e 's/\@.*//g' | uniq >> temp$ fi done; # FILE1 temp.temp, . FILE1=`cat temp.temp | sort -u | uniq` # . for J in $FILE1 do if [ -n "$J" ] then cat telefoni.tmp | grep -v $J > telefoni1.tmp mv telefoni1.tmp telefoni.tmp fi done; rm temp.temp; cat telefoni.tmp | mail -s Ne_Dozvon testmail@example.com
- . Inbound routes CID . - , , . DID . destination Misc Destinations . Misc Destinations, 9876 dial. ( extensions_custom.conf? )
, , , , . , .
Channel: -
CallerID: Name - ,
MaxRetries: - , 0, 1 .
RetryTime: - , , , - , - ( ). .
WaitTime: - . 60 , , .
Account:
- тАЬaccount codeтАЭ CDR,
Context: <context-name>
- ( )
Extension: - Extension .
Priority: - Extension, .
Set:
- .
Application:
- Asterisk, . - context, extension priority.
Data:
- . .
Archive: Yes/No
тАУ .call "outgoing_done" "Status: ", : Completed, Expired Failed. .
, :
Channel: Local/11%1%@from-internal/n
CallerID: <5102>
MaxRetries: 4
RetryTime: 60
WaitTime: 60
Context: startmessage
Extension: 5102
Priority: 1
. Local CDR ( - ). , 5 60 , 60 . - startmessage. extension 5102, 1.
11, . FreePBX Outbound route 11 . " " .
/etc/asterisk/extensions_custom.conf ( Elastix)
exten => 9876,1,Goto(testcontext,s,1)
, 9876 , .
2 . , . , , .
:
[testcontext]
exten => s,1,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/privet-zapis)
exten => s,n,Record(obzvon-message.wav)
exten => s,n,Playback(/var/lib/asterisk/sounds/obzvon-message)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/zapusk)
exten => s,n,WaitExten(10)
exten => s,n,Hangup()
exten => 999,1,System(echo "" > /var/log/asterisk/cdr-custom/Simple.csv)
exten => 999,n,System(/mnt/script/parser.bash /mnt/CallCenter/telefony.txt /mnt/script/main.call)
exten => 999,n,System(/mnt/script/startcall.bash)
exten => 0,1, Hangup()
- , 2 , /var/lib/asterisk/sounds/custom/privet-zapis , obzvon-message.wav , /var/lib/asterisk/sounds/custom/zapusk . 10 . 999, , - .
999, /var/log/asterisk/cdr-custom/Simple.csv ( ), /mnt/script/parser.bash , /mnt/CallCenter/telefony.txt - ( ), /mnt/script/main.call - call . call . /mnt/script/startcall.bash .
windows , .. , Notepad ++, Windows.
CDR - /etc/asterisk/cdr_custom.conf :
[mappings]
Simple.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},$$
.
/mnt/script/parser.bash :
#!/bin/bash # - , FILE=`cat $1 | sort -u` for I in $FILE do if [ -n "$I" ] then sed -e 's/\%1\%/'$I'/g' < $2 >> /mnt/script/tmp/$I.call fi done;
call %1%, /mnt/script/tmp/ " ".call .
/mnt/script/startcall.bash :
#!/bin/bash # - call OutDir="/mnt/script/tmp/" # call inDir="/var/spool/asterisk/outgoing/" # call ( ) CountIn=5; movefile () # inDir { CounFileInDir=$(find $inDir -name "*.call" | wc -l); # inDir - CountIn, . if (("$CounFileInDir" < "$CountIn")); then mv $I $inDir # 30 . else sleep 30; movefile; fi } # *.call OutDir. FILE=`find $OutDir -name "*.call"` # FILE, , movefile. for I in $FILE do if [ -n "$I" ] then movefile; fi done; # - . /mnt/script/result.bash
/mnt/script/result.bash :
#!/bin/bash # telefoni=/mnt/CallCenter/telefony.txt # . logfile=/var/log/asterisk/cdr-custom/Simple.csv; # . cp $telefoni telefoni.tmp # FILE . FILE=`cat telefoni.tmp | sort -u | uniq` # FILE , - logfile ANSWERED. # startmessage, , #, 11 ( ) @ temp for I in $FILE do if [ -n "$I" ] then rm temp.temp cat $logfile | grep "ANSWERED" | grep "startmessage" | grep $I | awk 'BEGIN{FS=","}{print $5}' | sed -e 's/.*\/11//g' -e 's/\@.*//g' | uniq >> temp$ fi done; # FILE1 temp.temp, . FILE1=`cat temp.temp | sort -u | uniq` # . for J in $FILE1 do if [ -n "$J" ] then cat telefoni.tmp | grep -v $J > telefoni1.tmp mv telefoni1.tmp telefoni.tmp fi done; rm temp.temp; cat telefoni.tmp | mail -s Ne_Dozvon testmail@example.com
- . Inbound routes CID . - , , . DID . destination Misc Destinations . Misc Destinations, 9876 dial. ( extensions_custom.conf? )
, , , , . , .
Channel: -
CallerID: Name - ,
MaxRetries: - , 0, 1 .
RetryTime: - , , , - , - ( ). .
WaitTime: - . 60 , , .
Account:
- тАЬaccount codeтАЭ CDR,
Context: <context-name>
- ( )
Extension: - Extension .
Priority: - Extension, .
Set:
- .
Application:
- Asterisk, . - context, extension priority.
Data:
- . .
Archive: Yes/No
тАУ .call "outgoing_done" "Status: ", : Completed, Expired Failed. .
, :
Channel: Local/11%1%@from-internal/n
CallerID: <5102>
MaxRetries: 4
RetryTime: 60
WaitTime: 60
Context: startmessage
Extension: 5102
Priority: 1
. Local CDR ( - ). , 5 60 , 60 . - startmessage. extension 5102, 1.
11, . FreePBX Outbound route 11 . " " .
/etc/asterisk/extensions_custom.conf ( Elastix)
exten => 9876,1,Goto(testcontext,s,1)
, 9876 , .
2 . , . , , .
:
[testcontext]
exten => s,1,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/privet-zapis)
exten => s,n,Record(obzvon-message.wav)
exten => s,n,Playback(/var/lib/asterisk/sounds/obzvon-message)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/zapusk)
exten => s,n,WaitExten(10)
exten => s,n,Hangup()
exten => 999,1,System(echo "" > /var/log/asterisk/cdr-custom/Simple.csv)
exten => 999,n,System(/mnt/script/parser.bash /mnt/CallCenter/telefony.txt /mnt/script/main.call)
exten => 999,n,System(/mnt/script/startcall.bash)
exten => 0,1, Hangup()
- , 2 , /var/lib/asterisk/sounds/custom/privet-zapis , obzvon-message.wav , /var/lib/asterisk/sounds/custom/zapusk . 10 . 999, , - .
999, /var/log/asterisk/cdr-custom/Simple.csv ( ), /mnt/script/parser.bash , /mnt/CallCenter/telefony.txt - ( ), /mnt/script/main.call - call . call . /mnt/script/startcall.bash .
windows , .. , Notepad ++, Windows.
CDR - /etc/asterisk/cdr_custom.conf :
[mappings]
Simple.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},$$
.
/mnt/script/parser.bash :
#!/bin/bash # - , FILE=`cat $1 | sort -u` for I in $FILE do if [ -n "$I" ] then sed -e 's/\%1\%/'$I'/g' < $2 >> /mnt/script/tmp/$I.call fi done;
call %1%, /mnt/script/tmp/ " ".call .
/mnt/script/startcall.bash :
#!/bin/bash # - call OutDir="/mnt/script/tmp/" # call inDir="/var/spool/asterisk/outgoing/" # call ( ) CountIn=5; movefile () # inDir { CounFileInDir=$(find $inDir -name "*.call" | wc -l); # inDir - CountIn, . if (("$CounFileInDir" < "$CountIn")); then mv $I $inDir # 30 . else sleep 30; movefile; fi } # *.call OutDir. FILE=`find $OutDir -name "*.call"` # FILE, , movefile. for I in $FILE do if [ -n "$I" ] then movefile; fi done; # - . /mnt/script/result.bash
/mnt/script/result.bash :
#!/bin/bash # telefoni=/mnt/CallCenter/telefony.txt # . logfile=/var/log/asterisk/cdr-custom/Simple.csv; # . cp $telefoni telefoni.tmp # FILE . FILE=`cat telefoni.tmp | sort -u | uniq` # FILE , - logfile ANSWERED. # startmessage, , #, 11 ( ) @ temp for I in $FILE do if [ -n "$I" ] then rm temp.temp cat $logfile | grep "ANSWERED" | grep "startmessage" | grep $I | awk 'BEGIN{FS=","}{print $5}' | sed -e 's/.*\/11//g' -e 's/\@.*//g' | uniq >> temp$ fi done; # FILE1 temp.temp, . FILE1=`cat temp.temp | sort -u | uniq` # . for J in $FILE1 do if [ -n "$J" ] then cat telefoni.tmp | grep -v $J > telefoni1.tmp mv telefoni1.tmp telefoni.tmp fi done; rm temp.temp; cat telefoni.tmp | mail -s Ne_Dozvon testmail@example.com
- . Inbound routes CID . - , , . DID . destination Misc Destinations . Misc Destinations, 9876 dial. ( extensions_custom.conf? )
, , , , . , .
Channel: -
CallerID: Name - ,
MaxRetries: - , 0, 1 .
RetryTime: - , , , - , - ( ). .
WaitTime: - . 60 , , .
Account:
- тАЬaccount codeтАЭ CDR,
Context: <context-name>
- ( )
Extension: - Extension .
Priority: - Extension, .
Set:
- .
Application:
- Asterisk, . - context, extension priority.
Data:
- . .
Archive: Yes/No
тАУ .call "outgoing_done" "Status: ", : Completed, Expired Failed. .
, :
Channel: Local/11%1%@from-internal/n
CallerID: <5102>
MaxRetries: 4
RetryTime: 60
WaitTime: 60
Context: startmessage
Extension: 5102
Priority: 1
. Local CDR ( - ). , 5 60 , 60 . - startmessage. extension 5102, 1.
11, . FreePBX Outbound route 11 . " " .
/etc/asterisk/extensions_custom.conf ( Elastix)
exten => 9876,1,Goto(testcontext,s,1)
, 9876 , .
2 . , . , , .
:
[testcontext]
exten => s,1,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/privet-zapis)
exten => s,n,Record(obzvon-message.wav)
exten => s,n,Playback(/var/lib/asterisk/sounds/obzvon-message)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/zapusk)
exten => s,n,WaitExten(10)
exten => s,n,Hangup()
exten => 999,1,System(echo "" > /var/log/asterisk/cdr-custom/Simple.csv)
exten => 999,n,System(/mnt/script/parser.bash /mnt/CallCenter/telefony.txt /mnt/script/main.call)
exten => 999,n,System(/mnt/script/startcall.bash)
exten => 0,1, Hangup()
- , 2 , /var/lib/asterisk/sounds/custom/privet-zapis , obzvon-message.wav , /var/lib/asterisk/sounds/custom/zapusk . 10 . 999, , - .
999, /var/log/asterisk/cdr-custom/Simple.csv ( ), /mnt/script/parser.bash , /mnt/CallCenter/telefony.txt - ( ), /mnt/script/main.call - call . call . /mnt/script/startcall.bash .
windows , .. , Notepad ++, Windows.
CDR - /etc/asterisk/cdr_custom.conf :
[mappings]
Simple.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},$$
.
/mnt/script/parser.bash :
#!/bin/bash # - , FILE=`cat $1 | sort -u` for I in $FILE do if [ -n "$I" ] then sed -e 's/\%1\%/'$I'/g' < $2 >> /mnt/script/tmp/$I.call fi done;
call %1%, /mnt/script/tmp/ " ".call .
/mnt/script/startcall.bash :
#!/bin/bash # - call OutDir="/mnt/script/tmp/" # call inDir="/var/spool/asterisk/outgoing/" # call ( ) CountIn=5; movefile () # inDir { CounFileInDir=$(find $inDir -name "*.call" | wc -l); # inDir - CountIn, . if (("$CounFileInDir" < "$CountIn")); then mv $I $inDir # 30 . else sleep 30; movefile; fi } # *.call OutDir. FILE=`find $OutDir -name "*.call"` # FILE, , movefile. for I in $FILE do if [ -n "$I" ] then movefile; fi done; # - . /mnt/script/result.bash
/mnt/script/result.bash :
#!/bin/bash # telefoni=/mnt/CallCenter/telefony.txt # . logfile=/var/log/asterisk/cdr-custom/Simple.csv; # . cp $telefoni telefoni.tmp # FILE . FILE=`cat telefoni.tmp | sort -u | uniq` # FILE , - logfile ANSWERED. # startmessage, , #, 11 ( ) @ temp for I in $FILE do if [ -n "$I" ] then rm temp.temp cat $logfile | grep "ANSWERED" | grep "startmessage" | grep $I | awk 'BEGIN{FS=","}{print $5}' | sed -e 's/.*\/11//g' -e 's/\@.*//g' | uniq >> temp$ fi done; # FILE1 temp.temp, . FILE1=`cat temp.temp | sort -u | uniq` # . for J in $FILE1 do if [ -n "$J" ] then cat telefoni.tmp | grep -v $J > telefoni1.tmp mv telefoni1.tmp telefoni.tmp fi done; rm temp.temp; cat telefoni.tmp | mail -s Ne_Dozvon testmail@example.com
- . Inbound routes CID . - , , . DID . destination Misc Destinations . Misc Destinations, 9876 dial. ( extensions_custom.conf? )
, , , , . , .
Channel: -
CallerID: Name - ,
MaxRetries: - , 0, 1 .
RetryTime: - , , , - , - ( ). .
WaitTime: - . 60 , , .
Account:
- тАЬaccount codeтАЭ CDR,
Context: <context-name>
- ( )
Extension: - Extension .
Priority: - Extension, .
Set:
- .
Application:
- Asterisk, . - context, extension priority.
Data:
- . .
Archive: Yes/No
тАУ .call "outgoing_done" "Status: ", : Completed, Expired Failed. .
, :
Channel: Local/11%1%@from-internal/n
CallerID: <5102>
MaxRetries: 4
RetryTime: 60
WaitTime: 60
Context: startmessage
Extension: 5102
Priority: 1
. Local CDR ( - ). , 5 60 , 60 . - startmessage. extension 5102, 1.
11, . FreePBX Outbound route 11 . " " .
/etc/asterisk/extensions_custom.conf ( Elastix)
exten => 9876,1,Goto(testcontext,s,1)
, 9876 , .
2 . , . , , .
:
[testcontext]
exten => s,1,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/privet-zapis)
exten => s,n,Record(obzvon-message.wav)
exten => s,n,Playback(/var/lib/asterisk/sounds/obzvon-message)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/zapusk)
exten => s,n,WaitExten(10)
exten => s,n,Hangup()
exten => 999,1,System(echo "" > /var/log/asterisk/cdr-custom/Simple.csv)
exten => 999,n,System(/mnt/script/parser.bash /mnt/CallCenter/telefony.txt /mnt/script/main.call)
exten => 999,n,System(/mnt/script/startcall.bash)
exten => 0,1, Hangup()
- , 2 , /var/lib/asterisk/sounds/custom/privet-zapis , obzvon-message.wav , /var/lib/asterisk/sounds/custom/zapusk . 10 . 999, , - .
999, /var/log/asterisk/cdr-custom/Simple.csv ( ), /mnt/script/parser.bash , /mnt/CallCenter/telefony.txt - ( ), /mnt/script/main.call - call . call . /mnt/script/startcall.bash .
windows , .. , Notepad ++, Windows.
CDR - /etc/asterisk/cdr_custom.conf :
[mappings]
Simple.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},$$
.
/mnt/script/parser.bash :
#!/bin/bash # - , FILE=`cat $1 | sort -u` for I in $FILE do if [ -n "$I" ] then sed -e 's/\%1\%/'$I'/g' < $2 >> /mnt/script/tmp/$I.call fi done;
call %1%, /mnt/script/tmp/ " ".call .
/mnt/script/startcall.bash :
#!/bin/bash # - call OutDir="/mnt/script/tmp/" # call inDir="/var/spool/asterisk/outgoing/" # call ( ) CountIn=5; movefile () # inDir { CounFileInDir=$(find $inDir -name "*.call" | wc -l); # inDir - CountIn, . if (("$CounFileInDir" < "$CountIn")); then mv $I $inDir # 30 . else sleep 30; movefile; fi } # *.call OutDir. FILE=`find $OutDir -name "*.call"` # FILE, , movefile. for I in $FILE do if [ -n "$I" ] then movefile; fi done; # - . /mnt/script/result.bash
/mnt/script/result.bash :
#!/bin/bash # telefoni=/mnt/CallCenter/telefony.txt # . logfile=/var/log/asterisk/cdr-custom/Simple.csv; # . cp $telefoni telefoni.tmp # FILE . FILE=`cat telefoni.tmp | sort -u | uniq` # FILE , - logfile ANSWERED. # startmessage, , #, 11 ( ) @ temp for I in $FILE do if [ -n "$I" ] then rm temp.temp cat $logfile | grep "ANSWERED" | grep "startmessage" | grep $I | awk 'BEGIN{FS=","}{print $5}' | sed -e 's/.*\/11//g' -e 's/\@.*//g' | uniq >> temp$ fi done; # FILE1 temp.temp, . FILE1=`cat temp.temp | sort -u | uniq` # . for J in $FILE1 do if [ -n "$J" ] then cat telefoni.tmp | grep -v $J > telefoni1.tmp mv telefoni1.tmp telefoni.tmp fi done; rm temp.temp; cat telefoni.tmp | mail -s Ne_Dozvon testmail@example.com
- . Inbound routes CID . - , , . DID . destination Misc Destinations . Misc Destinations, 9876 dial. ( extensions_custom.conf? )
, , , , . , .
Channel: -
CallerID: Name - ,
MaxRetries: - , 0, 1 .
RetryTime: - , , , - , - ( ). .
WaitTime: - . 60 , , .
Account:
- тАЬaccount codeтАЭ CDR,
Context: <context-name>
- ( )
Extension: - Extension .
Priority: - Extension, .
Set:
- .
Application:
- Asterisk, . - context, extension priority.
Data:
- . .
Archive: Yes/No
тАУ .call "outgoing_done" "Status: ", : Completed, Expired Failed. .
, :
Channel: Local/11%1%@from-internal/n
CallerID: <5102>
MaxRetries: 4
RetryTime: 60
WaitTime: 60
Context: startmessage
Extension: 5102
Priority: 1
. Local CDR ( - ). , 5 60 , 60 . - startmessage. extension 5102, 1.
11, . FreePBX Outbound route 11 . " " .
/etc/asterisk/extensions_custom.conf ( Elastix)
exten => 9876,1,Goto(testcontext,s,1)
, 9876 , .
2 . , . , , .
:
[testcontext]
exten => s,1,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/privet-zapis)
exten => s,n,Record(obzvon-message.wav)
exten => s,n,Playback(/var/lib/asterisk/sounds/obzvon-message)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/zapusk)
exten => s,n,WaitExten(10)
exten => s,n,Hangup()
exten => 999,1,System(echo "" > /var/log/asterisk/cdr-custom/Simple.csv)
exten => 999,n,System(/mnt/script/parser.bash /mnt/CallCenter/telefony.txt /mnt/script/main.call)
exten => 999,n,System(/mnt/script/startcall.bash)
exten => 0,1, Hangup()
- , 2 , /var/lib/asterisk/sounds/custom/privet-zapis , obzvon-message.wav , /var/lib/asterisk/sounds/custom/zapusk . 10 . 999, , - .
999, /var/log/asterisk/cdr-custom/Simple.csv ( ), /mnt/script/parser.bash , /mnt/CallCenter/telefony.txt - ( ), /mnt/script/main.call - call . call . /mnt/script/startcall.bash .
windows , .. , Notepad ++, Windows.
CDR - /etc/asterisk/cdr_custom.conf :
[mappings]
Simple.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},$$
.
/mnt/script/parser.bash :
#!/bin/bash # - , FILE=`cat $1 | sort -u` for I in $FILE do if [ -n "$I" ] then sed -e 's/\%1\%/'$I'/g' < $2 >> /mnt/script/tmp/$I.call fi done;
call %1%, /mnt/script/tmp/ " ".call .
/mnt/script/startcall.bash :
#!/bin/bash # - call OutDir="/mnt/script/tmp/" # call inDir="/var/spool/asterisk/outgoing/" # call ( ) CountIn=5; movefile () # inDir { CounFileInDir=$(find $inDir -name "*.call" | wc -l); # inDir - CountIn, . if (("$CounFileInDir" < "$CountIn")); then mv $I $inDir # 30 . else sleep 30; movefile; fi } # *.call OutDir. FILE=`find $OutDir -name "*.call"` # FILE, , movefile. for I in $FILE do if [ -n "$I" ] then movefile; fi done; # - . /mnt/script/result.bash
/mnt/script/result.bash :
#!/bin/bash # telefoni=/mnt/CallCenter/telefony.txt # . logfile=/var/log/asterisk/cdr-custom/Simple.csv; # . cp $telefoni telefoni.tmp # FILE . FILE=`cat telefoni.tmp | sort -u | uniq` # FILE , - logfile ANSWERED. # startmessage, , #, 11 ( ) @ temp for I in $FILE do if [ -n "$I" ] then rm temp.temp cat $logfile | grep "ANSWERED" | grep "startmessage" | grep $I | awk 'BEGIN{FS=","}{print $5}' | sed -e 's/.*\/11//g' -e 's/\@.*//g' | uniq >> temp$ fi done; # FILE1 temp.temp, . FILE1=`cat temp.temp | sort -u | uniq` # . for J in $FILE1 do if [ -n "$J" ] then cat telefoni.tmp | grep -v $J > telefoni1.tmp mv telefoni1.tmp telefoni.tmp fi done; rm temp.temp; cat telefoni.tmp | mail -s Ne_Dozvon testmail@example.com
- . Inbound routes CID . - , , . DID . destination Misc Destinations . Misc Destinations, 9876 dial. ( extensions_custom.conf? )
, , , , . , .