Outgoing calls with multiple SIP accounts from same provider

Based on the Incoming SIP Connections page, I’ve configured my SIP accounts as follows. This means incoming calls for these registrations are sent to the ‘incoming’ context.

[code][general]
bindport=6070
bindaddr=12.34.56.78
register => USER1:PASS1@sipgate.co.uk/123
register => USER2:PASS2@sipgate.co.uk/456

[sipgate]
type=peer
host=sipgate.co.uk
context=incoming
[/code]

And my extensions like this (excerpt):

[code]context default {
s => {
Verbose(1,Unrouted call handler);
Hangup();
}
}

context incoming {
s => {
Verbose(1,Unrouted incoming handler);
Hangup();
}

123 => jump s@foo;
456 => jump s@bar;

}

context foo {

}

context bar {

}
[/code]

This works very well, but now I want to make outgoing calls. My question is: how do I specify the SIP ID to place the outgoing call? I need to use the right account so my provider can bill for the appropriate calls.

So far, all I know I can do with the outbound dial is choose the sipgate peer:

Dial(SIP/01234567890@sipgate)

But, of course, this peer is ambiguous between the two registrations I’m doing with this provider :question:

You should try to create another sip user, such as:

[sipgate1]
type=peer
username=user1
secret=…
host=sipgate.co.uk
context=incoming

[sipgate2]
type=peer
username=user2
secret=…
host=sipgate.co.uk
context=incoming