HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Re: [hylafax-users] Human readable status instead of statuscode?
I think I found and solved the problem - the 'awk' script in
'common-functions' caught both status and statuscode line and exported
the later as 'faxstatus'.
I made a patch that corrects the 'faxstatus' and adds 'statuscode':
--- common-functions.orig 2008-10-30 11:15:42.000000000 +0100
+++ common-functions 2008-10-30 11:46:19.000000000 +0100
@@ -123,12 +123,13 @@
/^jobtag/ { jobtag = $0; sub("jobtag:", "", jobtag); p("jobtag",
jobtag)}
/^jobtype/ { p("jobtype", $2); }
# status needs to be used in the shell as faxstatus since status is
reserved word
- /^status/ { status = $0; sub("status:", "", status);
+ /^status:/ { status = $0; sub("status:", "", status);
while ($0 ~ /\\\\$/ && getline > 0) {
sub(/\\\\$/, "\\n", status);
status = status $0;
} p("faxstatus", status);
}
+ /^statuscode/ { p("statuscode", $2); }
/^resolution/ { p("resolution", $2); }
/^npages/ { p("npages", $2); }
/^totpages/ { p("totpages", $2); }
I assume 'status' can be a multi-line string, thus the special handling
(didn't go too deep into awk), while 'statuscode' is always a one-liner.
Danilo
PS: Are there any developers on this list or should I send this to someone?
Danilo Godec pravi:
> Hi,
>
> I'm using Hylafax 4.4.0 (OpenSuSE 11.0). I decided to use the 'default'
> notify script with templates. Now I have a little problem - the variable
> 'faxstatus' returns a 'statuscode:xxx' (where xxx is a number).
>
> If I look at the 'doneq' files, I see that the 'usual' status line exists:
>
>> status:No carrier detected
>> statuscode:2
>>
> Is there any other variable that would give me the 'human readable'
> status that I could use in templates?
>
> Thanks, Danilo
>
>
--
Danilo Godec, sistemska podpora
Predlog! Obiscite prenovljeno spletno stran http://www.agenda.si
ODPRTA KODA IN LINUX
STORITVE : POSLOVNE RESITVE : UPRAVLJANJE IT : INFRASTRUKTURA IT : IZOBRAZEVANJE : PROGRAMSKA OPREMA
Visit our updated web page at http://www.agenda.si
OPEN SOURCE AND LINUX
SERVICES : BUSINESS SOLUTIONS : IT MANAGEMENT : IT INFRASTRUCTURE : TRAINING : SOFTWARE
begin:vcard
fn:Danilo Godec
n:Godec;Danilo
org:Agenda OpenSystems
adr:;;Ul. Pohorskega bataljona 49;Maribor;;2000;Slovenia
email;internet:danilo.godec@xxxxxxxxx
tel;work:+386 2 4216138
tel;fax:+386 2 4216141
tel;cell:+386 40 618802
x-mozilla-html:FALSE
url:http://www.agenda.si/
version:2.1
end:vcard