adding params OUTSIDE of the gui ??

bigbloke

New Member
Joined
Feb 5, 2008
Messages
25
Reaction score
0
Hi All,

I cut my asterisk teeth on 1.0.10 totally CLI based.

I have been lured by the prospect of some of the "nice" features of
PIAF but admit I am struggling with the transition.

zapata configs:

I need to add additional directives to get CLI working on my ZAP phones,

in the old version I could just slap them into zapata.conf but in PIAF things seem to be spread around 2 or 3 files .

I really need to add them into zapata-auto.conf as this is where the channels are really defined - but it says "do not hand edit"

freepbx seems to put extensions into zapata_additional.conf, but editing that by hand seems to cause problems when I go back into freepbx gui

where can I add extensions , to be read at reload time, without freepbx tripping over them / deleting them ? what is the correct "best practice"
for PIAF please ?

[exten] configs:

I want to integrate a skype gateway

I want to put that gateway into its own context ,

However, the various AGI's of PIAF grab the incoming calls, bypassing my contexts

Into which file can I write custom contexts ?

MTIA

Regards

BB
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

Welcome to PiaF, I see you are just across the channel from me.

To give you a quick overview of how it all works.
  1. You put stuff in the FreePBX web pages.
  2. You press submit.
  3. It's written to the database
  4. You press the orange bar to reload
  5. magic happens that writes all the Asterisk config files from the DB
There are three basic kinds of files.

1. something.conf - these are the ones you are used to like sip.conf, iax.conf extensions.conf. These files are not touched by the database, BUT they may be overwritten by a module upgrade at some later stage.

2. something_additional.conf - These files are recreated everytime you click the orange button at the top. Change anything in here manually, and it will disappear when you click the orange bar. Great for experimenting, but not a good idea for permenant stuff. So something_additional.conf should not be edited.

3. something_custom.conf - you can add all your dial plans an extras in here and it will not be touched - as the previous files have a #iinclude statement, putting stuff in here is like putting it in the original sip.conf et al.


The zapata-auto to which you refer is created by genzaptelconf, which is a script run to configure analogue hardware, to save doing all of this by hand, or if you do not have any, configures ztdummy as a timing source. So you could safely delete zapata-auto.conf and put all your stuff in zapata.conf - just do not run genzaptelconf again. The contents for zapata.conf are created us at install time.

I'd appreciate it if you could share your knowledge on CLI delivery and proper reliable disconnect in the UK. It would be good to get in some commented out settings in zapata.conf for UK (and other countries) to get CLI working, and proper disconnects working - it can be a bit of a nuisance.

You should be able to put almost everything you need into FreePBX, and let it do it for you, but when you do have to write custom stuff, use the _custom.conf files, or create new ones, and do a #include.

FreePBX also gives the ability to send calls to a custom context. These contexts always begin "custom" e.g custom-some_contect_name. You can call your custom contexts from inbound routes.

In my opinion, FreePBX takes all the donkey work out of doing some quite complicated features, while still allowing you the opportunity to create your own stuff - as Ward and others have demonstrated with all sorts of great projects and customisations.

To do your own customisations, you probably need to know that all inbound stuff in FreePBX is set to the [from-trunk] context, while just about everything leaving freePBX and is internal to freePBX lives in the [from-internal] context.

To illustrate - if you created a context in sip_custom.conf for your own special inbound trunk and called it [from-my-custom-trunk] and brought in a call that way, then it should not touch FreePBX. You could then pass a call into [from-internal] and you can access all your freepbx extensions.

Joe
 

bigbloke

New Member
Joined
Feb 5, 2008
Messages
25
Reaction score
0
Hi Joe,

Many thanks for the rundown - it was exactly the level I needed - I'd suggest framing that post into a wiki article entitled:

"PIAF differences in 5 minutes for legacy asterisk users"

CLi settings for BT approved phones? well.... upon historic advice from Ian Plain (over at www.voipuser.org) I have always configured the following:

for 2.6 kernel add:

install wcfxs /sbin/modprobe --ignore-install wcfxs opermode=UK

into /etc/modprobe.d/zaptel

when you run genzaptel.conf , do it with options -d -s -c uk

zaptel.conf

in the global data section :

loadzone=uk
defaultzone=uk

zapata.conf (or now in PIAF I have manually added into zapata-auto.conf)

in the globals:

callerid=as received

in the individual zap channel definitions

usecallerid = yes
ukcallerid = yes
cidsignalling = v23
cidstart = polarity ; polarity works for me , sometimes = usehist
sendcalleridafter=2

;UK "BT Callsign" ring patterns
dring1=366,246,216
dring2=246,98,0
dring1context=ringring_ringring
dring2context=ring_ring

channel => n

However, I understand that some of the cable companies don't work this way. IIRC, For some, sendcalleridafter=1 is necessary

For some reason I don't presently have a machine here with an inbound PSTN trunk to cut n paste cli settings from. Will try and find one.

I make no claim of originality for the above - they just "work for me". I cite both the voipuser.org forums and cyber-cottage.co.uk/wiki as my historic sources. Particularly this thread I started back in 2005 iirc:

http://www.voipuser.org/forum_topic_2743.html

Now...I dont know why...but your name is very familiar to me - Bristol ? ...cant place it ...?? You dont work in fixed / mobile telecomms at an aztec west establishment or st james court perhaps ?? ( I worked around there myself for oooh...12 years in total , but left 7 years ago)

Regards

BB
 

bigbloke

New Member
Joined
Feb 5, 2008
Messages
25
Reaction score
0
Hi Joe,

Many thanks for the rundown - it was exactly the level I needed - I'd suggest framing that post into a wiki article entitled:

"PIAF differences in 5 minutes for legacy asterisk users"

CLi settings for BT approved phones? well.... upon historic advice from Ian Plain (over at www.voipuser.org) I have always configured the following:

for 2.6 kernel add:

install wcfxs /sbin/modprobe --ignore-install wcfxs opermode=UK

into /etc/modprobe.d/zaptel

run genzaptel.conf with -d -s -c uk

zaptel.conf

in the global data section :

loadzone=uk
defaultzone=uk

zapata.conf (or now in PIAF I have manually added into zapata-auto.conf)

in the globals:

callerid=as received

in the individual zap channel definitions

usecallerid = yes
ukcallerid = yes
cidsignalling = v23
cidstart = polarity ; polarity works for me , sometimes = usehist
sendcalleridafter=2

;UK "BT Callsign" ring patterns
dring1=366,246,216
dring2=246,98,0
dring1context=ringring_ringring
dring2context=ring_ring

channel => n

However, I understand that some of the cable companies don't work this way. For some sendcalleridafter=1 is necessary

For some reason I don't presently have a machine here with an inbound PSTN trunk to cut n paste from. Will try and find one.

I make no claim of originality for the above - they just "work for me" as I cite both the voipuser.org forums and cyber-cottage.co.uk/wiki as my historic sources. Particularly this thread I started back in 2005 iirc:

http://www.voipuser.org/forum_topic_2743.html

I odnt know why...but your name is very familiar to me - Bristol ? ...cant place it ...?? You dont work in fixed / mobile telecomms at an aztec west establishment or st james court perhaps ?? ( I worked around there myself for oooh...12 years in total , but left 7 years ago)

Regards

BB
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

I did work in Fixed & Mobile telecoms in Bristol, and did business with that company in Aztec West. Get in touch.

I'm glad you found my write up useful.


Joe
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top