voip:cisco7940-7960
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| voip:cisco7940-7960 [16/09/2024 09:46] – created - external edit 127.0.0.1 | voip:cisco7940-7960 [26/02/2026 10:35] (current) – [Cisco 3750 switch config] andrew | ||
|---|---|---|---|
| Line 21: | Line 21: | ||
| </ | </ | ||
| + | |||
| + | Better example with QoS for phone. | ||
| + | < | ||
| + | interface FastEthernet1/ | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | mls qos trust device cisco-phone | ||
| + | mls qos trust cos | ||
| + | | ||
| + | </ | ||
| + | |||
| + | This requires QoS to be set on the switch:- | ||
| + | 3750-1(config-if)# | ||
| Line 140: | Line 155: | ||
| Jul 19 20:20:12 localhost in.tftpd[1200]: | Jul 19 20:20:12 localhost in.tftpd[1200]: | ||
| + | |||
| + | Hotline | ||
| + | To create a line that automatically dials a number when the phone goes off-hook use an empty pattern with a timeout of 0 and rewrite containing the number to dial. | ||
| + | |||
| + | ==== Hotline config in dialplan.xml ==== | ||
| + | |||
| + | This matches any digits and immediately dials the rewrite, x1234 in this case. | ||
| + | |||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| Line 212: | Line 240: | ||
| [[https:// | [[https:// | ||
| + | |||
| + | Flask based code to generate XML:- | ||
| + | |||
| + | <code python> | ||
| + | from flask import Flask, request, render_template, | ||
| + | |||
| + | |||
| + | app = Flask(__name__) | ||
| + | |||
| + | |||
| + | # See https:// | ||
| + | |||
| + | @app.route('/ | ||
| + | def xml_response(): | ||
| + | # Define sample data to be returned as XML | ||
| + | data0 = { | ||
| + | ' | ||
| + | ' | ||
| + | } | ||
| + | |||
| + | data1 = { | ||
| + | ' | ||
| + | ' | ||
| + | } | ||
| + | |||
| + | # Convert data to XML format | ||
| + | xml_data = f""" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | """ | ||
| + | |||
| + | # Create a response with the XML content type | ||
| + | response = Response(xml_data, | ||
| + | return response | ||
| + | |||
| + | |||
| + | @app.route('/ | ||
| + | def xml_opt0_response(): | ||
| + | # Define sample data to be returned as XML | ||
| + | data0 = { | ||
| + | ' | ||
| + | ' | ||
| + | } | ||
| + | |||
| + | # Convert data to XML format | ||
| + | xml_opt0_data = f""" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | """ | ||
| + | |||
| + | # Create a response with the XML content type | ||
| + | response = Response(xml_opt0_data, | ||
| + | return response | ||
| + | </ | ||
| Line 219: | Line 321: | ||
| [[https:// | [[https:// | ||
| + | [[https:// | ||
| + | |||
| + | ---- | ||
| + | |||
| + | This page has been accessed:- \\ | ||
| + | Today: {{counter|today}} \\ | ||
| + | Yesterday: {{counter|yesterday}} \\ | ||
| + | Until now: {{counter|total}} \\ | ||
voip/cisco7940-7960.1726479992.txt.gz · Last modified: by 127.0.0.1
