Break SIP trunking provider into incoming and outgoing?

I’ve been putting sip “trunking” config into one file. How is that different, better, or worse than breaking it up into incoming and outgoing?

[babytel_incoming]
type=peer
qualify=no
insecure=no
host=nat5.babytel.ca
port=5065

[babytel_outbound]
type=peer
username=1234567890
host=nat5.babytel.ca
outboundproxy=nat5.babytel.ca:5065
secret=lkjklgjfghf446fghf
canreinvite=no
insecure=invite

There is no point in having two sip.conf sections here.

Note that canreinvite is deprecated or may have been removed; you should use directmedia.

On current versions, using remotesecret with insecure defaulting to no is cleaner than using insecure=invite.

insecure=invite has no effect, unless you also specify a secret, so there was no need to specify insecure=no in you first section.

If you had had needed separate incoming and outgoing sections, putting them in separate files would have been purely for your administrative convenience, so only you could answer the question.

If you actually needed the insecure in your current configuration it is because your incoming section isn’t being used. Asterisk can only use the IP address and port to match an incoming call to section and you have two sections with the same information

[quote=“david55”]There is no point in having two sip.conf sections here.

Note that canreinvite is deprecated or may have been removed; you should use directmedia.
[/quote]

This is probably the way to go, since I have a NAT situation:

directmedia=nonat
canreinvite=nonat

asteriskfaqs.org/tag/directmedia

however, that’s more of a forum than actual documentation. I’ll have to reference the actual manual.