SIP and email Rules Engine Recipies

Over time, most individuals begin to need more control of their personal communications in the accounts they have for various internet communications services. Information digestion controls exist in many forms and the need itself often spawns new methods of accessing information.

CommuniGate Pro is the communications platform that delivers all of the communication services I need from one account. This is convenient, but also very useful when deciding how to control that information. One of my favorite features in CommuniGate Pro is the Automated Rules engine. I use the rules engine to manage my day to day communications across all mediums. Both asynchronous communications (email) and realtime (SIP and VoIP) can be personally improved with Automated Rules. There are basically two end user categories of rules that can be accessed from the Web interface, MAPI interface or the Pronto! Flash user interface.

Simplified Rule = A rule who's magic or detailed parameters and actions have been grouped into a single option.
This is the list of Simplified rules for users direct from my account today:

VoIP (via the Call Control link)

  • Voice Mail - To set voicemail options

  • Divert Calls - Call Forward with time and destination options

  • Alerting - This provides a simultaneous ring feature. I use this to have my mobile ring everytime I receive any call to my account

  • Block Calls - Provides a Blacklisting option for specific callers. A Blacklisted Address book can be created to add blocked contacts to the list



Messaging (via the Mail link)


  • Vacation Message - Standard vacation messaging with the nice feature that does not repeat sending the same message to the same address wehn you receive more mail from that sender

  • Redirect All Mail to - Message forwarding and copying options (applies to voicemail recordings too)



Automated Rules = Rules where one can provide valid parameters and actions to have the system handle your data as you wish. These can be created by administrators and users (when allowed) and offer many options.

Signaling Rules Recipes

These examples are limited and one should review the documentation for Automated Signal Processing Rules to gain a full understanding of the different controls and behaviors that can be created. I do not have many of these signaling rules yet. Most of the simplified rules take care of my needs. I have submitted a feature request for rule actions that can for example forward IM messages to SMS when Presence is Away or another for server side archiving of IM messages into IMAP folders. As CommuniGate Pro is enhanced and I learn more I will likely add more examples.

Block Unwanted Roster Activity

One of the first signaling rules I needed to create was for Instant Messaging. Various internal and external testing servers created a state where my Instant Messaging buddies or contact roster would receive buddy requests for roster permissions. I also has some individuals I did not know sending buddy bombs or just inviting to connect without introduction or response when I asked who they were. I did not want strangers to constantly ask for or see my presence. Since I knew that some of these were not real people or unwanted contacts I created a rule that would basically blacklist these Instant Messaging Invitations to stop the requests before they reach my IM client. To start to configure this look for the Call Control Link in the Basic Web Interface.

Pasted Graphic


When on the Call Control Screen you can add a rule called Block IM.

Pasted Graphic 2

The documentation from the help link in the upper right hand corder will provide links to information that explain the Stage and Priority options.

Pasted Graphic 13

Redirect Calls (without redirecting Instant messages)

This rule was created because a specific SIP phone with IM features was receiving and playing an audio signal for every IM I received. This feature could be deactivated in the phone, but this rule was used instead. Note that the Redirect to parameter can send to an extension only such as 200 or a valid SIP address as it appears in the example below.

Pasted Graphic 12

Mail Rules Recipes

The idea of mail filtering rules is not new. CommuniGate Pro has had this capability for some time now and memos like the Sieve RFC from 2001 are other examples. Sieve has an important place in the world of email filtering as a reference example. I am not up to date on it but I think it still is not designed to perform actions such as 'marking a message read' with the read flag. Most likely because it does not reach that deep into the message store. CommuniGate Pro Rules can perform these types of actions because as the clustered store of all communications it is not hampered by the need for more moving parts (special gateways) to make nice integration things happen across services or protocols.

SpamCatcher

This is a rule I use to set the level of SPAM I want removed from my Inbox and placed in another folder for this unwanted email. I also mark the message as Read with the rule so my mail user agent application does not chime when SPAM messages arrive. This uses the mail header graph of Xs that the SpamCatcher server filter creates.

Pasted Graphic 3

CRM Sent Messages

I use a web based CRM tool that allows me to send messages direct from the CRM system to communicate with partners and customers. This feature is good, but I causes me to receive a copy of the messages I sent in my CommuniGate Pro INBOX instead of my Sent folder where all email I send is stored. I created this rule to automatically recognize copied of email messages I sent from the CRM and store them ad Read in the Sent folder exactly as if I sent them directly from my email client.

Pasted Graphic 4

SMS Redirect and Archive Rule

There is an email alias to my regular email account that simply forwards mail to my INBOX. In this example the alias is called absms@communigate.com (not the actual address). This rule recognizes that the inbound email was addressed to the special SMS alias and redirects that to the mobile operator's email to SMS gateway and then archives the message in a saved messages folder I use.

Pasted Graphic 5

Email news service (also good for recurring invoices)

A company that would send me market reports was sending this information from an info@domain.com address. I was content to receive this information, but I did not want it to sit in my Inbox unread until I had time to read it. Therefore I created a very simple rule that would move these messages to the saved messages folder while keeping them unread. I would have manually stored them in this folder after reading them anyhow. It seems a very small time improvement, but simply skipping the step of dragging or moving a message from Inbox to another archive folder is a nice time saver for me. I have similar rules for recurring invoices or receipts that I receive regularly.

Pasted Graphic 6

Mailing List Rule

I subscribe to the CommuniGate Pro Mailing list but I read the list from this CommuniGate Pro Mailing List RSS Feed and not from my INBOX. That RSS feed is automatically generated by a public email to RSS gateway called MailBucket. You might only wish to perform the store task in this example if you do not use the MailBucket service for any of your mailing lists. This rule performs two major tasks for me.

  1. It generates the RSS Feed by copying the list traffic to the MailBucket service as the creator of that service has graciously given me permission to do

  2. It stores all of the traffic I receive from the list to a folder and marks all of those messages read



The result is I can participate in this list with moderate to high traffic, but I am not obligated to manage much of the data by hand. I sometimes see a message on the mailing list that I wish to reply to. When I do, I can enter the email folder I have called CGatePro, find the message, and compose a reply. This is a great time saver for me that still allows me to communicate to a list community that is important to me.

Pasted Graphic 7

Blog Comments SMS Notifications

I use a blog comments service called Haloscan. When someone posts a comment to one of my Blog entries I receive an email notification of that comment. I can also activate this rule if I am traveling and wish to receive the comment notification via SMS.

Pasted Graphic 8

Virus Warnings

Some of the Anti Virus filters are nice enough to warn you when someone has sent you a virus message. This is informative but can kill your Inbox with dat traffic if there is an outbreak of some email worm. I choose to not see these warnings so I activate this rule so they never reach me.

Pasted Graphic 10

Mail NOT Sent Directly To Me

It is not uncommon to be copied as a 'cc:' recipient on many email messages. This can sometimes increase one's Inbox mail volume dramatically. I personally give mail where I am copied a different review priority of email that is sent directly to me. Therefore if i receive a message and my name or address is not in the 'To:' field, I immediately store that in an archive folder because I would likely move it there in the future by hand. This saves me the step. I also leave the message unread so that when I do take care of messages that were addressed directly to me, I can then review all of the unread mail where I was copied. I am considering a similar rule for when there are multiple people copied in the 'To:' field, but I don't think that will be as effective.

Pasted Graphic 11
|

Google Calendar now compatible with CommuniGate Pro!

When Google Calendar was first released on the 13th of April 2006, I tested it with CommuniGate Pro Calendaring and I was not happy with the result. When a CommuniGate Pro user would open a Google Calendar invite in Webmail, CGP did not display the Accept/Decline type controls. This has changed for the better.

Previously Google Calendar did send the text/calendar part and it would display as an event in WebMail over the text and html parts they also send. That part previously only contained:

BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
END:VCALENDAR

There was no VEVENT inside it.

I re-tested this again today and the Accept/Decline controls that I wanted to appear in CommuniGate Pro do appear as expected. This upgrade is a positive small step toward a compatible and ubiquitous scheduling future for all. I still wish Google would open their Google Talk XMPP Service for federation for any other domain as Jabber is meant to work. If they are concerned about scalability from lots of roster and IM traffic, I have a really good architecture to recommend. note: the reverse also works, see the end of this page for details

Below are the Screenshots of my Google Calendar test and the positive result.

Inviting myself from a Google account.

Pasted Graphic

This is the invite in the CommuniGate Pro XChange Skin. Note that the extra long URL in the message pushes the control far out to the right. It may make sense to aligh these control to the left in future skins although this long URL is a rare case.

Pasted Graphic 1

There are the controls after scrolling to the right.

Pasted Graphic 2

Google Calendar receives the accepted event.

Pasted Graphic 3

The good news is the reverse also works. I was able to send an invitation from CommuniGate Pro to Google Calendar and Accept the event in Google Calendar. Both ends of the scheduling transaction worked as expected and CommuniGate Pro gave me the option of updating the attendee status after the Google Calendar account accepted the invitation.
|

Updated: Fixing UDP signaling errors with network MTU settings

Scott Gorlick from CT Labs has shared more information with me about this MTU issue, specifically with X10 phones that have many codecs available which causes fragmented packets and improper signaling performance. Scott informed me that It may be possible that the device that is receiving these packets is improperly handling the fragmented sequence numbers in the Ethernet/PPP header. The fragments beyond the first fragment do not have IP/UDP headers, but they do contain enough information in the Ethernet/PPP header to be reassembled upon receipt. Therefore he concludes that this is not an IP/UDP stack issue, but a layer 2 issue.


A member of our team was testing software phones with CommuniGate Pro and observed some problems with UDP SIP signaling between two different phones because one of the phones presented a long list of codecs that increased the UDP packet size beyond MTU limits. A change to the network configuration resolved this issue and the phones could then successfully complete calls.

A network's MTU configuration, the maximum transfer/transmit unit basically sets the biggest packet that can be transfered. When you use TCP, you use streamed data, and the TCP stack breaks it into packets itself. It uses large packets to send it over LAN (up to 64K), but when the data leaves on a different link such as via serial line, DSL, T1 or anything else, that path will usually does not support a large MTU. On slower links large packets stop other packets from coming through at the same time. So, the router rejects the large packet, sending the sender a special (ICMP) packet. The sending TCP software then decreases the size of packets it uses.

UDP is a much simpler protocol, packets are sent without any confirmation or further packetization. Therefore it is best if UDP packets are smaller than the minimal MTU on its path to the destination. Most networks have an MTU of 1500 and a server can add up to 200 bytes of additional headers or more. Each Record-Routes field is usually 50 bytes and other headers can also be included. For example, most always add the Via header). Therefore a sound recommended limit for SIP UDP packets is 1500-200 = 1300.

For larger SIP packets, the TCP protocol should be used. But TCP protocol is implemented very poorly in many systems.
|

Available now: CommuniGate Pro Reviewers Guide v5.1

The 5.1 Reviewers Guide is now available! Many thanks to our excellent team for putting this very useful document together. This book is the ultimate real world use reference for those new to CommuniGate Pro or those who need an update on all of the new IP communications features available in the platform. It is 83 Pages of great information ranging from architecture philosophy to help with client device configurations.

A PDF copy is available from:

http://www.communigate.com/Papers/CommuniGatePro-ReviewersGuide.pdf
|