remove nvram uci add voice_client uci

This commit is contained in:
Sukru Senli 2015-05-21 10:52:47 +02:00 committed by Martin Schröder
parent 00883253d3
commit 69d15acd73
2 changed files with 110 additions and 98 deletions

View file

@ -174,102 +174,113 @@
"fw_down_path": { dvalue: "", type: String, required: false}
}
},
"broadcom": {
"broadcom": {
"init": { dvalue: '1', type: String },
"debug": { dvalue: '0', type: String },
"wl0_cfgno": { dvalue: '', type: String },
"wl0_reg_mode": { dvalue: 'h', type: String },
"wl_5g_radio": { dvalue: 'wl0', type: String },
"wl0_acs_chan_dwell_time": { dvalue: '70', type: String },
"wl0_acs_chan_flop_period": { dvalue: '70', type: String },
"wl0_acs_ci_scan_timeout": { dvalue: '300', type: String },
"wl0_acs_ci_scan_timer": { dvalue: '4', type: String },
"wl0_acs_cs_scan_timer": { dvalue: '7200', type: String },
"wl0_acs_scan_entry_expire": { dvalue: '3600', type: String },
"wl0_acs_tx_idle_cnt": { dvalue: '5', type: String },
"wl0_acs_lowband_least_rssi": { dvalue: '-75', type: String },
"wl0_acs_fcs_mode": { dvalue: '0', type: String },
"wl0_acs_dfs": { dvalue: '1', type: String },
"wl0_acs_dfsr_activity": { dvalue: '30 10240', type: String },
"wl0_acs_dfsr_deferred": { dvalue: '604800 5', type: String },
"wl0_acs_dfsr_immediate": { dvalue: '300 3', type: String },
"wl0_apsta": { dvalue: '0', type: String },
"wl0_mode": { dvalue: 'ap', type: String },
"wl0_ifname": { dvalue: 'wl0', type: String },
"wl0_ssid": { dvalue: '', type: String },
"wl0_radio": { dvalue: '1', type: String },
"wl0_infra": { dvalue: '1', type: String },
"wl0_auth": { dvalue: '0', type: String },
"wl0_preauth": { dvalue: '0', type: String },
"wl0_net_auth_type": { dvalue: '1', type: String },
"wl0_wep": { dvalue: 'disabled', type: String },
"wl0_wpa_gtk_rekey": { dvalue: '0', type: String },
"wl0_akm": { dvalue: 'psk psk2', type: String },
"wl0_crypto": { dvalue: 'tkip+aes', type: String },
"wl0_wpa_psk": { dvalue: '', type: String },
"wl0_auth_mode": { dvalue: 'psk', type: String },
"wl0_wps_mode": { dvalue: 'enabled', type: String },
"router_disable": { dvalue: '0', type: String },
"wps_modelnum": { dvalue: '', type: String },
"boardnum": { dvalue: '', type: String },
"wps_modelname": { dvalue: 'Broadcom', type: String },
"wps_mfstring": { dvalue: 'Broadcom', type: String },
"wps_device_name": { dvalue: 'Inteno', type: String },
"wps_version2": { dvalue: 'enabled', type: String },
"lan_wps_reg": { dvalue: 'enabled', type: String },
"lan_wps_oob": { dvalue: 'disabled', type: String },
"wps_button_gpio": { dvalue: '22', type: String },
"wps_oob_configured": { dvalue: '1', type: String },
"wps_config": { dvalue: 'DONE', type: String },
"wl0_vifs": { dvalue: 'wl0', type: String },
"wl0_network": { dvalue: 'lan', type: String },
"wl0_bss_enabled": { dvalue: '1', type: String },
"wl0_hwaddr": { dvalue: '', type: String },
"wl_main_ifnames": { dvalue: 'wl0 wl1', type: String },
"wl1_cfgno": { dvalue: '', type: String },
"wl_2g_radio": { dvalue: 'wl1', type: String },
"acs_ifnames": { dvalue: 'wl0 wl1', type: String },
"wl1_acs_chan_dwell_time": { dvalue: '70', type: String },
"wl1_acs_chan_flop_period": { dvalue: '70', type: String },
"wl1_acs_ci_scan_timeout": { dvalue: '300', type: String },
"wl1_acs_ci_scan_timer": { dvalue: '4', type: String },
"wl1_acs_cs_scan_timer": { dvalue: '7200', type: String },
"wl1_acs_scan_entry_expire": { dvalue: '3600', type: String },
"wl1_acs_tx_idle_cnt": { dvalue: '5', type: String },
"wl1_acs_lowband_least_rssi": { dvalue: '-75', type: String },
"wl1_acs_fcs_mode": { dvalue: '1', type: String },
"wl1_acs_dfs": { dvalue: '0', type: String },
"wl1_apsta": { dvalue: '0', type: String },
"wl1_mode": { dvalue: 'ap', type: String },
"wl1_ifname": { dvalue: 'wl1', type: String },
"wl1_ssid": { dvalue: '', type: String },
"wl1_radio": { dvalue: '1', type: String },
"wl1_infra": { dvalue: '1', type: String },
"wl1_auth": { dvalue: '0', type: String },
"wl1_preauth": { dvalue: '0', type: String },
"wl1_net_auth_type": { dvalue: '1', type: String },
"wl1_wep": { dvalue: 'disabled', type: String },
"wl1_wpa_gtk_rekey": { dvalue: '0', type: String },
"wl1_akm": { dvalue: 'psk psk2', type: String },
"wl1_crypto": { dvalue: 'tkip+aes', type: String },
"wl1_wpa_psk": { dvalue: '', type: String },
"wl1_auth_mode": { dvalue: 'psk', type: String },
"wl1_wps_mode": { dvalue: 'enabled', type: String },
"wl1_vifs": { dvalue: 'wl1', type: String },
"wl1_network": { dvalue: 'lan', type: String },
"wl1_bss_enabled": { dvalue: '1', type: String },
"wl1_hwaddr": { dvalue: '', type: String },
"wlmngr": { dvalue: 'done', type: String },
"lan_ifname": { dvalue: 'br-lan', type: String },
"lan_ifnames": { dvalue: '', type: String },
"wps_device_pin": { dvalue: '', type: String },
"wps_config_method": { dvalue: '0x2688', type: String },
"wps_aplockdown": { dvalue: '0', type: String },
"wps_button": { dvalue: '0', type: String },
"wps_sta_pin": { dvalue: '00000000', type: String },
"wl_unit": { dvalue: '0', type: String },
"wps_proc_status": { dvalue: 0, type: Number }
"voice_client": {
"brcm_line": {
"extension": { dvalue: "0000", type: String},
"sip_account": { dvalue: "-", type: String},
"noise": { dvalue: 0, type: Number },
"vad": { dvalue: 0, type: Number },
"txgain": { dvalue: 0, type: Number },
"rxgain": { dvalue: 0, type: Number },
"echo_cancel": { dvalue: true, type: Boolean },
"callwaiting": { dvalue: false, type: Boolean },
"clir": { dvalue: false, type: Boolean },
"name": { dvalue: "", type: String}
},
"dialplan": {
"custom_outgoing_enabled": { dvalue: false, type: Boolean },
"custom_incoming_enabled": { dvalue: false, type: Boolean },
"custom_hangup_enabled": { dvalue: false, type: Boolean },
"all_ports_extension": { dvalue: "#123456", type: String},
"test_audio_extension": { dvalue: "#123457", type: String},
"test_echo_extension": { dvalue: "#123458", type: String},
"record_message_extension": { dvalue: "#999999", type: String}
},
"sip_advanced": {
"rtpstart": { dvalue: 10000, type: Number },
"rtpend": { dvalue: 20000, type: Number },
"dtmfmode": { dvalue: "rfc2833", type: String},
"remotehold": { dvalue: "yes", type: String},
"contact_line_suffix": { dvalue: 1, type: Number },
"registertimeoutbackoff": { dvalue: 512, type: Number },
"registerattemptsbackoff": { dvalue: 0, type: Number },
"register403timeout": { dvalue: 0, type: Number },
"register503timeout": { dvalue: 0, type: Number },
"registertimeoutguardsecs": { dvalue: 15, type: Number },
"registertimeoutguardlimit": { dvalue: 30, type: Number },
"registertimeoutguardpct": { dvalue: "0.2", type: String},
"defaultexpiry": { dvalue: 300, type: Number },
"tls_version": { dvalue: "tlsv1", type: String},
"tls_cipher": { dvalue: "'DES-CBC3-SHA", type: String},
"dnsmgr": { dvalue: "no", type: String},
"dnsmgr_refresh_interval": { dvalue: 300, type: Number },
"srvlookup": { dvalue: "yes", type: String}
},
"brcm_advanced": {
"country": { dvalue: "SWE", type: String},
"jbenable": { dvalue: "yes", type: String},
"jbforce": { dvalue: "no", type: String},
"jbmaxsize": { dvalue: 500, type: Number },
"jbimpl": { dvalue: "adaptive", type: String},
"genericplc": { dvalue: "yes", type: String},
"dialoutmsec": { dvalue: 4000, type: Number },
"cw_enable": { dvalue: "yes", type: String}
},
"features": {
"cbbs_enabled": { dvalue: true, type: Boolean },
"callforward_enabled": { dvalue: true, type: Boolean },
"redial_enabled": { dvalue: true, type: Boolean },
"callreturn_enabled": { dvalue: true, type: Boolean },
"advanced_register_settings": { dvalue: true, type: Boolean },
},
"sip_service_provider": {
"name": { dvalue: "", type: String},
"enabled": { dvalue: true, type: Boolean },
"codec0": { dvalue: "alaw", type: String},
"codec1": { dvalue: "ulaw", type: String},
"codec2": { dvalue: "g729", type: String},
"codec3": { dvalue: "g726", type: String},
"autoframing": { dvalue: 1, type: Number },
"call_lines": { dvalue: 0, type: Number },
"cfim_on": { dvalue: "*21*", type: String},
"cfim_off": { dvalue: "#21#", type: String},
"cfbs_on": { dvalue: "*61*", type: String},
"cfbs_off": { dvalue: "#61#", type: String},
"call_return": { dvalue: "*69", type: String},
"redial": { dvalue: "*66", type: String},
"is_fax": { dvalue: 0, type: Number },
"transport": { dvalue: "udp", type: String},
"priority_ulaw": { dvalue: 2, type: Number },
"priority_alaw": { dvalue: 1, type: Number },
"priority_g729": { dvalue: 3, type: Number },
"priority_g723": { dvalue: 1, type: Number },
"priority_g726": { dvalue: 4, type: Number },
"call_filter": { dvalue: "call_filter0", type: String}
},
"log": {
"console": { dvalue: "notice,warning,error", type: String },
"messages": { dvalue: "error", type: String },
"syslog_facility": { dvalue: "local0", type: String }
},
"speed_dial": {
"tone": { dvalue: 1, type: Number },
"number": { dvalue: "", type: String }
},
"call_filter": {
"name": { dvalue: "Default", type: String }
"block_foreign": { dvalue: false, type: Boolean },
"block_special_rate": { dvalue: false, type: Boolean }
},
"call_filter_rule_outgoing": {
"owner": { dvalue: "call_filter0", type: String }
"enabled": { dvalue: false, type: Boolean },
"extension": { dvalue: "321#", type: String }
},
"call_filter_rule_incoming": {
"owner": { dvalue: "call_filter0", type: String }
"enabled": { dvalue: false, type: Boolean },
"extension": { dvalue: "123#", type: String }
}
},
//"ddns": {

View file

@ -1143,7 +1143,8 @@ rpc_luci2_upgrade_clean(struct ubus_context *ctx, struct ubus_object *obj,
struct ubus_request_data *req, const char *method,
struct blob_attr *msg)
{
const char *fwpath = "/tmp/firmware.bin";
char fwpath[255];
strcpy(fwpath, "/tmp/firmware.bin");
struct uci_package *p;
struct uci_element *e;
@ -1170,7 +1171,7 @@ rpc_luci2_upgrade_clean(struct ubus_context *ctx, struct ubus_object *obj,
if (ptr.o && ptr.o->type == UCI_TYPE_STRING)
{
fwpath = strdup(ptr.o->v.string);
strncpy(fwpath, ptr.o->v.string, sizeof(fwpath));
}
uci_unload(cursor, p);