Page tree
Skip to end of metadata
Go to start of metadata

The setup to use IQ trunks is intended for systems that have no other trunks enabled. The steps listed here may break the outbound dialing of existing trunks.

Centurylink(CL) will provide a data set that will be similar to the following:

Group TN: 5554441212
Pilot TN: 5554441210
Pilot User: 5554441210@voip.centurylink.com
Trunk Group SIP ID: 262530-5554441210 
Trunk Group SIP Password: 3Cj8G42m8 
CenturyLink SBC IPv4 Address: 216.206.64.91:5100 
CenturyLink SBC IPv6 Address: [0000:0000:0000:0000:0000:0000:0000:0001]:5100 

Step-by-step guide

There are a few preparatory steps that I suggest you do 1st to have them out of the way: 

  1. Edit the /etc/hosts file to include the IP voip.centurylink.com should resolve to ( note that every account may have a different SBC IP so use what CL provides.)

    127.0.0.1 phones.phones.com localhost localhost.localdomain localhost4
    
    ::1 phones.phones.com localhost localhost6
    
    216.206.64.91 voip.centurylink.com 


  2. Edit the /etc/asterisk/extensions_custom.conf to include the following

    [macro-dialout-trunk-predial-hook]
    
    exten => s,1,SIPAddHeader(P-Asserted-Identity: "5554441210" <sip:[email protected]>)
    
    exten => s,n(done),MacroExit()
  • Setup the actual SIP Trunk. At this time the instructions are for chan_sip, pjsip trunk instructions are not available yet.

    General
    -Name the trunk something that makes sense for you
    -Use the Pilot TN: 5554441210 for Outbound CallerID

    Outgoing
    - Set the Trunk Name to "Centurylink_SIP
    - Populate the PEER Details:


    username=262530-5554441210 <-- Trunk Group SIP ID: 262530-5554441210 
    type=peer
    secret= 3Cj8G42m8 <-- Trunk Group SIP Password: 3Cj8G42m8 
    insecure=very
    host=voip.centurylink.com
    port=5100
    context=from-trunk
    disallow=all
    allow=ulaw
    ;directmedia=nat <-- NOTE that you should only enable this when behind a router and am using NAT

    Incoming

    - USER Context as the Pilot TN: 5554441210

    - USER Details as 'type=peer'

    - Register String as [email protected]:3Cj8G42m8:[email protected]:5100/5554441210~3600

  • Pilot User:Trunk Group SIP Password:Trunk Group SIP ID@CenturyLink SBC IPv4 Address/Pilot TN~3600 ( tilde 3600)

At this point submit and apply config. You will still need to add your Inbound Routes as needed.

 

1 Comment

  1. If you have more than 1 IQ SIP Trunk, this might be a solution for you!

    REGEX matchs the TRUNKOUTCID (set on Trunk page / OUTBOUND CallerID) and then Execif to set the  proper PAI for the trunk being used.  Outbound CallerID must be unique for each Trunk.

    [macro-dialout-trunk-predial-hook]
    exten => s,1,Execif(${REGEX("5554441234" ${TRUNKOUTCID})}?SIPAddHeader(P-Asserted-Identity: <sip:[email protected]voip.centurylink.com>)
    exten => s,n,Execif(${REGEX("5554441235" ${TRUNKOUTCID})}?SIPAddHeader(P-Asserted-Identity: <sip:[email protected]voip.centurylink.com>)
    exten => s,n(done),MacroExit()