<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[buttons from sip.conf instead of voicemail.conf?]]></title><description><![CDATA[<p dir="auto">Does anyone parse the sip.conf to build the buttons? I have users that have both soft and hard phones. Soft phones do not have voicemail and/or are the softphone is setup to leave voicemail at the primary (hard phone) mailbox. Hard phones that are in conference rooms, lobbies, server room, etc do not have mailboxes either so I don't see them in fop2.</p>
<p dir="auto">Has anyone written a script to parse the sip.conf file instead?</p>
]]></description><link>http://localhost:4567/topic/272/buttons-from-sip.conf-instead-of-voicemail.conf</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 05:47:25 GMT</lastBuildDate><atom:link href="http://localhost:4567/topic/272.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 23 Feb 2010 20:16:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to buttons from sip.conf instead of voicemail.conf? on Mon, 15 Mar 2010 21:18:05 GMT]]></title><description><![CDATA[<p dir="auto">I don't have freepbx but got this to work with asterisk 1.6.0.26<br />
Create a file called build_buttons.pl and paste following code.</p>
<pre><code>#!/usr/bin/env perl
#
# Extensions
#
while (&lt;&gt;) {
        if (m/\[\d/) {
                chomp $_;
                s/\[([0-9]+)\]/\1/;
                print("[SIP/$_]\n");
                print("type=extension\n");
                print("extension=$_\n");
                while (&lt;&gt;) {
                        if (m/^$/) {
                                last
                        }
                if (m/^(context|label|vmexten=[0-9]|callerid|mailbox|\[[0-9])/) {
                        s/\&lt;([0-9]+)\]/\1/;
                        s/callerid=/label=/;
                        s/ &lt;\d+&gt;//;
                        if ( m/context/ ) {
                                $context=$_;
                                $context=~ s/context=//;
                                chomp $context;
                        }
                        s/(mailbox=\d+)/\1\@default/;
                        s/vmexten=(\d+)/extenvoicemail=*\1\@$context/;
                        print
                        }
                }
        }
}

#The rest of this is just hardcoded buttons.
#
# Conference
#
print("[CONFERENCE/1600]\n");
print("type=conference\n");
print("label=User\n");
print("extension=1600\n");
print("context=from-internal-redir\n");
print("\n");

print("[PARK/default]\n");
print("extension=700\n");
print("context=parkedcalls\n");
print("type=park\n");
print("Label=Parked \n");
print("\n");

print("[SIP/VoicePulse]\n");
print("type=trunk\n");
print("label=VoicePulse\n");

print("[G1]\n");
print("type=trunk\n");
print("label=PRI\n");
print("channel=DAHDI/1\n");
print("channel=DAHDI/2\n");
print("channel=DAHDI/3\n");
print("channel=DAHDI/4\n");
print("channel=DAHDI/5\n");
print("channel=DAHDI/6\n");
print("channel=DAHDI/7\n");
print("channel=DAHDI/8\n");
print("channel=DAHDI/9\n");
print("channel=DAHDI/10\n");
print("channel=DAHDI/11\n");
print("channel=DAHDI/12\n");
print("channel=DAHDI/13\n");
print("channel=DAHDI/14\n");
print("channel=DAHDI/15\n");
print("channel=DAHDI/16\n");
print("channel=DAHDI/17\n");
print("channel=DAHDI/18\n");
print("channel=DAHDI/19\n");
print("channel=DAHDI/20\n");
print("channel=DAHDI/21\n");
print("channel=DAHDI/22\n");
print("channel=DAHDI/23\n");
</code></pre>
<p dir="auto">buttons.cfg only has this line<br />
#exec build_buttons.pl &lt; /etc/asterisk/sip.conf</p>
]]></description><link>http://localhost:4567/post/1288</link><guid isPermaLink="true">http://localhost:4567/post/1288</guid><dc:creator><![CDATA[id10t]]></dc:creator><pubDate>Mon, 15 Mar 2010 21:18:05 GMT</pubDate></item><item><title><![CDATA[Reply to buttons from sip.conf instead of voicemail.conf? on Wed, 24 Feb 2010 17:32:02 GMT]]></title><description><![CDATA[<p dir="auto">Quick and dirty, for FreePBX:</p>
<pre><code>#!/bin/bash
if [ -e /etc/amportal.conf ]; then

DBNAME=`cat /etc/amportal.conf | sed 's/ //g' | grep ^AMPDBNAME | cut -d= -f2`
DBUSER=`cat /etc/amportal.conf | sed 's/ //g' | grep ^AMPDBUSER | cut -d= -f2`
DBPASS=`cat /etc/amportal.conf | sed 's/ //g' | grep ^AMPDBPASS | cut -d= -f2`
DBHOST=`cat /etc/amportal.conf | sed 's/ //g' | grep ^AMPDBHOST | cut -d= -f2`

mysql -NB -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME -e "select CONCAT('user=',id,':',data,':all') from sip where keyword='secret'" | while read LINEA
do
echo $LINEA 
done
echo "buttonfile=autobuttons.cfg"

else
echo "Unable to find /etc/amportal.conf"
fi
</code></pre>
]]></description><link>http://localhost:4567/post/1287</link><guid isPermaLink="true">http://localhost:4567/post/1287</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Wed, 24 Feb 2010 17:32:02 GMT</pubDate></item><item><title><![CDATA[Reply to buttons from sip.conf instead of voicemail.conf? on Tue, 23 Feb 2010 22:18:55 GMT]]></title><description><![CDATA[<p dir="auto">The latest beta can be used together with a freepbx module to configure users from the extensions instead of voicemail. Please search the forums as there are several posts with the appropiate links... you can try that out. Best regards,</p>
]]></description><link>http://localhost:4567/post/1286</link><guid isPermaLink="true">http://localhost:4567/post/1286</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Tue, 23 Feb 2010 22:18:55 GMT</pubDate></item></channel></rss>