FreePBX 2.4 and sip.conf

jvantslot

Member
Joined
Nov 24, 2007
Messages
72
Reaction score
2
Hi all,

I just stepped through the FreePBX upgrade process and all when SMOOOTH! A major Kudos to the FreePBX Guys. I'll have to chip in some $$ to express my gratitude.

There are a number of changes to the way FreePBX handles some of the conf files, specifically the sip.conf file.

Previously it took a "hands off" approach to this file but now appears to mange a number of the directives formerly contained in that file.

With sip.conf I needed to modify the directive "context=from-sip-external" to be "context=from-trunk" in order to get things to work properly with my setup. However now that directive is managed by the sip_general_additional.conf file which is over-written on any update from the FreePBX Gui.

My question is how do I make my needed "context=from-trunk" persistent? Is there a file I can place this in that will override the value in sip_general_additional.conf? Or can I modify this in the GUI somewhere?

Any hints would be appreciated!

Thanks

james
 
Absolutely not.

I just felt that a bit of filling out may be in order.

It would depend exactly how Jvantslot was intending to use the system as to what exactly was required in his case - both answers were equally valid.

You and I have been on these and other forums for long enough seen the - "I put all my custom configs in sip_additional.conf, and now all my configs have been overwritten" particularly by those who are used to designing their own dial plans in Asterisk, so pointing out that anything with _additional at the end of it should probably be left alone may or may not be valid, depending on the experience of the person asking.

Joe
 
Right, I don't want to put any changes in any *_additional.conf as they will get over-written.

Also, I'm not sure how I feel about allowing anonymous sip calls by default, as I'm not quite clear about how that might affect my server security wise.

I can certainly put the directive in question (context=from-trunk) in my sip_custom.conf file if that is the proper place for it.

I would like to know however, what the ramifications of allowing anonymous sip calls would have?
 
I will weigh in on the allow anonymous sip. It is my opinion that it is not a security risk as long as you do not have an any/any inbound route. If you have no any/any route, it is just like receiving a POTS telephone call. The caller dialed one of the numbers (inbound DID's) on your machine and got connected. If the caller did not dial one of your DID's, he will be rejected by your machine.
 
Would someone explain what is the difference between context = from-trunk in sip.conf(or sip_custom.conf) and allow anonymous inbound sip calls = yes in general settings ? Which one is more security ?
Thanks
 
Hi

By default, and as I understand it, the process is as follows: -

All SIP calls turning up at your PBX fall into context = from-sip-external ; Send unknown SIP callers to this context as seen in sip.conf

Looking in extensions.conf at line 1134 calls dropped into the above context run through this code:-

[from-sip-external]
;give external sip users congestion and hangup
; Yes. This is _really_ meant to be _. - I know asterisk whinges about it, but
; I do know what I'm doing. This is correct.
exten => _.,1,NoOp(Received incoming SIP connection from unknown peer to ${EXTEN})
exten => _.,n,Set(DID=${IF($["${EXTEN:1:2}"=""]?s:${EXTEN})})
exten => _.,n,Goto(s,1)
exten => s,1,GotoIf($["${ALLOW_SIP_ANON}"="yes"]?from-trunk,${DID},1)
exten => s,n,Set(TIMEOUT(absolute)=15)
exten => s,n,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(ss-noservice)
exten => s,n,Playtones(congestion)
exten => s,n,Congestion(5)
exten => h,1,NoOp(Hangup)
exten => i,1,NoOp(Invalid)
exten => t,1,NoOp(Timeout)

This says if allow anonymous sip calls = yes, then send the call into the from-trunk context, which is the main entry point for FreePBX.

If it isn't set, then play congestion and drop the call.

Once the call is in the from-trunk context, it is controlled, filtered and directed by your settings in Inbound Routes.

Joe
 

Members online

Forum statistics

Threads
26,688
Messages
174,412
Members
20,257
Latest member
Dempan
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.
Back
Top