Grandstream idle screen
Aus metasec wiki
Version vom 25. November 2009, 12:04 Uhr von Admin (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „ <pre> [grandstream-idle-screen-refresh] Event=>x-gs-screen Content-Length=>0 </pre> <pre> <?php include("/var/www/zphone/etc/config.inc.php"); include($CCBOX[…“)
[grandstream-idle-screen-refresh] Event=>x-gs-screen Content-Length=>0
<?php include("/var/www/zphone/etc/config.inc.php"); include($CCBOX["INC"]."func_sql.inc.php"); include($CCBOX["INC"]."func_manager.inc.php"); function zphone_manager_db_get( $family, $key ) { $str = trim(zphone_manager_exec_cmd("database get ".$family." ".$key)); $uml_nr = (string)str_replace("Value: ","", $str ); if ( $uml_nr == "" || $uml_nr == -1 || $uml_nr == "0I>" || $uml_nr == 0 ) return -1; else return $uml_nr; return true; } $str = $_SERVER["HTTP_USER_AGENT"]; $_arr = explode("DevId", $str); $_arr[1] = trim($_arr[1]); $s = new SQL; $s->query("SELECT ae_ext FROM ast_users WHERE ae_mac_ip='".strtoupper($_arr[1])."'"); $s->next_record(); $ae_ext = $s->f("ae_ext"); $s->free_result(); //$uml = $ae_ext; $uml = zphone_manager_db_get( "uml_target", $ae_ext ); print("<?xml version=\"1.0\"?>\n"); ?> <Screen> <IdleScreen> <ShowStatusLine>true</ShowStatusLine> <DisplayString font="f10h" halign="Center" a1reg="false"> <DisplayStr>$N</DisplayStr> <X>64</X> <Y>1</Y> </DisplayString> <DisplayString font="f10b" halign="Center" a1reg="true"> <DisplayStr>$N</DisplayStr> <X>64</X> <Y>1</Y> </DisplayString> <DisplayString font="f16" halign="Center" a1reg="false"> <DisplayStr>$X</DisplayStr> <X>64</X> <Y>10</Y> </DisplayString> <DisplayString font="f16b" halign="Center" a1reg="true"> <DisplayStr>$X</DisplayStr> <X>64</X> <Y>10</Y> </DisplayString> <?php if ( $uml > 0 ) { ?> <DisplayString font="f8" halign="Center" a1reg="true"> <DisplayStr>UML: <?php print($uml); ?></DisplayStr> <X>64</X> <Y>28</Y> </DisplayString> <?php } ?> <DisplayString font="f8" halign="Center"> <DisplayStr>$M $D, $Y</DisplayStr> <X>64</X> <Y>40</Y> </DisplayString> </IdleScreen> </Screen>
exten => h,n,System(/usr/sbin/asterisk -rx "sip notify grandstream-idle-screen-refresh ${CALLERID(num)}")