Same SIP Provider for two trunks incoming problem

I have two SIP trunks from the same SIP provider. Both of them have the same configuration except for the username and password. I am having problem when I set it up at the same time as it only detects one of the trunks I have configured. From incoming DID, I can reach one trunk and not the other. They are coming from one IP address which makes me think causing the problem. Have tried all combination for insecure (“port”,“invite”,“port,invite”,“very”) but not getting success out of it. I have been checking out from google but most have the same problem but no concrete solution have been provided. Just want to know if anyone manage to get this to work.

The easy solution to this is use a callback extension number and discriminate in the dialplan.

SIP providers are unlikely to allow you to use the From: header, as they will prefer to use that for caller-ID, if this is a real trunk.

insecure is not relevant here. It’s main use is to prevent problems when sip.conf has a user and password configured, but the provider is not using those for inbound calls. You will probably need insecure=invite, but it won’t help distinguish between the two trunks, as that is done on IP address.

The right place to ask was Asterisk Support.

You won’t need a callback extension if you have a true DID trunk, but DID is commonly used to refer to a single number taken from a DID trunk on the PSTN side of the provider, rather than a DID trunk to your system.

SIP turnk coming form the same IP did not cause any problem.
Just need to make sure both of your account has be registered properly. You can use command “sip show channels” to see if both of them is working.
When SIP trunk provider signal your Asterisk, they send out INVITE to your URI (your account name), not necessary send out the DID information directly, unless your username is your DID.

Hope this helps.
TieUs Technology - The SIP trunks provider for Canadian.

Unless the from user is set, Asterisk will match them on IP address and will use the first matching sip.conf entry. If the from user is set, there is a good chance that caller ID won’t be provided by other means.

My from user is set but it still not able to work. It will take the last configured sip (having the same IP address) and the other one won’t work at all. I am considering getting a new provider which can give me multiple channels.

Good day depam ,
I got the same issue with one of our main provider and they recommended us to use sendrpid=yes in sip.conf. You could try it if Your provider is supported it , but anyway I suppose You should ask for advice from your provider.

sendrpid = Defines whether a Remote-Party-ID SIP header should be sent. Defaults to no.
This field is often used by wholesale VoIP providers to provide calling party identity regardless of the privacy settings (the From SIP header).

Good luck.

I have tried this without success. My provider won’t cooperate but instead want me to get the business plan for SIP.

Why don’t you extract the DID from the To: header ? … nd-it-and-