Multiple Sip Channels Inbound

Morning all

quick question for the guru’s

im busy toying with freepbx using sip trunks for inbound and outbound calls, but i seem to be having a issue with adding multiple sip trunks, the moment i activate the second sip trunk i cannot receive calls at all,

[2019-01-18 09:58:27] NOTICE[2656] chan_sip.c: Peer ‘Number b’ is now Reachable. (24ms / 2000ms)

[2019-01-18 09:59:01] WARNING[2656][C-00000028] chan_sip.c: username mismatch, have <Number a>, digest has <Number b>

i’ve tried googling, and going through this forum, but im not getting any solid answers, both channels are set up identically

So you have two completely different SIP accounts for this? They both aren’t trying to use the same user/password or creds?

I assume that you have two trunks with the same provider. If not, please provide details.

It is usually not necessary to authenticate the provider on incoming calls – Asterisk can tell from the source IP address. Try adding
insecure=port,invite
to the Peer Details of both trunks. (Also to User Details if those sections are not blank.) If you already have this setting, post details of your provider and trunk settings.

With most providers, you can have multiple numbers and as many channels as you need on one trunk. Explain why you have more than one (trunks paid for by different organizations or departments, provider doesn’t offer the desired number of channels on one trunk, multiple accounts end up costing less, etc.)

With chan_sip, it is sometimes not possible for Asterisk to identify which of several trunks to the same provider received a call, though it can still identify the called number and route the call properly. pjsip would be a better choice if distinguishing the correct trunk is important, for example if you need to restrict the number of calls on a trunk.

That’s not entirely true. If you have two PJSIP endpoints that both are set to auth based on IP and they both have match=IPAddress and IPAddress is the same, it will match on the first endpoint it can match to. Same as Chan_SIP. So having two PJSIP trunks matching to the same IPs can cause the wrong trunk to match.

You are of course correct; I was assuming (because the OP was getting auth errors) that his trunks use registration.

Hi!

2 Separate accounts, pointing to the same provider ( 2 different numbers, 2 different accounts / password) set up as sip trunks

OK. Confirm that adding
insecure=port,invite
to both trunks (two places each, if you use incoming details) and reloading Asterisk did not help.

Post your trunk settings (mask personal info).

Explain why you don’t have both numbers in the same trunk.

Same Provider, i will give it a go
As to the trunks, its a free incoming service, 1 number, 1 account , hence the multiple accounts
aaaaak, i cant post links ( paste bin) , ( new user)

for the requested information

going to try now

the provider only allows 1 number per account ( free testing for inbound, and very cheap outbound)

still get

[2019-01-18 20:42:20] NOTICE[2656] chan_sip.c: Peer ‘’ is now Reachable. (15ms / 2000ms)
[2019-01-18 20:42:41] WARNING[2656][C-0000007a] chan_sip.c: username mismatch, have <>, digest has <>
[2019-01-18 20:42:41] NOTICE[2656][C-0000007a] chan_sip.c: Failed to authenticate device “+277167MYNUM” <sip:[email protected]>;tag=as0c04a7ef

Try completely deleting (save it first in case you need to put it back) the User Details for both trunks (except for Register Strings). If that doesn’t change anything, at the Asterisk console type
sip set debug on
and make an incoming call attempt.

Possibly, they are sending the call from another IP address (different from 41.221.5.251 that sip1.freshphone.co.za resolves to). Or, there may be a clue in the incoming INVITE as to why Asterisk is trying to authenticate.

Another approach is to try a pjsip trunk.

@Stewart1
thanks, i’ll disable the one , and try recreate it with pjsip, just to see what happens :slight_smile:

Why are you putting the username and passwords in the Trunk Names?!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.