Friday, June 22, 2018

Asterisk - target all calls on trunk to specific destination

Lets say you have a bunch of different trunks, sometimes you need to send calls to a specific destination and NOT use DID routing.

This example has calls that come in on a specific trunk, regardless of what the DID is, caller ID or any other identifying manner, will send the call to an internal number.  This could be a ring group that points to an IVR, or a queue etc.

This was tested in FREEPBX distro but should work in most versions of asterisk.  You might need to use the extensions.conf file instead of the override file outlined below for non-freepbx gui users.

Create your trunk in asterisk and at least verify it works.
then in your context for your trunk put this line in:

context=from-yourcustomdestination

then open up /etc/asterisk/extensions_override_freepbx.conf

put this in as an example: (this one dials extension/ringgroup/queue # of 6990.  Just changed the 6990 number to a destination number.

[from-yourcustomdestination]
exten => s,1,Dial(local/6990@from-internal/n,)

save your changes and exit the editor

type in
asterisk -rx 'core reload'

Call your trunk and test.

When you place a call to that trunk, the trunk should dial 6990. 



Wednesday, June 13, 2018

Audiocodes MP-112 firmware recovery

Have you lost communication to the box because of a pooched firmware upgrade? 
Here is a possible way to salvage it.

AudioCodes boxes, upon boot up will do a BootP process, meaning it will do a call out the network immediately on power up to see if it can download a firmware.

Find the program called the "AudioCodes BootP " or ACbootP.  Google should be able to resolve the app

Now you'll need your firmware files. Essentially the .cmp file for your device.

I was not able to make this update process work reliably on Windows 10 at time of writing.


The same process worked perfectly on Windows 7, so FYI.


1>
Install the ACBootP application on your computer.

2>
Download the appropriate firmware files and put them into a folder.
Here are some firmware files that might help too MP-1XX firmware

3>
Set your PC's network interface to 10.1.10.11 as a local IP.  (AudioCodes box uses .10 as their default)

4>
Disable any AntiVirus you may be running.  These can cause conflicts

5>
Launch the ACBootP app.

6>
Set your TFTP directory to point at the folder that you stored your firmware in.

7>
Make sure the default network for new cliwent has the right Ethernet adapter selected.
yours SHOULD show 10.1.10.11  (my screen shot was done later on, my bad).  You are the server.



8>
Press APPLY.

9>
Now click on "CLIENT CONFIGURATION" at the bottom left


10>
Select ADD NEW CLIENT and the stuff below will appear.

11>
Enter in the MAC address of your AudioCodes device (usually written on the bottom of the box)

CLIENT IP is likely the default ip of 10.1.10.10 (this is the IP that the audiocodes box defaults too usually)
subnet 255.255.255.0
gateway shouldn't matter

TFTP SERVER IP is the ip of your computer that has the TFTP on it.

CMP file is the file of your upgrade you want

12>
Hit APPLY.

Connect the AudioCodes box to your laptop via a network cable and power it up.

If all goes well, your device should boot and start downloading


It will flash pretty quick...and should be basically immediately available via Web Browser.

13>
Log in then "burn" the image when done to make sure it has saved properly.


SETUP TFTP in Asterisk (FREEPBX)

SETUP TFTP in Asterisk (FREEPBX)

here's how:

1> Open the file " tftp " in /etc/xinetd.d/ for editing

2> Modify the " server_args " entry to look like this:

server_args = -vv -s /tftpboot 

If your phones need to be able to create directories, you can put in a " -c " option in there as well

3> Save your changes and exit the editor

4> restart the TFTP service using:  service xinetd restart

That SHOULD do it.

5>  You can look at the TFTP status by typing in:

tail -100f /var/log/messages 

This will give you a 'live' update of the actions of the TFTP as they roll into the log.

Example:
Jun 13 13:00:30 BG-PBX-02 in.tftpd[27960]: sending NAK (1, File not found) to 100.4.100.110
Jun 13 13:04:48 BG-PBX-02 in.tftpd[28596]: RRQ from 100.4.100.110 filename 1120.cfg
Jun 13 13:04:52 BG-PBX-02 in.tftpd[28597]: RRQ from 100.4.100.110 filename SIPA4475A347A5A.cfg
Jun 13 13:05:05 BG-PBX-02 in.tftpd[28660]: RRQ from 100.4.100.110 filename dialplan.txt
Jun 13 13:05:05 BG-PBX-02 in.tftpd[28660]: sending NAK (1, File not found) to 100.4.100.110

Jun 13 13:05:28 BG-PBX-02 php: /sbin/iptables  -A fpbxregistrations -s 100.4.100.110/32 -j fpbxknownreg