Skip to end of metadata
Go to start of metadata

Remote Restart

Digium phones will, typically, automatically restart themselves whenever they receive a configuration parameter that necessitates a full restart.

Otherwise, Digium phones, beginning with firmware 1.1.0, may be remotely notified to restart by using a check-sync SIP NOTIFY Event sent from the Asterisk CLI. This feature is enabled by default and is controlled by the:

setting for XML-configured phones or by the enable_check_sync parameter for DPMA-configured phones.

Older versions of Asterisk may not have a properly configured pjsip_notify.conf file to allow sending the restart notices from the Asterisk CLI. To enable this functionality, add the following lines to pjsip_notify.conf if they are not already present:

; Digium

[digium-check-cfg]
Event=>check-sync

Following an Asterisk reload or restart, Digium phones may then be remotely sent restart notices by executing the following Asterisk CLI command:

pjsip send notify digium-check-cfg <my endpoint identifier, e.g. 1000>

Remote Reconfigure

Digium phones, when connected to DPMA, can be remotely reconfigured using the Asterisk CLI command:

digium_phones reconfigure phone <my endpoint identifier, e.g. 1000>

Or using by using the DigiumPhoneReconfigure AMI Action.

If phones are not connected to DPMA, they can be reconfigured, as opposed to restarted, beginning with firmware 2.3.0, by issuing a new notify command.

Most versions of Asterisk will not have a properly configured sip_notify.conf file to allow sending the reconfigure notices from the Asterisk CLI. To enable this functionality, add the following lines to pjsip_notify.conf if they are not already present:

 

; Digium

[digium-check-reconfig]
Event=>check-sync-reconfig

Like the other check-sync Event, this command depends on the phone's enable_check_sync setting being enabled.

 

Following an Asterisk reload or restart, Digium phones may then be remotely sent reconfigure notices by executing the following Asterisk CLI command:

 

pjsip send notify digium-check-reconfig <my endpoint identifier, e.g. 1000>

 

Performing Remote Restart or Reconfigure outside of Asterisk


The SIPp test tool can be used with the following scenario file:

 

 SIPp Reconfigure checksync.xml
<?xml version="1.0" ?>
<scenario name="Reconfigure">
 <send>
  <![CDATA[
    NOTIFY sip:[service]@[remote_ip]:[remote_port];ob SIP/2.0
    Via: SIP/2.0/UDP [local_ip]:[local_port];branch=[branch];rport
    Max-Forwards: 70
    From: "asterisk" <sip:asterisk@[local_ip]>;tag=[call_number]
    To: <sip:[service]@[remote_ip]:[remote_port];ob>
    Contact: <sip:asterisk@[local_ip]:[local_port]>
    Call-ID: [call_id]@[local_ip]:[local_port]
    CSeq: 102 NOTIFY
    User-Agent: Asterisk PBX SVN-branch-11-r377355
    Date: Mon, 10 Dec 2012 16:23:50 GMT
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
    Supported: replaces, timer
    Subscription-State: terminated
    Event: check-sync
    Content-Length: 0
  ]]>
</send>
</scenario>

 

to programmatically restart Digium phones like:

./sipp 10.24.19.95 -sf checksync.xml -m 1

where 10.24.19.95 represents the IP address of the Digium phone to be restarted.

 

This is also possible using other tools, such as sipsak with the following file:

 

 sipsak reboot.phone restart example
NOTIFY sip:10.1.2.3 SIP/2.0
To: sip:10.1.2.3
From: sip:asterisk@10.1.2.3
CSeq: 10 NOTIFY
Call-ID: 1234@10.1.2.3
Event: check-sync

 

as executed like:

./sipsak -f reboot.phone -s sip:101@10.1.2.3

where 10.1.2.3 represents the IP address of the Digium phone to be restarted.


  • No labels