Jump to content

fmateo05

Members
  • Posts

    282
  • Joined

  • Last visited

  • Days Won

    28

3 Followers

Recent Profile Visitors

3,683 profile views
  1. I am going to give details about how it works. When the number is dialed outbound, it will ask the user to dial two digits. These two digits are split by the first one as the carrier to select, and the second one, the DID number selected as the caller ID on that carrier. The code is wrote to split the carrier by required flags, so when adding your resources, you must specify a flag in the second pivot script and also set that same on the carrier to be configured. If adding another different carrier you must add the function like: function myothercarrier($digitspl) { $myothercarrier = array("1929XXXXXXX", "+1561XXXXXXX", "1786XXXXXXX", "1862XXXXXXXX"); header('content-type:application/json'); ?> { "module": "dynamic_cid", "data": { "action": "static", "caller_id" : { "name": "<?= $myothercarrier[$digitspl]; ?>", "number": "<?= $myothercarrier[$digitspl]; ?>" } }, "children": { "_": { "module":"resources", "data": { "use_local_resources": false , "outbound_flags": ["myothercarrier"], "to_did": "<?= $calleeid ; ?>" }, "children": {} } } } <?php } And also add some code, so the function must be executed, this one must be just below of the last similar one like: if($digitspl['0'] === '8' ){ signalwire($digitspl['1']); } Note that the value is '8' and must be increased by one on each carrier addition (if there were seven, then you add digit 8. The numbers must be added on e164 or 1+NPA+NXX format, depending of how the carrier supports it. Settings that are required: The resource flags with require_flags: true , and also the flag value set. The list of DID's on that carrier (if they are 7 for example, you add them separated by commas on the array, i recommend to add the first DID twice, because the array counts from zero) The "use_local_resources" setting if you desire to use local resources or global (boolean).
  2. Hey Tested the new spanish prompts officially from 2600hz. They are excellent. Going to create another account on my cluster to test the other ones (es-es)
  3. Hi. I have edited the previous post for easy understanding and how to know how are the first or the second pivot script. The URL posted is an example, and you should set it to the site where your pivot scripts are hosted (it basically calls the second script with file named 'resource-cid-select.php') The Caller ID would be chosen depending of the dialed digit. If you dial (1)(1) after the prompt: First Digit: Carrier #1 or Carrier #2 Second Digit: Caller ID in full format on kazoo
  4. First Pivot Script: <?php header('content-type:application/json'); ?> { "module":"tts", "data":{ "text": "Please select your Provider and CallerID", "engine": "flite" }, "children": { "_": { "module": "collect_dtmf", "data": { "max_digits": 3, "collection_name": "custom_name" }, "children": { "_": { "module": "pivot", "data": { "voice_url": "http://portal.example.com/pivot/resource-cid-select.php" }, "children": {} } } } } } Second Pivot Script: <?php function signalwire($digitspl) { $signalwire = array("1631XXXXXXX", "1786XXXXXXX", "+1929XXXXXXX", "1848XXXXXXX", "1716XXXXXXX"); $calleeid = '+' . $_REQUEST['To']; header('content-type:application/json'); ?> { "module": "dynamic_cid", "data": { "action": "static", "caller_id" : { "name": "<?= $signalwire[$digitspl]; ?>", "number": "<?= $signalwire[$digitspl]; ?>" } }, "children": { "_": { "module":"resources", "data": { "use_local_resources": false , "outbound_flags": [ "signalwire" ], "to_did": "<?= $calleeid ?>" }, "children": {} } } } <?php } function bulkvs($digitspl) { $bulkvs = array("1929XXXXXXX", "+1561XXXXXXX", "1786XXXXXXX", "1862XXXXXXXX"); header('content-type:application/json'); ?> { "module": "dynamic_cid", "data": { "action": "static", "caller_id" : { "name": "<?= $bulkvs[$digitspl]; ?>", "number": "<?= $bulkvs[$digitspl]; ?>" } }, "children": { "_": { "module":"resources", "data": { "use_local_resources": false , "outbound_flags": ["bulkvs"], "to_did": "<?= $calleeid ; ?>" }, "children": {} } } } <?php } $digitsel = $_REQUEST['Digits']; $digitspl = $digitsel['custom_name']; if($digitspl['0'] === '1' ){ signalwire($digitspl['1']); } elseif($digitspl['0'] === '2') { bulkvs($digitspl['1']) ; } else { $calleeid = '+' . $_REQUEST['To']; header('content-type:application/json'); ?> { "module":"resources", "data": { "use_local_resources": false , "to_did": "<?= $digitspl ?>" }, "children": {} } } <?php } These pivot scripts can help as a quick method. For example, if you dial 12, it would choose the assigned provider as first digit and the third callerid as the second one. First digit: > 1. 'Signalwire' < 2. Bulkvs Second digit: 1. 1631XXXXXXX 2. 1786XXXXXXX > 3. '1929XXXXXXX' <
  5. I was practicing the feature code (*2) combining dynamic_cid with cb_lists. I got it working as per the example as expected. That setting is on the API level.
  6. I also use it via API on call flows. On Pivot you can select the caller id inside an Array (for example) and set it on the dynamic caller id with static option https://github.com/2600hz/kazoo/blob/master/applications/callflow/doc/dynamic_cid.md That can be configured as above on pivot also.
  7. You must set-up the device configuration on zoiper like: Username: <device username> Hostname: <Realm> Password: <device password> Outbound Proxy: <server ip address>:7000
  8. host=<proxy-ip-address> from-domain=20201126085320.sip.XXXX.com Register string: register => sip-user@20201126085320.sip.XXXX.com:password@<proxy-ip-address>
  9. Check this out: https://upcloud.com/compare/azure/ https://upcloud.com/pricing/
  10. Are you trying the register for use as Normal SIP phone? or to use it as trunking?
  11. For inbound you must add the numbers on the account on full format mode (E.164), then add the carriers ip address to the acls. After that you should assign the numbers to any user or devices (on SmartPBX or Call-flows) For outbound calling you should use the resources API, they can be global (to all accounts) or local to the account. https://github.com/2600hz/kazoo/blob/master/applications/crossbar/doc/resources.md
  12. execute: ss -ln | egrep "7000|5060" it seems that kamailio's IP address is set to 127.0.0.1 on MY_IP_ADDRESS kamailio variable (local.cfg)
  13. You must start up kamailio, kamailio listens on those ports and freeswitch is the media server.
×
×
  • Create New...