# Patent

## Title
System and method for routing communications

## Abstract

A system and method that includes receiving a communication request of an account, the communication request including communication properties; identifying at least two routing options of a route priority list, the routing options capable of completing the communication request and identified according to a priority heuristic; generating a communication cost from the communication properties; and upon receipt of the routing response and the communication cost response, executing a communication with a routing option of the routing priority list and committing a cost of the communication to the account.

## Background
CROSS-REFERENCE TO RELATED APPLICATIONS
This application is a divisional of co-pending U.S. patent application Ser. No. 14/054,439, filed 15 Oct. 2013, which claims the benefit of U.S. Provisional Application Ser. No. 61/714,108, filed on 15 Oct. 2012, both of which are incorporated in their entirety by this reference.


TECHNICAL FIELD
This invention relates generally to the telephony field, and more specifically to a new and useful system and method for routing communications in the telephony field.
BACKGROUND
Communication networking is becoming increasingly more complex. While telephony communication was traditionally the main form of communication, today people have a variety of mediums to communicate such as text messaging, SIP based voice and video calls, IP messaging, proprietary communication channels, and other forms of communication. Additionally, the global community is becoming more connected and communication infrastructure needs to support communication across many globally located regions. Expanding communications globally is not only complicated through technical challenges but it is also complicated by the coordination with partners that is required to support such a platform. Thus, there is a need in the telephony field to create a new and useful system and method for routing communications. This invention provides such a new and useful system and method.



BRIEF DESCRIPTION OF THE FIGURES
FIG. 1 is a schematic representation of a system of a first preferred embodiment of the invention;
FIG. 2 is a schematic representation of a method of a first preferred embodiment of the invention
FIG. 3 is a communication flow diagram of a method of a first preferred embodiment;
FIG. 4 is an exemplary table representation of a routing option priority list with a cost prioritization parameter;
FIG. 5 is an exemplary table representation of a routing option priority list with a multiple parameters used in selecting a routing option;
FIG. 6 is an exemplary table representation of a routing option priority list with a multiple parameters used in selecting a routing option;
FIG. 7 is an exemplary table representation of a routing option priority list with a with effective cost parameters of the routing options;
FIG. 8 is a communication flow diagram of updating routing options through an interface;
FIG. 9 is a communication flow diagram of updating communication pricing through an interface;
FIG. 10 is a schematic representation of exemplary transformations applied to intended content of a communication to a format suitable for a transport protocol of a selected routing option; and
FIGS. 11 and 12 are communication flow diagrams of alerting an account resource of communication failure.



DESCRIPTION OF THE PREFERRED EMBODIMENTS
The following description of the preferred embodiments of the invention is not intended to limit the invention to these preferred embodiments, but rather to enable any person skilled in the art to make and use this invention.
A System for Routing Communications
As shown in FIG. 1, a system for routing communications of a preferred embodiment includes a communication service 110, a routing service 120, and a communication cost service 130. The system functions to provide scalable, reliable communications to customers. Additionally, the system functions to enable cost effective determination of communication options for both the platform provider and the source of the outgoing communication. The system is preferably implemented in combination with a telephony platform such as the one described in patent application Ser. No. 12/417,630 filed 2 Apr. 2009, entitled “System and Method for Processing Telephony Sessions”, which is hereby incorporated in its entirety by this reference. The telephony platform is preferably a multitenant telephony platform that allows multiple accounts to configure telephony applications for use on the platform. The telephony can be designed for one or more mediums of communication. The telephony platform can additionally be a cloud hosted platform as a service system. The telephony platform can be a server, a server cluster, a collection of components on a distributed computing system, or any suitable network accessible computing infrastructure. The system may alternatively be used in combination with a text or multi-media based messaging system, a video or voice chat system, a screen-sharing system, and/or any suitable communication platform. The system preferably takes a communication request for an outgoing Short Message Service (SMS) text message, Multimedia Messaging Service (MMS) message, push notification, IP-based message, telephony voice call, SIP voice call, video chat/communication session, screen sharing communication session, proprietary communication protocol, and/or any suitable communication protocol and establishes communication using a selected communication option.
The system architecture is preferably configured such that pricing and determination of communication routing may be determined independently from the customer price for the communication. Thus, users of the communication system experience substantially consistent pricing for outgoing messages or communication connections, and additionally experience overall better quality and performance due to improved selection of routing options. A telephony platform can benefit from managing a number of routing options. A telephony platform can be used to serve a diverse collection of communication requests. Such requests may have diverse device endpoint origins, destination endpoints, involved applications, involved devices, involved carriers, involved countries, involved regions, communication content, timing requirements, bandwidth requirements, and other suitable properties. The routing option used for a particular communication will impact the quality of the call based on at least one of these properties. The communication service 110 preferably coordinates with the routing service 120 to determine at least one preferred routing option. Additionally, the communication will have an associated communication cost. The communication cost can similarly be based on the properties of the communication request. The communication cost is the outward cost of a communication as viewed by an account, sub-account, or requesting entity. The communication cost is preferably normalized to provide a stable cost across different routing options and transport protocols. The communication service 110 preferably coordinates with the communication cost service 120 to obtain the communication cost. The system can generate route options and pricing options independently and optionally in parallel to decouple the services. A telephony platform utilizing the system can achieve the benefit of balancing high quality communication performance, while providing stable and fair operational cost to customers.
The communication service 110 of a preferred embodiment functions to receive communication requests and establish communications as regulated by input of the routing service 120 and the communication cost service 130. The communication service 110 can comprise of one or more services that establish communication through various channels and over varying protocols. Depending on the message medium and possibly the origin and destination endpoints, the routing options may be different channel protocols directed at different service provider destinations. For an SMS message, the routing options may be SMPP connections to various service provider destinations. The routing options of an MMS message can be SMTP connections to various service provider destinations (for MM4) or alternatively they can be various service resources accessed over HTTP/SOAP (for MM7). A voice call can have routing options including PSTN channels of different carriers, SIP, and other protocols. The routing options preferably include various commercial relationships between the service provider and the communication platform. The routing options can additionally span multiple mediums/transport protocols. For example, a message router may be configured to selectively transmit a message using a routing option selected from SMS routing options, proprietary push notification routing options (e.g., Apple or Google push notifications) and application messaging routing options (e.g., message sent to a Whatsapp user).
The communication service 110 preferably includes a communication request input to receive communication requests. A communication request preferably specifies a communication destination. The communication destination can be a communication endpoint such as a telephone number, a short code phone number, a SIP address, a communication account identifier, and/or any suitable communication endpoint. The communication request additionally will include an origin identifier. In a first variation, the origin identifier will be the communication endpoint that will be connected or that will be indicated as the sender. The communication endpoint can be some variety of communication endpoints as described above. The communication endpoint of the origin can be the same type or a different type of communication endpoint as the communication destination. The origin identifier can be explicitly included in the communication request or the origin identifier can be associated with an account associated with the communication request. A communication medium may be implicit for the communication system such as in the situation where only one medium is available, but the communication medium may alternatively be specified in the request. The medium can specify a general form of the communication, such as voice, video, text, synchronous, and/or asynchronous. The medium can alternatively specify particular protocols of communication such as SMS, MMS, PSTN, SIP, and the like. In appropriate communication requests, frequently asynchronous communication requests, the content of the communication may be included in the request. For example, the text for an SMS message is preferably included in the communication request. In other variations, the communication request is for establishing a synchronous communication session between the source and the destination such as in a voice or video call where communication can occur between at least two communication endpoints in real-time. The communication service 110 is additionally communicatively coupled to the routing service 120 and the communication cost service 130.
The communication request is preferably received using an application programming interface (API). More preferably the communication request is received through a representational state transfer (REST) API, Restful (i.e., having characteristics of a REST API) can include the characteristics of having a uniform interface separating client and servers, the client-server communication is stateless where all information to process a client request is transferred in the request; cacheable requests if specified, interoperability with a layered service infrastructure, and/or a uniform interface between clients and servers. The API can be exposed externally such that requests directly originate from outside entities. The API can alternatively be an internal API used during operation of the telephony platform.
Communication requests can be directed to both the routing service 120 and the communication cost service 130. Preferably, the requests are routed in parallel but may alternatively occur sequentially. The communication service 110 preferably includes an outbound routing subsystem for establishing outbound communications. The outbound routing subsystem preferably initiates or establishes the communication to the specified destination through a routing option. The communication service no preferably includes a plurality of configured routing options. The routing options may include communication providers such as telephony carriers, communication mediums such as SMS, TXT, or voice, and/or any suitable communication routing option. The routing options preferably determine the manner in which a communication is established for outbound communications.
The routing service 120 of a preferred embodiment functions to generate a list with at least one routing option for the outbound routing of the communication service no. The routing service 120 receives routing requests from the communication service no. The routing service 120 is configured to process the request and use properties of the request to generate at least one selected/recommended routing option. More preferably the routing service generates a set of at least two routing options and returns the list to the communication service 110. The set or list of routing options can be prioritized or include parameters that can be used to select a desired routing option. The routing service 120 preferably includes a routing table. The routing table includes a list of available routing options. In one variation, a routing option in the routing table preferably includes an assigned priority and a weight. The priority and weight may be assigned for different communication parameters. For example, the prefix of a destination phone number is preferably associated with various routing options each having a priority and weight. The routing table can include additionally or alternative parameters associated with the different routing options such as quality score, regional associations (e.g., related country codes or area codes or geographic proximity), quota prioritizations, internal cost (e.g., cost to the platform), effective internal cost (e.g., cost to transmit requested content considering transforming the content into multiple messages), and/or any suitable parameter used in selecting a routing option. The quota prioritization parameter can be used to prioritize a routing option in response to a contractual obligation. Some routing options can be maintained through contractual obligations of meeting a quota of communications (e.g., number of calls, number of messages, rate of communication). This quota prioritization parameter can be dynamically updated or fixed based on the communication restriction. The quota prioritization can be used to positively count towards the selection of that routing option (e.g., if a system wants to meet a certain quota of messages) or alternatively negative impact selection (e.g., if a system wants to avoid going over a limit). The relative properties for the associated routing options are used to generate a route priority list. The routing priority list is a customized list of routing options prioritized for a particular communication request. Multiple routing options are prioritized in order of preference. The listed routing options may not have indicated preference and be a sub-set of the full set of routing options.
The routing service 120 may additionally include a routing table interface such that an administrator or client device may update the parameters used to determine the communication routing. Routing options can preferably be added, removed, or updated. In one exemplary use case, an administrator may need to update the routing options based on contract changes with various carriers. In another exemplary use case, communication performance may unexpectedly drop for a carrier. An administrator could easily edit the routing table such that communications avoid that carrier until the issue is resolved. In yet another use case, communication quality of a used routing option is measured and used to update a quality parameter of a routing option. In another variation, the routing table interface is an application programming interface (API) such that parameters of the routing table may be automatically updated.
The communication cost service 130 of a preferred embodiment functions to generate the cost for the communication according to the communication request. Preferably, the destination is the primary key for determining a communication cost. For voice communications, the telephone number prefix is the primary key. For SMS messages the primary key is preferably the mobile operator of the SMS endpoint. The communication cost service may additionally include a pricing API. The pricing API is preferably a restful interface that may be used internally and/or externally. The communication cost service preferably includes a cost model that is a resource to aid in determination of the price. The cost model can consider multiple factors influencing cost such as involved endpoints, the communication message, the account associated with the request, carrier of involved endpoints, country, and other suitable factors. The cost model may be periodically updated. The cost model may be communicatively coupled to the routing service for automatic updates to the price, but an administrator or any suitable entity may alternatively manually update the cost model. The cost model is preferably fixed within a time window such that customers can expect consistent pricing within that window. However, the cost model may be dynamically updated in real-time to provide reactive pricing.
A Method for Routing Communications
As shown in FIGS. 2 and 3, a method for routing communications of a preferred embodiment includes receiving a communication request S210, generating a route priority list from the communication request S220, delivering the route priority list to a communication service S230, generating a communication cost S240, and establishing a communication according to the route priority list S250. The method functions to provide reliable and high quality communication while managing a plurality of routing options. The capability to manage and distribute communications effectively across various routing options can be important for the success of a global communication platform. The availability and quality of routing options can be temporally and regionally variable. Communication routes of a particular carrier can suddenly reduce in quality or stop functioning all together. Additionally, to provide numerous routing options in case a carrier does go down, a plurality of carriers must be maintained which typically requires at least some minimum usage requirements. The method for routing communications can preferably account for such scenarios through route option management. Furthermore, by integrating a substantially separate communication cost service, the method can provide consistent cost accounting for users of a communication platform. In a preferred variation, pricing for account usage of the communication platform is dependable and predictable despite possibly highly variable underlying communication execution. The method is preferably implemented by a system substantially similar to the system described above, but the method may alternatively be implemented by any suitable system. The method may be used on a communication platform allowing only a single mode or medium of communication (e.g., just text messages or just voice sessions), but the communication platform can additionally include multi-modal communication wherein, the method can accommodate route selection and communication cost.
Block S210, which includes receiving a communication request, functions to obtain an instruction for sending or establishing an outbound communication. The communication request is preferably received at a communication service, which as described can be a server or machine that establish a communication or at least direct a secondary service to establish a communication. The communication service may be specifically configured for a particular medium or mode of communication such as Public Switch Telephone Network (PSTN) calls, Session Initiation Protocol (SIP) voice or video calls, Short Message Service (SMS) messages, Multimedia Messaging Service (MMS) messages, IP based messaging, push notifications, proprietary communication protocols, and/or any suitable communication medium. The communication service may be used for a plurality of communication mediums. A communication request can include communication properties, which can include at least one destination endpoint, one originating endpoint, communication content, and/or other properties of the communication. The communication request can additionally include control properties such as a max price parameter, a quality limit, and/or other properties used to gate or control communication.
In one implementation, the communication request can indicate communication intent. As opposed to specific communication instructions (e.g., send a SMS message to this endpoint originating from this endpoint), the communication request can include intended communication content that indicates generalized objectives of the communication. The intended communication content can specify raw message content or medium of communication. In the case of asynchronous communication, the request of communication intent can include content intended for delivery and the intended destination entity. The final form of the content, whether the transmitted content is text, a graphic, a video, a link to an external resource, an audio message, and/or any suitable medium is not exclusively determined through the request as long as the content is delivered. Similarly, the exact destination endpoint is not strictly defined as long as the message is delivered to the intended entity. In the case of synchronous communication, the mode of communication can similarly be generalized. The communication request can include a specified mode of communication, which can place limits on the suitable routing options. The possible modes can include a voice session mode (where synchronous audio should be transmitted between at least two endpoints), a video session mode (where video and/or audio should be transmitted between at least two endpoints), and synchronous message transmission mode (where text, images, videos, and/or other media can be delivered to a destination). A voice session mode can result in a voice session (e.g., PSTN or SIP based), a video session with only audio, or any synchronous form of communication through which audio can be transmitted. A video session can be a video session or alternatively downgraded to just audio. An asynchronous message transmission mode can result in any executed communication that transmits desired content. Synchronous communication mediums can similarly be used when in an asynchronous message transmission mode.
Upon receiving a communication request, at least a subset of information from the communication request is sent to the routing service. Preferably, the subset of information sent to the routing service is sent in the form of a routing request. The subset of information includes communication properties specified in the communication request of block S110. Additionally, at least a subset of information from the communication request may be sent to a communication cost service. Preferably, the subset of information is sent to the communication cost service in the form of a cost request. The routing request and the cost request preferably include at least the destination of the communication. The routing request and/or cost request may additionally or alternatively include content of the communication, account information for the entity sending the communication request, the originating endpoint, the mode or medium of communication, and/or any suitable information. The routing request and the cost request are preferably sent in parallel but may alternatively be sent sequentially or in any suitable manner. The routing request and the cost request can be independent in that how a communication is routed and the attributed costs of that communication do not directly rely on each other. One expected benefit is that the quality of communication can be increased while simulating a simplified cost model to user accounts. As described below, a maximum cost parameter specified in a communication request can be accommodated after initially fulfilling the requests.
In one variation, the communication properties include a specified transport mode of communication. The specified transport mode can be a set of modes of communication permitted and/or blocked for the communication request. The set of operational transport modes can include a synchronous voice session mode of communication, a synchronous video session mode of communication, an asynchronous message transmission mode of communication and/or specific permitted/prohibited transport protocols (e.g., SMS, MMS, push, etc.).
Block S220, which includes generating a route priority list from the communication request, functions to determine at least one routing option to be used for the communication. The priority list is preferably generated at a routing service upon the routing service receiving the routing request from the communication service. The generated priority list preferably includes a plurality of routing options. The routing options can include a ranking or one or more properties that can be used to rank and select a final routing option. The priority list is preferably dynamically generated for each communication request according to at least one parameter of the routing request. The priority list may alternatively be cached from previous similar communication requests, be a fixed priority list, or otherwise pre-generated at any suitable time. Generating a route priority list may include a number of various processes. Generating a route priority list may include factoring in current routing option status (e.g., carrier connectivity or availability), current routing option quality, minimum communication commitments (i.e., communication quota prioritizations), contractual agreement parameters with a routing option, routing option internal cost (e.g., cost of the routing option to the communication platform), destination presence, cost of a routing option for the communication service, geographical proximity of the destination and/or source, the medium(s) of the communication, and/or any suitable parameter to generate a route priority list.
Generating a route priority list can include identifying at least two routing options capable of completing the communication request and identified according to a priority heuristic. The priority list is preferably generated in part through use of a routing table, and identifying at least two routing options includes querying a routing table of routing options. The routing options in the routing table can be indexed by communication properties. In querying routing options, the intended communication content can be analyzed to identify suitable transport protocols. The routing options of suitable transport protocols can then be filtered according destination endpoint. A destination can be identified as including an associated carrier, a country/regional location property, and/or device capabilities. Routing options having been reduced to routings options capable of communication intended content and capable of delivering to the intended destination can then be further filtered according to availability. Some routing options can be suffering from down time or quality issues at any given time—such routing options are preferably not added to a routing priority list. The routing table is preferably a data resource accessible by the routing service. The priority list preferably includes a list of routing options associated with various primary keys. In one exemplary embodiment, the routing service preferably uses the destination endpoint (e.g., telephony country code prefix) as a primary key. Each routing option and primary key pair preferably includes a priority and weighting parameter, but may alternatively or additionally includes any suitable parameters. The priority and weighting parameters are preferably used in generating a priority list for an individual communication. The priority is preferably used as a rank magnitude factor, and the weighting parameter preferably factors into the probability of using that routing option for a given routing request. The routing table can include each available routing option for all forms of communication. Of the full set of routing options only a subset of routing options may be compatible for serving a communication defined by the communication properties. In the variation of a multimodal communication platform with unified communication intent, the compatible routing options may including routing options for more than one communication protocol or medium. The routing table can be structured a number of ways. As shown in FIG. 4, a routing option can include a singular prioritization parameter or weight. A singular prioritization score can be calculated using several external factors. As shown in FIG. 5, a routing option can include several parameters that are used to select compatible routing options.
Prioritization heuristics can consider many factors. A first factor gives weight to a routing option based on the involved content transformations. For example, sending a text message would give preference a routing option involving an SMS with text over a routing option involving transforming the text to text-to-speech audio and playing over a PSTN phone call.
A second factor gives weight to routing options with better quality scores.
A third factor gives weight to routing options that have not satisfied a communication quota or contractual obligation. A quota can be set for a time frame, and a routing option has the target of satisfying the quota in that time frame. For example, an SMS routing option can have a quota of five thousand messages in a month. Selection of a routing option within a priority list or prioritization within the list can be based on satisfying the quota. For example, a routing option further from a quota can be prioritized above a routing option that has satisfied a quota, surpassed a quota, or does not include a quota as shown in FIG. 6. Additionally, a quota can be weighted to indicate importance of the quota. For example, some routing options may have a more important quota goal (e.g., a routing option will be cancelled by a carrier), and other routing options may have less important quota goal (e.g., special discounting pricing isn't provided if not satisfied). Various rules and properties can be encoded into a routing option to facilitate relative prioritization/selection of routing options. One exemplary use of a quota includes a routing option using a particular network carrier that was negotiated at an internal cost rate that has a minimum number of communications that should be met. Another exemplary use of a quota may include regulating a routing option with a rate limit of SMS messages sent in a minute allowed over a network carrier of a second routing option.
A fourth factor gives weight to routing options with lower internal cost (e.g., payment to outside partners and/or operational cost). A related heuristic can include calculating effective internal cost of a routing option. The effective internal cost is the predicted cost to the communication cost to the platform. In some cases, communicating over a first transport protocol has different communication limits compared to a second transport protocol and as a result a routing option of the first transport protocol may require transmitting the intended content in one form (e.g., in a single message) and the routing option of the second transport protocol may require transmitting the intended content in a second form (e.g., split into two or more messages). The effective internal cost can be the number of messages to transmit the intended content multiplied by the internal cost of an individual message transmitted on the routing option as shown in FIG. 7. The cost can be a financial cost and is frequently dependent on the specific routing option. The difference between the communication cost and the effective internal cost can be the profit of the platform for an individual communication. The priority heuristic is preferably in place to increase profits across a plurality of communications.
A fifth factor gives weight to routing options with particular feature capabilities (e.g., message confirmation, no message size restrictions). These factors and other suitable prioritization factors can be combined in any suitable manner to form a prioritization heuristic used in ranking routing options.
The method may additionally include updating a routing table through a routing table interface. The routing table may be automatically updated based on system inputs such as carrier quality metrics. The method can include measuring quality of an executed communication over a routing option, and through the routing interface, updating quality parameters of the routing option in the routing table with the measured quality metrics as shown in FIG. 8. The quality can be measured through a quality control service or system operable on the communication platform. Other properties of a routing option can similarly be updated of automatically controlled. Additionally or alternatively, the routing table may be updated by a user through a user interface. The user interface can allow parties responsible for maintaining and managing routing options to easily update and modify routing options through a simple interface. The user interface can be an administrator website, an application, or any suitable tool. As a benefit of the method, a routing option management user interface enables newly added or modified routing options to immediately be usable within a system. Updating the priority, weighting, and/or other parameters of a routing option enables an administrator or application to update the routing table to accommodate various factors. For example, an administrator may learn of service problems with an external routing option and accordingly, temporarily deprioritize that routing option.
Block S230, which includes delivering the route priority list to a communication service, functions to communicate the route priority list from the routing service to the communication service. As mentioned above, the priority list preferably includes a plurality of routing options ranked according to the route service determined preference for using that routing option. The route priority list can include routing options of different quality and preference. Similarly, the route priority list may include routing options of more than one medium or mode of communication. A first routing option can be a routing option of a first communication protocol (e.g., SMS), and a second routing option can be a routing option of a second communication protocol (e.g., MMS). The route priority list is preferably delivered to the communication service prior to establishing a communication.
Block S240, which includes generating a communication cost, functions to calculate a price for a communication. The generated cost is preferably the price charged for the account associated with the communication (e.g., the entity initiating the outgoing communication). The cost can alternatively be resource cost such as processor, storage, data transfer, or other operational cost. The cost is an external cost that is used exposed to the associated account or client. The price of the actual routing option used in the established communication may not correspond to the price generated at the communication cost service. An internal cost will reflect the operational and/or financial cost incurred by the communication platform (e.g., the amount a network charges the platform for a text message). A cost margin is the differences between the external cost and the internal cost and can equate to earned profit of a communication in a simplified model. In execution, the internal costs can be highly complicated due to convoluted contracts, but the external costs are preferably normalized or maintained to hide underlying complexity. As a result, the earned profit is not a fixed amount for each communication and is dependent on the cost model and/or the cost of using a selected route.
The cost is preferably independently generated without direct dependence on the communication route. The cost is preferably generated according to parameters of the communication. Parameters of the communication may include destination endpoint, account information, context of the communication (e.g., if the communication is the 1000th communication, if a particular number of communications are made in a given time window, etc.), content of the communication, and/or any suitable parameter. Using such parameters, the communication service can provide powerful pricing functionality that enables features such as offering pricing specials to customers, unique pricing per account or account type, altering pricing for content of a message, and/or any other suitable pricing features. A cost model (e.g., a pricing model) is preferably used in at least part of the generation of the price. A communication cost from the cost model is preferably selected according to a primary key. A primary key may be any suitable communication parameter as described above or any suitable key. A cost model can additionally determine cost based on multiple communication properties. The cost model can characterize the set of individual billable items that collectively define cost for any communication on the communication platform. The generation of a communication cost is preferably performed in parallel to generating a route priority list, but may alternatively be performed at any suitable time. Generating a communication cost is preferably performed in response to a cost request. The cost request is preferably sent from the communication service, but the cost request may alternatively be made through a communication cost service API by any suitable party. The communication cost service API preferably enables outside entities to include communication pricing in any application logic without making communication request. A communication cost is transmitted to a communication service in response to the cost request. If the cost request is made by the communication service, the communication cost is preferably charged to an account in response to establishing the communication. If no communication is established the price may not be charged to the account.
In another alternative embodiment, the method may additionally include periodically updating the cost model and/or automatically updating the cost model. The cost model may include input from the routing service and/or routing table. Preferably, the cost model is updated periodically such that prices are consistent during a particular time window (e.g., a month or a week). The cost, priority, weighting, history, and/or any suitable parameters of the routing options may be used to generate the cost model. The routing options of the routing table in the routing service can include a parameter of internal cost. Alternatively or additionally, the cost model may be dynamically updated in response to real-time changes in the communication service as shown in FIG. 9. A cost API or other suitable interface can be used to access and modify a cost model of the cost service.
Block S250, which includes establishing a communication according to the route priority list, functions to use the route priority list to determine how a communication should be made. Establishing a communication preferably includes sending an outgoing message, establishing a communication link between the source and destination, or completing any suitable operation to successfully fulfill the communication request. In some variations, a response may be sent to the source of the communication request indicating a failure to establish a communication. Preferably, the routing option with the highest priority in the route priority list is selected. The communication service may alternatively use any suitable logic to select a routing option from the priority list. Additionally, establishing a communication may include determining that the routing options of the route priority list are not suitable for communication and selecting a default routing option for establishing communication. In a variation where the medium(s) of communication can verify that communication is established (e.g., SIP voice or video calls), the communication service will preferably initially attempt to establish communication with a first routing option from the route priority list. If communication is unsuccessfully established, the communication service will preferably attempt communication with a second routing option from the route priority list. In an alternative embodiment where the medium of the communication may be selected from a plurality of mediums, establishing a communication may include converting content of a communication request to a second medium as shown in FIG. 10. For example, if a communication request is for sending a text message, but the routing option is a voice routing option, a text to speech (TTS) component can convert the text to a speech recording. In a first variation, a text message can be converted into a text body of MMS message, a text-to-speech audio file played over a voice connection, and/or a text graphic displayed in a video chat session. In a variation, where the original mode of communication is a voice session, the used route can be an audio or video synchronous session. Similarly, if the original mode of communication is a video session, the used route can be a video or an audio only version in a synchronous audio session. In some variations, the selected routing option can include identifying a communication endpoint associated with the destination endpoint provided in the communication request. For example, the destination endpoint may be a phone number, but the selected routing option is for establishing a SIP voice session. A SIP address associated with the phone number if stored can be accessed and if found can be used for the SIP communication. If a required communication endpoint of a routing option is not available, that routing option can be foregone for another routing option of the routing priority list. Additionally, during multimodal communication, the communication service or some additional service can translate/convert between communication protocols and mediums used by the originating endpoint and the destination endpoint. Additionally, Block S250 can include committing a cost of the communication cost response, which functions to credit the cost to the account associated with the communication. The cost is preferably committed to a cost or billing log of an account. The account can be associated with the originating endpoint, the destination endpoint, the source of the request, and/or an account identified by the requesting entity.
In one alternative embodiment, a communication request may include a maximum cost parameter. The max cost will preferably restrict the communication according to the generated communication cost. The maximum cost is preferably the most that an account or entity is willing to incur due to the communication. The max price can be used as a control mechanism to indicate that quality, urgency, and/or deliverability can be compromised to match a price. Communications can be canceled, delayed, sent over lower quality routing options, or transformed into alternate mediums in response to a maximum cost parameter. If the generated communication cost is less than the max cost parameter, then the communication can be completed at the generated communication cost. If the generated communication cost is greater than the generated price, then the communication is preferably completed at the max cost rate, augmented into a compromised form of communication, or alternatively not completed. Additionally or alternatively, if the communication price does not comply with the maximum cost parameter, the method can include alerting an account resource of the communication failure. Alerting an account can include responding to the communication request with a communication failure message as shown in FIG. 11 or transmitting a message to a callback URI as shown in FIG. 12. A communication failure message can include information about the routing options such as routing option prices, transport modes, and other options. In one variation, an account can respond and select one of the alternative routing options, that alternative routing option is executed. Augmenting the communication can include using a routing option from the routing priority list that is selected with a modified heuristic. For example, a routing option can be selected with the lowest internal cost. Any suitable action may alternatively or additionally be performed when the max rate is exceeded. For example, an application may be messaged when the price exceeds a max cost, and the application can respond in a callback to provide subsequent actions. In another example, communication may be allowed for a particular time period while only charging the max cost for each communication. After a set amount of time or after a certain number of communications, the communication cost can be enforced. In another alternative variation, max cost of the request may be used to schedule communication. When the communication exceeds a max cost, the communication service and the communication cost service preferably cooperate to delay sending the communication until the communication cost satisfies the max cost restriction. This would be particularly useful for communications that are not time sensitive. Similar to the max cost parameter, a received communication request may include other communication restrictions. Such restrictions may behave similarly to the max cost parameter to impact routing decisions, medium decisions, communication scheduling, application callbacks, or any suitable variable aspect of the communication.
In one exemplary application, a method of a preferred embodiment may be used to manage multiple carriers for voice and video calls and/or SMS messaging. In such an example, each carrier may have minimum commitments for the communication service as agreed upon in a contract with the communication platform (e.g., the operator of the communication service will be charged for at least x number of messages during a month). Logic for generating the route priority list preferably incorporates such minimum requirements and any other suitable aspects of the contract. The generated priority list will typically provide prioritized routing options for the best communication performance, but for a sub-set of the communication requests a communication may use a routing option that contributes to satisfying a carrier agreement. In performing the method, the communication platform can preferably offer a high quality of service while simultaneously maintaining a diverse set of routing options. The method may incorporate the minimum commitments into the step of generating a route priority list. Such a use case is valuable to a communication platform as it allows the communication platform to feasibly and economically maintaining numerous carrier agreements. Maintaining numerous carrier agreements can be important for scaling communication platforms globally.
In a second additional or alternative application, a method of a preferred embodiment may be used to provide dynamic communication mediums for communication directed to an individual. Communications are preferably routed based on the optimal medium for accessing an individual for whom a plurality of endpoints is known. This application preferably relies on a presence service to provide presence information of an individual. Alternatively, the various medium endpoints of an individual may be stored and prioritized such that the medium preferences for each individual may be customized. Communications can preferably be converted to a plurality of other mediums. For example, a communication request including text and a destination may be sent as text in an SMS, text attachment in an MMS, a TTS audio recording, or any suitable media that communicates the desired content of the communication. Additionally, a communication request may specify medium preferences, instructions, or any suitable medium-associated parameters.
An alternative embodiment preferably implements the above methods in a computer-readable medium storing computer-readable instructions. The instructions are preferably executed by computer-executable components preferably integrated with a communication routing system. The communication routing system may include a communication system, routing system and a pricing system. The computer-readable medium may be stored on any suitable computer readable media such as RAMs, ROMs, flash memory, EEPROMs, optical devices (CD or DVD), hard drives, floppy drives, or any suitable device. The computer-executable component is preferably a processor but the instructions may alternatively or additionally be executed by any suitable dedicated hardware device.
As a person skilled in the art will recognize from the previous detailed description and from the figures and claims, modifications and changes can be made to the preferred embodiments of the invention without departing from the scope of this invention defined in the following claims.

## Claims

1. A method comprising:
receiving a communication request of an account, the request including a maximum cost parameter and a set of communication properties including at least a destination endpoint;
compiling a route priority list of routing options according to the communication properties of the communication request;
delivering the route priority list to a communication service;
querying a communication cost according to the communication properties;
delivering the communication cost to the communication service; and
at the communication service, if the communication cost complies with the maximum cost parameter, selecting a routing option of the route priority list and establishing a communication through the selected routing option and committing the communication cost to the account; and
at the communication service, if the communication cost does not comply:
alerting an account resource of a communication failure, wherein alerting an account resource comprises responding to the communication request with a communication failure message, and wherein the communication failure message includes alternative routing options;
receiving a message that specifies a selection of an alternative routing option; and
establishing a communication through the selected alternative routing option.

2. The method of claim 1, wherein a first routing option of the route priority list is communication over a first transport protocol and a second routing option of the route priority list is communication over a second transport protocol.

3. The method of Claim 2, wherein establishing a communication through the selected routing option comprises transforming content of the communication properties to a format compatible with a transport protocol of the selected routing option.

4. A method comprising:
receiving a communication request of an account the request including a maximum cost parameter and a set of communication properties including at least a destination endpoint;
compiling a route priority list of routing options according to the communication properties of the communication request
wherein compiling a route priority list comprises: identifying at least two routing options according to a priority heuristic, and
wherein identifying at least two routing options according to a priority heuristic comprises:
analyzing intended communication content and identifying routing options with transport capabilities of delivering intended communication content to the destination endpoint;
calculating an effective internal cost of communicating intended communication content of the communication properties; and
prioritizing routing options of the route priority list in part according to the effective internal cost of the routing options;


delivering the route priority list to a communication service,
querying a communication cost according to the communication properties;
delivering the communication cost to the communication service;
at the communication service, if the communication cost complies with the maximum cost parameter, selecting a routing option of the route priority list and establishing a communication through the selected routing option and committing the communication cost to the account; and
at the communication service if the communication cost does not comply alerting an account resource of a communication failure.

5. A method comprising:
receiving a communication request of an account, the request including a maximum cost parameter and a set of communication properties including at least a destination endpoint;
compiling a route priority list of routing options according to the communication properties of the communication request;
delivering the route priority list to a communication service;
querying a communication cost according to the communication properties;
delivering the communication cost to the communication service; and
at the communication service, if the communication cost complies with the maximum cost parameter, selecting a routing option of the route priority list and establishing a communication through the selected routing option and committing the communication cost to the account; and
at the communication service, if the communication cost does not comply:
alerting an account resource of a communication failure, wherein alerting an account resource comprises transmitting an application transport message to a callback universal resource identifier (URI), and wherein the application transport message includes alternative routing options;
receiving a message that specifies a selection of an alternative routing option; and
establishing a communication through the selected alternative routing option.