You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When FreeSwitch returns a "text/rude-rejection" Response the opts.Dial function keeps waiting a message from channel forever in: <-connection.responseChannels[TypeAuthRequest]
I created a temporary fix adding a new response and an anonymous go routine before the line of the mentioned above
go func () {
<-connection.responseChannels[TypeRude]
connection.ExitAndClose()
}()
// First auth
<-connection.responseChannels[TypeAuthRequest]
Tell me if you want me to make a pull request or to find another cleaner solution (I'm sure there's a better way)
Regards.
The text was updated successfully, but these errors were encountered:
Your first pass solution certainly looks like it could work for this and shouldn't hurt anything/cause issues with the library. However I think some more research may be needed/looking at FS source code to ensure when this can be thrown. Documentation seems sparse for this particular response type, do you have anymore insight into what can produce this type of response?
From initial searching it seems to happen when FS blocks your connection explicitly instead of just a normal authentication failure? If that is the case and we can assume the connection is dead when receiving that response I can rework the disconnect handler to also catch this case. That would give the advantage that we can let the user of the library know the connection is dead and they can choose what do do from there.
When FreeSwitch returns a "text/rude-rejection" Response the opts.Dial function keeps waiting a message from channel forever in:
<-connection.responseChannels[TypeAuthRequest]
I created a temporary fix adding a new response and an anonymous go routine before the line of the mentioned above
Tell me if you want me to make a pull request or to find another cleaner solution (I'm sure there's a better way)
Regards.
The text was updated successfully, but these errors were encountered: