This file contains 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
public class PlayFileCommand : ICommand | |
{ | |
private readonly ISipUserAgent _userAgent; | |
private readonly IContainer _container; | |
public PlayFileCommand(ISipUserAgent userAgent, IContainer container) | |
{ | |
_userAgent = userAgent; | |
_container = container; | |
} |
This file contains 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
public class PlayFileCommand : ICommand | |
{ | |
private readonly ISipUserAgent _userAgent; | |
private readonly IContainer _container; | |
public PlayFileCommand(ISipUserAgent userAgent, IContainer container) | |
{ | |
_userAgent = userAgent; | |
_container = container; | |
} |
This file contains 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
public class Class1 | |
{ | |
public class MyConfigurator : IConfigurationProvider | |
{ | |
public void Configure(IConfigurationContext context) | |
{ | |
var registrar = "sipgate.de"; | |
var accountId = new SipUriBuilder().AppendDomain("sipgate.de").AppendExtension("me").ToString(); | |
var proxy = "proxy.live.sipgate.de"; | |
context.RegisterAccounts(new[] |
This file contains 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
public class TransferCommand : ICommand | |
{ | |
private ISipUserAgent _userAgent; | |
private TransferArguments _arguments; | |
public TransferCommand(ISipUserAgent userAgent, TransferArguments transferArguments) | |
{ | |
_userAgent = userAgent; | |
_arguments = transferArguments; | |
} |
This file contains 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
var ua = Configure.Pjsip4Net().FromConfig().Build().Start(); | |
ua.ImManager.NatDetected += OnNatDetected; |
This file contains 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"?> | |
<configuration> | |
<configSections> | |
<section name="sipua" type="pjsip4net.Configuration.SipUserAgentSettingsSection, pjsip4net, Culture=neutral, PublicKeyToken=null"/> | |
<sectionGroup name="common"> | |
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" /> | |
</sectionGroup> | |
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821"/> | |
</configSections> | |
<sipua> |
This file contains 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
Configure.Pjsip4Net().WithVersion_1_4().Build().Start(); |
This file contains 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
var container = new WindsorContainer(); | |
var ua = Configure.Pjsip4Net().With_CastleContainer(container).Build().Start(); |
This file contains 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
public static void Main(string[] args) | |
{ | |
//Initialization skipped | |
ua.CallManager.IncomingCall += CallManager_IncomingCall; | |
ua.CallManager.Ring += CallManager_Ring; | |
//Loop is skipped | |
static void CallManager_Ring(object sender, RingEventArgs e) | |
{ | |
System.Console.WriteLine("Call {0} ring event.", e.CallId); |
This file contains 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
static void ua_Log(object sender, LogEventArgs e) | |
{ | |
if (e.Data.Contains("TCP transport destroyed with reason 70016: End of file (PJ_EEOF)")) | |
{ | |
System.Console.WriteLine("SNAP, SERVER WENT DOWN"); | |
ua.AccountManager.Accounts.All(x => x.Unregister()); | |
} | |
} |
OlderNewer