Don't loop call with my free pbx

Hi!
I have a question.

We do try to keep calls that are originating from AND destinated to our Asterisk system to be kept on-switch. They are currently going out and going back in, we are trying to avoid such “loop” calls.

AsteriskNow w/ FreePBX gui.

We did installed Custom Context module and extensions are the DID associated to them.

Thanks,

That sounds like a question for the AsteriskNow forum.

GUIs tend not to be good at producing a concise serialised version of the configuration that can be copied into a reasonably sized forum posting.

I am curious as to what your users are dialling. If they are dialling the external DID number for an internal extension, the best thing to do would be to get them to stop doing that. If the external DID is 555-555-1234, and the internal extension is 1234, the users should be dialing only 1234.

Some other thoughts…

I suppose there could be a way to write an outbound route to strip off the extra digits and keep the call ‘on-switch’, but depending on your situation, it could be an interesting exercise. Off the top of my head, I think you may have to define a trunk to yourself for outbound routes to work.

If you can write some dialplan code, you could write something into extensions_custom.conf. I think the [from-internal-custom] context would be an appropriate context. Something like this may help…

exten => _555555XXXX,1,NoOp(DID intercept)
same => n,goto(from-internal,${EXTEN:-4},1)

Please note the following…

  1. I have not tested the code.
  2. XXXX is assumed to be a 4 digit internal extension that shares the same last 4 digits of the full number.
  3. The example assumes North American Numbering Plan, the 555555 is an example NPA NXX, you need to change the pattern match to fit your installation.