Skip to content

Commit

Permalink
Add ability to override callprefix from dynamicconfigoutgoing
Browse files Browse the repository at this point in the history
  • Loading branch information
denzs committed Sep 7, 2020
1 parent b278648 commit 446234c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -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 <denz@gonicus.de> Mon, 07 Sep 2020 12:03:57 +0200

gofaxip (1.2-1) unstable; urgency=medium

* config parameters for t.38 handling have changed
Expand Down
4 changes: 4 additions & 0 deletions gofaxsend/sendqfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 446234c

Please sign in to comment.