Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot accept connection timeout #114

Open
washa78 opened this issue Dec 2, 2019 · 2 comments
Open

Cannot accept connection timeout #114

washa78 opened this issue Dec 2, 2019 · 2 comments
Labels

Comments

@washa78
Copy link

washa78 commented Dec 2, 2019

Cannot accept connection timeout
Example
Dim _Config As AccountConfig = New AccountConfig()
_Config.RegTimeout = 10

@siniypin
Copy link
Collaborator

siniypin commented Dec 2, 2019

pls elaborate

@washa78
Copy link
Author

washa78 commented Dec 2, 2019

@siniypin
1

2

`Public Class MyConfigurator
Implements IConfigurationProvider

Public Sub Configure(ByVal context As IConfigurationContext) Implements pjsip4net.Core.Interfaces.IConfigurationProvider.Configure
    Dim registrar As String = "sip:" & Form1.TextBoxDomain.Text
    Dim accountId As String = New SipUriBuilder().AppendDomain(Form1.TextBoxDomain.Text).AppendExtension(Form1.TextBoxUser.Text).ToString
    Dim proxy As String = "sip:" & Form1.TextboxProxy.Text

    Dim accountConfigArray As AccountConfig() = New AccountConfig(1 - 1) {}
    Dim _Config As AccountConfig = New AccountConfig()

    _Config.RegUri = registrar
    _Config.Id = accountId
    _Config.RegTimeout = 10

    Dim networkCreds As List(Of NetworkCredential) = New List(Of NetworkCredential)()
    networkCreds.Add(New NetworkCredential(Form1.TextBoxUser.Text, Form1.TextBoxPasswd.Text, Form1.TextBoxDomain.Text))
    _Config.Credentials = networkCreds

    Dim strs As List(Of String) = New List(Of String)()
    strs.Add(proxy)
    _Config.Proxy = strs

    accountConfigArray(0) = _Config
    context.RegisterAccounts(accountConfigArray)
End Sub

End Class`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants