diff --git a/pkg/sip/client.go b/pkg/sip/client.go index 56aeb4a3..da2ea084 100644 --- a/pkg/sip/client.go +++ b/pkg/sip/client.go @@ -308,7 +308,7 @@ func (c *Client) onNotify(req *sip.Request, tx sip.ServerTransaction) bool { if call == nil { return false } - call.log.Infow("NOTIFY") + go func() { err := call.cc.handleNotify(req, tx) diff --git a/pkg/sip/outbound.go b/pkg/sip/outbound.go index a17b5f8f..b9e88d07 100644 --- a/pkg/sip/outbound.go +++ b/pkg/sip/outbound.go @@ -971,9 +971,13 @@ func (c *sipOutbound) transferCall(ctx context.Context, transferTo string, heade func (c *sipOutbound) handleNotify(req *sip.Request, tx sip.ServerTransaction) error { method, cseq, status, err := handleNotify(req) if err != nil { + c.log.Infow("error parsing NOTIFY request", "error", err) + return err } + c.log.Infow("handling NOTIFY", "method", method, "status", status, "cseq", cseq) + switch method { case sip.REFER: c.mu.RLock()