Hello
I have 2 SIP trunks configured with my provider.
Trunk_1 - is my main two-way trunk. Let’s name it a private line.
Trunk_8 - is a copy of Trunk_1, but uses the different account (username/password). I need this 2nd account for dialout only. Let’s name it a business line.
[trunk_1]
; this is my private line
secret = password
provider =
trunkstyle = customvoip
username = 1234567
trunkname = incoming
callerid =
hasexten = no
hassip = yes
hasiax = no
registeriax =
registersip = yes
host = provider.tld
dialformat = ${EXTEN:1}
context = provider_in
group =
insecure = invite
contact = 1234567
fromuser = 1234567
fromdomain = provider.tld
nat = yes
canreinvite = no
[trunk_8]
; this is my business line
secret = password
provider =
trunkstyle = customvoip
username = 7654321
trunkname = outgoing
callerid = "my business line" <7654321>
hasexten = no
hassip = yes
hasiax = no
registeriax =
registersip = no
host = provider.tld
dialformat = ${EXTEN:1}
context = incoming ; was 'outgoing'
group =
insecure = invite
fromuser = 7654321
fromdomain = provider.tld
nat = yes
canreinvite = no
My system works pretty good without Trunk_8 configured.
As soon as I added that line I faced the following problem.
All the calls coming to my 1st account 1234567 are recognized by Asterisk as calls on Trunk_8 !!! (Found peer ‘trunk_8’ for …) Probably because both trunks have the same host= configured, but I expected that some other parameters should be taken into account as well!
Initially I had different contexts configured for both trunks, so all my calls were dropped because I had no incoming call routing configured for Trunk_8 as soon as it was created for dialing out only. Then I changed the 2nd trunk to use the same context as the 1st (I don’t like it). Now I can receive calls, but now my internal SIP phones are showing the caller ID from Trunk_8 (“my business line” <7654321>) for on incoming calls!
In simple words I just want Asterisk to treat the calls to my 1st trunk account as calls to Trunk_1, not Trunk_8.
Any ideas how to fix this?
Thanks!