{"id":176,"date":"2021-11-15T05:08:32","date_gmt":"2021-11-15T05:08:32","guid":{"rendered":"https:\/\/jazchye.com\/?p=176"},"modified":"2021-11-15T05:08:34","modified_gmt":"2021-11-15T05:08:34","slug":"how-to-configure-least-cost-routing-lcr-between-two-ucm6xxx-series","status":"publish","type":"post","link":"https:\/\/jazchye.com\/index.php\/2021\/11\/15\/how-to-configure-least-cost-routing-lcr-between-two-ucm6xxx-series\/","title":{"rendered":"How to configure least cost routing (LCR) between two UCM6XXX series"},"content":{"rendered":"\n<p>Least Cost Routing (LCR), is a process to find the most inexpensive way to route phone calls. It is the process of analyzing, selecting, and directing the path of outbound and inbound communications traffic depending on which path delivers the best rates.<\/p>\n\n\n\n<p>Imagine you have two sites with one UCM in each site. One of the sites is located in Australia and the other is located in the USA. And you only have a registered trunk in Australia. Therefore, the most cost-efficient way is to route outgoing calls from the USA through Australia, instead of subscribing for another register trunk in the USA itself.<\/p>\n\n\n\n<p>In my example here, there are 3 devices involved:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>GSM Gateway<\/li><li>UCM A<\/li><li>UCM B<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/architecture-1024x640.jpg\" alt=\"\" class=\"wp-image-163\" srcset=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/architecture-1024x640.jpg 1024w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/architecture-300x188.jpg 300w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/architecture-768x480.jpg 768w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/architecture.jpg 1430w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Prerequisite:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>UCM A and UCM B are peered with one another.<\/li><li>GSM Gateway has peered with UCM A.<\/li><\/ol>\n\n\n\n<p>Make sure UCM A and UCM B have peered with one another<\/p>\n\n\n\n<p>UCM A has an extension range of 1XX and UCM B has an extension of 2XX. This guide will not go further on how to configure peering between UCM A and UCM B. You may find more details on that in this <a href=\"https:\/\/www.grandstream.com\/hubfs\/Product_Documentation\/ucm6xxx_sip_trunk_guide.pdf?hsLang=en\">SIP Trunk guide<\/a>. Since both UCM have peered with one another, you should already have one inbound route and one outbound route in each UCM, so that extension from UCM A with 1XX can be routed to UCM B with 2XX, and vice versa.<\/p>\n\n\n\n<p><strong>For outgoing calls from UCM B to GSM Gateway through UCM A<\/strong>:<\/p>\n\n\n\n<p>You will need &#8211;<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>An outbound route in UCM B<\/li><li>An inbound route in UCM A<\/li><li>An outbound route in UCM A<\/li><\/ol>\n\n\n\n<p>Why is it so? Because you are making an outbound call from UCM B (hence the need for an outbound route in UCM B), the call will arrive into UCM A (hence the need of inbound route in UCM A), and the call will then get routed outbound to GSM Gateway (hence the outbound route in UCM A).<\/p>\n\n\n\n<p><strong>UCM B (Outbound route):<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Configure an outbound route with pattern _9X.<\/li><\/ol>\n\n\n\n<p>With this pattern configured, the caller will need to prepend a digit \u20189\u2019 in their dialing numbers to make sure that the pattern will match this particular outbound rule (Outbound_to_UCM_A).<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Set Main Trunk to the peered SIP trunk \u2013 UCM A.<\/li><li>Set Strip to \u20181\u2019 to strip off the digit 9 once it reached this SIP trunk so that the dialed number pass to UCM A will not contain a prepend 9.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"580\" src=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/out_ucmb_out-1024x580.jpg\" alt=\"\" class=\"wp-image-169\" srcset=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/out_ucmb_out-1024x580.jpg 1024w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/out_ucmb_out-300x170.jpg 300w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/out_ucmb_out-768x435.jpg 768w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/out_ucmb_out.jpg 1493w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>UCM A (Inbound route):<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Create an inbound route (UCM A \u2013 B peer trunk) with pattern _X. to accept any numbers coming from anywhere.<\/li><li>Set Trunks to SIPTrunks \u2013 UCM A.<\/li><li>Select \u2018By DID\u2019 as Default Destination.<\/li><li>Enable \u2018Dial Trunk\u2019.<\/li><\/ol>\n\n\n\n<p>The logic here is to allow UCM A to accept any incoming calls with any patterns. By setting \u2018By DID\u2019 as the default destination, the calls will get routed to a DID and dialed through the internal trunk.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"535\" src=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/out_ucma_in-1024x535.jpg\" alt=\"\" class=\"wp-image-167\" srcset=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/out_ucma_in-1024x535.jpg 1024w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/out_ucma_in-300x157.jpg 300w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/out_ucma_in-768x401.jpg 768w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/out_ucma_in.jpg 1493w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>UCM A (Outbound route):<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Create an outbound route with the pattern that matches your GSM number.<\/li><li>Main Trunk set to SIPTrunks \u2013 GSM.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"582\" src=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/out_ucma_out-1024x582.jpg\" alt=\"\" class=\"wp-image-168\" srcset=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/out_ucma_out-1024x582.jpg 1024w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/out_ucma_out-300x170.jpg 300w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/out_ucma_out-768x436.jpg 768w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/out_ucma_out.jpg 1482w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>For incoming calls from GSM Gateway to an extension in UCM B through UCM A<\/strong>:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>You will require \u2013<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>An inbound route in UCM A<\/li><li>An outbound route in UCM A<\/li><li>An inbound route in UCM B<\/li><\/ol>\n\n\n\n<p>The inbound route in UCM A is required to allow the call from the GSM gateway to come through and an inbound route in UCM B is needed to route the calls from UCM A to UCM B.<\/p>\n\n\n\n<p><strong>UCM A (Inbound route):<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Create an inbound route (UCM A \u2013 GSM Peer Trunk) with pattern _X.<\/li><li>Set Default Destination to External Number \u2013 Extension 200.<\/li><\/ol>\n\n\n\n<p>This inbound route will route all of the calls with any patterns coming from the GSM gateway to UCM A. It will get routed to an external number, which is Extension 200 in UCM B. Why do we not use Extension as the default destination? This is because Extensions from UCM B will not show up in the Extensions dropdown list in UCM A.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"447\" src=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/in_ucma_in-1024x447.jpg\" alt=\"\" class=\"wp-image-164\" srcset=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/in_ucma_in-1024x447.jpg 1024w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/in_ucma_in-300x131.jpg 300w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/in_ucma_in-768x335.jpg 768w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/in_ucma_in.jpg 1488w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>UCM A (Outbound route):<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Create an outbound route with pattern _2XX to UCM B.<\/li><li>Main Trunk set to SIPTrunks \u2013 UCM B.<\/li><\/ol>\n\n\n\n<p>This setting will ensure that there is an outgoing route in UCM A for the call to get routed to any extensions with 2XX in UCM B using UCM A \u2013 B peer trunk.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"574\" src=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/in_ucma_out-1024x574.jpg\" alt=\"\" class=\"wp-image-165\" srcset=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/in_ucma_out-1024x574.jpg 1024w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/in_ucma_out-300x168.jpg 300w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/in_ucma_out-768x430.jpg 768w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/in_ucma_out.jpg 1479w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>UCM B (Inbound route):<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Create an inbound route (UCM A \u2013 B Peer Trunk) with pattern _X.<\/li><li>Set Default Destination to Extension \u2013 Extension 200.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"436\" src=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/in_ucmb_in-1024x436.png\" alt=\"\" class=\"wp-image-166\" srcset=\"https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/in_ucmb_in-1024x436.png 1024w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/in_ucmb_in-300x128.png 300w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/in_ucmb_in-768x327.png 768w, https:\/\/jazchye.com\/wp-content\/uploads\/2021\/11\/in_ucmb_in.png 1487w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Least Cost Routing (LCR), is a process to find the most inexpensive way to route phone calls. It is the process of analyzing, selecting, and&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,4,9],"tags":[],"class_list":["post-176","post","type-post","status-publish","format-standard","hentry","category-how-to","category-ippbx","category-sip"],"_links":{"self":[{"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/posts\/176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/comments?post=176"}],"version-history":[{"count":3,"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/posts\/176\/revisions"}],"predecessor-version":[{"id":232,"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/posts\/176\/revisions\/232"}],"wp:attachment":[{"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/media?parent=176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/categories?post=176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jazchye.com\/index.php\/wp-json\/wp\/v2\/tags?post=176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}