Posts

Showing posts from January, 2023

Mitel SIP-phone XML API configuration server on Python/Flask and registration on Asterisk PBX

Image
  Agenda: Configuration server SIP-phones XML configuration Flask XML server Asterisk SIP extensions configuration 0. Configuration server Setting up configuration server for SIP-phones was described on previous post:  Configuration server We will use the following configuration file  startup.cfg : # Configuration server download protocol:HTTP http server:192.168.5.22 #can be IP or FQDN http path:aastra68xxi http port:8888 firmware server: "http://192.168.5.22:8888/firmware" # SIP server sip transport protocol:1 #UDP(1),TCP(2),TLS(4) sip srtp mode:0 #0(SRTP disabled),1(SRTP preferred),2(SRTP only) sip line1 user name: EmergencyCallsOnly sip proxy ip: 192.168.5.22 sip proxy port: 5060 sip registrar ip: 192.168.5.22 sip registrar port: 5060 # XML server xml application uri: "http://192.168.5.22:8888" # Time settings time server disabled:0 #server enabled(0), server disabled(1) time server1: de.pool.ntp.org time zone name: Custom #Required setting if ...

Small HTTP server (Python/Flask) for uploading configuration and FW to Mitel SIP-phones

Image
  Create two local directories:   aastra68xxi   for configuration files and   firmware   for 6xxx.st FW and lang_xx.txt language files. Create  startup.cfg  file in  aastra68xxi  folder: $ cat aastra68xxi/startup.cfg download protocol:HTTP http server:192.168.5.3 # can be IP or FQDN http path:aastra68xxi http port:8888 firmware server: " http://192.168.5.3:8888/firmware " sip transport protocol:1 # UDP(1),TCP(2),TLS(4) sip srtp mode:0 # 0(SRTP disabled),1(SRTP preferred),2(SRTP only) sip line1 user name: EmergencyCallsOnly sip proxy ip: 192.168.5.22 sip proxy port: 5060 sip registrar ip: 192.168.5.22 sip registrar port: 5060 Create  app.py  application script with http routes to these directories: $ cat ./app.py import os from flask import Flask from flask import send_file app = Flask ( __name__ ) @ app . route ( "/" ) def hello_test (): return "Hello World!" ; @ app . route ( '/aastra68xxi/...