Sip trunks ringing in wrong context

Hello,
I’m new to Asterisk and I’m having an issue with my sip trunks. I use Telnyx for my provider. I have 3 “connections” that are trunked into the system. They are three different numbers that do different things. My line 1 works as it should, but line 2 and 3 ring in the wrong context. Yes, in the endpoints I have: Line 1 is, from-line1 Line 2 is, from-line2 line 3 is, from-line3. Line 2 and three show in the CLI that it’s not found in context “from-line1” even though the two other trunks are on different contexts. I also have the register string for each trunk in sip.conf. This is pretty frustrating because I know people that know asterisk real well, but the don’t respond to my messages.

Thanks, Carson

Maybe they know less than they claim, :). You need to provide your complete PJSIP configuration, maybe also later a complete SIP trace.

In short, you need to be careful on how to identify the accounts. SIP actually doesn’t have the concept of a trunk the way the old T1/E1 ISDN lines worked. That said, one of the most important settings could be that you have to specify the line parameter in the registration, but we can’t say that right now.

The line option, if supported by the provider, is a possible solution to the problem of registering to multiple provider accounts, but you can also use the contact URI and use procedural dialplan code to reroute to the correct context. These assume chan_sip, but you shouldn’t be using chan_sip in new systems.

However, trying to have multiple accounts associated with the same IP address is basically a bad idea, and you you really have a single account with multiple associated PSTN numbers, and do your own sub-division of the billing.

Thank you for the response. It just made me think that I can route the numbers to one Telnyx connection, so I may mess with that and see if it works better. Appreciate it!

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