I have a Sipgate basic account with several numbers. I have the configuration working, so that all telephones ring when any of my sipgate numbers is called from external.
I now want that different telephones ring, when different sipgate numbers are called from external.
I changed the inbound route DID from ANY to the sipgate number :
inbound routes -> sipgate > DID 1234 (sipgate number)
and the user context on incoming to from-pstn-toheader:
trunk -> sipgate -> sipsettings -> incoming -> User context : from-pstn-toheader
The settings in the webinterface:
Trunk -> sipsettings -> incoming
User Context: from-pstn-toheader
As @Overkill said, don’t worry about different contexts.
What you want to achieve you can do so within the regular from-trunk context.
What matters is the destination for each of your incoming Sipgate calls. For each DID you would have a different inbound route with a different destination.
Have some phones in one ring group, others in another. Or queues for that matter.
And set the inbound route destinations to those.
I see, the problem lies somewhere else.
A soon as I enter the DID in the inbound route settings, no call comes through, only the voice “not available” or something. The telephone ring if I put ALL in the DID field though. Maybe there is something wrong with the format? I put the DID it exactly as seen in the log (004975711234).
Be sure to always have an “Any/any” inbound route (No DID, no CID). This way, you calls will at least complete. Also then, make your calls and watch the logfile output. In there will be a note about “Maybe you should set up a route for this DID”, or something similar.
I have now created 2 inbound routes, one with DID ANY and one with DID 075711234 (I also tried different formats). One is connected to a Telephone, the other one to a terminate call (for testing). It always chooses the ANY route, the 1234 route isn’t matched at any time .
In the log there is indeed this “should set up a route”-message:
[2017-06-22 16:47:24] VERBOSE[C-00000005] pbx.c: Executing [[email protected]:1] NoOp(“SIP/sipgate-00000005”, “Catch-All DID Match - Found 2458671 - You probably want a DID for this.”) in new stack
Ok, I was overlooking that. This is actually the customer number of the Sipgate-Account. It is the same for all telephone numbers I got from sipgate.
This is why I cannot really create different routes for different numbers.
If I look at the logs, I can see the correct number 004975711234 in the “to” of the header:
Since you are using a register string, you don’t need the “USER Context” or “USER Details” fields populated, remove whatever you have there. Then locate the context line in the PEER Details field and make it look like this
There is another problem:
I just found out, when I call from another sipgate account, the "To: " field in the header is the sipgate account number of the receiving account. When I call from my mobile the "To: " field is the correct number that is called.
Here the log from calling from another sipgate account:
The 1111111e0 is the sipgate account number and the 0049757155555 is the number that is called. For some reason Sipgate is messing something up for calls that are happening inside sipgate’s network. Is there anything that can be done? The 004975715555 is not appearing at all int the logs when I call from the other sipgate account.