Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ require (
github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731
github.com/livekit/media-sdk v0.0.0-20250620175140-c86da91c22a2
github.com/livekit/mediatransportutil v0.0.0-20250519131108-fb90f5acfded
github.com/livekit/protocol v1.40.1-0.20250827075523-9bd0fc7c95be
github.com/livekit/psrpc v0.6.1-0.20250726180611-3915e005e741
github.com/livekit/protocol v1.41.1-0.20250919162624-3476f457ed91
github.com/livekit/psrpc v0.7.0
github.com/livekit/server-sdk-go/v2 v2.11.1
github.com/livekit/sipgo v0.13.2-0.20250601220430-a77cc3f220fb
github.com/mjibson/go-dsp v0.0.0-20180508042940-11479a337f12
Expand All @@ -33,6 +33,7 @@ require (
)

require (
github.com/nyaruka/phonenumbers v1.6.5 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/otel v1.37.0 // indirect
go.opentelemetry.io/otel/metric v1.37.0 // indirect
Expand Down
10 changes: 6 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ github.com/livekit/media-sdk v0.0.0-20250620175140-c86da91c22a2 h1:uHDhc7gk5Wcxd
github.com/livekit/media-sdk v0.0.0-20250620175140-c86da91c22a2/go.mod h1:7ssWiG+U4xnbvLih9WiZbhQP6zIKMjgXdUtIE1bm/E8=
github.com/livekit/mediatransportutil v0.0.0-20250519131108-fb90f5acfded h1:ylZPdnlX1RW9Z15SD4mp87vT2D2shsk0hpLJwSPcq3g=
github.com/livekit/mediatransportutil v0.0.0-20250519131108-fb90f5acfded/go.mod h1:mSNtYzSf6iY9xM3UX42VEI+STHvMgHmrYzEHPcdhB8A=
github.com/livekit/protocol v1.40.1-0.20250827075523-9bd0fc7c95be h1:KeqTnGdU8HybxjAjQNAHTZ3nEFVynqgK4ZmiQfz3cl8=
github.com/livekit/protocol v1.40.1-0.20250827075523-9bd0fc7c95be/go.mod h1:Scx8arfj5y65w6EYA3ZIKJafoN2xBuV8pauvyrvI4eg=
github.com/livekit/psrpc v0.6.1-0.20250726180611-3915e005e741 h1:KKL1u94l6dF9u4cBwnnfozk27GH1txWy2SlvkfgmzoY=
github.com/livekit/psrpc v0.6.1-0.20250726180611-3915e005e741/go.mod h1:AuDC5uOoEjQJEc69v4Li3t77Ocz0e0NdjQEuFfO+vfk=
github.com/livekit/protocol v1.41.1-0.20250919162624-3476f457ed91 h1:XoxTN5GkqZCrUz02bTxQQhB34yDgSWnmVv12oQJgpuo=
github.com/livekit/protocol v1.41.1-0.20250919162624-3476f457ed91/go.mod h1:vhMS30QoEyH2p34vi6X1eWkC4EMV72ZGZwQb74ajY7A=
github.com/livekit/psrpc v0.7.0 h1:rtfqfjYN06WJYloE/S0nmkJ/Y04x4pxLQLe8kQ4FVHU=
github.com/livekit/psrpc v0.7.0/go.mod h1:AuDC5uOoEjQJEc69v4Li3t77Ocz0e0NdjQEuFfO+vfk=
github.com/livekit/server-sdk-go/v2 v2.11.1 h1:mBRlkstQxueAl+2BHqQad1wTzbyyC4DYbA6VE1UUajw=
github.com/livekit/server-sdk-go/v2 v2.11.1/go.mod h1:x9JXFdPeDPr0jdObS7pPfcytxYLdxNQhLk0pK/NcHSg=
github.com/livekit/sipgo v0.13.2-0.20250601220430-a77cc3f220fb h1:onh9h110573vcxmse38aSZifEsRB8bbrXu2VYVt8PC0=
Expand Down Expand Up @@ -161,6 +161,8 @@ github.com/nats-io/nkeys v0.4.11 h1:q44qGV008kYd9W1b1nEBkNzvnWxtRSQ7A8BoqRrcfa0=
github.com/nats-io/nkeys v0.4.11/go.mod h1:szDimtgmfOi9n25JpfIdGw12tZFYXqhGxjhVxsatHVE=
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/nyaruka/phonenumbers v1.6.5 h1:aBCaUhfpRA7hU6fsXk+p7KF1aNx4nQlq9hGeo2qdFg8=
github.com/nyaruka/phonenumbers v1.6.5/go.mod h1:7gjs+Lchqm49adhAKB5cdcng5ZXgt6x7Jgvi0ZorUtU=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
Expand Down
1 change: 1 addition & 0 deletions pkg/sip/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ func (c *Client) createSIPParticipant(ctx context.Context, req *rpc.InternalCrea
maxCallDuration: req.MaxCallDuration.AsDuration(),
enabledFeatures: req.EnabledFeatures,
mediaEncryption: enc,
displayName: req.DisplayName,
}
log.Infow("Creating SIP participant")
call, err := c.newCall(ctx, c.conf, log, LocalTag(req.SipCallId), roomConf, sipConf, state, req.ProjectId)
Expand Down
11 changes: 8 additions & 3 deletions pkg/sip/outbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ type sipOutboundConfig struct {
maxCallDuration time.Duration
enabledFeatures []livekit.SIPFeature
mediaEncryption sdp.Encryption
displayName *string
}

type outboundCall struct {
Expand Down Expand Up @@ -113,7 +114,7 @@ func (c *Client) newCall(ctx context.Context, conf *config.Config, log logger.Lo
Host: sipConf.host,
Addr: contact.Addr,
Transport: tr,
}, contact, func(headers map[string]string) map[string]string {
}, contact, sipConf.displayName, func(headers map[string]string) map[string]string {
c := call
if len(c.sipConf.attrsToHeaders) == 0 {
return headers
Expand Down Expand Up @@ -648,10 +649,14 @@ func (c *outboundCall) transferCall(ctx context.Context, transferTo string, head
return nil
}

func (c *Client) newOutbound(log logger.Logger, id LocalTag, from, contact URI, getHeaders setHeadersFunc) *sipOutbound {
func (c *Client) newOutbound(log logger.Logger, id LocalTag, from, contact URI, displayName *string, getHeaders setHeadersFunc) *sipOutbound {
from = from.Normalize()
if displayName == nil { // Nothing specified, preserve legacy behavior
displayName = &from.User
}

fromHeader := &sip.FromHeader{
DisplayName: from.User,
DisplayName: *displayName,
Address: *from.GetURI(),
Params: sip.NewParams(),
}
Expand Down
Loading