FreePBX | Register | Issues | Wiki | Portal | Support

Multiple Sip Channels Inbound


(Ijacobs3) #1

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


(Tom Ray) #2

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


#3

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.


(Tom Ray) #4

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.


#5

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


(Ijacobs3) #6

Hi!

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


#7

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.


(Ijacobs3) #8

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


(Ijacobs3) #9

going to try now

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


(Ijacobs3) #10

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:+277167MYNUM@41.221.x.xxx>;tag=as0c04a7ef


#11

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.


(Ijacobs3) #12

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


(Tom Ray) #13

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


(system) closed #14

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