forked from CyCoreSystems/ari
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcallerid.go
More file actions
27 lines (22 loc) · 737 Bytes
/
Copy pathcallerid.go
File metadata and controls
27 lines (22 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package ari
import "errors"
//NOTE: Direct translation from ARI client 2.0
// CallerID describes the name and number which
// identifies the caller to other endpoints
type CallerID struct {
Name string `json:"name"`
Number string `json:"number"`
}
// CallerIDFromString interprets the provided string
// as a CallerID. Usually, this string will be of the following forms:
// - "Name" <number>
// - <number>
// - "Name" number
func CallerIDFromString(src string) (*CallerID, error) {
//TODO: implement complete callerid parser
return nil, errors.New("CallerIDFromString not yet implemented")
}
// String returns the stringified callerid
func (cid *CallerID) String() string {
return cid.Name + "<" + cid.Number + ">"
}