{"id":3745,"date":"2017-03-15T15:40:02","date_gmt":"2017-03-15T20:40:02","guid":{"rendered":"http:\/\/itsoftware.com.co\/content\/?p=3745"},"modified":"2019-11-19T11:19:18","modified_gmt":"2019-11-19T16:19:18","slug":"ata-ht503-line-asterisk-server","status":"publish","type":"post","link":"https:\/\/itsoftware.com.co\/content\/ata-ht503-line-asterisk-server\/","title":{"rendered":"ATA HT503 &#8211; Connecting PSTN phone line to Asterisk Server"},"content":{"rendered":"<div class=\"entry-content clearfix\">\n<p>[Encuentra la versi\u00f3n en espa\u00f1ol <a href=\"https:\/\/itsoftware.com.co\/content\/ata-ht503-conectando-linea-asterisk\/\">aqu\u00ed <\/a>]<\/p>\n<p>This article describe a procedure to connect a phone line to Asterisk server, using a Grandstream ATA HT503 gateway.<\/p>\n<p>For this example, we will use the public switching telephone network number 7020806. The incoming calls from this phone, must end&nbsp; on internal extensions via Asterisk IVR, or using the dialing pattern 9 + local number to do outgoing calls.<\/p>\n<\/div>\n<p><!--more--><\/p>\n<figure id=\"attachment_3747\" aria-describedby=\"caption-attachment-3747\" style=\"width: 596px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/itsoftware.com.co\/content\/wp-content\/uploads\/2017\/03\/ht503-asterisk.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-3747\" src=\"https:\/\/itsoftware.com.co\/content\/wp-content\/uploads\/2017\/03\/ht503-asterisk-300x179.png\" alt=\"Setup ATA HT503 to PSTN line\" width=\"596\" height=\"356\"><\/a><figcaption id=\"caption-attachment-3747\" class=\"wp-caption-text\">Setup ATA HT503 to PSTN line<\/figcaption><\/figure>\n<hr>\n<h2>Asterisk Freepbx Setup<\/h2>\n<hr>\n<div class=\"entry-content clearfix\">\n<p>The first step is setup Asterisk (FreePBX) for incoming or outgoing calls from the PSTN phone line connected to ATA HT503.<\/p>\n<ol>\n<li>&nbsp;Create a normal SIP Trunk named Claro_1, registering HT503 IP address, user context and password por incoming settings, such as is shown below:<\/li>\n<\/ol>\n<figure id=\"attachment_275\" class=\"wp-caption alignnone\">\n<p><figure id=\"attachment_275\" aria-describedby=\"caption-attachment-275\" style=\"width: 507px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i2.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/a1.png\"><img decoding=\"async\" class=\"wp-image-275 size-full\" title=\"Troncal linea fija ITSoftware\" src=\"https:\/\/i2.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/a1.png?resize=507%2C803\" alt=\"SIP trunk for PSTN line\" width=\"507\" height=\"803\"><\/a><figcaption id=\"caption-attachment-275\" class=\"wp-caption-text\">SIP trunk for PSTN line<\/figcaption><\/figure><\/figure>\n<ol start=\"2\">\n<li>Create outgoing Route to sip trunk Claro_1 using the dial pattern prefix 9 + local number, such as is shown here:<\/li>\n<\/ol>\n<figure id=\"attachment_276\" class=\"wp-caption alignnone\">\n<p><figure id=\"attachment_276\" aria-describedby=\"caption-attachment-276\" style=\"width: 518px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i1.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/a2.png\"><img decoding=\"async\" class=\"wp-image-276 size-full\" title=\"Ruta saliente linea fija\" src=\"https:\/\/i1.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/a2.png?resize=518%2C687\" alt=\"Outgoing calls from extensions to PSTN Line\" width=\"518\" height=\"687\"><\/a><figcaption id=\"caption-attachment-276\" class=\"wp-caption-text\">Outgoing calls from extensions to PSTN Line<\/figcaption><\/figure><\/figure>\n<ol start=\"3\">\n<li>Now is created a incoming route named \u00abEntrante_Claro1\u00bb for calls from PSTN line. These calls end to an IVR previously created, such as is shown here:<\/li>\n<\/ol>\n<figure id=\"attachment_277\" class=\"wp-caption alignnone\">\n<p><figure id=\"attachment_277\" aria-describedby=\"caption-attachment-277\" style=\"width: 527px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i2.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/a3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-277 size-full\" title=\"Ruta entrante l\u00ednea fija\" src=\"https:\/\/i2.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/a3.png?resize=527%2C767\" alt=\"Incoming route for calls from PSTN line\" width=\"527\" height=\"767\"><\/a><figcaption id=\"caption-attachment-277\" class=\"wp-caption-text\">Incoming route for calls from PSTN line<\/figcaption><\/figure><\/figure>\n<\/div>\n<hr>\n<h2>ATA HT503 setup<\/h2>\n<hr>\n<div class=\"entry-content clearfix\">\n<ol>\n<li>To know the DHCP IP address asigned automatically, a phone must be&nbsp;connected to FXS port, and dial&nbsp; \u201c***\u201d, &nbsp;a voice record will say the ATA IP address.<\/li>\n<\/ol>\n<ol start=\"2\">\n<li>Type this IP address on a Internet Browser to setup the device:<\/li>\n<\/ol>\n<figure id=\"attachment_278\" class=\"wp-caption alignnone\">\n<p><figure id=\"attachment_278\" aria-describedby=\"caption-attachment-278\" style=\"width: 703px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i1.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/h1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-278 \" title=\"Ingreso HT503\" src=\"https:\/\/i1.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/h1.png?resize=840%2C252\" alt=\"Login HT503\" width=\"703\" height=\"211\"><\/a><figcaption id=\"caption-attachment-278\" class=\"wp-caption-text\">Login HT503<\/figcaption><\/figure><figcaption class=\"wp-caption-text\"><\/figcaption><\/figure>\n<ol start=\"3\">\n<li>Now in the Basic Settings tab, must be typed a fixed IP address, for this example 172.18.1.10:<\/li>\n<\/ol>\n<figure id=\"attachment_280\" class=\"wp-caption alignnone\">\n<p><figure id=\"attachment_280\" aria-describedby=\"caption-attachment-280\" style=\"width: 697px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/h3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-280 \" title=\"Direcciones IP fija ATA HT503\" src=\"https:\/\/i0.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/h3.png?resize=840%2C415\" alt=\"Fix IP for HT503\" width=\"697\" height=\"344\"><\/a><figcaption id=\"caption-attachment-280\" class=\"wp-caption-text\">Fix IP for HT503<\/figcaption><\/figure><\/figure>\n<ol start=\"4\">\n<li>At the end of page in \u201cUnconditional Call Forward to VoIP\u201d option, type the default extension where the incoming calls must be forwarded, in this example is typed the incoming route ID (CID) + SIP server IP (Asterisk server) and SIP port. The CID have an additional 1 + 7020806, because the local PSTN add the city prefix automatically, such as is shown below:<\/li>\n<\/ol>\n<figure id=\"attachment_281\" class=\"wp-caption aligncenter\">\n<p><figure id=\"attachment_281\" aria-describedby=\"caption-attachment-281\" style=\"width: 688px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/h4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-281\" title=\"Redirecci\u00f3n llamadas entrantes del ATA HT503\" src=\"https:\/\/i0.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/h4.png?resize=688%2C337\" alt=\"Forwarding incoming calls\" width=\"688\" height=\"337\"><\/a><figcaption id=\"caption-attachment-281\" class=\"wp-caption-text\">Forwarding incoming calls<\/figcaption><\/figure><\/figure>\n<ol start=\"5\">\n<li>In \u201c<em>FXO Port\u201d <\/em>tab is typed the Asterisk IP address&nbsp; in&nbsp; \u201cPrimary SIP Server\u201d.&nbsp; Below is typed the&nbsp; SIP User ID, Authentication ID and Authenticate Password, according the \u00abUser Context\u00bb data named \u00abclaro-in\u00bb fom SIP trunk \u00abClaro_1\u00bb. Also must be set the parameters marked in red square:<\/li>\n<\/ol>\n<figure id=\"attachment_282\" class=\"wp-caption aligncenter\" style=\"width: 664px;\"><a href=\"https:\/\/i0.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/h10.png\"><img decoding=\"async\" class=\"wp-image-282\" title=\"Datos puerto FXO HT503 - Parte 1\" src=\"https:\/\/i0.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/h10.png?resize=840%2C954\" alt=\"&quot;<yoastmark\"><\/a><figcaption class=\"wp-caption-text\"><\/figcaption><\/figure>\n<figure id=\"attachment_283\" class=\"wp-caption aligncenter\" style=\"width: 653px;\"><a href=\"https:\/\/i1.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/h11.png\"><img decoding=\"async\" class=\"wp-image-283\" title=\"Datos puerto FXO HT503 - Parte 2\" src=\"https:\/\/i1.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/h11.png?resize=840%2C949\" alt=\"&quot;<yoastmark\"><\/a><\/figure>\n<figure id=\"attachment_284\" class=\"wp-caption aligncenter\" style=\"width: 659px;\"><a href=\"https:\/\/i0.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/h12.png\"><img decoding=\"async\" class=\"wp-image-284\" title=\"Datos puerto FXO HT503 - Parte 3\" src=\"https:\/\/i0.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/h12.png?resize=840%2C946\" alt=\"&quot;<yoastmark\"><\/a><\/figure>\n<figure id=\"attachment_285\" class=\"wp-caption aligncenter\" style=\"width: 665px;\"><a href=\"https:\/\/i1.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/h13.png\"><img decoding=\"async\" class=\"wp-image-285\" title=\"Datos puerto FXO HT503 - Parte 4\" src=\"https:\/\/i1.wp.com\/itsoftware.com.co\/content\/wp-content\/uploads\/2014\/06\/h13.png?resize=840%2C919\" alt=\"&quot;<yoastmark\"><\/a><\/figure>\n<p>With Apply button all changes will be&nbsp;saved. Normally the ATA must be rebooted to apply all configuration changes.<\/p>\n<p>In Conclusion, when an incoming call is from PSTN line, the ATA HT503 receive it and route it to Asterisk server, Asterisk receive this call using an IVR to end in some internal extensions.<\/p>\n<p>And for outgoing calls from the extensions, when someone dial 9 + local number, the call is routed to ATA HT503, and finally send the dialing phone data to PSTN network.<\/p>\n<p>This configuration only allow one call every time, either outgoing or incoming.<\/p>\n<div>\n<p><strong>This article is part of the knowledge base service of <a href=\"http:\/\/itsoftware.com.co\">ITSoftware SAS<\/a>.<\/strong><\/p>\n<h4>Please share this article if you like it. \ud83d\ude09<\/h4>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>[Encuentra la versi\u00f3n en espa\u00f1ol aqu\u00ed ] This article describe a procedure to connect a phone line to Asterisk server, using a Grandstream ATA HT503 gateway. For this example, we[&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[628],"tags":[],"class_list":["post-3745","post","type-post","status-publish","format-standard","hentry","category-opensource"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/itsoftware.com.co\/content\/wp-json\/wp\/v2\/posts\/3745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsoftware.com.co\/content\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsoftware.com.co\/content\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsoftware.com.co\/content\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsoftware.com.co\/content\/wp-json\/wp\/v2\/comments?post=3745"}],"version-history":[{"count":0,"href":"https:\/\/itsoftware.com.co\/content\/wp-json\/wp\/v2\/posts\/3745\/revisions"}],"wp:attachment":[{"href":"https:\/\/itsoftware.com.co\/content\/wp-json\/wp\/v2\/media?parent=3745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsoftware.com.co\/content\/wp-json\/wp\/v2\/categories?post=3745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsoftware.com.co\/content\/wp-json\/wp\/v2\/tags?post=3745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}