Some vendors offer different quality options on their routes.  Best example of this is VoxBeam, which offers 4 types of qualities.

LCR for FusionPBX application  allows you to select different service qualities. Follow these steps:

  1. Go to App -> LCR menu and configure your carriers by quality. In this example we are going to use Voxbeam
    fusionpbx lcr 3 carriers
  2. Most carriers require a prefix to specify quality. Edit a carrier and link a gateway with the given prefix.
    fusionpbx lcr carrier with prefix
    This example adds 0011102 prefix. Repeat this step on each carrier.
  3. Add your buying prices on each carrier.
  4. Edit the lcr.conf.xml file and add a LCR profile as the following (some variations may take place because database type or customizations):

    <profile name="select">
    <param name="custom_sql" value="
    SELECT
    l.digits AS lcr_digits,
    c.carrier_name AS lcr_carrier_name,
    l.rate as lcr_rate_field,
    cg.prefix AS lcr_gw_prefix,
    cg.suffix AS lcr_gw_suffix,
    l.lead_strip AS lcr_lead_strip,
    l.trail_strip AS lcr_trail_strip,
    l.prefix AS lcr_prefix,
    l.suffix AS lcr_suffix,
    cg.codec AS lcr_codec,
    (SELECT rate FROM v_lcr WHERE v_lcr.lcr_profile = '${lcr_profile}' AND v_lcr.carrier_uuid IS NULL AND v_lcr.lcr_direction = 'outbound' AND v_lcr.digits IN (${lcr_query_expanded_digits}) ORDER BY digits DESC, rate ASC LIMIT 1) AS lcr_user_rate,
    'carriers' AS lcr_limit_realm,
    c.carrier_name AS lcr_limit_id,
    c.carrier_channels AS lcr_limit_max,
    a.type_value as nibble_account,
    (SELECT rate FROM v_lcr WHERE v_lcr.lcr_profile = '${lcr_profile}' AND v_lcr.carrier_uuid IS NULL AND v_lcr.lcr_direction = 'outbound' AND v_lcr.digits IN (${lcr_query_expanded_digits}) ORDER BY digits DESC, rate ASC LIMIT 1) AS nibble_rate,
    l.connect_increment as lcr_first_increment,
    l.talk_increment as lcr_second_increment,
    (SELECT connect_increment FROM v_lcr WHERE v_lcr.lcr_profile = '${lcr_profile}' AND carrier_uuid IS NULL AND v_lcr.lcr_direction = 'outbound' AND digits IN (${lcr_query_expanded_digits}) ORDER BY digits DESC, rate ASC limit 1) AS lcr_user_first_increment,
    (SELECT talk_increment FROM v_lcr WHERE v_lcr.lcr_profile = '${lcr_profile}' AND carrier_uuid IS NULL AND v_lcr.lcr_direction = 'outbound' AND digits IN (${lcr_query_expanded_digits}) ORDER BY digits DESC, rate ASC limit 1) AS lcr_user_second_increment,
    (SELECT IF(strcmp(credit_type,'prepaid'),credit,0.5) FROM v_billings WHERE type_value='${accountcode}') as nobal_amt,
    (SELECT IF(strcmp(credit_type,'prepaid'),credit,1) FROM v_billings WHERE type_value='${accountcode}') as lowbal_amt,
    '${for_fax}' as fax
    FROM v_lcr l
    JOIN v_carriers c ON l.carrier_uuid=c.carrier_uuid
    JOIN v_carrier_gateways cg ON c.carrier_uuid=cg.carrier_uuid
    JOIN v_billings a ON a.type_value='${accountcode}'
    WHERE c.enabled = 'true'
    AND cg.enabled = 'true'
    AND l.enabled = 'true'
    AND l.lcr_direction = 'outbound'
    AND l.lcr_profile = '${lcr_profile}'
    AND NOW() >= l.date_start
    AND NOW() < l.date_end
    AND l.digits IN (${lcr_query_expanded_digits})
    ORDER BY digits DESC, lcr_rate_field ASC, l.date_start DESC;
    "/>
    <param name="export_fields" value="nibble_account,nibble_rate,lcr_first_increment,lcr_second_increment,lcr_user_first_increment,lcr_user_second_increment,nobal_amt,lowbal_amt"/>
    </profile>

  5. Reload the Freeswitch's mod_lcr module with fs_cli -x 'reload mod_lcr' command
  6. Edit dialplans as the following example:
    fusionpbx prefix outbound dialplan
    In this case, you must dial 2* as prefix to access 'direct' quality. Note the lcr_profile=direct and lcr/selelect/$1 lines.

About OKay

An IT Company whose mission is generating value with low cost of ownership.

We will offer you Linux based solutions that satisfy your needs. We focus on VoIP & Linux, but we are up for any other challenge you may want to bring.