Dialling using IP address and different configs?

We are currently making outbound calls by issuing Dial(SIP/IP_ADDRESS/Phone Number) in our dialplan, which works fine. The settings such as the codec are specified in the [General] in sip.conf.

Now we want to dial using a second provider using the same method above, but now we want to use different settings in the config. Since we’re not provided with a username/password by either SIP providers we can’t create peer entries in, say, sip_additional.conf (otherwise we could just create say [Provider1] and [Provider2] and Dial(SIP/Provider1/nnnnnnnn) etc.).

Does anyone know how we can achieve this?

Thanks.

You don’t need to have a user name and or password to create a “context” in sip.conf. I have a provider that authenticates based on my IP that works fine. I have this in my sip.conf:

[my_carrier]
host = XXX.XXX.XXX.XX
type = friend     
context = from-external
disallow = all
allow = g729
allow = ulaw
insecure = very
canreinvite = no
nat = no 

Of course you want to change the settings above to that you need.