CUCM Asterisk SIP Trunk Integration

CUCM Asterisk SIP Trunk Integration

Today, lets configure a Trunk between CUCM and Asterisk. I was pretty much happier when i got this configured and working, hope you would also be happy as well. Lets start.

CUCM CONFIGURATION


1. Login to Cisco Unified Communication Manager.
2. Create a Trunk between CUCM and Asterisk. To do this follow the below shared steps.

  • Go to Device -> Trunk -> Add a New Trunk -> Trunk Type = SIP Trunk
  • Device Protocol -> SIP Trunk
  • Trunk Service Type -> None (Default)
  • Click on Next
  • Device Name – Trunk-to-Asterisk
  • Description – Trunk configured for Asterisk
  • Device Pool – Select appropriate Device Pool
  • MRGL – Select appropriate MRGL
  • Location – Select appropriate Location
  • Check Mark – Media Termination Point Required
  • Check Mark – Retry Video Call as Audio
  • Inbound Calls – Select appropriate Calling Search Space
  • Check Mark – Redirecting Diversion Header Delivery – Inbound
  • SIP Information – Enter Asterisk IP Address under Destination Address X.X.X.X
  • Enter the Port as 5060
  • Select SIP Trunk Security Profile – Non Secure SIP Trunk Security Profile
  • SIP Profile – Standard SIP Profile
  • Click on Save
  • Click on Apply
  • Click on Reset

3. Create Route Pattern which points to Asterisk. To do this follow the below shared steps.

  • Go to Call Routing -> Route/Hunt -> Route Pattern
  • Click on Add New
  • Route Pattern -> Enter appropriate Route Pattern which will be routed to Asterisk
  • Route Partition -> Enter appropriate Route Partition which a caller can call
  • Gateway/Route List -> Select the trunk which was created in Point 2.

3. Change Outgoing Transport Type as UDP. To do this follow the below shared steps.

  • Go to System -> Security -> Non Secure SIP Trunk Security Profile
  • Select Outgoing Transport Type as UDP
  • Click on Save
  • Click on Apply
  • Click on Reset

 


 

CONFIGURATION ON ASTERISK


1. Login to Asterisk.

2. Create a New Trunk. To do this, follow the below step.

  • Trunk Name – Enter a Trunk Name
  • Outgoing Settings – Trunk Name – Enter a Name of the Trunk
  • Under peer details enter the following

type=peer
host=X.X.X.X {IP Address of the CUCM}
port=5060
insecure=port,invite
nat=no
disallow=all
allow=ulaw,alaw
qualify=yes

  • Click on Save

3. Create Outbound Routes which will be pointing to CUCM. To do this, follow the below step

  • Add New Route
  • Route Name – Enter a Route Name
  • Match Pattern – 8101XXXX
  • Trunk Sequence for Matched Pattern – Select The Trunk from Drop Down Menu which was created in Step 2
  • Click on Save

Note – Configure NAT Settings, IP Address Settings and Anonymous calls settings before or after you create the Trunks on Asterisk and CUCM. The settings has to be done on Asterisk PBX. Please follow the link – https://www.uccollabing.com/2016/06/30/cucm-asterisk-sip-settings-basic/ if you haven’t already configured NAT Settings, IP Address Settings and Anonymous call settings.

Now you are done and you are ready to received and make calls via Asterisk – CUCM and vice-versa.

32 thoughts on “CUCM Asterisk SIP Trunk Integration”

    1. Trunk setup with Elastix & CUCM & incoming/outgoing is ok but only CUCM site can hear means one side audio problem. So, have any solution for it?

  1. Hello Baris,
    Thank You for confirmation. Yes, that’s possible to dial call manager extension in asterisk. The above steps guides how to create an outbound dial pattern which routes the call from Asterisk to CUCM and vice-versa. Let me know if you still have questions.

    1. Hello Avinash,
      I couldn’t figured out how dial CCM extension on IVR menu. Because Asterisk/elastix only allow to dial asterisk extension on IVR. I believe i need to do some custom thing to dial it. right ? But it is OK to dial between CCM extension and Elastix extension.

      1. Hello Baris,
        It’s been a long time since i worked on Elastix and unable to recall the interface if there is an option to do so. I am also unable to work on the lab due to hectic schedule. As of now i can think of one option, you create a DN on Elastix and Forward all the calls to CUCM
        For Example – You have a IVR created and for Call Option Number “3”. If someone press 3 while listening to IVR Menu, you would like to forward the call to CUCM extension number 2000.
        Now, create 1000 as a DN in Elastix and Forward calls to the extension 2000.
        In the IVR Menu, you can select “Extension” from Drop Down Menu and Point it to 1000 and thereafter all the calls will be forwarded to 2000 when they select Option 3 while hearing the IVR Option Menu.
        Hope the above solution makes sense. If you would like me to think of a different solution, probably i would have to work on your network taking control of your Elastix using Team Viewer. Let me know whatever is feasible.

        1. Hello
          Thanks for the explanation. Would you be able to share the version of Asterisk that can be integrated with CUCM 7 and later? I have downloaded the Asterisk from asterisk site, but do you suggest any specific site to download the whole package and the patches. Thanks

  2. dears, whats the css that i assigned in trunk? is this to route coming call from asterisk to pstn gw?
    and the route pattern that should be configured in step tow, this is to forward the call that comes to extension on asterisk to sip trunk? please advice.
    regards,
    Amjad

    1. Hello Amjad,
      The Calling Search Space assigned to the Trunk is for Inbound calls from Asterisk to Cisco Unified Communication Manager (CUCM). You need to ensure that this CSS can also route inbound calls to the extensions in CUCM. A Route Pattern is created in order to route Outbound Calls from CUCM to Asterisk. The Route Pattern points to SIP Trunk.
      Hope this helps!

    1. Administrator

      Hello Sophorn,
      What error are you getting while setting up the trunk? Are you facing issue with inbound or outbound call from CUCM? Please check the parameters thoroughly once again as this configuration has worked for most of the people who followed this blog.

  3. i also followed your post from exactly but it didnt worked ,
    i have 1 router ,
    2 vms, 1 cucm,1 astrisks, that use network bridge and DHCP to get ip adress from my router ,
    i pinged from VM of astrisks i can ping to cucm , so they both are locally connected ,
    not working i think you are missing something

    1. Administrator

      Hi Adeel,
      Have you deployed asterisk newly in your environment? Are you facing issues with inbound calls or outbound calls?

      1. i can call from astrisk to cisco , but can not call from cisco to astrisk , i think its the problem of cisco outbound calls , yes i have deployed astrisk newly

        1. Administrator

          Please check your Asterisk General SIP Settings and configure you NAT Settings, IP Configuration and Allow Anonymous Inbound SIP Calls. This should resolve your issue. Please reply back once the issue is resolved so that it would be helpful for other people.

          1. please explain Nat settings its been weeks i can not still call from Cisco to Astrisk , but i can call form Astrisk to Cisco
            i saw in general settings there was option Allow Anonymous Inbound SIP Calls set to NO ,
            so i set it to yes , but same problem ,
            please can u explain a bit more about what you said regarding Configuring Nat settings , IP configurations,
            i understand both terms ,but i dnt know what you are trying to say

          2. hy i just want you and other to know that my problem was the PORT NUMBER as well be sure that in cucm trunk settings where we give ip of Astrisk server we also give the port number which is set on astrisk
            sip settings chan settings advance gerneral setttings
            BIND PORT and
            should be same thanks for the help admin
            i really appreciate your help

          3. Administrator

            By default, if you don’t configure Bind Address and Bind Port, Asterisk will listen to all the IP Address (0.0.0.0) with Port Number 5060. So, all calls should have been accepted by Asterisk when these parameters were blank. However, appreciate your response on the solution that helped you. I am sure, it will help others as well.
            Cheers!

  4. Hello everybody first of all thank you for the information. I make the configuration as you wrote but hte trunk remain unreachable.Any suggestions?

    1. Hello Azax,
      Just ensure that there are no firewalls in between Asterisk and CUCM which is denying the connection/communication between these two. You can login to Asterisk using SSH and ping CUCM IP Address and see if it is reaching CUCM IP Address. Also login to CUCM CLI and try to ping Asterisk and ensure that it is reaching Asterisk IP Address.Ensure that Ping replies are received.
      From Asterisk type > asterisk -vr on the CLI and hit enter
      Type sip show peers and see the status of your trunk if it is reaching the CUCM? Output will be similar to this (OutGoing_Trunk 10.99.44.12 No No 5060 OK (1 ms))
      If you have followed my post correctly and no firewalls stopping the connection, the configuration should work as expected.

  5. Hi,
    Quick question — Will this configuration work if our CUCM is SCCM based and asterisk is SIP based? please confirm. thanks

  6. HI, Thanks for the confirmation. I tried the above, but unable to make the calls between CUCM and Asterisk and vice versa. We are using CCM version 10.5.1.10000-7 and Asterisk (PBX Manager 6.1.1.13) would appreciate if you can suggest next step for us. thanks in advance

  7. My PSTN Line (PRI getaway) are connected on Asterisk can i do PSTN call from CUCM —-> Asterisk —-> PRI gateway with above config ??

    1. Hi Deepak,
      I have not tried this scenario but I think you should be able to route your call from your CUCM > Asterisk > PRI GW. All you need is valid route patterns and trunks directing from CUCM to Asterisk and then Asterisk to PRI GW ++ required media resources in your scenario.

  8. Great guide Avinash! It actually solved my issue.

    I had an issue with my asterisk gw not passing/registering some DTMF ‘keystrokes’ when going through IVR.

    I checked ‘Media Termination Point Required’ which was the only thing missing from this guide and it worked. Do you happen to understand why this would cause the issue? I don’t have this checked in other SIP trunks.

    Thanks,

  9. Hi
    hope u are doing well
    these unlimited licenses are available
    if u need u can remotely check my server and do whatever u want
    email: [email protected]
    skype: [email protected]

    1-Cisco CUCM 9.X 10.X 11.X 12.X 14.X crack
    2-Cisco unity 11,12 crack
    3-Cisco expressway 12.5
    4-Cisco webex3.x / 4.x
    5-Cisco ASAv Crack
    6-Fortigate Crack license
    7-Imagicle call recording and billing crack
    8-Cisco ISE 2.7 (10000 Node)
    9-Cisco Prime
    10- PRTG NCM / NPM
    11- Vmware / ESXi all versions license
    12- ….

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top