Skip to content

Instantly share code, notes, and snippets.

@devinrader
devinrader / gist:2777535
Created May 23, 2012 20:20
Office Mobile Service xmsData
<?xml version="1.0" encoding="utf-8"?>
<xmsData client="Microsoft Office Outlook 12.0" xmlns="http://schemas.microsoft.com/office/Outlook/2006/OMS">
<user>
<userId>myname</userId>
<password>mypwd</password>
<replyPhone>13801391350</replyPhone>
<customData/>
</user>
<xmsHead>
<scheduled>2005-04-20T14:20:00Z</scheduled>
@devinrader
devinrader / gist:2973813
Created June 22, 2012 16:21
Custom NLog Target for sending log events via SMS using Twilio
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Twilio.Targets
{
[NLog.Targets.Target("Sms")]
public class Sms : NLog.Targets.TargetWithLayout
@devinrader
devinrader / gist:2973823
Created June 22, 2012 16:23
Example NLog config file for custom SMS target
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--
See http://nlog-project.org/wiki/Configuration_file
for information on customizing logging rules and outputs.
-->
<extensions>
<add assembly="Twilio.Targets"/>
<Response>
<Enqueue>CustomerService</Enqueue>
</Response>
<Response>
<Enqueue waitUrl="/AwesomerExperience">CustomerService</Enqueue>
</Response>
<Response>
<Gather action="/EnterCallbackSetupFlow" numDigits="1" timeout="3">
<Say>Why hang out on hold? To have us call you back so you can hang up and move on with your day, press one.</Say>
</Gather>
</Response>
<Response>
<Say>While you wait for an agent, we’d like to gather some more information about your problem. Don't worry, when the next agent becomes available we will connect you immediately</Say>
<Redirect url="/GatherModelNumber">
</Response>
<Response>
<Gather action="/GatherModelNumber" Method="POST" numDigits="10">
<Say>OK, lets start by getting your model number, which can be found on the back of the device and starts with the numbers 534.</Say>
</Gather>
</Response>
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial>
<Sip username="1004" password="1234">1004@XXX.XXX.XXX.XXX</Sip>
</Dial>
</Response>
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial>
<Sip username="1004" password="1234">
1004@XXX.XXX.XXX.XXX?CallTrackingApp-InboundSource=Website
</Sip>
</Dial>
</Response>