/usr/share/augeas/lenses/dist/tests/test_sip_conf.aug is in augeas-lenses 1.2.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | module Test_sip_conf =
let conf = "[general]
context=default ; Default context for incoming calls
udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
; The address family of the bound UDP address is used to determine how Asterisk performs
; DNS lookups. In cases a) and c) above, only A records are considered. In case b), only
; AAAA records are considered. In case d), both A and AAAA records are considered. Note,
[basic-options-title](!,superclass-template);a template for my preferred codecs !@#$%#@$%^^&%%^*&$%
#comment after the title
dtmfmode=rfc2833
context=from-office
type=friend
[my-codecs](!) ; a template for my preferred codecs
disallow=all
allow=ilbc
allow=g729
allow=gsm
allow=g723
allow=ulaw
[2133](natted-phone,my-codecs) ;;;;; some sort of comment
secret = peekaboo
[2134](natted-phone,ulaw-phone)
secret = not_very_secret
[2136](public-phone,ulaw-phone)
secret = not_very_secret_either
"
test Sip_Conf.lns get conf =
{ "title" = "general"
{ "context" = "default"
{ "#comment" = "Default context for incoming calls" }
}
{ "udpbindaddr" = "0.0.0.0"
{ "#comment" = "IP address to bind UDP listen socket to (0.0.0.0 binds to all)" }
}
{ "#comment" = "The address family of the bound UDP address is used to determine how Asterisk performs" }
{ "#comment" = "DNS lookups. In cases a) and c) above, only A records are considered. In case b), only" }
{ "#comment" = "AAAA records are considered. In case d), both A and AAAA records are considered. Note," }
{ }
{ }
}
{ "title" = "basic-options-title"
{ "@is_template" }
{ "@use_template" = "superclass-template" }
{ "#title_comment" = ";a template for my preferred codecs !@#$%#@$%^^&%%^*&$%" }
{ "#comment" = "comment after the title" }
{ "dtmfmode" = "rfc2833" }
{ "context" = "from-office" }
{ "type" = "friend" }
{ }
{ }
}
{ "title" = "my-codecs"
{ "@is_template" }
{ "#title_comment" = " ; a template for my preferred codecs" }
{ "disallow" = "all" }
{ "allow" = "ilbc" }
{ "allow" = "g729" }
{ "allow" = "gsm" }
{ "allow" = "g723" }
{ "allow" = "ulaw" }
{ }
}
{ "title" = "2133"
{ "@use_template" = "natted-phone" }
{ "@use_template" = "my-codecs" }
{ "#title_comment" = " ;;;;; some sort of comment" }
{ "secret" = "peekaboo" }
}
{ "title" = "2134"
{ "@use_template" = "natted-phone" }
{ "@use_template" = "ulaw-phone" }
{ "secret" = "not_very_secret" }
}
{ "title" = "2136"
{ "@use_template" = "public-phone" }
{ "@use_template" = "ulaw-phone" }
{ "secret" = "not_very_secret_either" }
}
(*********************************************
* Tests for update, create, delete
*
*********************************************)
(*********************************************
* Test to confirm that we can update the
* default context
*
*********************************************)
test Sip_Conf.lns put "[general]\ncontext=default\n" after
set "title[.='general']/context" "updated"
= "[general]\ncontext=updated
"
(*********************************************
* Test to confirm that we can create a
* new title with a context
*
*********************************************)
test Sip_Conf.lns put "[general]\ncontext=default\n" after
set "/title[.='newtitle']" "newtitle"; set "/title[.='newtitle']/context" "foobarbaz"
= "[general]\ncontext=default
[newtitle]
context=foobarbaz
"
|