Skip to content

Commit

Permalink
Disable call ID reuse across auth attempts (#229)
Browse files Browse the repository at this point in the history
* try not reusing callid

* Disable call ID reuse across auth attempts
  • Loading branch information
biglittlebigben authored Nov 20, 2024
1 parent 442b8de commit 9b10ad8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/sip/outbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,10 @@ func (c *sipOutbound) attemptInvite(ctx context.Context, prev *sip.Request, dest
ctx, span := tracer.Start(ctx, "sipOutbound.attemptInvite")
defer span.End()
req := sip.NewRequest(sip.INVITE, to.Address)
if prev != nil {

const reuseCallID = false // FIXME some service may require the call ID to be kept between auth attempts, but Telnyx requires it to change

if reuseCallID && prev != nil {
if cid := prev.CallID(); cid != nil {
req.RemoveHeader("Call-ID")
req.AppendHeader(cid)
Expand Down

0 comments on commit 9b10ad8

Please sign in to comment.