Skip to content

Instantly share code, notes, and snippets.

@siniypin
Last active March 1, 2020 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siniypin/7860029 to your computer and use it in GitHub Desktop.
Save siniypin/7860029 to your computer and use it in GitHub Desktop.
Configuring pjsip4net from App.config
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="sipua" type="pjsip4net.Configuration.SipUserAgentSettingsSection, pjsip4net, Culture=neutral, PublicKeyToken=null"/>
</configSections>
<sipua srtp="Disabled" secureSignaling="0" logMessages="true" logLevel="5" traceAndDebug="false" autoAnswer="true" autoConference="false" maxCalls="5">
<accounts>
<!--<account accountId="sip:1000@66.240.xxx.xx:5080" registrarUri="sip:66.240.170.79:5080"
userName="1000" password="1234" realm="*" isDefault="true"
publishPresence="false" />-->
</accounts>
<sipTransport type="udp" Port="5060"/>
<networkSettings natInSDP="true" forceLooseRoute="false">
<stun address="stun.stunprotocol.org"/>
<turn enabled="false" server="" type="udp" userName="" password="" realm=""/>
<ice enabled="true" noRTCP="false"/>
<proxies>
<add address="sip:192.168.1.1:5060"/>
</proxies>
</networkSettings>
<media isVADEnabled="true"/>
</sipua>
var cfg = Configure.Pjsip4Net().FromConfig();//read configuration from .config file
var ua = cfg.Build().Start();//build and start
@princetomy92
Copy link

its not working
it hits an exception "Exception has been thrown by the target of an invocation."

@princetomy92
Copy link

Unable to load DLL 'pjsua.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"}

@Ucheha
Copy link

Ucheha commented Mar 1, 2020

@princetomy92 found a fix ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment