Multiple sip trunk from same provider

Hello!

I had a sip line from a provider which worked fine, now I ordered another line, so now I have 2 lines, I created a new sip trunk with the second line’s username/password, it registers, incomingcalls work, but if I try to call out I got a number not available, and suddenly the trunks become unavailable. I read that this is because the same host, but in this case, what can be the solution?

My trunk config:

username=my_uername
type=friend
secret=xxxx
qualify=yes&3600
insecure=port,invite
host=xxxx
fromuser=my_uername
fromdomain=xxxx
dtmfmode=RFC2833
context=from-pstn-toheader

And the register string:

my_username:my_password:[email protected]/my_username

Does your provider actually require you to setup a second trunk for a second number? Any provider that I’ve ever worked with will just deliver the service over the same trunk.

If yours requires a second trunk be setup maybe you need to reach out to them for details on what they are expecting to have the trunks configured.

If it can’t handle multiple calls, it isn’t a trunk. Trunk refers to having multiple circuits to the same place. It sounds like you are using a home user or centrex service but using it with a PABX, rather than a phone per “line”.

It’s more common to have problems inbound, for which the current SIP driver, chan_pjsip, has the line option to distinguish calls associated with different registrations. You are using a lame duck driver with, as is all to common, a cut and paste configuration., and some weird things (qualify=yes&3600 is, as far as I know, completely invalid).

Yes these are only extensions I got from my provider, not original trunks. I tried to convert it to pjsip, but unsuccessfully, can you help me with that? In the advanced settings I filled the from domain, from user, and the client uri with the same register string, and added sip: to the beginning, but this is not working.

The client URI is the actual address of record, not the compound parameter used by chan_sip. In particular, it does not contain authentication information. The register string in chan_sip includes both server and client IDs, authentication data, and contact user information, in its most general form. On the other hand, it doesn’t include parameters like user=phone that some providers may require. Basically client URI has to be what the provider expects in the URI part of the To header of the REGISTER request.

So in pjsip where is the register string field? If I left the client uri blank I got

403 The account has registered another contact address

response from the provider.

There isn’t a register string in SIP. The chan_sip register string is used to provide input to several parts of the REGISTER request. chan_pjsip accesses those fields more directly.

The provider thinks that you are making multiple registrations for the same account, something which as a matter of policy, they don’t permit. I don’t know what they use to determine the account, and one would need the successful registration with which this one is conflicting to make a guess at that. This would need to be less redacted, as it would be important to be able to differentiate between different user names.

Normally one would expect them to either accept multiple registrations and attempt to call all of them, or to replace the original one with latest.

Also please do not use screen shots of protocol traces. They are difficult to check and one screenful is not normally enough.