Missing fields when adding sip device

Hi,

New to the forum, but I have been spending endless nights using the freepbx software over the past couple of weeks. :slight_smile: yes its true I am a newbie.

I have a couple of vta adapters that I would to hook up to the trixbox.

if I edit the sip_additional.conf manual I can add the following settings and the vta boxs stay up and running

[505]
context = default ; You may need to change this setting
insecure = very
disallow = all
allow = ulaw
port = 5060
username = 505
type = friend
secret = quebec
host = dynamic
fromuser = 505
dtmfmode=rfc2833
nat=Yes
notransfer=yes
qualify=500

also I add the following to the sip.conf file and it also gets deleted

externhost = siphost.dyndns.org
localnet=192.168.11.0/255.255.255.0
nat=yes

The settings work great, but If I go and do an update in the freepbx screens

I lose the additional fields I added.

Is there a way to add them in the freepbx screens, or to add them with out the files getting deleted

thanks

Jasit

Re: the sip_additional.conf rewrite it self every time you click update in the freepbx, you need to add this settings in the sip_custom.conf and then click update in the freepbx

So I added the fromuser=210 in the sip_custom.conf but I couldn’t find the update button on the freepbx screen. Will this add the fromuser as an option for other extensions.

I have read from a couple of different people on different forums if I want the vta to work I need the fromuser= as one of the settings.

thanks

Jasit

the sip_additional.conf rewrite it self every time you click update in the freepbx, you need to add this settings in the sip_custom.conf and then click update in the freepbx

On 12/2/06, jasit <[email protected] ([email protected])> wrote:[quote] Hi,

New to the forum, but I have been spending endless nights using the freepbx software over the past couple of weeks. :slight_smile: yes its true I am a newbie.

I have a couple of vta adapters that I would to hook up to the trixbox.

if I edit the sip_additional.conf manual I can add the following settings and the vta boxs stay up and running

[505]
        context = default       ; You may need to change this setting
        insecure = very
        disallow = all
        allow = ulaw
        port = 5060
        username = 505
        type = friend
        secret = quebec
        host = dynamic
        fromuser = 505
        dtmfmode=rfc2833
        nat=Yes
        notransfer=yes
        qualify=500

also I add the following to the sip.conf file and it also gets deleted

externhost = siphost.dyndns.org
localnet=192.168.11.0/255.255.255.0
nat=yes

The settings work great, but If I go and do an update in the freepbx screens

I lose the additional fields I added.

Is there a way to add them in the freepbx screens, or to add them with out the files getting deleted

thanks

Jasit

-------------------- m2f --------------------

Sent using Mail2Forum ( http://www.mail2forum.com).

Read this topic online here:
http://www.freepbx.org/forums/viewtopic.php?p=2592#2592

-------------------- m2f --------------------


Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net 's Techsay panel and you’ll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Amportal-users mailing list
[email protected] ([email protected])
https://lists.sourceforge.net/lists/listinfo/amportal-users
[/quote]

Post generated using Mail2Forum (http://www.mail2forum.com)

Let me see if I can explain this once more. Suppose you saw a sample configuration file out on the web someplace that had lines like these:

dogbreed=poodle
magazine=mad
news=onion

Would you just assume that those lines had to be somewhere in YOUR configuration?

Just because someone puts a sample file out with plausible-looking lines in it does NOT mean they are really needed. In fact, if you don’t find those lines in any of the sip*.conf files or extensions*.conf files created by FreePBX, it’s a pretty good bet they aren’t needed. Also remember that there’s more than one way to do things; maybe the person you got that file from had a reason for including those lines that doesn’t apply in your situation. I’ve seen sample configurations that have lines in them that don’t do anything today, and never have done anything.

It would have possibly been more productive to explain your problem and ask for help with that, although I must admit I’ve never heard of a “vta” adapter (however, it’s really late and my mind isn’t running on all cylinders). I do know that some adapters by default use a registration timeout of 3600 seconds (one hour) which apparently is a bit too long for Asterisk in some cases. If you can find that value, you could try reducing it to 1800 or even 900. Or there may be some other value in the adapter that needs tweaking. I can guarantee that the presence or absence of username and fromuser settings is not going to cause the sort of problem you are describing.

Thanks for the info, but how come I don’t see the settings for username and fromuser in the sip_addtional.conf settings on a per extentsion basis.

That’s why I posted to the forum. I know the way I setup the file was incorrect and didn’t make sense but it made for a quick short term solution. I am having problems with my vta adaptors staying connected they seem to lock up after 12 hours and the settings for the username and fromuser settings were missing and I wanted to see if that was what was causing the problem.

jasit

It would be nice if we could add the addtional options like we do in the trunk settings screen.

ie have an open box were we could put

fromuser = 500
username= 500

I ended up deleting that ext from the webpage and adding it to the sip_nat.conf page then going into the voicemail.conf page and adding the voicemail piece there also.

Jasit

Jasit, you don’t NEED the fromuser and username settings - those are automatically taken care of for you by FreePBX when you define the extension number.

Don’t take this the wrong way, but what you are trying to do is totally the wrong way to do it. If you are going to use FreePBX as a front end, then let FreePBX manage your extensions. Take the time to learn how to do things within FreePBX as much as is possible, instead of just spending a few minutes with it, deciding you can’t get it to work, and running off and sticking settings in whatever file will accept them.

On the other hand, if you want to write your own configuration files, that’s fine too. Just install Asterisk by itself and don’t use FreePBX. But if you try to mix the two, I guarantee you that you are not going to like what happens if an upgrade comes along. For example, if you add extensions to sip_nat.conf (which is NOT the correct place to put such information), what happens when someone writes a module to manage that file, and that module throws out any information that shouldn’t be in there?

There is a proper place to place extensions that for some odd reason you can’t manage from within FreePBX, and that’s extensions_custom.conf. But it sounds to me like you get frustrated far too quickly, and instead of trying to learn the right way to do it, you do “whatever works” for the moment, not realizing that if you do that, it could very easily come back to bite you in the butt down the road.

My suggestion to you is that you decide which path you want to take. If you decide to use Asterisk alone and write your own configuration files, more power to you - I have a friend that does that and he has a very impressive system (he was also writing Linux code when he was about 12, I think, but that’s another matter). But if you want to use a front end such as FreePBX, then learn how to do things from within that front end, and don’t take expedient workarounds just because you don’t see some (probably unnecessary) setting that you saw in someone else’s configuration file.

But hey, it’s YOUR system - just don’t ask us for help with your custom configuration files, since most FreePBX users don’t do those!

The only place you can put changes like this that will persist through upgrades is in sip_nat.conf (for the NAT stuff) and in the FreePBX extensions contexts. What may be confusing you is that when you first create an extension, you don’t see all the options, only the most commonly used ones. So create your extensions using the extensions tab, and add a new Generic SIP Device extension for each extension you have. Start out by setting the fields you know (User Extension and secret are the most important, and you will need a Display Name which is used as the Caller ID on Extension to Extension calls… Save that, then re-open the extension, and you will see the additional option fields. The most important is to set NAT=yes IF the device is not on your local network (otherwise set NAT to never for devices inside your firewall). Most of the other fields are either not necessary, or will be set by default to the values you have.

Then in sip_nat.conf (create it if it doesn’t exist, but be sure it has the same permissions as other *.conf files in the /etc/asterisk directory), you can place your lines that you were adding to sip.conf. I use lines similar to this:

nat=yes
externip=12.34.567.890 (use ipchicken.com if you aren’t sure what this is)
fromdomain=siphost.dyndns.org
localnet=192.168.11.0/255.255.255.0

But, if your way works, great because it would have the advantage of not having the external ip address hardcoded (I may even try that to see if it will work here).

I’m betting that when you create extensions in FreePBX, it is the fact that NAT is set to never by default that keeps them from working. Try just changing that and using a sip_nat.conf file, and I’ll bet everything else will work for you.