Get DID from the to string

I receive DIDs in the following form:
INVITE sip:XXXXXXXXXXX;tgrp=14;[email protected]:5060;user=phone SIP/2.0.
My freePBX cannot extract DID from this string. Is there any setting I can modify to work it correctly or I must write my own context to process the To strings?

The DID is read on the call event logging page as XXXXXXXXXX;tgrp=14;trunk-context=

Try setting the context for your trunk to

Set a default Inbound Route and see what appears for the DID.

If it’s not usable, post a sample of the To: header on an incoming INVITE.

I set my context, the incoming calls are received OK, but now the problem is with outgoing calls (dial application). Should and can I modify the to headers, so I can include, for example, the tgrp and trunk-context switches?

You cannot modify From/To headers in such a manner. What format are they expecting for calls?

They have not told me the format yet. I tried to set the from field in the trunk settings with the trunk-context and tgrp switches, but that is not enough.

Your provider hasn’t told you the format of DIDs or any other specific settings like from user/domain or preferred CallerID method?

Then how can you even test outbound calls?

Everything used to work except redirecting with foreign caller ids. To fix this they decided to use trunk groups, and outbound calls now do not work. I think either they have not finished configuration settings or I need on my side to make modifications. So, I expect, tomorrow there will be further information.

So then there’s nothing that can be done until then. Got it.

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