include recorded msg length and host name were file is stored in sent mail
(closes bug #6, thx to Achim Bohnet and Thomas Niesel for the feature requests) git-svn-id: https://svn.ibp.de/svn/capisuite/trunk/capisuite@200 4ebea2bb-67d4-0310-8558-a5799e421b66
This commit is contained in:
parent
9679c04cb6
commit
6e07170c33
|
@ -1,3 +1,8 @@
|
||||||
|
2003-12-31 Gernot Hillier <gernot@hillier.de>
|
||||||
|
* scripts/incoming.py (voiceIncoming): include recorded msg length
|
||||||
|
and host name were file is stored in sent mail (closes bug #6,
|
||||||
|
thx to Achim Bohnet and Thomas Niesel for the feature requests)
|
||||||
|
|
||||||
2003-12-31 Gernot Hillier <gernot@hillier.de>
|
2003-12-31 Gernot Hillier <gernot@hillier.de>
|
||||||
* scripts/cs_helpers.pyin (sendMIMEMail): use 16 bit ouput when
|
* scripts/cs_helpers.pyin (sendMIMEMail): use 16 bit ouput when
|
||||||
converting sound files from la to wav. Thx to Holger Krull for
|
converting sound files from la to wav. Thx to Holger Krull for
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
# copyright : (C) 2002 by Gernot Hillier
|
# copyright : (C) 2002 by Gernot Hillier
|
||||||
# email : gernot@hillier.de
|
# email : gernot@hillier.de
|
||||||
# version : $Revision: 1.14 $
|
# version : $Revision: 1.15 $
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -160,7 +160,7 @@ def faxIncoming(call,call_from,call_to,curr_user,config,already_connected):
|
||||||
+(faxInfo[2] and "hiRes" or "loRes")+(faxInfo[3] and "color" or "")+"\nPages: " \
|
+(faxInfo[2] and "hiRes" or "loRes")+(faxInfo[3] and "color" or "")+"\nPages: " \
|
||||||
+str(faxInfo[4])
|
+str(faxInfo[4])
|
||||||
mailText+="\n\nSee attached file.\nThe original file was saved to file://"+filename \
|
mailText+="\n\nSee attached file.\nThe original file was saved to file://"+filename \
|
||||||
+" on host \""+os.uname()[1]+"\""
|
+" on host \""+os.uname()[1]+"\"."
|
||||||
cs_helpers.sendMIMEMail(fromaddress, mailaddress, "Fax received from "+call_from+" to "+call_to,
|
cs_helpers.sendMIMEMail(fromaddress, mailaddress, "Fax received from "+call_from+" to "+call_to,
|
||||||
faxFormat, mailText, filename)
|
faxFormat, mailText, filename)
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ def voiceIncoming(call,call_from,call_to,curr_user,config):
|
||||||
capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"beep.la"),1)
|
capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"beep.la"),1)
|
||||||
length=cs_helpers.getOption(config,curr_user,"record_length","60")
|
length=cs_helpers.getOption(config,curr_user,"record_length","60")
|
||||||
silence_timeout=cs_helpers.getOption(config,curr_user,"record_silence_timeout","5")
|
silence_timeout=cs_helpers.getOption(config,curr_user,"record_silence_timeout","5")
|
||||||
capisuite.audio_receive(call,filename,int(length), int(silence_timeout),1)
|
msg_length=capisuite.audio_receive(call,filename,int(length), int(silence_timeout),1)
|
||||||
|
|
||||||
dtmf_list=capisuite.read_DTMF(call,0)
|
dtmf_list=capisuite.read_DTMF(call,0)
|
||||||
if (dtmf_list=="X"):
|
if (dtmf_list=="X"):
|
||||||
|
@ -257,10 +257,13 @@ def voiceIncoming(call,call_from,call_to,curr_user,config):
|
||||||
if (mailaddress==""):
|
if (mailaddress==""):
|
||||||
mailaddress=curr_user
|
mailaddress=curr_user
|
||||||
if (action=="mailandsave"):
|
if (action=="mailandsave"):
|
||||||
cs_helpers.sendMIMEMail(fromaddress, mailaddress, "Voice call received from "+call_from+" to "+call_to, "la",
|
mailText="You got a voice call from "+call_from+" to " \
|
||||||
"You got a voice call from "+call_from+" to "+call_to+"\nDate: "+time.ctime()+"\n\n"
|
+call_to+"\nDate: "+time.ctime()+"\nLength: " \
|
||||||
+"See attached file.\nThe original file was saved to file://"+filename+"\n\n", filename)
|
+str(msg_length)+" s\n\nSee attached file.\n" \
|
||||||
|
+"The original file was saved to file://"+filename \
|
||||||
|
+" on host \""+os.uname()[1]+"\".\n\n"
|
||||||
|
subject="Voice call received from "+call_from+" to "+call_to
|
||||||
|
cs_helpers.sendMIMEMail(fromaddress,mailaddress,subject,"la",mailText,filename)
|
||||||
|
|
||||||
# @brief remote inquiry function (uses german wave snippets!)
|
# @brief remote inquiry function (uses german wave snippets!)
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue