Skip to content

Commit 82cace9

Browse files
Log NOTIFY request parameters (#361)
1 parent d48a512 commit 82cace9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pkg/sip/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ func (c *Client) onNotify(req *sip.Request, tx sip.ServerTransaction) bool {
309309
if call == nil {
310310
return false
311311
}
312-
call.log.Infow("NOTIFY")
312+
313313
go func() {
314314
err := call.cc.handleNotify(req, tx)
315315

pkg/sip/outbound.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,9 +971,13 @@ func (c *sipOutbound) transferCall(ctx context.Context, transferTo string, heade
971971
func (c *sipOutbound) handleNotify(req *sip.Request, tx sip.ServerTransaction) error {
972972
method, cseq, status, err := handleNotify(req)
973973
if err != nil {
974+
c.log.Infow("error parsing NOTIFY request", "error", err)
975+
974976
return err
975977
}
976978

979+
c.log.Infow("handling NOTIFY", "method", method, "status", status, "cseq", cseq)
980+
977981
switch method {
978982
case sip.REFER:
979983
c.mu.RLock()

0 commit comments

Comments
 (0)