Skip to content

Commit 33e81c3

Browse files
authored
Merge pull request #739 from nyaruka/parse_phone
Trust `urns.ParsePhone` for phone number parsing now that it's stricter
2 parents 29ce7cd + 451ad2c commit 33e81c3

File tree

37 files changed

+73
-73
lines changed

37 files changed

+73
-73
lines changed

Diff for: go.mod

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.22
44

55
require (
66
github.com/antchfx/xmlquery v1.4.0
7-
github.com/aws/aws-sdk-go v1.52.3
7+
github.com/aws/aws-sdk-go v1.52.4
88
github.com/buger/jsonparser v1.1.1
99
github.com/dghubble/oauth1 v0.7.3
1010
github.com/getsentry/sentry-go v0.27.0
@@ -16,7 +16,7 @@ require (
1616
github.com/jmoiron/sqlx v1.4.0
1717
github.com/lib/pq v1.10.9
1818
github.com/nyaruka/ezconf v0.3.0
19-
github.com/nyaruka/gocommon v1.54.3
19+
github.com/nyaruka/gocommon v1.54.4
2020
github.com/nyaruka/null/v3 v3.0.0
2121
github.com/nyaruka/redisx v0.8.0
2222
github.com/patrickmn/go-cache v2.1.0+incompatible
@@ -48,7 +48,7 @@ require (
4848
github.com/naoina/toml v0.1.1 // indirect
4949
github.com/nyaruka/librato v1.1.1 // indirect
5050
github.com/nyaruka/null/v2 v2.0.3 // indirect
51-
github.com/nyaruka/phonenumbers v1.3.4 // indirect
51+
github.com/nyaruka/phonenumbers v1.3.5 // indirect
5252
github.com/pmezard/go-difflib v1.0.0 // indirect
5353
github.com/samber/lo v1.39.0 // indirect
5454
github.com/shopspring/decimal v1.4.0 // indirect

Diff for: go.sum

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ github.com/antchfx/xmlquery v1.4.0 h1:xg2HkfcRK2TeTbdb0m1jxCYnvsPaGY/oeZWTGqX/0h
44
github.com/antchfx/xmlquery v1.4.0/go.mod h1:Ax2aeaeDjfIw3CwXKDQ0GkwZ6QlxoChlIBP+mGnDFjI=
55
github.com/antchfx/xpath v1.3.0 h1:nTMlzGAK3IJ0bPpME2urTuFL76o4A96iYvoKFHRXJgc=
66
github.com/antchfx/xpath v1.3.0/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs=
7-
github.com/aws/aws-sdk-go v1.52.3 h1:BNPJmHOXNoM/iBWJKrvaQvJOweRcp3KLpzdb65CfQwU=
8-
github.com/aws/aws-sdk-go v1.52.3/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
7+
github.com/aws/aws-sdk-go v1.52.4 h1:9VsBVJ2TKf8xPP3+yIPGSYcEBIEymXsJzQoFgQuyvA0=
8+
github.com/aws/aws-sdk-go v1.52.4/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
99
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
1010
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
1111
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -71,16 +71,16 @@ github.com/naoina/toml v0.1.1 h1:PT/lllxVVN0gzzSqSlHEmP8MJB4MY2U7STGxiouV4X8=
7171
github.com/naoina/toml v0.1.1/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E=
7272
github.com/nyaruka/ezconf v0.3.0 h1:kGvJqVN8AHowb4HdaHAviJ0Z3yI5Pyekp1WqibFEaGk=
7373
github.com/nyaruka/ezconf v0.3.0/go.mod h1:89GUW6EPRNLIxT7lC4LWnjWTgZeQwRoX7lBmc8ralAU=
74-
github.com/nyaruka/gocommon v1.54.3 h1:NZx2hdVRFfvxW9ug5RY7XTNkrqbXW0w+o9mB5lJtv84=
75-
github.com/nyaruka/gocommon v1.54.3/go.mod h1:3rM5QdBU5YzFn/3KlDI0skPEghgssIS4WtLiji99JsA=
74+
github.com/nyaruka/gocommon v1.54.4 h1:93JR8DmussPu3mukhcnfYWaHk6b7LiOw7dm0cR0pWaU=
75+
github.com/nyaruka/gocommon v1.54.4/go.mod h1:rWkEIpYIK98zL9Qm6PeMXJ+84WcWlArf01RfuWWCYvQ=
7676
github.com/nyaruka/librato v1.1.1 h1:0nTYtJLl3Sn7lX3CuHsLf+nXy1k/tGV0OjVxLy3Et4s=
7777
github.com/nyaruka/librato v1.1.1/go.mod h1:fme1Fu1PT2qvkaBZyw8WW+SrnFe2qeeCWpvqmAaKAKE=
7878
github.com/nyaruka/null/v2 v2.0.3 h1:rdmMRQyVzrOF3Jff/gpU/7BDR9mQX0lcLl4yImsA3kw=
7979
github.com/nyaruka/null/v2 v2.0.3/go.mod h1:OCVeCkCXwrg5/qE6RU0c1oUVZBy+ZDrT+xYg1XSaIWA=
8080
github.com/nyaruka/null/v3 v3.0.0 h1:JvOiNuKmRBFHxzZFt4sWii+ewmMkCQ1vO7X0clTNn6E=
8181
github.com/nyaruka/null/v3 v3.0.0/go.mod h1:Sus286RmC8P0VihFuQDDQPib/xJQ7++TsaPLdRuwgVc=
82-
github.com/nyaruka/phonenumbers v1.3.4 h1:bF1Wdh++fxw09s3surhVeBhXEcUKG07pHeP8HQXqjn8=
83-
github.com/nyaruka/phonenumbers v1.3.4/go.mod h1:Ut+eFwikULbmCenH6InMKL9csUNLyxHuBLyfkpum11s=
82+
github.com/nyaruka/phonenumbers v1.3.5 h1:WZLbQn61j2E1OFnvpUTYbK/6hViUgl6tppJ55/E2iQM=
83+
github.com/nyaruka/phonenumbers v1.3.5/go.mod h1:Ut+eFwikULbmCenH6InMKL9csUNLyxHuBLyfkpum11s=
8484
github.com/nyaruka/redisx v0.8.0 h1:5QSDLfHBRFjrlTD9VaxfBbq72rb0S++Dr2ui9q/q9kY=
8585
github.com/nyaruka/redisx v0.8.0/go.mod h1:mpTqnydmHfzeQ8V55AwS/cVrkxzHu4yGvwClEeprvbA=
8686
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=

Diff for: handlers/africastalking/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/buger/jsonparser"
1212
"github.com/nyaruka/courier"
1313
"github.com/nyaruka/courier/handlers"
14+
"github.com/nyaruka/gocommon/urns"
1415
)
1516

1617
const configIsShared = "is_shared"
@@ -68,7 +69,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
6869
}
6970

7071
// create our URN
71-
urn, err := handlers.StrictTelForCountry(form.From, channel.Country())
72+
urn, err := urns.ParsePhone(form.From, channel.Country())
7273
if err != nil {
7374
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, err)
7475
}

Diff for: handlers/bandwidth/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"github.com/nyaruka/courier/utils"
1515
"github.com/nyaruka/gocommon/httpx"
1616
"github.com/nyaruka/gocommon/jsonx"
17+
"github.com/nyaruka/gocommon/urns"
1718
)
1819

1920
var (
@@ -90,7 +91,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
9091
}
9192

9293
// create our URN
93-
urn, err := handlers.StrictTelForCountry(messagePayload.Message.From, channel.Country())
94+
urn, err := urns.ParsePhone(messagePayload.Message.From, channel.Country())
9495
if err != nil {
9596
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, err)
9697
}

Diff for: handlers/bongolive/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/nyaruka/courier"
1212
"github.com/nyaruka/courier/handlers"
1313
"github.com/nyaruka/gocommon/gsm7"
14+
"github.com/nyaruka/gocommon/urns"
1415

1516
"github.com/buger/jsonparser"
1617
)
@@ -92,7 +93,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
9293
clog.SetType(courier.ChannelLogTypeMsgReceive)
9394

9495
// create our URN
95-
urn, err := handlers.StrictTelForCountry(form.From, channel.Country())
96+
urn, err := urns.ParsePhone(form.From, channel.Country())
9697
if err != nil {
9798
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, err)
9899
}

Diff for: handlers/clickatell/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"github.com/buger/jsonparser"
1616
"github.com/nyaruka/courier"
1717
"github.com/nyaruka/courier/handlers"
18+
"github.com/nyaruka/gocommon/urns"
1819
)
1920

2021
var (
@@ -123,7 +124,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
123124
}
124125

125126
// create our URN
126-
urn, err := handlers.StrictTelForCountry(payload.FromNumber, channel.Country())
127+
urn, err := urns.ParsePhone(payload.FromNumber, channel.Country())
127128
if err != nil {
128129
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, err)
129130
}

Diff for: handlers/clickmobile/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"github.com/nyaruka/courier/handlers"
1515
"github.com/nyaruka/gocommon/dates"
1616
"github.com/nyaruka/gocommon/jsonx"
17+
"github.com/nyaruka/gocommon/urns"
1718
)
1819

1920
var (
@@ -71,7 +72,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
7172
}
7273

7374
// create our URN
74-
urn, err := handlers.StrictTelForCountry(payload.Mobile, channel.Country())
75+
urn, err := urns.ParsePhone(payload.Mobile, channel.Country())
7576
if err != nil {
7677
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, err)
7778
}

Diff for: handlers/dart/handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
7575
}
7676

7777
// create our URN
78-
urn, err := handlers.StrictTelForCountry(form.Original, channel.Country())
78+
urn, err := urns.ParsePhone(form.Original, channel.Country())
7979
if err != nil {
8080
urn, err = urns.New(urns.External, form.Original)
8181
if err != nil {

Diff for: handlers/dmark/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/buger/jsonparser"
1212
"github.com/nyaruka/courier"
1313
"github.com/nyaruka/courier/handlers"
14+
"github.com/nyaruka/gocommon/urns"
1415
)
1516

1617
var (
@@ -61,7 +62,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
6162
}
6263

6364
// create our URN
64-
urn, err := handlers.StrictTelForCountry(form.MSISDN, channel.Country())
65+
urn, err := urns.ParsePhone(form.MSISDN, channel.Country())
6566
if err != nil {
6667
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, err)
6768
}

Diff for: handlers/external/handler.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func (h *handler) receiveStopContact(ctx context.Context, channel courier.Channe
101101
// create our URN
102102
urn := urns.NilURN
103103
if channel.Schemes()[0] == urns.Phone.Prefix {
104-
urn, err = handlers.StrictTelForCountry(form.From, channel.Country())
104+
urn, err = urns.ParsePhone(form.From, channel.Country())
105105
} else {
106106
urn = urns.URN(channel.Schemes()[0] + ":" + form.From)
107107
err = urn.Validate()
@@ -203,7 +203,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
203203
// create our URN
204204
urn := urns.NilURN
205205
if channel.Schemes()[0] == urns.Phone.Prefix {
206-
urn, err = handlers.StrictTelForCountry(from, channel.Country())
206+
urn, err = urns.ParsePhone(from, channel.Country())
207207
} else {
208208
urn = urns.URN(channel.Schemes()[0] + ":" + from)
209209
err = urn.Validate()

Diff for: handlers/generic.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"time"
88

99
"github.com/nyaruka/courier"
10+
"github.com/nyaruka/gocommon/urns"
1011
)
1112

1213
// NewTelReceiveHandler creates a new receive handler given the passed in text and from fields
@@ -23,7 +24,7 @@ func NewTelReceiveHandler(h courier.ChannelHandler, fromField string, bodyField
2324
return nil, WriteAndLogRequestError(ctx, h, c, w, r, fmt.Errorf("missing required field '%s'", fromField))
2425
}
2526
// create our URN
26-
urn, err := StrictTelForCountry(from, c.Country())
27+
urn, err := urns.ParsePhone(from, c.Country())
2728
if err != nil {
2829
return nil, WriteAndLogRequestError(ctx, h, c, w, r, err)
2930
}

Diff for: handlers/globe/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111

1212
"github.com/nyaruka/courier"
1313
"github.com/nyaruka/courier/handlers"
14+
"github.com/nyaruka/gocommon/urns"
1415
)
1516

1617
var (
@@ -92,7 +93,7 @@ func (h *handler) receiveMessage(ctx context.Context, c courier.Channel, w http.
9293
return nil, handlers.WriteAndLogRequestError(ctx, h, c, w, r, fmt.Errorf("invalid 'senderAddress' parameter"))
9394
}
9495

95-
urn, err := handlers.StrictTelForCountry(glMsg.SenderAddress[4:], c.Country())
96+
urn, err := urns.ParsePhone(glMsg.SenderAddress[4:], c.Country())
9697
if err != nil {
9798
return nil, handlers.WriteAndLogRequestError(ctx, h, c, w, r, err)
9899
}

Diff for: handlers/highconnection/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111

1212
"github.com/nyaruka/courier"
1313
"github.com/nyaruka/courier/handlers"
14+
"github.com/nyaruka/gocommon/urns"
1415
)
1516

1617
var (
@@ -63,7 +64,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
6364
}
6465

6566
// create our URN
66-
urn, err := handlers.StrictTelForCountry(form.From, channel.Country())
67+
urn, err := urns.ParsePhone(form.From, channel.Country())
6768
if err != nil {
6869
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, err)
6970
}

Diff for: handlers/hormuud/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"github.com/gomodule/redigo/redis"
1515
"github.com/nyaruka/courier"
1616
"github.com/nyaruka/courier/handlers"
17+
"github.com/nyaruka/gocommon/urns"
1718
"github.com/pkg/errors"
1819
)
1920

@@ -57,7 +58,7 @@ func (h *handler) receiveMessage(ctx context.Context, c courier.Channel, w http.
5758
return nil, handlers.WriteAndLogRequestError(ctx, h, c, w, r, err)
5859
}
5960

60-
urn, err := handlers.StrictTelForCountry(payload.Sender, c.Country())
61+
urn, err := urns.ParsePhone(payload.Sender, c.Country())
6162
if err != nil {
6263
return nil, handlers.WriteAndLogRequestError(ctx, h, c, w, r, err)
6364
}

Diff for: handlers/i2sms/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"github.com/nyaruka/courier"
1313
"github.com/nyaruka/courier/handlers"
1414
"github.com/nyaruka/gocommon/httpx"
15+
"github.com/nyaruka/gocommon/urns"
1516
)
1617

1718
const (
@@ -56,7 +57,7 @@ func (h *handler) receive(ctx context.Context, c courier.Channel, w http.Respons
5657
}
5758

5859
// create our URN
59-
urn, err := handlers.StrictTelForCountry(from, c.Country())
60+
urn, err := urns.ParsePhone(from, c.Country())
6061
if err != nil {
6162
return nil, handlers.WriteAndLogRequestError(ctx, h, c, w, r, err)
6263
}

Diff for: handlers/infobip/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"github.com/nyaruka/courier"
1414
"github.com/nyaruka/courier/handlers"
1515
"github.com/nyaruka/gocommon/httpx"
16+
"github.com/nyaruka/gocommon/urns"
1617
)
1718

1819
var sendURL = "https://api.infobip.com/sms/1/text/advanced"
@@ -140,7 +141,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
140141
}
141142

142143
// create our URN
143-
urn, err := handlers.StrictTelForCountry(infobipMessage.From, channel.Country())
144+
urn, err := urns.ParsePhone(infobipMessage.From, channel.Country())
144145
if err != nil {
145146
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, err)
146147
}

Diff for: handlers/jasmin/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"github.com/nyaruka/courier"
1313
"github.com/nyaruka/courier/handlers"
1414
"github.com/nyaruka/gocommon/gsm7"
15+
"github.com/nyaruka/gocommon/urns"
1516
)
1617

1718
var idRegex = regexp.MustCompile(`Success \"(.*)\"`)
@@ -82,7 +83,7 @@ func (h *handler) receiveMessage(ctx context.Context, c courier.Channel, w http.
8283
}
8384

8485
// create our URN
85-
urn, err := handlers.StrictTelForCountry(form.From, c.Country())
86+
urn, err := urns.ParsePhone(form.From, c.Country())
8687
if err != nil {
8788
return nil, handlers.WriteAndLogRequestError(ctx, h, c, w, r, err)
8889
}

Diff for: handlers/justcall/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"github.com/nyaruka/courier"
1515
"github.com/nyaruka/courier/handlers"
1616
"github.com/nyaruka/gocommon/jsonx"
17+
"github.com/nyaruka/gocommon/urns"
1718
)
1819

1920
var (
@@ -109,7 +110,7 @@ func (h *handler) receiveMessage(ctx context.Context, c courier.Channel, w http.
109110
date = date.UTC()
110111
}
111112

112-
urn, err := handlers.StrictTelForCountry(payload.Data.From, c.Country())
113+
urn, err := urns.ParsePhone(payload.Data.From, c.Country())
113114
if err != nil {
114115
return nil, handlers.WriteAndLogRequestError(ctx, h, c, w, r, err)
115116
}

Diff for: handlers/kannel/handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
6969
date := time.Unix(form.TS, 0).UTC()
7070

7171
// create our URN
72-
urn, err := handlers.StrictTelForCountry(form.Sender, channel.Country())
72+
urn, err := urns.ParsePhone(form.Sender, channel.Country())
7373
if err != nil {
7474
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, err)
7575
}

Diff for: handlers/m3tech/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/nyaruka/courier"
1212
"github.com/nyaruka/courier/handlers"
1313
"github.com/nyaruka/gocommon/gsm7"
14+
"github.com/nyaruka/gocommon/urns"
1415
)
1516

1617
var (
@@ -51,7 +52,7 @@ func (h *handler) receiveMessage(ctx context.Context, c courier.Channel, w http.
5152
}
5253

5354
// create our URN
54-
urn, err := handlers.StrictTelForCountry(from, c.Country())
55+
urn, err := urns.ParsePhone(from, c.Country())
5556
if err != nil {
5657
return nil, handlers.WriteAndLogRequestError(ctx, h, c, w, r, err)
5758
}

Diff for: handlers/macrokiosk/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"github.com/nyaruka/courier"
1313
"github.com/nyaruka/courier/handlers"
1414
"github.com/nyaruka/gocommon/gsm7"
15+
"github.com/nyaruka/gocommon/urns"
1516

1617
"github.com/buger/jsonparser"
1718
)
@@ -122,7 +123,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
122123
}
123124

124125
// create our URN
125-
urn, err := handlers.StrictTelForCountry(sender, channel.Country())
126+
urn, err := urns.ParsePhone(sender, channel.Country())
126127
if err != nil {
127128
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, err)
128129
}

Diff for: handlers/mblox/handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313

1414
"github.com/nyaruka/courier"
1515
"github.com/nyaruka/courier/handlers"
16+
"github.com/nyaruka/gocommon/urns"
1617
)
1718

1819
var (
@@ -90,7 +91,7 @@ func (h *handler) receiveEvent(ctx context.Context, channel courier.Channel, w h
9091
}
9192

9293
// create our URN
93-
urn, err := handlers.StrictTelForCountry(payload.From, channel.Country())
94+
urn, err := urns.ParsePhone(payload.From, channel.Country())
9495
if err != nil {
9596
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, err)
9697
}

Diff for: handlers/messagebird/handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
165165
}
166166

167167
// create our URN
168-
urn, err := handlers.StrictTelForCountry(payload.Originator, channel.Country())
168+
urn, err := urns.ParsePhone(payload.Originator, channel.Country())
169169
if err != nil {
170170
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, err)
171171
}

0 commit comments

Comments
 (0)