When I was first working with UCWA I had trouble processing Batch messages (multipart/batching) as I would be constantly coping each individual message from Fiddler and dumping it into a JSON parser to see a prettier display of results. While a few batch messages might not seem to daunting, it is possible to wrap 20 requests into a single batch message. At this point I began to read up on creating Custom Inspectors Fiddler.
Fiddler includes a set of Inspectors by default and the ones I find myself readily using when debugging UCWA tend to include: Headers, TextView, Raw, and JSON. Inspectors implement an interface that provides the component with the Header/Body data for the message and from there the component can choose how to display. In the case of the Headers Inspector it separates the message headers into bold categories.
When it comes to processing Batch messages either TextView (view Body data) or Raw (Header & Body) is the place to grab the individual message. According to RFC 2046 each message in a multipart entry is separated by a boundary and in the example below the boundary is 07b2d3f3-9a8f-416c-a006-c489726f0660. It is possible to see that both responses in this Batch message have a Content-Type of application/json.
Similar to extending Fiddler via FiddlerScript, it is possible to create a Custom Inspector for Request/Responses and this time with C#! Basic documentation exists on how to Build a Custom Inspector. When creating this extension there is a choice to make: support .NET 2.0 or .NET 4.0 (directly related to which Fiddler version is installed and the extension is built against). In my case I chose to support .NET 2.0 as it is compatible with the .NET 4.0 version (and potentially newer versions).
Typically a Custom Inspector would implement Inspector2 and IResponseInspector (Response handler) or IRequestInspector (Request handler), but with Batch messaging both the request and response are of type multipart/batching and it would be ideal to visually represent both in some readable fashion.
Request messages will be wrapping Content-Type of application/http; msgtype=request which should contain the following:
Response messages will be wrapping Content-Type of application/http; msgtype=response which should contain the following:
I had a good idea of what the data might look like, but was unsure how I wanted to visually present it to the user. A colleague of mine pointed me at JSON Viewer as it had a standalone control for displaying JSON. Another lucky feature is that it included a Custom Inspector and I was able to use that as a base for the creation of a new Custom Inspector. I would reuse the code that made use of the JsonViewer control and provide it with a JSON-formatted Batch message. JSON Viewer also has dependencies on Json.NET, so came along for the ride as well.
I browsed Fiddler reference in my project and discovered that IRequestInspector and IResponseInspector would only give me access to headers and I wanted to be able to process both headers and body. By having my main class (MimeInspector also implements Inspector2) implement IBaseInspector I was able to process body data. With a fair amount of string manipulation I was able to transform the header/body into a fairly readable JSON object rendered in a JSON Viewer control. All that was left to do was define classes implementing IRequestInspector2 and IResponseInspector2 inheriting from MimeInspector (to benefit from the header/body processing and display via a JSON Viewer control).
Using a Custom Inspector is as simple as navigating to Fiddler's install location and placing the necessary files into the Inspectors folder (Fiddler should not be running if you are adding/removing Inspectors). The end result is a new tab in Fiddler, multipart/batching, that can render Batch messages into an easier to read/navigate JSON display.
Fiddler Custom Inspector: MimeParser.7z Sample Fiddler Trace: Batch.saz Sample Fiddler Trace: Batch 2.saz
Publish Date: September 11, 2015 5:00 AM
|1.)||Call Center Studio|
Call Center Studio
Call Center Studio is the world’s first call center built on Google and is one of the most secure and stable systems with some of the industry’s best reporting. It is one of the most full-featured enterprise grade systems (with the most calling features, one of the best call distribution, outbound dialing features and integrations—including IVR, AI Speech Recognition, blended inbound/outbound calling and includes Google’s new Dialogflow and Speech API. Call Center Studio is the absolute easiest to use (with a 10 minute setup), and is the price performance leader with lower equipment cost and less setup time.
PH: +1 512-872-7565
CLink for CRM and Call Center Integration
CLink by Comsys is a middleware that connects in real-time the CRM and the contact center applications. CLink enhances the CRM with interaction management capabilities from the contact center that allow agents to work more productively across all communication channels.
Comsys is a provider of οmnichannel customer engagement solutions that assist companies around the world in delivering unique customer experiences. For the last 15 years, Comsys designs and implements complex projects for clients from the outsourcing, financial services, telecommunications, and retail sectors. Comsys enjoys strategic partnerships with technology vendors like Cisco®, Aspect Software®, and Microsoft® for the delivery of innovative interaction management and contact center optimization solutions.
IntraNext Systems develops agent efficiency tools and data security software solutions for medium-to-large contact centers. Our Event Intelligence® Platform solutions include SmartCTI™, iGuard®, and SmartSIP™. SmartSIP is based on our patented SIP layer technology and provides a DTMF masking solution for VoIP environments.
We know how important it is for a business to obtain data from its customers and to manage them effectively, so we help small to large companies by integrating their CRM with the Virtual Switchboard.
This type of integration will simplify the work of your team and improve the management performance of the contact list and its information.
PH: +34 952 667 511
NovelVox CTI Connector
NextGen Cisco Finesse, Genesys & Avaya Embedded CTI Connectors for Salesforce, Microsoft Dynamics, ServiceNow, Zendesk & more.
PH: (+1) 301 202 3672
|Informal Contact Centers||December 8, 2015 5:00 AM|
|The Importance of Intelligent Routing and Forwarding||October 2, 2015 5:00 AM|
|What Really Matters in Your Contact Center? Headcount Turnover vs. Service Level||September 11, 2015 5:00 AM|
|Getting rerouted messages to the right UCMA endpoint||September 11, 2015 5:00 AM|
|UCWA - Messing with SignalR and NodeJS||September 11, 2015 5:00 AM|
|Response Groups and call forwarding||September 11, 2015 5:00 AM|
|Presence updates and multiple application pools||September 11, 2015 5:00 AM|
|UCWA by the numbers - #5 Re-join Conversations||September 11, 2015 5:00 AM|
|UCWA & Deciphering multipart/batching with Fiddler||September 11, 2015 5:00 AM|
|Clarity Connect + Skype for Business||July 9, 2015 5:00 AM|