linux - list username and SIP number for users Asterisk -


i have installed asterisk , have file users.conf
want create shell script can list usernames , sip number

the users listed in file shown below:

[6001]               type=friend           host=dynamic             dtmfmode=rfc2833         disallow=all             allow=ulaw           fullname = john doe       username = jdoe          secret=secret            context = work   

you can use simple regexp this:

grep -e '\[[0-9]+\]|username' users.conf 

is output ok? can list these without brackets, or username = part. if need more add comment


Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -