{"id":1378,"date":"2014-05-14T09:13:02","date_gmt":"2014-05-14T16:13:02","guid":{"rendered":"http:\/\/wp.colliertech.org\/cj\/?p=1378"},"modified":"2014-05-14T14:18:28","modified_gmt":"2014-05-14T21:18:28","slug":"configuring-voice-service-on-a-cisco-2801-integrated-services-router-via-asterisk","status":"publish","type":"post","link":"https:\/\/wp.c9h.org\/cj\/?p=1378","title":{"rendered":"Configuring voice service on a Cisco 2801 Integrated Services Router via Asterisk"},"content":{"rendered":"<p>So I&#8217;ve configured voice service a number of times, but never using Cisco equipment.  There&#8217;s a business starting up here on Orcas Island and they need a number of lines voice and fax service.  I had a spare 2801 router laying around and heard that it&#8217;s possible to provision voice service using these machines.  So I looked on eBay for a module that will provide more than two FXS ports and decided on the <a href=\"http:\/\/wp.colliertech.org\/cj\/wp-content\/uploads\/2014\/05\/VIC-4FXS.jpg\" alt=\"VIC-4FXS\">VIC-4FXS<\/a>.  When it was delivered, I installed it and booted the router.  It told me that it needed a <a href=\"http:\/\/wp.colliertech.org\/cj\/wp-content\/uploads\/2014\/05\/PVDM32-DSP.jpg\">PVDM DSP Module<\/a>, so I got one of those as well.  It has arrived.  I have installed it.  Now when I boot the router, I don&#8217;t get a warning or an error.<\/p>\n<h3>configure the router to send outbound calls to the SIP server<\/h3>\n<h3>configure the router to send inbound calls to FXS ports 2,3,4 in round robin<\/h3>\n<pre>\r\n\r\ntrunk group FXSlines\r\n!\r\nvoice-port 0\/2\/1\r\n trunk-group FXSlines\r\n!\r\nvoice-port 0\/2\/2\r\n trunk-group FXSlines\r\n!\r\nvoice-port 0\/2\/3\r\n trunk-group FXSlines\r\n\r\n<\/pre>\n<h3>configure the router to send inbound calls to the correct ports on the VIC-4FXS<\/h3>\n<pre>\r\ndial-peer voice 1 pots\r\n preference 7\r\n destination-pattern 3602987792\r\n translate-outgoing called 10\r\n port 0\/2\/0\r\n forward-digits all\r\n!\r\ndial-peer voice 2 pots\r\n preference 2\r\n destination-pattern 3602987793\r\n translate-outgoing called 10\r\n port 0\/2\/1\r\n forward-digits all\r\n!\r\ndial-peer voice 3 pots\r\n preference 3\r\n destination-pattern 3602987794\r\n translate-outgoing called 10\r\n port 0\/2\/2\r\n forward-digits all\r\n!\r\ndial-peer voice 4 pots\r\n preference 4\r\n destination-pattern 3602987795\r\n translate-outgoing called 10\r\n port 0\/2\/3\r\n forward-digits all\r\n<\/pre>\n<h3>configure the router to accept inbound calls from the asterisk call server<\/h3>\n<pre>\r\nvoice service voip\r\n allow-connections sip to sip\r\n no supplementary-service sip moved-temporarily\r\n no supplementary-service sip refer\r\n fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback cisco\r\n sip\r\n  registrar server expires max 3600 min 3600\r\n  localhost dns:8.8.8.8\r\n<\/pre>\n<h3>configure the asterisk call server to send inbound calls to the router<\/h3>\n<p>On asterisk call server, edit sip.conf to register with SIP server on cisco router at <b>172.16.78.209<\/b>:<\/p>\n<pre>\r\n[fhvoice]\r\ntype=peer\r\ninsecure=port,invite\r\ncontext=fhvoice\r\ndisallow=all\r\nallow=ulaw\r\nlanguage=en\r\ncanreinvite=no\r\nhost=<b>172.16.78.209<\/b>\r\nqualify=20000\r\ndtmfmode=rfc2833\r\n<\/pre>\n<p>On asterisk call server, edit extensions.conf and add extensions to the incoming context:<\/p>\n<pre>\r\nexten => 3602987792,1,Dial(SIP\/fhvoice\/${EXTEN},30)\r\n   same => n,Hangup()\r\n\r\nexten => 3602987793,1,Dial(SIP\/fhvoice\/${EXTEN},30)\r\n   same => n,Hangup()\r\n\r\nexten => 3602987794,1,Dial(SIP\/fhvoice\/${EXTEN},30)\r\n   same => n,Hangup()\r\n\r\nexten => 3602987795,1,Dial(SIP\/fhvoice\/${EXTEN},30)\r\n   same => n,Hangup()\r\n<\/pre>\n<h3>configure the asterisk call server to accept outbound calls from the router<\/h3>\n\n<div class=\"twitter-share\"><a href=\"https:\/\/twitter.com\/intent\/tweet?via=cjamescollier\" class=\"twitter-share-button\">Tweet<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>So I&#8217;ve configured voice service a number of times, but never using Cisco equipment. There&#8217;s a business starting up here on Orcas Island and they need a number of lines voice and fax service. I had a spare 2801 router laying around and heard that it&#8217;s possible to provision voice service using these machines. So [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[238,265,60,17,171,47,163,170,235],"tags":[],"class_list":["post-1378","post","type-post","status-publish","format-standard","hentry","category-asterisk","category-cisco","category-colliertech","category-debian","category-hardware","category-linux","category-networking","category-telephony","category-wheezy"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1YDIB-me","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/posts\/1378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1378"}],"version-history":[{"count":9,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/posts\/1378\/revisions"}],"predecessor-version":[{"id":1389,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/posts\/1378\/revisions\/1389"}],"wp:attachment":[{"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}