Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
 
Go Back   Zimbra - Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra - Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Display Modes
  #111 (permalink)  
Old 07-27-2009, 07:10 PM
Senior Member
 
Posts: 58
Default

Hmm . . . something strange is happening. I do see more matches than I saw before but not all of them are matching even though the regex testing is matching. Is there some other processing going on? I'll post of list of formats all of which evaluate as matched in the regex tester at RegEx: online regular expression testing and I'll show the results I have when I mouse over:

12079857880 - matched
2079857880 - matched
(207)9857880 - no match but recognized by Zimbra as a phone number
(207) 985-7880 - matched
207-985-7880 - no match but recognized by Zimbra as a phone number
207 985 7880 - matched
+1 207-985-7880 - matched

Any ideas? Thanks - John
__________________
www.spiritualoutreach.com
Making Christianity intelligible to secular society
Reply With Quote
  #112 (permalink)  
Old 07-27-2009, 07:17 PM
Senior Member
 
Posts: 58
Default Country Code problems

I sure hope I don't come across as picking on this Zimlet; I think it's great. However, I hit another issue that may be easily resolved. If one clicks to dial a number with a "+" that happens to be in one's own country, it attempts to access it via international dialing. For example, my signature has +1 207-985-7880 and I am in the US. If I click to dial or right click and dial, it erroneously dials 01112079857880.

May I suggest a per user country code. If the country code in the number matches the user's country code, the + expansion logic is skipped. Per user is important for installations operating in multiple countries.

I would suggest two related changes. When right click dialing, should we show the complete dialing string? This would allow the user to edit erroneous international expansion, e.g., they are visiting another country.

May I suggest a two tiered evaluation of the user's country code. There would be a zimlet configuration parameter in the xml configuration file for the default and there would be a user override in preferences. I would suggest the same for user context.

Thanks - John
__________________
www.spiritualoutreach.com
Making Christianity intelligible to secular society
Reply With Quote
  #113 (permalink)  
Old 07-27-2009, 07:34 PM
Senior Member
 
Posts: 58
Default

As I think about it, I suppose a per user country code is a bad idea. It should be per host since the dialing is being done by the host.
__________________
www.spiritualoutreach.com
Making Christianity intelligible to secular society
Reply With Quote
  #114 (permalink)  
Old 08-03-2009, 08:22 AM
Senior Member
 
Posts: 63
Default Host config

Quote:
Originally Posted by gracedman View Post
As I think about it, I suppose a per user country code is a bad idea. It should be per host since the dialing is being done by the host.
Hi gracedman
Since 0.65 all configs Attributs are also usable in <host> config. Just move the property from global section to <host> section.
You may set zimlet Log level to "debug" an check mailbox.log to see if it works.
Check Section "Zimlet Debugging" in install.txt delived in zimlet's zip file.
Reply With Quote
  #115 (permalink)  
Old 08-03-2009, 08:25 AM
Senior Member
 
Posts: 63
Default

Quote:
Originally Posted by gracedman View Post
Hmm . . . something strange is happening. I do see more matches than I saw before but not all of them are matching even though the regex testing is matching. Is there some other processing going on? I'll post of list of formats all of which evaluate as matched in the regex tester at RegEx: online regular expression testing and I'll show the results I have when I mouse over:

12079857880 - matched
2079857880 - matched
(207)9857880 - no match but recognized by Zimbra as a phone number
(207) 985-7880 - matched
207-985-7880 - no match but recognized by Zimbra as a phone number
207 985 7880 - matched
+1 207-985-7880 - matched

Any ideas? Thanks - John
Hi John

I am not a RegExp expert, too. So the pragmatic way is to get RegExp from
/opt/zimbra/jetty/webapps/service/zimlet/com_zimbra_phone/com_zimbra_phone.xml .This one is proably very much tuned for American phone numbers.
btw. to prevent problems between com_zimbra_phone and ch_bnc_asterisk you may disable com_zimbra_phone zimelt.

Have fun
- Christof
Reply With Quote
  #116 (permalink)  
Old 08-03-2009, 09:00 AM
Senior Member
 
Posts: 58
Default

Thanks very much, Christof. The conflict between the two zimlets was the problem. As soon as I disabled com_zimbra_phone, your zimlet matched all the numbers and worked flawlessly.

The country code is still an issue. Using a host directive would work if the underlying logic supported it. However, wouldn't we need to build the setting into the code? In other words, right now, it doesn't matter what the host's country code is; if the number is preceded by a +, the international dialing prefix (011 in the US) is added even to calls within the host's own country and there is no way to override it with a right click either. That's the fundamental problem.

Thanks again - John

PS - I think the regex I've proposed will work equally well for non-US numbers; I was intentionally trying to not be country specific. I'm certainly curious to see what others find as they test it - John
__________________
www.spiritualoutreach.com
Making Christianity intelligible to secular society
Reply With Quote
  #117 (permalink)  
Old 08-05-2009, 03:47 AM
Intermediate Member
 
Posts: 22
Default using trixbox

I have just spent about 7 hrs total in getting this sorted with trixbox so I thought I'd post my findings here. Also being new to zimbra didn't help!!

Installing the zimlet

Download AND RENAME! remove the version number like so:

original filename: ch_bnc_asterisk_0.65.zip

new filename: ch_bnc_asterisk.zip

Install the zimlet as described everywhere in this thread either vi cli or adminUI.

Extract the config file and edit - this is what you need to change:

Code:
<host name="your.zimbra.hostname">
This is the name of your zimbra box - NOT your trixbox! (that caught me out for a while!

Code:
<property name="astManagerIp">192.168.14.3</property>
The IP address of your trixbox

Code:
<property name="astManagerUser">username</property>
<property name="astManagerSecret">password</property>
You can use the default trixbox ones here from manager.conf. Defaults are admin and amp111 - but of course you have changed the passwords haven't you?

Code:
<property name="astNoExtenCheck">false</property>
Not too sure if this affects trixbox, but working ok here

Code:
<property name="astDialContext">from-internal</property>
The context taken from the extension settings in FreePBX

Code:
<property name="srcPhonePrefix"></property>
I changed this to be blank

Code:
<property name="calleePrefix">9</property>
My trrixbox simply needs a 9 to dial out so add your prefix here!

Configure the zimlet as described elsewhere, restart mailboxd and then go to your webUI, under zimlets, right click asterisk, select properties, insert your extension number and context 'from-internal' and click ok.

This has worked for me with trixbox 2.6
Reply With Quote
  #118 (permalink)  
Old 08-05-2009, 05:58 AM
Senior Member
 
Posts: 58
Default Regex revision

Hello, all. The regex I proposed earlier does not account for dots, dashes, or commas after +CountryCode. This one does and seems to be handling UK and Australian numbers as well as US ones:

(?:\s|^)(?:\+\d{1,3}(?:\s|\.|\-|\,)?)?(?:\(\d{1,4}\))?\s?\d{1,11}(?:(?:\-|\.|\,|\s)\d{1,10}){0,3}\s?$

Take care - John
__________________
www.spiritualoutreach.com
Making Christianity intelligible to secular society
Reply With Quote
  #119 (permalink)  
Old 08-06-2009, 11:55 AM
Loyal Member
 
Posts: 82
Default Switchvox does not expose AMI.

I posted a question on the digium switchvox developers forum and got a response back that Switchvox does not expose AMI. Switchvox has its own API, which if I get a chance I will take a look at this zimlet and see if it can easily be rewritten for Switchvox.
Derek
Reply With Quote
  #120 (permalink)  
Old 08-13-2009, 08:57 AM
Starter Member
 
Posts: 2
Default

hey gracedman.
The regular expression you proposed is working great. just one thing it matches all the phone numbers except when there is text after the numbers.

For example
"my phone number is 555-6677" This matches
"my cell is 555-6677 call me any time" this does not match for some reason.

Does this work for you.
Reply With Quote
Reply


Thread Tools
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0