Hi, I'm trying to configure 2 parallel sip trunks between 2 boxes. However I seem to have the problem that when making a call from Box 2 to Box 1, it sometimes says authentication failed because it is using the username of the other trunk. Here's my configuration: Box 1: [dp-dp2] type=peer username=dp-dp2 secret=mysecret qualify=yes host=box.2.ip.address context=from-internal [e911-dp2] context=from-pstn host=box.2.ip.address qualify=yes secret=mysecret2 type=peer username=e911-dp2 Box 2: [dp-dp2] host=box.1.ip.address qualify=yes type=peer username=dp-dp2 secret=mysecret context=from-pstn [e911-dp2] context=from-internal host=box.1.ip.address qualify=yes secret=mysecret2 type=peer username=e911-dp2 If I have both trunks up, I'll see in the log on Box 1, when calling from Box 2 -> Box 1: " username mismatch, have <e911-dp2>, digest has <dp-dp2>" How can I get both to co-exist? Thanks. -- James
On Tue, 1 Sep 2009, James Lamanna wrote:> Hi, > I'm trying to configure 2 parallel sip trunks between 2 boxes. > However I seem to have the problem that when making a call from Box 2 > to Box 1, it sometimes > says authentication failed because it is using the username of the other trunk. > > Here's my configuration: > > Box 1: > [dp-dp2] > type=peer > username=dp-dp2 > secret=mysecret > qualify=yes > host=box.2.ip.address > context=from-internal > > [e911-dp2] > context=from-pstn > host=box.2.ip.address > qualify=yes > secret=mysecret2 > type=peer > username=e911-dp2 > > > Box 2: > > [dp-dp2] > host=box.1.ip.address > qualify=yes > type=peer > username=dp-dp2 > secret=mysecret > context=from-pstn > > [e911-dp2] > context=from-internal > host=box.1.ip.address > qualify=yes > secret=mysecret2 > type=peer > username=e911-dp2 > > If I have both trunks up, I'll see in the log on Box 1, when calling > from Box 2 -> Box 1: > " username mismatch, have <e911-dp2>, digest has <dp-dp2>" > > How can I get both to co-exist? > > Thanks. > > -- James >Hi James, Try changing the host idents to 'dynamic'. I think the IP match may come first, though I don't know why it would be intermittent and not always a problem. If that works you could limit each entry with appropriate permit/deny statements. Cheers, j
2 sep 2009 kl. 02.44 skrev James Lamanna:> Hi, > I'm trying to configure 2 parallel sip trunks between 2 boxes. > However I seem to have the problem that when making a call from Box 2 > to Box 1, it sometimes > says authentication failed because it is using the username of the > other trunk. > > Here's my configuration: > > Box 1: > [dp-dp2] > type=peer > username=dp-dp2 > secret=mysecret > qualify=yes > host=box.2.ip.address > context=from-internal > > [e911-dp2] > context=from-pstn > host=box.2.ip.address > qualify=yes > secret=mysecret2 > type=peer > username=e911-dp2 > > > Box 2: > > [dp-dp2] > host=box.1.ip.address > qualify=yes > type=peer > username=dp-dp2 > secret=mysecret > context=from-pstn > > [e911-dp2] > context=from-internal > host=box.1.ip.address > qualify=yes > secret=mysecret2 > type=peer > username=e911-dp2 > > If I have both trunks up, I'll see in the log on Box 1, when calling > from Box 2 -> Box 1: > " username mismatch, have <e911-dp2>, digest has <dp-dp2>" > > How can I get both to co-exist? >Well, you have to learn how Asterisk matches incoming calls for peers. The peer matching is done on ip/port and will match the first one in the internal list, which is the last one in the configuration. All incoming calls will come to e911-dp2 in your configuration, since both peers has the same ip address and port. /O