{"id":864,"date":"2012-02-23T16:33:27","date_gmt":"2012-02-23T03:33:27","guid":{"rendered":"http:\/\/www.c2s.co.nz\/blog\/?p=864"},"modified":"2012-02-23T16:33:27","modified_gmt":"2012-02-23T03:33:27","slug":"passing-on-the-dialled-number-id-in-asterisk","status":"publish","type":"post","link":"http:\/\/www.c2s.co.nz\/blog\/passing-on-the-dialled-number-id-in-asterisk\/","title":{"rendered":"Passing on the dialled number ID in Asterisk"},"content":{"rendered":"<div class=\"8781ca4f97038dd0d58a1ad8af045721\" data-index=\"3\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-6411751809866006\";\r\n\/* BlogHorizontalSlim *\/\r\ngoogle_ad_slot = \"6442664612\";\r\ngoogle_ad_width = 468;\r\ngoogle_ad_height = 60;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>So I had a problem recently where the phone number that I was dialling wasn&#8217;t being passed on to the destination. In otherwords:<br \/>\nI call 0800 83 83 83 (Pretend here, I don&#8217;t really work for Pizza Hut).<\/p>\n<p>My asterisk box picks up and says &#8220;Oh hai, you want Pizza Hut on 0800 83 83 83, I&#8217;ll pass you on to that user&#8221;.<\/p>\n<p>Asterisk sends me off to the Pizza Hut server.<\/p>\n<p>Then on the Pizza Hut box we receive something that looks like this:<\/p>\n<pre>-- Executing [s@from-trunk:1] Set(\"SIP\/VoIP_Provider-0000014f\", \"__FROM_DID=s\") in new stack<\/pre>\n<p>The &#8220;__FROM_DID=s&#8221; basically means it&#8217;s not getting the information it needs from the remote side, so then the Pizza Hut server will say:<\/p>\n<p>&#8220;Hi this is the Pizza Hut asterisk server, who do you want?! You haven&#8217;t told me? Meh, I&#8217;ll hang up on you, try again later&#8221;<\/p>\n<p>Not good \ud83d\ude41<\/p>\n<p>Thankfully it&#8217;s not too hard to get it to forward on the correct details.<\/p>\n<p><!--more--><\/p>\n<p>In some places this is known as DNIS, or Dialled Number Identification Service.<\/p>\n<p>I was searching for &#8220;Dialled CID&#8221; or &#8220;Called Number&#8221; and a variety of other things.<\/p>\n<p>Thankfully it didn&#8217;t require much, just a quick change of dial-plan. Mine was previously:<\/p>\n<pre>exten=>0800838383,1,Dial(SIP\/pizzahut,30)<\/pre>\n<p>Now it looks like this:<\/p>\n<pre>exten=>0800838383,1,Dial(SIP\/pizzahut\/${EXTEN},30)<\/pre>\n<p>All solved!!<\/p>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>So I had a problem recently where the phone number that I was dialling wasn&#8217;t being passed on to the destination. In otherwords: I call 0800 83 83 83 (Pretend here, I don&#8217;t really work for Pizza Hut). My asterisk box picks up and says &#8220;Oh hai, you want Pizza Hut on 0800 83 83 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[4],"tags":[20,383,382,49,384],"class_list":["post-864","post","type-post","status-publish","format-standard","hentry","category-how-tos-guides-tech-info","tag-asterisk","tag-called-number","tag-calling-id","tag-dialplan","tag-dnis"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pWi3e-dW","jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.c2s.co.nz\/blog\/wp-json\/wp\/v2\/posts\/864","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.c2s.co.nz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.c2s.co.nz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.c2s.co.nz\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/www.c2s.co.nz\/blog\/wp-json\/wp\/v2\/comments?post=864"}],"version-history":[{"count":1,"href":"http:\/\/www.c2s.co.nz\/blog\/wp-json\/wp\/v2\/posts\/864\/revisions"}],"predecessor-version":[{"id":865,"href":"http:\/\/www.c2s.co.nz\/blog\/wp-json\/wp\/v2\/posts\/864\/revisions\/865"}],"wp:attachment":[{"href":"http:\/\/www.c2s.co.nz\/blog\/wp-json\/wp\/v2\/media?parent=864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.c2s.co.nz\/blog\/wp-json\/wp\/v2\/categories?post=864"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.c2s.co.nz\/blog\/wp-json\/wp\/v2\/tags?post=864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}