How to use the custom conf files to override the freepbx generated files?

This is a two part question.

1/

I have this in sip_general_additional.conf

vmexten=*97
disallow=all
allow=ulaw
allow=alaw
context=from-sip-external
callerid=Unknown
notifyringing=yes
notifyhold=yes
limitonpeers=yes
tos_sip=cs3
tos_audio=ef
tos_video=af41

I want to change the context=from-sip-external to context=default

what exactly would i put in the sip_general_custom.conf file

2/

I cannot understand what this means…

sip_custom_post.conf
---------------------
1. This is the file that allows you to add/remove values to those entries found in the auto-generated sip_additional.conf file. So for example you have a extension 1000 that need a additional parameter added. create a context line: [1000](+) then on the next line add the item you need to add. To remove use (-) instead.

I have this in my sip_additional.conf

[100]
type=friend
secret=welcome
qualify=yes
port=5060
pickupgroup=
nat=yes
mailbox=100@device
host=dynamic
dtmfmode=rfc2833
dial=SIP/100
context=from-internal
canreinvite=no
callgroup=
callerid=device <100>
accountcode=
call-limit=50

BUT i would prefer to have this…

[100]
type=friend
secret=welcome
qualify=yes
host=dynamic
canreinvite=no
context=phones

How do i go about modifying sip_custom_post.conf to get what I want.

Would this work?

[100](-)
type=friend
secret=welcome
qualify=yes
port=5060
pickupgroup=
nat=yes
mailbox=100@device
host=dynamic
dtmfmode=rfc2833
dial=SIP/100
context=from-internal
canreinvite=no
callgroup=
callerid=device <100>
accountcode=
call-limit=50

[100](+)
type=friend
secret=welcome
qualify=yes
host=dynamic
canreinvite=no
context=phones

how about you start by trying to explain why you want to remove the information that was put there for specific reasons.

Pulling several of the items out that you don’t want to see will break things so a better description of what you want to do and why.

I’m following the tutorial in orielly’s Asteisk book, so they suggest beginning with a simple setup. I realise this may not be fully possible with AsteriskNOW when coupled with FreePBX.

But more importantly I want to understand exactly how to modify the sip custom files to achieve any objective i may have.

That is I wish to find out how to remove and add (tweak) the settings that freepbx puts into the sip_additional.conf file.

That is how to use the extension and extension directives to add and remove entries. I tried it as shown above but the system did not seem to acknowledge how I used them in the sip_custom_post.conf

I say this because when I view the details for extension at the astersik cli I can see clearly that the context=from-internal still remains instead of being change to context=phones.

ok that tutorial was designed for starting from scratch with asterisk and without FreePBX installed. In fact maybe all books that teach programming asterisk assume you have a basic system and don’t expect FreePBX to be installed. They just don’t go together (custom done dial plans and FreePBX).

It is a good thing to learn how to do dial plans, etc. but by following those tutorials and attempting to make them fit into the FreePBX frame work things will go very bad as FreePBX uses a lot of configuration files, organized structure and macros to get things done and simply changing a context for example will break many, many things.

When you make a change you need to reload the the asterisk running config. type reload in the asterisk CLI. but trying to learn by following the tutorials and have FreePBX installed will very quickly drive you nuts as things will break and you’ll not know why.

If you really want to leanr following those tutorials either build two systems, or create a learning system in a VM would be the best thing.

Can FreePBX be removed totally without damaging the asterisk installation?