Closed Qjawko closed 4 weeks ago
but why didn't I add validation to server.OnInvite as well? Do you have an example of how you are customizing the methods?
but why didn't I add validation to server.OnInvite as well? Do you have an example of how you are customizing the methods?
I don't think that someone will need it, because diago already handles RTP streaming (inside sipgo handler) and other stuff.
Here is an example
srv, _ := sipgo.NewServer(ua)
srv.OnOptions(func(req *sip.Request, tx sip.ServerTransaction) {
// do your stuff
})
dg := diago.NewDiago(ua, diago.WithServer(srv))
ok, i understand
works as intended. Thanks anyway for reporting this.
Hi,
I am trying to customize the
OPTIONS
handler response to fit my specific requirements. However, when I calldiago.NewDiago
with my ownsipgo.Server
that has a definedOPTIONS
handler, Diago overrides it with its own implementation.I will submit a PR that modifies this behavior so that Diago checks for already registered methods and avoids replacing them.
Thank you!