TUTORIAL AvantFax DID Routing

Joined
Sep 23, 2017
Messages
98
Reaction score
22
These instructions are for IncrediblePBX. The version I am running is the Raspberry Pi 3 version released 2018-08-25 file name incrediblepbx13-raspbian8-gvsip.zip

These instructions might need to be modified for your system.

I wanted to setup AvantFax to have multiple DID routing to different email addresses and users. I could not find a good tutorial anywhere online but I was able to figure it out from bits and pieces hanging on the internet.

As with anything make backups of your system and files before making changes.

Start by changing the caller ID settings in AvantFax local_config.php file

Code:
nano /var/www/html/avantfax/includes/local_config.php

Code:
        $CALLIDn_CIDNumber      = 1;
        $CALLIDn_CIDName        = 2;
        $CALLIDn_DIDNum         = 4;


Activate DID routing Scroll down to ENABLE_DID_ROUTING and make it true. This setting will activate a new menu option in the AdvantFax administration page.

Code:
$ENABLE_DID_ROUTING     = true;

Turn off AUTOCONFIGDID. It automatically enters routes based on incoming caller id numbers. For me not necessary.

Code:
$AUTOCONFDID            = false;

Close out the AvantFax config file

Now you need to make a change to the Asterisk Extension custom config to force the DID to be sent to the fax server when it receives a call.

Code:
nano /etc/asterisk/extensions_custom.conf

Scroll down to [custom-fax-iaxmodem]

Change the EXTEN to FROM_DID

Code:
exten => s,n,Dial(IAX2/iax-fax0/${FROM_DID})
exten => s,n,Dial(IAX2/iax-fax1/${FROM_DID})
exten => s,n,Dial(IAX2/iax-fax2/${FROM_DID})
exten => s,n,Dial(IAX2/iax-fax3/${FROM_DID})

Close out the custom extension file

Now you have to make a change to all of the IAX modems in the Hylafax directory. At default that will be config.ttyIAX0-3

Code:
nano /etc/hylafax/config.ttyIAX0

Find the line

# You'll likely want Caller*ID display (also displays DID) enabled.
#

Below it make sure this line is uncommented

Code:
ModemResetCmds:                AT+VCID=1       # enables CallID display

Scroll down again to below the line

# Uncomment DATE and TIME if you really want them, but you probably don't.

Make sure that the following are all uncommented

Code:
CallIDPattern:          "NMBR="
CallIDPattern:          "NAME="
CallIDPattern:          "ANID="
CallIDPattern:          "NDID="

That should be all the config file changes that need to be made. Everything else is done in the AvantFax Web Interface.


Log into your AvantFax administration page

Click the monitor with the wrench icon below the logged on username. It takes you to a dashboard.

Click the Menu drop down list and select DID/DTMF Groups

In the field DID/DTMF digits* add the 10 digit phone numbers

Add that same number into the Alias field. I haven't figured out what the purpose of the alias field is for.

Add the email address the fax should be sent to in contacts.

Click Create

Go back to the menu and go to the User List. That is assuming you already have the user created. If not create one. At the bottom of the form you should see the DID Group you created. Give this user access to that group.

You will also notice there is a default group "Catch All". This group is for any incoming fax that might not have proper DID information. Theoretically that number would not make it to the AvantFax server still it might be a good idea to assign that to a user.

The last thing you will want to do if you haven't at this point is point your DID to the Custom Destinations: Fax (HylaFax) from within Inbound Routes.

You should now be able to assign a number of users their own fax DID.

And finally reboot the system to apply the changes.
 
Last edited:

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
772
Reaction score
124
DoubleDriveLine,

Thanks for this post.

I followed it (hopefully to the letter) and 2 things:

1 (the little one), you have a typo. Where you typed "Scroll down to [custom_fax-iaxmodem]" it should be " ... [custom-fax-iaxmodem]"

2. (more importantly), I have created two groups based on the DID, and I no longer get an email of the PDF to either the original or the new one. I get a confirmation email as the sender, but no pdf. Clearly I have done something wrong, but I'm not sure how to diagnose the problem since I don't get any error messages.

The faxes with PDF do show up in my AvantFax inbox for both DIDs. In the InBox, the faxes seem to have been caught by the 'CatchAll' and the phone number it was sent FROM (not to, which is the routing) is prefaced by +1 (ie +18005551212, not 8005551212).

Thoughts on my problem (anyone)?

Andrew
 
Last edited:

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
772
Reaction score
124
I restored my original setup via Clonezilla. Emails ARE being sent from the system with the PDF of the fax. So, it is working correctly prior to changes.

Any thoughts on what might be borking the system for emails/routing?

I'd love to get this working - a friend wants to use my system for his incoming fax line - and I've agreed, prior to getting this working.

My second option is to set his incoming line to detect faxes (use SIP choice?) and forward to a dummy extension with an email address to him.

Would I need to set detectfax=yes in the trunk, or just in the incoming route description?

Help, Help?

Andrew
 

Members online

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top