Internal Routing for DDI and extensions

I am sure it is something really simple but I could not find it on the net or in the forum, i guess my search wording is off.

Basically if i have a setup like:

Ext: 10 - DDI = 555-555-5510
Ext: 20 - DDI = 555-555-5520

Setup is basic

SIP Trunk ----- FreePBX ---- SIP Extensions

Inbound/Outbound calls work, Extension to Extension works.

But, if i make a call from ext 10 to 555-555-5520 right now it routes out the SIP Trunk, back in the SIP trunk to ext 20. This functional but not economical.

Is there a way to have asterisk know that this DDI belongs to an extension and route accordingly?

Thanks in advance,

  • Stephen

Kind of how it’s supposed to work, as a work around, you could build a loop-back trunk on 127.0.0.1 and route such 55555555XX calls to that trunk

yea i guess thats a reasonable work around. Thanks.