This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<extension name="match_sid"> | |
<condition field="${sip_h_X-Twilio-AccountSid}" | |
expression="^ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX$"> | |
<action application="answer"/> | |
<action application="playback" data="tone_stream://%(251,0,1004);loops=-1"/> | |
</condition> | |
</extension> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<extension name="match_source_web"> | |
<condition field="${sip_h_X-CallTrackingApp-InboundSource}" expression="^Website$"> | |
<action application="answer"/> | |
<action application="playback" data="tone_stream://%(251,0,1004);loops=1"/> | |
</condition> | |
</extension> | |
<extension name="match_source_mag"> | |
<condition field="${sip_h_X-CallTrackingApp-InboundSource}" expression="^Publication$"> | |
<action application="answer"/> | |
<action application="playback" data="tone_stream://path=${base_dir}/conf/tetris.ttml;loops=1"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Response> | |
<Dial> | |
<Sip username="1004" password="1234"> | |
[email protected];transport=tcp | |
</Sip> | |
</Dial> | |
</Response> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Response> | |
<Dial> | |
<Sip username="1004" password="1234"> | |
[email protected];InboundSource=Website;AccountId=1234 | |
</Sip> | |
</Dial> | |
</Response> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<extension name="show_info"> | |
<condition field="destination_number" expression="^9192$"> | |
<action application="set" data="sip_rh_X-CustomerId=ABC123" /> | |
<action application="answer"/> | |
<action application="playback" data="tone_stream://path=${base_dir}/conf/tetris.ttml;loops=10"/> | |
<action application="sleep" data="250"/> | |
<action application="hangup"/> | |
</condition> | |
</extension> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Response> | |
<Dial> | |
<Sip username="1004" password="1234" method="POST" url="http://requestb.in/o07umlo0"> | |
[email protected] | |
</Sip> | |
</Dial> | |
</Response> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal void Send(string AccountSid, string authToken) | |
{ | |
_accountSid = accountSid; | |
_authToken = authToken; | |
Send(); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(TESTS_ASM)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
public void Should_Send_Sms_Message_Successfully() | |
{ | |
var message = Notifications.CreateMessage(TO_NUMBER); | |
message.Send(TEST_ACCOUNTSID, TEST_AUTHTOKEN); | |
Assert.AreEqual(MessageStatus.Success, message.Status); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
public void Should_Not_Send_Sms_Message_To_Nonmobile_Number() | |
{ | |
var message = Notifications.CreateMessage(NONMOBILE_FAIL_TO_NUMBER); | |
message.Send(TEST_ACCOUNTSID, TEST_AUTHTOKEN); | |
Assert.AreEqual(MessageStatus.Fail, message.Status); | |
} | |