Skip to content

Commit

Permalink
Use proper contact header in outbound call refer request (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
biglittlebigben authored Oct 18, 2024
1 parent 391c715 commit 3b1e63b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/sip/inbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ func (c *inboundCall) handleDTMF(tone dtmf.Event) {
func (c *inboundCall) transferCall(ctx context.Context, transferTo string) error {
err := c.cc.TransferCall(ctx, transferTo)
if err != nil {
c.log.Infow("inbound call failed to transfer", "error", err, "transferTo", transferTo)
return err
}

Expand Down
3 changes: 2 additions & 1 deletion pkg/sip/outbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ func (c *outboundCall) handleDTMF(ev dtmf.Event) {
func (c *outboundCall) transferCall(ctx context.Context, transferTo string) error {
err := c.cc.transferCall(ctx, transferTo)
if err != nil {
c.log.Infow("outound call failed to transfer", "error", err, "transferTo", transferTo)
return err
}

Expand Down Expand Up @@ -732,7 +733,7 @@ func (c *sipOutbound) transferCall(ctx context.Context, transferTo string) error
return psrpc.NewErrorf(psrpc.FailedPrecondition, "can't transfer hung up call")
}

req := NewReferRequest(c.invite, c.inviteOk, &sip.ContactHeader{Address: c.from.Address}, transferTo)
req := NewReferRequest(c.invite, c.inviteOk, c.contact, transferTo)
c.setCSeq(req)
cseq, _ := req.CSeq()

Expand Down

0 comments on commit 3b1e63b

Please sign in to comment.