Jump to content

Mehedi Hasan Tanim

Members
  • Posts

    18
  • Joined

  • Last visited

Posts posted by Mehedi Hasan Tanim

  1. On 7/5/2022 at 2:09 AM, Jay White said:

    Just one point, when creating the click 2 call, add "dial_first":"contact", so it should wait for the contact to answer the call.

    Thanks for the information

    On 7/29/2022 at 4:13 AM, RuhNet said:

    @Jay WhiteThanks for taking the time to add that very useful info. Good to know!

    Thanks

  2. I am using clicktocall for originating outbound calls from my client's web app.I am also using webhook for channel destroy event. I want to send a client's application specific custom parameter with chnnel destroy webhook event whose value will be dynamic even if call is not answered by user.

    I have tried to use "set_variables" in callflow action as like below 

     

    "data": {

                "numbers": [cf_number],

                "flow": {

                    "data": {

                        "custom_application_vars": {

                            "Jazzware-Request": base64_string

                        },

                        "export": True

                    },

                    "module": "set_variables",

                    "children": {

                        "_": {

                            "data": {

                                "method": "GET",

                                "req_timeout": "60",

                                "req_format": "kazoo",

                                "voice_url": voice_url

                            },

                            "module": "pivot",

                            "children": {}

                        }

                    }

                }

            }

    If call is answered or declined, then i am getting the custom_application_vars in Channel_Destroy event.

    But If call is not answered, then i am not getting the custom_application_vars in Channel_Destroy event. Can you give any suggestion for this so that i can be able to receive that custom_application_vars in Channel_Destroy event even though call is not answered which is very crucial for our application.

    Thanks

  3. @RuhNetThanks for your suggestions. I have some questions

    For Approach 1 (Modifying Kamailio)

    1 . How i can modify Kamailio config to use the UAC module? Should i need to enable  loadmodule "uac.so"  in /etc/kazoo/kamailio/default.cfg file? if so, then it is already enabled.If any more configuration needs to change?

    2 . Where to input Peerless sip username, password and realm in kamailio?

    3 . Any more configuration need at kamailio  to route the incoming call from peerless to kazoo?

    For Approach 2()

    1 . As far i have understood, if i use Asterisk as middleware , then i need to register peerless extension at asterisk and configure asterisk so that asterisk will route incoming call from peerless to our kazoo server.Is it right? 

  4. @mc_Thanks for your prompt response. Can you please elaborate what do you mean by "setup E164 numbers on your callflow" ? Did you mean i need to add an  E164 number (for example : +14155552671) to our kazoo account, use this +14155552671 number at numbers array  field of my callflow  instead of my IVR extension 995 and my client also needs to dial +14155552671 instead of 995 to access the IVR of my kazoo server from their sip clients which are registered with peerless extension?  

  5. I am new to kazoo and started to explore kazoo for last two months. But I have some previous experience of using freeswitch.

    I am using single server installed at Linode. I have  set up a callflow using Callflows app from monster-ui for a number (for example : 995) and using pivot module to fetch instructions for IVR. If I dialled this number 995 from a sip client registered with a kazoo extension , IVR works fine.

    But my ultimate goal is to dial this IVR extension 995 from peerless extension.Let me explain in detail. My client is already using service from cloudpbx.peerlessnetwork.io   .  So they will register using their peerless extension (for example :101@ cloudpbx.peerlessnetwork.io)  from sip client and will dial 995 which needs to be routed to our kazoo server. For this, they have provided me a peerless extension which i need to register at kazoo.

    Can anyone give me a guideline about how to register this peerless extension at kazoo and ensure call is routed to our kazoo server?

  6. I have recently started to investigate to figure out how I can instruct kazoo to route the call to my specified resource from Click2Call API. With suggestions from 2600hz community forum and after some trial & error, finally, I am able to design a solution to achieve this goal.

    Let’s first understand my goal in detail. For example, I have two remote PBX (asterisk1 & asterisk2) which I have added as resources in kazoo. Both asterisk1 and asterisk2 instances have the same extension 70003. Now if I use clicktocall for dialing 70003, how can I instruct kazoo from clicktocall so that it will dial 70003@asterisk1, not 70003@asterisk2? As I am calling ClicktoCall API from my web app and resource selection logic is also resides in my web app, somehow I need to tell ClicktoCall API which resource to route the call while invoking from the web app.

    To accomplish this, I have used The rules key on the resource which matches the number dialled. Actually, I have added a unique prefix before the regex pattern in the rules key for each resource. The rules key supports capture groups, in parenthesis. Those will throw away whatever is outside the parenthesis before sending it to the resource. As per my example, For the Asterisk1 resource, I am putting “1(.{5})” for the value of rules, and For the Asterisk2 resource, I am putting “2(.{5})” for the value of rules. So when my web app hits my clicktocall endpoint with the dialled extension of 270003, it will get sent through Asterisk server #2 as 70003. When my clicktocall executes 170003, it will send the call to 70003 on Asterisk server 1, etc.

    Resource Details

    Details of my resource setup are as below

    Asterisk1

    {

    “data”: {

    “name”: “Asterisk1”,

    “format_from_uri”: true,

    “rules”: [

    “1(.{5})”

    ],

    “flags”: [

    “Use_Asterisk1”

    ],

    “weight_cost”: 60,

    “formatters”: {

    “diversion”: [

    {

    “match_invite_format”: true,

    “direction”: “outbound”

    }

    ],

    “outbound_caller_id_number”: [

    {

    “value”: “70001”

    }

    ],

    “outbound_caller_id_name”: [

    {

    “value”: “kazoo”

    }

    ]

    },

    “gateways”: [

    {

    “caller_id_type”: “external”,

    “channel_selection”: “ascending”,

    “codecs”: [

    “PCMU”,

    “PCMA”,

    “OPUS”

    ],

    “custom_sip_headers”: {},

    “emergency”: false,

    “enabled”: true,

    “endpoint_type”: “sip”,

    “format_from_uri”: true,

    “invite_format”: “route”,

    “password”: “asterisk1_password”,

    “prefix”: “”,

    “progress_timeout”: 30,

    “realm”: “asterisk1_ip”,

    “server”: “asterisk1_ip”,

    “skype_rr”: false,

    “suffix”: “”,

    “username”: “asterisk1_username”,

    “force_port”: false,

    “port”: 5060

    }

    ],

    “emergency”: false,

    “enabled”: true,

    “from_account_realm”: false,

    “grace_period”: 5,

    “rules_test”: [],

    “id”: “c1ad847e401cb9c7a3f264a2840b2fff”

    },

    “revision”: “26-db769ea7891fb82a1d2425a2fe269814”,

    “timestamp”: “2021–11–01T20:20:14Z”,

    “version”: “4.3.140”,

    “node”: “yMeslQexQufV5c-zOCJ0Ow”,

    “request_id”: “d20e9b4223a47931f4d19b0a5012ddc8”,

    “status”: “success”,

    “auth_token”: “auth_token”

    }

    Asterisk 2

    {

    “data”: {

    “name”: “Asterisk”,

    “format_from_uri”: true,

    “rules”: [

    “2(.{5})”

    ],

    “flags”: [

    “Use_Asterisk2”

    ],

    “weight_cost”: 70,

    “formatters”: {

    “diversion”: [

    {

    “match_invite_format”: true,

    “direction”: “outbound”

    }

    ],

    “outbound_caller_id_number”: [

    {

    “value”: “70001”

    }

    ],

    “outbound_caller_id_name”: [

    {

    “value”: “kazoo”

    }

    ]

    },

    “gateways”: [

    {

    “caller_id_type”: “external”,

    “channel_selection”: “ascending”,

    “codecs”: [

    “PCMU”,

    “PCMA”,

    “OPUS”

    ],

    “custom_sip_headers”: {},

    “emergency”: false,

    “enabled”: true,

    “endpoint_type”: “sip”,

    “format_from_uri”: true,

    “invite_format”: “route”,

    “password”: “asterisk2_password”,

    “prefix”: “”,

    “progress_timeout”: 30,

    “realm”: “asterisk2_ip”,

    “server”: “asterisk2_ip”,

    “skype_rr”: false,

    “suffix”: “”,

    “username”: “asterisk2_username”,

    “force_port”: false,

    “port”: 5060

    }

    ],

    “emergency”: false,

    “enabled”: true,

    “from_account_realm”: false,

    “grace_period”: 5,

    “rules_test”: [],

    “id”: “c1ad847e401cb9c7a3f264a2840b2fff”

    },

    “revision”: “26-db769ea7891fb82a1d2425a2fe269814”,

    “timestamp”: “2021–11–01T20:20:14Z”,

    “version”: “4.3.140”,

    “node”: “yMeslQexQufV5c-zOCJ0Ow”,

    “request_id”: “d20e9b4223a47931f4d19b0a5012ddc8”,

    “status”: “success”,

    “auth_token”: “auth_token”

    }

    So if my web app decides, it needs to make call to 70003 extension of Asterisk1 instance, then it will append prefix 1 for Asterisk1 (Setup in rules for Asterisk1 described earlier) before the extension 70003 in the value of contact field.

    https://crossbarserver.tld/v2/accounts/5123456789098765432abcd/clicktocall/my_cool_pivot_c2c/connect?contact=170003

    Similarly, if my web app decides, it needs to make call to 70003 extension of Asterisk2 instance,then it will append prefix 2 for Asterisk2 (Setup in rules for Asterisk1 described earlier) before the extension 70003 in the value of contact field.

    https://crossbarserver.tld/v2/accounts/5123456789098765432abcd/clicktocall/my_cool_pivot_c2c/connect?contact=270003

  7. I have recently started to explore Kazoo for one of our official projects. Our goal is below 

    1. To make an Outbound call to the PSTN number using Flowroute as Carrier at Kazoo from a web app

    2. After answering  the call, run an IVR which instructions need to fetch from a web server using Pivot 

    While trying to do a POC for this, first I was facing some difficulties due to the lack of specific documentation. Then I have started to communicate with the 2600hz developer forum and finally, I am able to meet my goal after applying suggestions from the forum. Now I am decided to document every step that I follow which may be helpful for others to implement the same flow.

     

    The following tasks need to be done which I will describe in detail later

    1. Setup Flowroute as a resource in Kazoo

    2. Setup an extension in callflows that has a Pivot as the action

    3. Create a clicktocall endpoint that connects to the created extension in step 2

    4. Use created clicktocall endpoint in step 3 for making the PSTN call

     

    Prerequisite

    I have used kazoo crossbar API to accomplish my task. Almost for every request to Crossbar API, an authentication credential is required. Crossbar provides a number of ways of authenticating a request. The most common way is to authenticate as a user and receive a token usable on subsequent requests. In this method, you provide the credentials of your user just for login and crossbar will generate an authentication token in response.

    User credential  is the MD5 hash of USERNAME:PASSWORD. For generating MD5 of a text in terminal I have used md5sum (in Linux) or md5 (in macOS) as following where I assume john as USERNAME and 12345 is PASSWORD.

    echo-n 'john:12345 | md5sum

    Output : 82a2dc91686ec828a67152d45a5c5ef7

     

    Then I have called user_auth API to get an authentication token. Details of user_auth API request is as below

     

    URL : https://{SERVER}:8000/v2/user_auth

    Method : PUT

    Header : "Content-Type: application/json"

    Request Body : 

    {

       "data": {

           "credentials": "82a2dc91686ec828a67152d45a5c5ef7",

           "account_name": "YOUR_ACCOUNT_NAME"

       },

       "method": "[md5 | sha1]"

    }

     Use your generated  MD5 output for the value of the credential and replace "YOUR_ACCOUNT_NAME" with your actual Kazoo Account Name.

     If the request body is correct, then it will give below success response

    {

        "auth_token": "{AUTH_TOKEN}",

        "data": {

            "account_id": "{ACCOUNT_ID}",

            "apps": [],

            "is_reseller": true,

            "language": "en-US",

            "owner_id": "{OWNER_ID}",

            "reseller_id": "{RESELLER_ID}"

        },

        "node": "{API_NODE}",

        "request_id": "{REQUEST_ID}",

        "revision": "{REVISION}",

        "status": "success",

        "timestamp": "{TIMESTAMP}",

        "version": "{VERSION}",

    }

    Here{AUTH_TOKEN}, the authentication token, is a long list of characters that you need to use in future requests.

     

    Step 1: Setup Flowroute as a resource in Kazoo

     

    First, we need to add flowroute as a resource in the kazoo. There are two levels of resources, global (or system-wide), and per-account (or local). I have used local resources.

     

    URL : http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/resources

    *** Please replace {ACCOUNT_ID} with your actual ACCOUNT_ID

    Method: PUT

    Header

       1 . "Content-Type: application/json"

      2 . “X-Auth-Token: {AUTH_TOKEN}"

    *** Replace {AUTH_TOKEN} with the actual AUTH_TOKEN that you retrieved from user_auth API described in the above prerequisite section.

     

    Request Body

    {

       "data": {

           "name": "flowroute",

           "format_from_uri": true,

           "rules": [

               ".{7,}"

           ],

           "flags": [

               "Use_Flowroute"

           ],

           "formatters": {

               "from": [{

                   "regex": "\\+?1?(\\d{10})$",

                   "direction": "outbound"

               }],

               "diversion":[{

                   "match_invite_format":true,

                   "direction":"outbound"

               }],

               "outbound_caller_id_number": [{

                   "value": "YOUR_CALLER_ID_NUMBER"

               }],

               "outbound_caller_id_name": [{

                   "value": "YOUR_CALLER_ID_NAME"

               }]

           },

           "gateways": [{

               "caller_id_type": "external",

               "channel_selection": "ascending",

               "codecs": ["PCMU", "PCMA","OPUS"],

               "custom_sip_headers": {},

               "emergency": false,

               "enabled": true,

               "endpoint_type": "sip",

               "format_from_uri": true,

               "invite_format": "route",

               "password": "YOUR_FLOWROUTE_PASSWORD",

               "prefix": "YOUR_FLOWROUTE_TECH_PREFIX*",

               "progress_timeout": "30",

               "realm": "us-east-nj.sip.flowroute.com",

               "server": "us-east-nj.sip.flowroute.com",

               "skype_rr": false,

               "suffix": "",

               "username": "YOUR_FLOWROUTE_USER_NAME"

           }]

       }

    }

     

     *** Replace YOUR_FLOWROUTE_USER_NAME with your actual Flowroute user name

    *** Replace YOUR_FLOWROUTE_PASSWORD with your actual Flowroute password

    *** Replace YOUR_FLOWROUTE_TECH_PREFIX with your actual Flowroute Tech Prefix followed by *

    *** Replace YOUR_CALLER_ID_NUMBER with your desired caller_id_number

    *** Replace YOUR_CALLER_ID_NAME with your desired caller_id_name

    *** If you use different Flowroute PoP other than “us-east-nj.sip.flowroute.com” then use your preferred PoP in “realm” and “server” fields.

     

    Step 2: Setup an extension in callflows that has a Pivot as the action

     

    URL : http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/callflows

     

    *** Please replace {ACCOUNT_ID} with your actual ACCOUNT_ID

    Method: PUT

    Header

       1 . "Content-Type: application/json"

      2 . “X-Auth-Token: {AUTH_TOKEN}"

    *** Replace {AUTH_TOKEN} with the actual AUTH_TOKEN that you retrieved from user_auth API described in above prerequisite section.

     

    Request Body

    {

    "data": {

    "numbers": ["1"],

    "flow": {

    "data": {

    "method": "GET",

    "req_timeout": "60",

    "req_format": "kazoo",

    "voice_url": "YOUR_PIVOT_API_URL",

    "debug": false

    },

    "module": "pivot"

    }

    }

    }

     

    *** Replace "YOUR_PIVOT_API_URL" with your actual pivot API URL.

     

    Step 3: Create a clicktocall endpoint that connects to the created callflow of mentioned extension (value of numbers key in the request body) in step 2

    Click-to-call allows you to create URLs that can be POSTed to with a phone number or SIP URI and create a phone call from the provided contact information to a destination you have pre-determined. I have created an clicktocall endpoint and connected it to the created extension in step 2

     

    URL : http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/clicktocall

    *** Please replace {ACCOUNT_ID}  with your actual ACCOUNT_ID

    Method: PUT

    Header : 

       1 . "Content-Type: application/json"

      2 . “X-Auth-Token: {AUTH_TOKEN}"

    *** Replace {AUTH_TOKEN} with the actual AUTH_TOKEN that you retrieved from user_auth API described in above prerequisite section.

     

    Request Body

    {

       "data": {

           "name": "call_1",

           "auth_required": false,

           "extension":"1",

           "caller_id_number":"YOUR_CALLER_ID_NUMBER"

       }

    }

     *** Replace YOUR_CALLER_ID_NUMBER with your desired caller_id_number

     

    Response

    {

        "auth_token":"{AUTH_TOKEN}",

        "data": {

            "auth_required": false,

            "custom_application_vars": {},

            "extension": "{EXTENSION}",

            "id": "{C2C_ID}",

            "name": "{NAME}"

        },

        "node": "{NODE_HASH}",

        "request_id": "{REQUEST_ID}",

        "revision": "{REVISION}",

        "status": "success",

        "timestamp": "{TIMESTAMP}",

        "version": "4.3.1"

    }

     We will use this "{C2C_ID}" in step 4 to make the actual outbound call

     

     Step 4: Use created clicktocall endpoint in step 3 for making the PSTN call

     

    URL : http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/clicktocall/{C2C_ID}/connect?contact={CONTACT}

    *** Please replace {ACCOUNT_ID} with your actual ACCOUNT_ID , {C2C_ID} with the ID you got at step 3 and {CONTACT} with the PSTN number you want to call

    For example, if you want to make a call at the number 12223334444 then your URL should be as below

    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/clicktocall/{C2C_ID}/connect?contact=12223334444

     

    Method: GET

    Header : 

       1 . "Content-Type: application/json"

      2 . “X-Auth-Token: {AUTH_TOKEN}"

     

    *** Replace {AUTH_TOKEN} with the actual AUTH_TOKEN that you retrieved from user_auth API described in the above prerequisite section.

     

    You should receive a phone call now at the number you have called from your API and After answering the call, an IVR should be played whose callflow instructions will be fetched from your Pivot URL.

     

  8. @fmateo05 Flowroute tech prefix is 8 digit and it is same as sip username. Did you mean to add this under gateway section of resource configuration as like  (marked in red color) ? 

    {
        "gateways": [{
            "caller_id_type": "external",
            "channel_selection": "ascending",
            "codecs": [
                "PCMU",
                "PCMA",
                "OPUS"
            ],
            "custom_sip_headers": {},
            "emergency": false,
            "enabled": true,
            "endpoint_type": "sip",
            "format_from_uri": true,
            "invite_format": "route",
            "password": "my_password",
            "prefix": "09....11",
            "progress_timeout": 10,
            "realm": "sip.flowroute.com",
            "server": "sip.flowroute.com",
            "skype_rr": false,
            "suffix": "",
            "username": "my_password",
            "force_port": false,
            "port": 5060
        }]
    }

  9. @fmateo05 thanks for your patience and cooperation . As per your suggestion i have added regex in the formatter section.But still no luck. I have attached a pcap file and sngrep screenshot. From pcap file, i am little bit confused whether the request is reached to flowroute or not.

    After updating formatter, my current resource detail is as follow

    {
        "data": {
            "name": "flowroute",
            "format_from_uri": true,
            "rules": [
                ".{7,}"
            ],sip_message.pcap
            "flags": [
                "Use_Flowroute"
            ],
            "formatters": {
                "from": [{
                    "regex": "\\+?1?(\\d{10})$",
                    "direction": "outbound"
                }],
                "outbound_caller_id_number": [{
                    "value": "12408446009"
                }],
                "outbound_caller_id_name": [{
                    "value": "kazoo"
                }]
            },
            "gateways": [{
                "caller_id_type": "external",
                "channel_selection": "ascending",
                "codecs": [
                    "PCMU",
                    "PCMA",
                    "OPUS"
                ],
                "custom_sip_headers": {},
                "emergency": false,
                "enabled": true,
                "endpoint_type": "sip",
                "format_from_uri": true,
                "invite_format": "route",
                "password": "my_password",
                "prefix": "",
                "progress_timeout": 10,
                "realm": "sip.flowroute.com",
                "server": "sip.flowroute.com",
                "skype_rr": false,
                "suffix": "",
                "username": "my_username",
                "force_port": false,
                "port": 5060
            }],
            "emergency": false,
            "enabled": true,
            "from_account_realm": false,
            "grace_period": 5,
            "rules_test": [],
            "weight_cost": 50,
            "id": "f39a018667d617e8052fa0bc88ff77d2"
        },
        "revision": "26-2b129d38d2cec1e713a064c93a7240b9",
        "timestamp": "2021-10-20T08:21:32Z",
        "version": "4.3.140",
        "node": "yMeslQexQufV5c-zOCJ0Ow",
        "request_id": "0fd4c481a17edc12bd4b57c30b22979d",
        "status": "success",
        "auth_token": "my_token"
    }

    invite.png

    sngrep-home.png

  10. @fmateo05 I am using formatter now but still same error. I am not sure whether i am using formatter in right way or not. After adding formatter to resource, resource detail is as follows now

    {
        "data": {
            "name": "flowroute",
            "format_from_uri": true,
            "rules": [
                ".{7,}"
            ],
            "flags": [
                "Use_Flowroute"
            ],
            "formatters": {
                "outbound_caller_id_name": {
                    "value": "kazoo"
                },
                "outbound_caller_id_number": {
                    "value": "12408446009"
                }
            },

            "gateways": [{
                "caller_id_type": "external",
                "channel_selection": "ascending",
                "codecs": [
                    "PCMU",
                    "PCMA",
                    "OPUS"
                ],
                "custom_sip_headers": {},
                "emergency": false,
                "enabled": true,
                "endpoint_type": "sip",
                "format_from_uri": true,
                "invite_format": "route",
                "password": "my_password",
                "prefix": "",
                "progress_timeout": 10,
                "realm": "sip.flowroute.com",
                "server": "sip.flowroute.com",
                "skype_rr": false,
                "suffix": "",
                "username": "my_username",
                "force_port": false,
                "port": 5060
            }],
            "emergency": false,
            "enabled": true,
            "from_account_realm": false,
            "grace_period": 5,
            "rules_test": [],
            "weight_cost": 50,
            "id": "f39a018667d617e8052fa0bc88ff77d2"
        },
        "revision": "24-b34137ec7a15bdf702c24f967abdfc98",
        "timestamp": "2021-10-19T18:23:15Z",
        "version": "4.3.140",
        "node": "yMeslQexQufV5c-zOCJ0Ow",
        "request_id": "b80d5e6234fc055ba32bfb539e499c96",
        "status": "success",
        "auth_token": "my_token"
    }

     

    @RuhNet  As per your suggestion , i have also added external caller ID on the user. User details is as below 

    {
        "data": {
            "apps": {},
            "call_forward": {
                "substitute": false,
                "enabled": false,
                "failover": false,
                "require_keypress": false,
                "keep_caller_id": false,
                "direct_calls_only": false,
                "ignore_early_media": true
            },
            "call_restriction": {
                "closed_groups": {
                    "action": "inherit"
                },
                "tollfree_us": {
                    "action": "inherit"
                },
                "toll_us": {
                    "action": "inherit"
                },
                "emergency": {
                    "action": "inherit"
                },
                "caribbean": {
                    "action": "inherit"
                },
                "did_us": {
                    "action": "inherit"
                },
                "international": {
                    "action": "inherit"
                },
                "unknown": {
                    "action": "inherit"
                }
            },
            "caller_id": {
                "internal": {
                    "number": "300003",
                    "name": "Mehedi BMQA"
                },
                "
    external": {
                    "number": "12408446009",
                    "name": "Kazoo"
                }

            },
            "hotdesk": {
                "require_pin": false,
                "keep_logged_in_elsewhere": false,
                "enabled": false,
                "id": ""
            },
            "contact_list": {
                "exclude": false
            },
            "priv_level": "user",
            "music_on_hold": {},
            "username": "mehedi.hasan@bengalmobileqa.com",
            "email": "mehedi.hasan@bengalmobileqa.com",
            "first_name": "Mehedi",
            "last_name": "BMQA",
            "presence_id": "300003",
            "flags": [],
            "vm_to_email_enabled": false,
            "verified": true,
            "ui_metadata": {
                "version": "4.3-140",
                "ui": "monster-ui",
                "origin": "callflows"
            },
            "smartpbx": {
                "find_me_follow_me": {
                    "enabled": true
                },
                "call_recording": {
                    "enabled": false
                }
            },
            "send_email_on_creation": true,
            "ringtones": {},
            "require_password_update": false,
            "enabled": true,
            "directories": {
                "undefined": "75b01106686d5b71d504864c500d6019",
                "b9d388d91d3f7ae631cda9a905cdcd0b": "75b01106686d5b71d504864c500d6019"
            },
            "do_not_disturb": {
                "enabled": false
            },
            "record_call": false,
            "id": "581f26b1c20d7ca49307eadc36d14204"
        },
        "revision": "17-3ddc2b1310de65a55053684083a5512e",
        "timestamp": "2021-10-19T18:28:19Z",
        "version": "4.3.140",
        "node": "yMeslQexQufV5c-zOCJ0Ow",
        "request_id": "260ae8c21d5363132766e71607cedf6f",
        "status": "success",
        "auth_token": ""
    }

    These caller id change effect can be seen at log but error is same.

    2021-10-19T13:29:35.640417174Z [NOTICE] kazoo_node.c:466 log|g5JjzWMA7WqSxhXjHbyahg..|building xferext extension: bridge {origination_caller_id_number='12408446009',origination_caller_id_name='Kazoo',ignore_early_media='false',ecallmgr_Account-ID='36c8b00775c52885118d87b1cc7e78ca',ignore_display_updates='true',ecallmgr_Outbound-Flags='Use_Flowroute',ecallmgr_Realm='li89-28.members.linode.com',ecallmgr_Reseller-ID='36c8b00775c52885118d87b1cc7e78ca',effective_caller_id_number='12408446009',effective_caller_id_name='Kazoo',local_var_clobber='true'}[^^!origination_caller_id_name='kazoo'!leg_progress_timeout='10'!sip_from_uri='sip:12408446009@sip.flowroute.com'!ecallmgr_Global-Resource='false'!ecallmgr_Resource-ID='f39a018667d617e8052fa0bc88ff77d2'!ecallmgr_E164-Destination='+8801717580324'!ecallmgr_Original-Number='8801717580324'!ecallmgr_Matched-Number='+8801717580324'!ecallmgr_Resource-Type='offnet-termination'!absolute_codec_string='^^:PCMU:PCMA:OPUS'!effective_callee_id_number='+8801717580324'!effective_callee_id_name='8801717580324'!sip_auth_username='my_username'!sip_auth_password='my_password']sofia/sipinterface_1/+8801717580324@sip.flowroute.com

    2021-10-19T13:29:35.640421103Z [NOTICE] kazoo_node.c:466 log|g5JjzWMA7WqSxhXjHbyahg..|building xferext extension: event Event-Name=CUSTOM,Event-Subclass=kazoo::masquerade,kazoo_event_name=CHANNEL_EXECUTE_COMPLETE,kazoo_application_name=bridge  

  11. @RuhNet and @fmateo05 Thanks for your prompt response.

    As per doc, i have created a resource for Flowroute on the account using resources API. My Request Details are as below
     
    URL : http://Kazoo-IP:8000/v2/accounts/account_id/resources
     
    Method : PUT
     
    Header : "X-Auth-Token: {AUTH_TOKEN}
     
    Body : 
     
    {
        "data": {
            "name": "flowroute",
            "rules": [
                ".{7,}"
            ],
            "flags": [
                "Use_Flowroute"
            ],
            "gateways": [{
                "channel_selection": "ascending",
                "codecs": ["PCMU", "PCMA"],
                "custom_sip_headers": {},
                "emergency": false,
                "enabled": true,
                "endpoint_type": "sip",
                "format_from_uri": false,
                "invite_format": "route",
                "password": "My_Password",
                "prefix": "",
                "progress_timeout": "15",
                "realm": "sip.flowroute.com",
                "server": "sip.flowroute.com",
                "skype_rr": true,
                "suffix": "",
                "username": "My_Username"
            }]
        }
    }
     
    If i fetch the resource details, then it shows
     
    {
        "data": {
            "name": "flowroute",
            "rules": [
                ".{7,}"
            ],
            "flags": [
                "Use_Flowroute"
            ],
            "gateways": [{
                "channel_selection": "ascending",
                "codecs": [
                    "PCMU",
                    "PCMA"
                ],
                "custom_sip_headers": {},
                "emergency": false,
                "enabled": true,
                "endpoint_type": "sip",
                "format_from_uri": false,
                "invite_format": "route",
                "password": "My_Password",
                "prefix": "",
                "progress_timeout": 15,
                "realm": "sip.flowroute.com",
                "server": "sip.flowroute.com",
                "skype_rr": true,
                "suffix": "",
                "username": "My_Username",
                "force_port": false,
                "port": 5060
            }],
            "emergency": false,
            "enabled": true,
            "from_account_realm": false,
            "grace_period": 5,
            "rules_test": [],
            "weight_cost": 50,
            "id": "f39a018667d617e8052fa0bc88ff77d2"
        },
        "revision": "1-96d273e6e49cd071f0923ca18769de2a",
        "timestamp": "2021-10-18T13:17:18Z",
        "version": "4.3.140",
        "node": "yMeslQexQufV5c-zOCJ0Ow",
        "request_id": "b430f804325ca713f6d27df6d14bcf5a",
        "status": "success",
        "auth_token": "my - token"
    }
     
    I have created the callow from API. My Request Details are as below
     
    URL : http://Kazoo-IP:8000/v2/accounts/account_id/callflows
     
    Method : PUT
     
    Header : "X-Auth-Token: {AUTH_TOKEN}
     
    Body : 
     
    {
        "data": {
            "name": "Flowroute Callflow",
            "numbers": ["no_match"],
            "flow": {
                "module": "resources",
                "data": {
                    "use_local_resources": true,
                    "outbound_flags": [
                        "Use_Flowroute"
                    ]
                }
            }
        }
    }
     
    If i fetch the callflow details, then it shows
     
    {
        "data": {
            "name": "Flowroute Callflow",
            "numbers": [
                "no_match"
            ],
            "flow": {
                "module": "resources",
                "data": {
                    "use_local_resources": true,
                    "outbound_flags": [
                        "Use_Flowroute"
                    ],
                    "caller_id_type": "external",
                    "ignore_early_media": false
                }
            },
            "patterns": [],
            "id": "313f0a23386ce5096cc874e8ce3e1c96",
            "metadata": {}
        },
        "revision": "1-438e4f675ee0489d9f08c9a7530834cd",
        "timestamp": "2021-10-18T13:41:28Z",
        "version": "4.3.140",
        "node": "yMeslQexQufV5c-zOCJ0Ow",
        "request_id": "dd8d4cc26de38f9935891d7312aed8ae",
        "status": "success",
        "auth_token": "my-token"
    }
     
     
    But the problem is if i dialled my mobile number from zoiper client, then it shows Error Service Unavailable (500) in zoiper. Can you guys help me to figure out what i am doing wrong here? I have attached kazoo and freeswitch log.
     
    Note : I did not add any Main Number to account. Is it any issue?

     

  12. Hi, I am new to kazoo platform but has some prior experience to work with raw Freeswitch. I have tested some inbound call successfully by dialling an kazoo extension from zoiper client where callflow instructions are retrieved using pivot module and those are setup by me from Monster UI/Crossbar API.
     
    Now i want to make outbound PSTN call using Flowroute service provider. But unable to find clear instructions regarding this. From the Create an outbound carrier section of the link https://docs.2600hz.com/sysadmin/doc/install/configure_kazoo/,  i think i need to setup Flowroute as resource and also need to configure corresponding callflow for routing the call using Flowroute.
     
    Is this the all configuration required for PSTN call using Flowroute or any more things i need to configure?Can anyone give me some insight on this? 
     
    Thanks in advance.
     
    Note : 
     
    1 . I have installed kazoo on single Centos v7 server.
    2 . I did not add any main number to my account.
×
×
  • Create New...