Jump to content

Recommended Posts

Posted

Few days ago I installed AIO single server. all works good in E164 format, Now I was trying to implement dial plan for account to allow use local irish calling format.

does not matter what I do, calls get sent as is to carriers, 

in system_config/number_manager


 

{

"_id": "number_manager", 

"_rev": "18-a53e2fb11630490bd63cd2362c814f9b", 

"default": { "classifiers": 

{ "tollfree_us": { "regex": "^\\+1((?:800|88\\d|877|866|855|844|833|822)\\d{7})$", 

"friendly_name": "US TollFree", 

"pretty_print": "SS(###) ### - ####" }, 

"toll_us": { "regex": "^\\+1(900\\d{7})$", 

"friendly_name": "US Toll", 

"pretty_print": "SS(###) ### - ####" }, 

"emergency": { "regex": "^(911|922|933|833|811|711|999)$", 

"emergency": true, "friendly_name": "Emergency Dispatcher" }, 

"caribbean": { "regex": "^\\+?1((?:684|264|268|242|246|441|284|345|767|809|829|849|473|671|876|664|670|787|939|869|758|784|721|868|649|340)\\d{7})$", 

"friendly_name": "Caribbean", 

"pretty_print": "SS(###) ### - ####" }, 

"did_us": { "regex": "^(\\+?1)?([2-9][0-9]{2}[2-9][0-9]{6})$", 

"friendly_name": "US DID", "pretty_print": "SS(###) ### - ####" }, 

"international": { "regex": "^\\+([2-9]\\d{7,})$", "friendly_name": "International" }, 

"unknown": { "regex": "^(.*)$", 

"friendly_name": "Unknown" } }, 

"converter": 

"regex", "e164_converters": { "^08(\\d{8})$": { "prefix": "+3538" } }, 

"reconcile_regex": "^\\+?[1-9]\\d{5,}$|^0\\d{5,}$|^00\\d{5,}$", 

"time_between_numbers_ms": 1000, 

"fetch_account_from_ports": true, 

"available_module_name": "knm_local", 

"carrier_modules": [ "knm_local" ], 

"maximum_search_quantity": 500, 

"number_search_timeout_ms": 5000, 

"features": { "allow": [ "failover", "force_outbound", "prepend", "ringback", "cnam", "inbound_cnam", "outbound_cnam", "e911", "port", "carrier_name" ] }, 

"local_feature_override": false, "default_force_outbound": false, 

"force_local_outbound": true }, 

"pvt_account_id": "system_config",

"pvt_account_db": "system_config",

"pvt_created": 63709585111, "pvt_type":

"config", "pvt_node": 

"kazoo_apps@myserver.local", 

"pvt_document_hash": "b799b5f7ef650e307af7a7bc7a653275" }

 

I also added in my account document 

"dial_plan": {
       "^01(\\d{7})$": {
           "description": "IE_Dublin",
           "prefix": "+3531"
       },
       "^083(\\d{7})$": {
           "description": "IE_Mobile_H3G",
           "prefix": "+35383"
       },
       "^085(\\d{7})$": {
           "description": "IE_Mobile_Meteor",
           "prefix": "+35385"
       },
       "^086(\\d{7})$": {
           "description": "IE_Mobile_O2",
           "prefix": "+35386"
       },
       "^087(\\d{7})$": {
           "description": "IE_Mobile_Vodafone",
           "prefix": "+35387"
       },
       "^089(\\d{7})$": {
           "description": "IE_Mobile_Lyca",
           "prefix": "+35389"
       },
       "^041(\\d{7})$": {
           "description": "IE_Drogheda",
           "prefix": "+35341"
       },
       "^046(\\d{6})$": {
           "description": "IE_Navan",
           "prefix": "+35346"
       },
       "^045(\\d{6})$": {
           "description": "IE_Kildare",
           "prefix": "+35345"
       },
       "^0404(\\d{5})$": {
           "description": "IE_Wicklow",
           "prefix": "+353404"
       },
       "^0402(\\d{5})$": {
           "description": "IE_Arklow",
           "prefix": "+353402"
       },
       "^053(\\d{7})$": {
           "description": "IE_Wexford",
           "prefix": "+35353"
       },
       "^059(\\d{7})$": {
           "description": "IE_Carlow",
           "prefix": "+35359"
       },
       "^051(\\d{7})$": {
           "description": "IE_Waterford",
           "prefix": "+35351"
       },
       "^056(\\d{7})$": {
           "description": "IE_Kilkenny",
           "prefix": "+35356"
       },
       "^057(\\d{7})$": {
           "description": "IE_Portlaoise",
           "prefix": "+35357"
       },
       "^044(\\d{7})$": {
           "description": "IE_Mullingar",
           "prefix": "+35344"
       },
       "^042(\\d{7})$": {
           "description": "IE_Dundalk",
           "prefix": "+35342"
       },
       "^047(\\d{7})$": {
           "description": "IE_Monaghan",
           "prefix": "+35347"
       },
       "^049(\\d{7})$": {
           "description": "IE_Cavan",
           "prefix": "+35349"
       },
       "^043(\\d{7})$": {
           "description": "IE_Longford",
           "prefix": "+35343"
       },
       "^074(\\d{7})$": {
           "description": "IE_Donegal",
           "prefix": "+35374"
       },
       "^071(\\d{7})$": {
           "description": "IE_Sligo",
           "prefix": "35371"
       },
       "^090(\\d{7})$": {
           "description": "IE_Athlone",
           "prefix": "+35390"
       },
       "^091(\\d{7})$": {
           "description": "IE_Galway",
           "prefix": "+35391"
       },
       "^093(\\d{7})$": {
           "description": "IE_Tuam",
           "prefix": "+35393"
       },
       "^094(\\d{7})$": {
           "description": "IE_Castlebar",
           "prefix": "+35394"
       },
       "^096(\\d{7})$": {
           "description": "IE_Ballina",
           "prefix": "+35396"
       },
       "^097(\\d{7})$": {
           "description": "IE_Belmullet",
           "prefix": "+35397"
       },
       "^098(\\d{7})$": {
           "description": "IE_Westport",
           "prefix": "+35398"
       },
       "^099(\\d{5})$": {
           "description": "IE_Aran_Islands",
           "prefix": "+35399"
       },
       "^095(\\d{7})$": {
           "description": "IE_Clifden",
           "prefix": "+35395"
       },
       "^065(\\d{7})$": {
           "description": "IE_Clare",
           "prefix": "+35365"
       },
       "^061(\\d{6})$": {
           "description": "IE_Limerick",
           "prefix": "+35361"
       },
       "^067(\\d{7})$": {
           "description": "IE_Nenagh",
           "prefix": "+35367"
       },
       "^062(\\d{7})$": {
           "description": "IE_Tipperary",
           "prefix": "+35362"
       },
       "^063(\\d{7})$": {
           "description": "IE_Rathluirc",
           "prefix": "+35363"
       },
       "^069(\\d{7})$": {
           "description": "IE_Newcastlewest",
           "prefix": "+35369"
       },
       "^068(\\d{7})$": {
           "description": "IE_Listowel",
           "prefix": "+35368"
       },
       "^066(\\d{7})$": {
           "description": "IE_Tralee",
           "prefix": "+35366"
       },
       "^064(\\d{7})$": {
           "description": "IE_Killarney",
           "prefix": "+35364"
       },
       "^027(\\d{7})$": {
           "description": "IE_Bantry",
           "prefix": "+35327"
       },
       "^028(\\d{7})$": {
           "description": "IE_Northern_Ireland_Fixed",
           "prefix": "+35348"
       },
       "^029(\\d{7})$": {
           "description": "IE_Kanturk",
           "prefix": "+35329"
       },
       "^026(\\d{7})$": {
           "description": "IE_Macroom",
           "prefix": "+35326"
       },
       "^023(\\d{7})$": {
           "description": "IE_Bandon",
           "prefix": "+35323"
       },
       "^021(\\d{7})$": {
           "description": "IE_Cork",
           "prefix": "+35321"
       },
       "^022(\\d{5})$": {
           "description": "IE_Mallow",
           "prefix": "+35322"
       },
       "^025(\\d{7})$": {
           "description": "IE_Fermoy",
           "prefix": "+35325"
       },
       "^024(\\d{7})$": {
           "description": "IE_Youghal",
           "prefix": "+35324"
       },
       "^058(\\d{7})$": {
           "description": "IE_Dungarvan",
           "prefix": "+35358"
       },
       "^052(\\d{7})$": {
           "description": "IE_Clonmel",
           "prefix": "+35352"
       },
       "^0504(\\d{5})$": {
           "description": "IE_Thurles",
           "prefix": "+353504"
       },
       "^0505(\\d{5})$": {
           "description": "IE_Roscrea",
           "prefix": "+353505"
       },
       "^076(\\d{7})$": {
           "description": "IE_Voip",
           "prefix": "+35376"
       }
   }

 

Am I missing something?

  • Administrators
Posted

What is an example of the dialed number Kazoo receives from a user's device?

The dialplan should correct, for instance 050599999 (using the IE_Roscrea) to +35350599999. Kazoo debug logs of a call attempt could also help see what happened.

Posted

If I dial 00353899999999 call is sucessfull.

{
    "app_name": "ecallmgr",
    "app_version": "4.0.0",
    "billing_seconds": 6,
    "call_direction": "inbound",
    "call_id": "p7grOK-FMyAgRyWVxXcIcw..",
    "callee_id_name": "353899999999",
    "callee_id_number": "+353899999999",
    "caller_id_name": "Kristaps Dravnieks",
    "caller_id_number": "053999999",
    "channel_call_state": "HANGUP",
    "channel_created_time": 1543411167916429,
    "channel_name": "sofia/sipinterface_1/kristaps@customers.domain.local",
    "channel_state": "REPORTING",
    "custom_application_vars": {},
    "custom_channel_vars": ⊕{...}⊖{
        "account_id": "75a0e879cde45da98c0a9d3bccd33498",
        "account_name": "MAINACCOUNT",
        "account_realm": "customers.domain.local",
        "application_name": "callflow",
        "application_node": "kazoo_apps@sip.domain.local",
        "authorizing_id": "fe198c486dc1f6432eb939572fa63b5a",
        "authorizing_type": "device",
        "bridge_id": "p7grOK-FMyAgRyWVxXcIcw..",
        "caller_privacy_hide_name": "false",
        "caller_privacy_hide_number": "false",
        "caller_screen_bit": "true",
        "callflow_id": "e7552dc29c896020914adb56846c62f8",
        "channel_authorized": "true",
        "ecallmgr_node": "ecallmgr@sip.domain.local",
        "fetch_id": "3b93e9f4-f310-11e8-8c5b-d3531a8c55c3",
        "owner_id": "40b39ebaeaeffc9375e1d4b0ddd640cb",
        "realm": "customers.domain.local",
        "reseller_id": "75a0e879cde45da98c0a9d3bccd33498",
        "username": "kristaps"
    },
    "custom_sip_headers": {},
    "disposition": "SUCCESS",
    "duration_seconds": "17",
    "event_category": "call_event",
    "event_name": "CHANNEL_DESTROY",
    "from": "kristaps@customers.domain.local",
    "from_tag": "ae632231",
    "from_uri": "kristaps@customers.domain.local",
    "hangup_cause": "NORMAL_CLEARING",
    "hangup_code": "sip:200",
    "id": "201811-p7grOK-FMyAgRyWVxXcIcw.."
    "interaction_id": "63710630368-f6ce3bb2",
    "interaction_key": "f6ce3bb2",
    "interaction_time": 63710630368,
    "local_sdp": "v=0\r\no=FreeSWITCH 1543391217 1543391219 IN IP4 1.1.1.1\r\ns=FreeSWITCH\r\nc=IN IP4 1.1.1.1\r\nt=0 0\r\nm=audio 19952 RTP/AVP 106 98\r\na=rtpmap:106 opus/48000/2\r\na=fmtp:106 useinbandfec=1; minptime=20\r\na=rtpmap:98 telephone-event/48000\r\na=fmtp:98 0-16\r\na=ptime:20\r\na=sendrecv\r\n",
    "media_server": "sip.domain.local",
    "msg_id": "1543411184936437",
    "node": "ecallmgr@sip.domain.local",
    "other_leg_call_id": "3c1955b2-f310-11e8-8c6f-d3531a8c55c3",
    "other_leg_caller_id_name": "Kristaps Dravnieks",
    "other_leg_caller_id_number": "+353539999999",
    "other_leg_destination_number": "+353899999999",
    "other_leg_direction": "outbound",
    "presence_id": "kristaps@customers.domain.local",
    "remote_sdp": "v=0\r\no=Z 0 0 IN IP4 1.1.1.1\r\ns=Z\r\nc=IN IP4 1.1.1.1\r\nt=0 0\r\nm=audio 8000 RTP/AVP 3 111 0 97 110 112 102 106 101 100 99 98\r\na=rtpmap:111 speex/16000\r\na=rtpmap:97 iLBC/8000\r\na=fmtp:97 mode=20\r\na=rtpmap:110 speex/8000\r\na=rtpmap:112 speex/32000\r\na=rtpmap:102 G726-32/8000\r\na=rtpmap:106 opus/48000/2\r\na=fmtp:106 minptime=20; cbr=1; maxaveragebitrate=40000; useinbandfec=1\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-16\r\na=rtpmap:100 telephone-event/16000\r\na=fmtp:100 0-16\r\na=rtpmap:99 telephone-event/32000\r\na=fmtp:99 0-16\r\na=rtpmap:98 telephone-event/48000\r\na=fmtp:98 0-16\r\n",
    "request": "00353899999999@customers.domain.local",
    "ringing_seconds": 11,
    "switch_hostname": "sip.wi.ie",
    "switch_nodename": "freeswitch@sip.domain.local",
    "switch_uri": "sip:1.1.1.1:11000",
    "switch_url": "sip:mod_sofia@1.1.1.1:11000",
    "timestamp": 63710630384,
    "to": "00353899999999@customers.domain.local",
    "to_uri": "00353899999999@customers.domain.local",
    "user_agent": "Z 5.2.19 rv2.8.99",
}

If I dial local format 0899999999

 

{
    "app_name": "ecallmgr",
    "app_version": "4.0.0",
    "billing_seconds": 0,
    "call_direction": "outbound",
    "call_id": "6b23f876-f310-11e8-8ca5-d3531a8c55c3",
    "callee_id_name": "0899999999",
    "callee_id_number": "0899999999",
    "caller_id_name": "Kristaps Dravnieks",
    "caller_id_number": "+353539999999",
    "channel_call_state": "HANGUP",
    "channel_created_time": 1543411247716419,
    "channel_name": "sofia/sipinterface_1/0899999999@slough.out.simwood.com",
    "channel_state": "REPORTING",
    "custom_application_vars": {},
    "custom_channel_vars": ⊖{
        "account_id": "75a0e879cde45da98c0a9d3bccd33498",
        "bridge_id": "oyAHJmaOj4-eyaVEx6Abbw..",
        "caller_privacy_hide_name": "false",
        "caller_privacy_hide_number": "false",
        "caller_screen_bit": "true",
        "channel_authorized": "true",
        "ecallmgr_node": "ecallmgr@sip.domain.local",
        "global_resource": "false",
        "matched_number": "0899999999",
        "original_number": "0899999999",
        "realm": "customers.domain.local",
        "reseller_id": "75a0e879cde45da98c0a9d3bccd33498",
        "resource_id": "9b9cc8ec66a41c066596e8931e63063e",
        "resource_type": "offnet-termination"
    },
    "custom_sip_headers": {},
    "duration_seconds": "1",
    "e164_destination": "0899999999",
    "event_category": "call_event",
    "event_name": "CHANNEL_DESTROY",
    "from": "0539102561@customers.domain.local",
    "hangup_cause": "INVALID_NUMBER_FORMAT",
    "hangup_code": "sip:484",
    "id": "201811-6b23f876-f310-11e8-8ca5-d3531a8c55c3"
    "interaction_id": "63710630447-1e16f4c3",
    "interaction_key": "1e16f4c3",
    "interaction_time": 63710630447,
    "local_sdp": "v=0\r\no=FreeSWITCH 1543391101 1543391102 IN IP4 1.1.1.1r\ns=FreeSWITCH\r\nc=IN IP4 1.1.1.1\r\nt=0 0\r\nm=audio 20146 RTP/AVP 102 0 8 103 104 101 13\r\na=rtpmap:102 opus/48000/2\r\na=fmtp:102 useinbandfec=1; maxaveragebitrate=30000; maxplaybackrate=48000; ptime=20; minptime=10; maxptime=40\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:103 telephone-event/48000\r\na=fmtp:103 0-16\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-16\r\na=rtpmap:104 CN/48000\r\na=rtpmap:13 CN/8000\r\na=ptime:20\r\na=sendrecv\r\n",
    "media_server": "sip.domain.local",
    "msg_id": "1543411248636448",
    "node": "ecallmgr@sip.wi.ie",
    "other_leg_call_id": "oyAHJmaOj4-eyaVEx6Abbw..",
    "other_leg_caller_id_name": "Kristaps Dravnieks",
    "other_leg_caller_id_number": "0539999999",
    "other_leg_destination_number": "0899999999",
    "other_leg_direction": "inbound",
    "request": "0899999999@customers.domain.local",
    "ringing_seconds": 1,
    "switch_hostname": "sip.domain.local",
    "switch_nodename": "freeswitch@sip.domain.local",
    "switch_uri": "sip:1.1.1.1:11000",
    "switch_url": "sip:mod_sofia@1.1.1.1:11000",
    "timestamp": 63710630448,
    "to": "nouser@customers.domain.local",
}

 

So it looks like dial_plan is ignored, and dialed number is passed on to carrier as is.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...