Nocom
On your Linux Asterisk machine, create the file /usr/local/bin/nocom and put the following lines in it.
#!/bin/sh
cat $1 | sed -e '/^\s*;/d' | sed -e '/^\s*$/d'
cat $1 | sed -e '/^\s*;/d' | sed -e '/^\s*$/d'
To execute this, you'll need to run this command:
chmod +x `which nocom`
Now, simply run nocom with the target file as an argument to have the file printed without comments.
Example:
nocom sip.conf
produces
root@xenu/etc/asterisk# nocom sip.conf
[general]
context=default ; Default context for incoming calls
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
[authentication]
[100]
type=friend
secret=supersecret
host=dynamic
context=internal
Featured -
Search:

Page Changes














