mirror of
https://github.com/openwrt/telephony.git
synced 2026-04-15 10:51:57 +00:00
asterisk: add a reregister extra command
`/etc/init.d/asterisk reregister` will re-register all outbound registrations. Currently only pjsip is supported, but, if required, this can be easily extended in the future. Signed-off-by: Andre Heider <a.heider@gmail.com>
This commit is contained in:
committed by
Jiri Slachta
parent
cc89b4b817
commit
1b924c1b50
@@ -66,3 +66,13 @@ start_service() {
|
|||||||
reload_service() {
|
reload_service() {
|
||||||
procd_send_signal $NAME
|
procd_send_signal $NAME
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extra_command "reregister" "Re-register all outbound registrations"
|
||||||
|
reregister() {
|
||||||
|
MODULES=`$COMMAND -x 'module show'` || exit 1
|
||||||
|
|
||||||
|
echo "$MODULES" | grep -q -s '^res_pjsip.so' && {
|
||||||
|
log info "re-registering all outbound pjsip registrations"
|
||||||
|
$COMMAND -x 'pjsip send unregister *all' -x 'pjsip send register *all'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user