Yealink VLAN DHCP Scope configuration on VLAN Windows DHCP Server

Yealink VLAN DHCP Scope configuration on VLAN Windows DHCP Server

To configure Yealink phones to get VLAN ID from the default DHCP Server follow the below instructions.

Step 1

Login to local windows dhcp server and configure a new scope option for Yealink phone.
a) Right click IPv4
b) select “Set Predefined Options”
windows_dhcp_define_new_scope_option

Step 2

a) Click on “Add”
b) Fill the “Option Type”
c) Select “Data Type” as String.
d) Code is “132”
e) Finish the Options by clicking “OK” on all other dialog boxes.
yealink_define_vlan_code

Step 3

a) Right click Scope Options
b) Select “Configure Options”
configure_dhcp_options

Step 4

a) Scroll till the end of the list and select the Yealink VLAN option.
b) Under String value put the VLAN ID which you want to set on yealink phone.

yealink_dhcp_vlan_scope

Polycom Paging : New Firmware : Elastix

Change the value of  $alertinfo = ‘Alert-Info: Ring Answer’ to  $alertinfo = ‘Alert-Info: Auto Answer’
File : /var/www/html/admin/modules/paging/functions.inc.php

Login to Elastix, Navigate to PBX >> Paging and Intercom >> Add new extension for Paging.

Disable / Enable Elstatix GUI (httpd) from your phone: Asterisk Dialplan

  1. Create 2 scripts to start & stop httpd daemon.
    1. httpstop
      #!/usr/bin/php
      <?php
      $output = $ret = NULL;
      exec("/sbin/service httpd stop 2>&1", $output, $ret);
      ?>
    2. httpstart
      #!/usr/bin/php
      <?php
      $output = $ret = NULL;
      exec("/sbin/service httpd start 2>&1", $output, $ret);
      ?>
  2. Make them executable (chmod +x) and copy to /usr/share/elastix/privileged
  3. Edit the file /etc/asterisk/extensions_custom.conf and add the lines under context [from-internal-custom].
    [from-internal-custom]
    exten => 120,1,Playback(posix-restarting) ; "Stop HTTP Server"
    exten => 120,2,Wait(1)
    exten => 120,3,System(sudo /usr/sbin/elastix-helper httpstop)
    exten => 120,4,Playback(disabled)
    exten => 120,5,Hangup
    
    exten => 121,1,Playback(posix-restarting) ; "Start HTTP server"
    exten => 121,2,Wait(1)
    exten => 121,3,System(sudo /usr/sbin/elastix-helper httpstart)
    exten => 121,4,Playback(enabled)
    exten => 121,5,Hangup

    I used the number 120 to stop the web server & 121 to start it.

  4. Reload asterisk and dial 120 & 121 to test.
  5. If you want to dial it from outside add above numbers in “Misc Destination” menu and then select them from IVR menu.

Elastix Tips

Change “From  Name”  in Elastix/FreePBX FAX to Email

Edit the file /var/lib/asterisk/bin/fax-process.pl

Change the line starting with “From: $from” to  “From: FAX Mailer \<$from\>” or put any name instead of FAX Mailer.

Assign only one Fax Device for each elastix user

Edit  the file /var/www/html/modules/sendfax/index.php

Comment the line starting with  $arrFaxList = array(“none”=> and add the below two lines.

// $arrFaxList = array(“none”=>’– ‘.$arrLang[“Select a Fax Device”].’ –‘);
$usrname=$_SESSION[‘elastix_user’];
exec(“sqlite3 -separator ‘|’ /var/www/db/acl.db \”select extension from acl_user where name=’$usrname’\””,$user_exten);

Add the following line after the line starting with  “foreach($faxes as $values){“

if($_SESSION[‘elastix_user’] == “admin” || $user_exten[0] == $values[‘extension’])

Edit  the file /var/www/html/modules/faxviewer/index.php

Add the following 2 lines after the line starting with  “if(is_array($arrResult) && $total>0) {“

$usrname=$_SESSION[‘elastix_user’];
exec(“sqlite3 -separator ‘|’ /var/www/db/acl.db \”select extension from acl_user where name=’$usrname’\””,$user_exten);

Add the following line after the line starting with   ” $fax[$k] = htmlentities($fax[$k], ENT_COMPAT, ‘UTF-8’);”

 if($user_exten[0] == $fax[‘destiny_fax’] OR $_SESSION[‘elastix_user’] == “admin”){

Add a close the bracket after ” “<a href=’?menu=$module_name&action=edit&id=”.$fax[‘id’].”‘>”._tr(‘Edit’).”</a>”); }

Change Elastix admin password

sqlite3 /var/www/db/acl.db "UPDATE acl_user SET md5_password = '`echo -n password|md5sum|cut -d ' ' -f 1`' WHERE name = 'admin'"

Now Elastix admin password is 'password' (without quotes)

Add a New Menu Item in Elastix / Issabel GUI

You want to publish a URL, example a database manager URL which you can access it with https://<elasitx_ip>/dbadmin.

Your dbadmin is located under the folder /var/www/html/


then add the menu:
——————————–
sqlite3 /var/www/db/menu.db
——————————–

If you want add to the menu extras:
——————————–
insert into menu values('dbadmin', 'extras', 'FOLDER', 'dbAdmin', 'frame','7');
——————————–
FOLDER is the name of your dbadmin folder in /var/www/html

then add the next:
——————————–
sqlite3 /var/www/db/acl.db
insert into acl_resource values(124, 'dbAdmin', 'dbAdmin');

——————————–

Note: See the first value (it’s a number: 124), it can’t be the same of another, first
review the last id with:
——————————–
select * from acl_resource;
——————————–
and choose the last one +1

Finally add:
——————————–
insert into acl_group_permission values(166, 1, 1, 124);
——————————–
Note: The first number (166) is:
——————————–
select * from acl_group_permission;
——————————–
the last one +1

the last number (124) is the same that the inserted in the acl_resource

Now you can see the module dbAdmin in Elastix – Extras
Remember that if you are logged you need logout and login.

Copied from new elastix forum location