Skip to content

res_smdr_whozz: Add SMDR server for WHOZZ Calling? devices. #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ PhreakScript installs:
- Broadworks compatible Shared Call Appearances (PJSIP)
- Presence publishing (PJSIP)
- Message Send Protocol send support
- SMDR support for "WHOZZ Calling?" call accounting devices
- AGI `RECORD FILE` option to require noise before silence detection
- Optional build enhancements
- `chan_sccp` (improved community Skinny/SCCP channel driver), with compilation fixes
Expand Down
29 changes: 29 additions & 0 deletions configs/samples/res_smdr_whozz.conf.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
; res_smdr_whozz.conf - SMDR for "WHOZZ Calling?" call accounting devices

; TIPS: Both serial and parallel wiring of the phone line to your WHOZZ Calling? device are supported.
; It is recommended that you wire in parallel if possible to avoid putting the unit in the voice path.
; Additionally, please note that the WHOZZ Calling? units do NOT support pulse dialing,
; and pulse-to-tone converters may degrade the quality of the voice path. You may wish
; to drive a slave / follower line to follow hook state changes and receive dialed digits (but not audio)
; and connect that to the unit instead.
; As always, USE AT YOUR OWN RISK.

;[general]
;device=/dev/ttyS0 ; Device name of serial port to which WHOZZ Calling? unit is connected (9600/N/1)

;[line-1]
;line = 1 ; Line number as configured on WHOZZ Calling? unit.
;device=DAHDI/1 ; Optional. Device name of associated FXO port connected to this same line.
; If configured, if calls are made using this device, they will be ignored by this module.
; This allows this module to create CDRs for calls made directly on a phone line connected
; to an Asterisk FXO port, when the call was NOT made through Asterisk,
; but allows Asterisk to create the CDR record if the call was made through Asterisk.
; This avoids duplicate CDR records for the same call.
; Optional variables to set, for example, for outgoing calls, you could do a lookup to determine if a call is local, long distance, etc. based on dialed number.
;setvar=CDR(trunkgrp)=pots-1
;setvar=CDR(direction)=${WHOZZ_DIRECTION}
;setvar=CDR(line)=${WHOZZ_LINE}
;setvar=CHANNEL(amaflags)=BILLING

;[line-2]
;line = 2
11 changes: 11 additions & 0 deletions phreaknet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1935,6 +1935,16 @@ phreak_tree_module() { # $1 = file to patch, $2 = whether failure is acceptable
fi
}

phreak_tree_module_branch() { # $1 = file to patch, $2 = whether failure is acceptable, $3 = branch name
printf "Adding new module: %s\n" "$1"
wget -q "https://raw.githubusercontent.com/InterLinked1/phreakscript/$3/$1" -O "$AST_SOURCE_PARENT_DIR/$AST_SRC_DIR/$1" --no-cache
if [ $? -ne 0 ]; then
echoerr "Failed to download module from branch $3, retrying with master..."
# Fall back to master in case the branch name is stale. If that fails, abort.
phreak_tree_module "$1" "$2"
fi
}

custom_module() { # $1 = filename, $2 = URL to download
printf "Adding new module: %s\n" "$1"
wget -q "$2" -O "$AST_SOURCE_PARENT_DIR/$AST_SRC_DIR/$1" --no-cache
Expand Down Expand Up @@ -2116,6 +2126,7 @@ phreak_patches() { # $1 = $PATCH_DIR, $2 = $AST_SRC_DIR
phreak_tree_module "res/res_msp.c"
phreak_tree_module "res/res_phreaknet.c"
phreak_tree_module "res/res_pjsip_presence.c"
phreak_tree_module "res/res_smdr_whozz.c"

if [ -d /etc/dahdi ]; then
phreak_tree_module "apps/app_loopdisconnect.c"
Expand Down
Loading
Loading