Parse native PJSIP endpoint names with caller display
This commit is contained in:
@@ -41,7 +41,9 @@ type appliedState struct {
|
||||
Trunks []loadedTrunk `json:"trunks"`
|
||||
}
|
||||
|
||||
var endpointLine = regexp.MustCompile(`(?m)^\s*Endpoint:\s+(\S+)`)
|
||||
// Asterisk prints Endpoint: <name>/<caller-id>; the slash and caller ID are
|
||||
// display metadata, not part of the configured endpoint name.
|
||||
var endpointLine = regexp.MustCompile(`(?m)^[ \t]*Endpoint:[ \t]+([^/< \t\r\n]+)(?:/[^ \t\r\n]+)?`)
|
||||
|
||||
func endpointOption(output []byte, name string) string {
|
||||
for line := range strings.SplitSeq(string(output), "\n") {
|
||||
|
||||
Reference in New Issue
Block a user