From 446234c97ff23146aba26ed6b294818d8d552419 Mon Sep 17 00:00:00 2001 From: Sebastian Denz Date: Mon, 7 Sep 2020 12:08:14 +0200 Subject: [PATCH] Add ability to override callprefix from dynamicconfigoutgoing --- README.md | 1 + debian/changelog | 7 +++++++ gofaxsend/sendqfile.go | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/README.md b/README.md index e2eae99..b19cef9 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,7 @@ The following arguments are provided to the `DynamicConfig` script for outgoing * `TagLine: ACME` will assign a header string to be shown on the top of each page. This does not support format strings as used by HylaFAX; if defined a header string is always shown with the current timestamp and page number as set by SpanDSP. * `FAXNumber: 1337` will set the outgoing caller id number as used by FreeSWITCH when originating the call. * `Gateway: somegw` or `Gateway: gw1,gw2` will set the [SIP Gateway](https://freeswitch.org/confluence/display/FREESWITCH/Gateways+Configuration) to use for sending the fax. The gateway has to be configured in FreeSWITCH. When multiple comma delimited gateways are given they will be tried in order. By default the gateway configured in GOFax.IP's configuration file is used. +* `CallPrefix: 99` will be prefixed to the original destination number and override the parameter `callprefix` from gofax.conf ### Fallback from T.38 to SpanDSP softmodem diff --git a/debian/changelog b/debian/changelog index 7355983..bc28c2f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +gofaxip (1.3-1) unstable; urgency=medium + + * allow prefix overriding from dynamicconfigoutgoing + * allow dialstring overriding from mod_db entries + + -- Sebastian Denz Mon, 07 Sep 2020 12:03:57 +0200 + gofaxip (1.2-1) unstable; urgency=medium * config parameters for t.38 handling have changed diff --git a/gofaxsend/sendqfile.go b/gofaxsend/sendqfile.go index 462d473..ad2da74 100644 --- a/gofaxsend/sendqfile.go +++ b/gofaxsend/sendqfile.go @@ -116,6 +116,10 @@ func SendQfile(qfilename string) (int, error) { faxjob.Header = tagline } + if prefix := dc.GetString("CallPrefix"); prefix != "" { + faxjob.Number = fmt.Sprint(prefix, qf.GetString("external")) + } + if faxnumber := dc.GetString("FAXNumber"); faxnumber != "" { faxjob.Cidnum = faxnumber }