From 65d84fc9230017b7173cc2ed1f61a0faa1719395 Mon Sep 17 00:00:00 2001 From: CrazyBolillo Date: Sun, 20 Oct 2024 19:22:42 -0600 Subject: [PATCH] fix: proper caller id for external calls --- internal/service/bouncer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/service/bouncer.go b/internal/service/bouncer.go index e2f4ffe..4ab828b 100644 --- a/internal/service/bouncer.go +++ b/internal/service/bouncer.go @@ -2,6 +2,7 @@ package service import ( "context" + "fmt" "github.com/crazybolillo/eryth/internal/db" "github.com/crazybolillo/eryth/internal/sqlc" "github.com/crazybolillo/eryth/pkg/model" @@ -36,7 +37,7 @@ func (b *Bouncer) Check(ctx context.Context, endpoint, dialed string) model.Boun if row.Callerid.Valid { callerId = row.Callerid.String } else { - callerId = endpoint + callerId = fmt.Sprintf(`"" <%s>`, endpoint) } return model.BouncerResponse{