Jump to content

tomas_

Members
  • Posts

    785
  • Joined

  • Last visited

  • Days Won

    20

Posts posted by tomas_

  1. As already mentioned we've done a mobile app for use with Kazoo, for now only own-hosted but we're planning on getting it to work with 2600hz hosted also.

    Some of the features working now:

    • CDRs that shows the Kazoo CDRs, as in Monster UI with clickable calls to get all calls legs etc. The numbers are also clickable for direct calling.
    • Set external CallerID, drop down shows all numbers assigned to the user or company default
    • Enable / disable user functions as; Call forwarding, "Allow use of cellphone's voicemail", "Keep Original Caller-ID" etc.
    • Ring groups shows all groups in the account, with possibility to login or logout (actually adds or removes the user to the group).
    • Push notifications, notices the user before mobile is ringing (to inform that this is a call from Kazoo, containing CID and CID name etc)
    • Dialing functions, integrated with the intent tel: so the app is automatically launched if clicking on a telephone number somewhere in the device. Also integrated with mobile phonebook.

      Three different call methods; Callback, Callthru and Direct. Direct makes a normal call from the mobile device, showing the mobile number.
      Callback and Callthru will connect the call through the PBX, showing the PBX number and hides the mobile number.

      Callback is used if the mobile user doesn’t want to pay for the call (if using a personal mobile at work - saving the company large sums in monthly costs!).
      If Callback is used the PBX first calls the mobile device, and when answer connects to the number entered.
      Callback can also be used with a SIP device in Kazoo, for instance your desktop phone. It has ”auto answer” in the request, so the phone will connect the call instantly (if supported - At least Grandstream phones have this). Like a remote call function for your desktop phone!

      Callthru is used if the mobile user has unlimited calls and not being charged for a call to the PBX. When pressing that button the app sends a request to our backend at Kazoo, witch searches the callflows for a callthru number and sends back the number to the app. The mobile device instantly calls that number and gets connected to the number entered
       

    • Presence / PAM function to select if you for example are on lunch, meeting or business trip etc, until a specific date or time. When someone is trying to reach you they will hear a voice saying ”The person you are calling is at lunch and will be back at 12:10”. It will also enable DND function on the user so MPK keys are showing availability.
      After the time has passed the system will automatically remove the presence and the DND. (Cron run every 1 minute).

      The presence system is also reachable from the PBX phones with a feature code (*23*3*1440 = meeting until 14:40 etc). There are 9 different presence types.
      Presence / PAM isn’t enabled in the demo account (yet), but it’s possible to set the presence from the app (but it seems like time and date popup functions isn’t working very well in browser, it’s using the iOS or Android native in the real device).
       

    Upcoming functions in progress:

    • Softphone integration
    • Transfer calls to own devices or other users (including BLF status)
    • Listen to call recordings in CDR listings
    • Change opening hours
    • Voicemail functionality
    • Chat


    The app is made with Ionic, so it works in iOS, Android and web browsers etc.

  2. Hi!
    I don't know if this is the right forum, but I'll try anyway.

    A while ago I noticed some bugs in the couchdb-dump-php tools (https://github.com/2600hz/couchdb-dump-php).
    I didn't see the impact of this until today, when accidentally removed my company's whole database in Couch(!) (oops, took 3 seconds with a faulty curl command, and 6-7 hours to restore from backup).

    We're using couchdb-dump.php to make nightly backups of the whole CouchDB (https://forums.2600hz.com/forums/topic/9275-couchdb-backup-strategies/?do=findComment&comment=51413)
    However, it seems like the restore script imports the objects as strings instead!
    In devices documents, ' "caller_id": { }, '' gets imported as ' "caller_id": [ ], ', same with contact_list etc and also in users documents. To solve this you can use the sed commands below, in the backup file before restoring it.

    sed -i -e 's/caller_id\":\[\]/caller_id\":\{\}/g' /tmp/backup.json
    sed -i -e 's/contact_list\":\[\]/contact_list\":\{\}/g' /tmp/backup.json
    sed -i -e 's/dial_plan\":\[\]/dial_plan\":\{\}/g' /tmp/backup.json
    sed -i -e 's/contact_list\":\[\]/contact_list\":\{\}/g' /tmp/backup.json
    sed -i -e 's/music_on_hold\":\[\]/music_on_hold\":\{\}/g' /tmp/backup.json
    sed -i -e 's/ringtones\":\[\]/ringtones\":\{\}/g' /tmp/backup.json
    sed -i -e 's/call_restriction\":\[\]/call_restriction\":\{\}/g' /tmp/backup.json
    sed -i -e 's/profile\":\[\]/profile\":\{\}/g' /tmp/backup.json
    sed -i -e 's/media\":\[\]/media\":\{\}/g' /tmp/backup.json


    Another thing that doesn't work as expected are the phone numbers. The plus sign is imported into space instead;
    image.png.f9d6c3e7116e8da755dbb0cfdf6704a6.png

    To solve this you need to copy, then delete and create a new number doc and replace space with plus, then save. On every number, manually...


    We tried to look into the code of the scripts, but can't see why this bugs occur. Hopefully some more experienced developers out there can fix this!

  3. Oh, I'm sorry but I didn't install it nor used it personally. The customer is rather far away so we had an local electrician there to install it for us.
    I haven't heard anything about it from the customer and he says it's working OK...

  4. 6 hours ago, Josh Robbins said:

    It turns out it doesn't work without an approved_group_id with the listening user in part of that group. 

    So you mean it isn't enough with just approved_user_id that we have in our script above?

  5. The BLF function on (at least) Grandstreams phones works like a charm.
    When enabling the function keys it shows the extension status (green = available, red = busy or not registered), and flashes if the extension are ringing. Pressing the key will pick up the call.
    Also works like speed dial and to transfer calls to another extn.

  6. Sure!
    Here's the main part of our PHP script invoked by pivot from a feature code (*68). I hope I didn't missed something.
    It uses https://github.com/2600hz/kazoo-php-sdk, basically in the find_user_id_from_extension function, but it should be possible to do that with Kazoo API and curl also.

    <?php
    
    ### Todo:
    # Permissions, system for who is permitted to eavesdrop on which users
    #  Now all users in same account is permitted to eavesdrop all
    
    require_once "kazoo-php-sdk/vendor/autoload.php";
    
    date_default_timezone_set('Europe/Stockholm');
    $date_format = 'Y-m-d H:i:s';
    $logfile = "/var/log/kazoo/eavesdrop.log";
    $feature_code_length = 3;  # Length of feature code (*68 = 3)
    
    $account_id = $_GET['Account-ID'];
    $user_id = $_GET['User-ID'];
    $caller_user_id = $_GET['User-ID'];
    $request = $_GET['Request'];
    $extn = substr($request, $feature_code_length);	# Strip feature code to get extension to eavesdrop
    
    if (!function_exists('AppendLogFile')) {
    	function AppendLogFile($logstring){
    		global $logfile, $logfile_handle, $date_format;
    		$datestring = date($date_format);
    		if (fwrite($logfile_handle, "$datestring; $logstring\n") === FALSE) echo("** Error: Cannot write to logfile $logfile! **\n\n");
    	}
    }
    
    function get_sdk($api_key_function) {
    	require_once "kazoo-php-sdk/vendor/autoload.php";
    	$options = array('base_url' => 'http://localhost:8000');
    	$auth_token = new \Kazoo\AuthToken\ApiKey($api_key_function);
    	$sdk = new \Kazoo\SDK($auth_token, $options);
    	return $sdk;
    	exit();
    }
    
    function find_user_id_from_extension($sdk, $account_id, $extn) {
    	$users = $sdk->Account($account_id)->Users();
    	foreach($users as $element) {
    		$presence_id = $element->presence_id;
    		if ($presence_id == $extn) {
    			return $element->id;
    			exit;
    		}
    	}
    }
    
    
    if (!$logfile_handle = fopen($logfile, 'a')) { ### Open logfile
    	die("** Error: Failed to open logfile $logfile! **");
    }
    
    $sdk = get_sdk($master_api_key);
    $user_id = find_user_id_from_extension($sdk, $account_id, $extn);
    
    AppendLogFile("Starting eavesdrop on user_id $user_id from $caller_user_id in account $account_id.");
    
    header("content-type: application/json");
    echo ('{"module":"eavesdrop","data":{"user_id":"'.$user_id.'", "approved_user_id": "'.$caller_user_id.'"}}');

     

  7. 25 minutes ago, FASTDEVICE said:

    @tomas_ Does the feature only work with queues and agents? I have a basic need for it to work with any device in an active call.  

    No, we are using it on regular calls and devices.
    Not queues, but I think it would work there also.

  8. We are using the eavesdrop feature, but that's in our own hosted Kazoo cluster. But I thought that all features in the open source version is available in the 2600hz hosted one?

    If I remember correctly we did a simple PHP script invoked via Pivot. The manager can monitor the agents by dialing a feature code followed by the extension he wants to listen to (*68*101 or *68*102 etc).
    We then programmed his phone to have those codes in the soft keys, so he just has to press one key to listen :)

  9. I did this when moving some customers from another Kazoo server to our cluster. Or I didn't use GET and POST, but https://github.com/2600hz/couchdb-dump-php to dump the database to JSON files instead (including attachments like sound files etc).

    However I found that it would be rather much work to use the old ID's, so i did a search and replace in the JSON files instead (created the new account first, then replaced the old IDs in the JSON files to the new ID).

    I also remember that it seems to be a bug in the couch-dump-php that exports '{}' as '[]' instead, so it wasn't straight forward at all!
    I highly recommend to consider a manual move instead.

    Or, maybe keep them as it is... Why do yo really need to split them? Do you want to separate the call charges? Otherwise it isn't a big problem running multiple companies inside the same account, we do that with a few...

  10. Wow, just tried this and it works! Awesome!!
    Thanks!

    However you need to press 0 before the recording starts, during the greeting message. When recording starts the only options are 1 (save recording), 2 (listen to recording) & 3 (record again). Would be nice if 0 worked here also...

×
×
  • Create New...