CUCM Asterisk SIP Trunk Integration

Asterisk CUCM

Hello Everyone,

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.





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




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

host=X.X.X.X {IP Address of the CUCM}

  • 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 – 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.


CUCM Asterisk SIP Trunk Integration was last modified: July 6th, 2017 by Administrator
(Visited 10,849 times, 3 visits today)

28 thoughts on “CUCM Asterisk SIP Trunk Integration

  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.

    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. 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. 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. 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. By default, if you don’t configure Bind Address and Bind Port, Asterisk will listen to all the IP Address ( 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.


  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 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, 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 and Asterisk (PBX Manager would appreciate if you can suggest next step for us. thanks in advance

    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.

Leave a Reply