Help: Inbound route configuration - multiple did numbers behind trunk with Digest Auhentication

I am having a problem to configure something with Dids so let me first explain my problem:

I have a TRUNK with sip username/password so it gives me only digest auth not ip authentication and this trunk have 15 dids so if I login into it from my computer directly with phonerlite or eyebeam any number from this 15 dids called it will ring and I can answer.

Now I want to use this dids from FreePBX register this trunk in FreePBX and there are some agents which everyone have a speicific extension and point one did from those 15 to each of those agents/extensions

Is this possible and can it be done with GUI Cconfiguration, I configured such way dids before only with IP Auth so with diggest auth its not working

Have you checked how is your provider presenting the DID? Create a catch-all inbound route and make an incoming call while you are watching the log and it will show if your provider is sending the DID on the default header. If you don’t see anything related to the DID, enable SIP debug and repeat.

In header the main number is called first - sip user of trunk which is also did then all other dids are presented as additional extensions by provider

Try setting the context for your trunk to
Set a temporary catch-all inbound route (CID any, DID any) to an extension.

Make a test call to one of the DIDs and see if it appears in the CDR. If so, note the format and set up your routes to match.


By adding only this in trunk registration it fixed my problem “from-pstn-toheader” and all incoming calls appear in cdr.

Now inbound calls get routed based in how I configure this Dids to which extensions to go but one thing which worries me is after lets say 5 min of being registered with extensions which have a Did to come into them when they call it responds with busy status in cdr and I dont receive call but if I re-register then I receive calls and if I am not so active with softphone and somebody tries to call freepbx gives busy status

It sounds as if your PBX is behind a NAT device and the SIP session is expiring, so incoming calls stop working.

Have you set “qualify=yes” on your trunk configuration?

Yes qualify=yes but my PBX is not behind nat it have dedicated ip address so its not behind nat or something.

And I use CHAN SIP not PJSIP so I see in Chan Sip NAT clicked Yes -> I will switch this to no and see if problem repeats.

Does your pbx have a dedicated public ip? Is it a physical server on your network or a hosted server on the cloud?

If you are using Chan_SIP do you have insecure=invite,port on it? You need to turn off authenticating your inbound calls. Because that has nothing to do with your username and password. That’s for you to auth to them. When they send an inbound call to you and you make them auth, then they need to provide auth details you setup. Which is not not how ITSPs work. They expect you to not auth their calls.

Its server hosted in cloud with public ip disabling nat fixed problem of disconecting, also as Stewart proposed doing from-pstn-toheader fixed problem of receiving calls so now everything is working as I wanted by describing my problem in topic here.

Thank you all.

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