[HELP] Routing inbound calls through IAX2 trunk

I am pretty new to Asterisk, and have a call routing question. I have successfully set up an IAX2 trunk between 2 asterisk boxes (both running trixbox). Box1 has a PRI card that is providing pstn connectivity. It is sitting in my company’s datacenter. Box2 is my personal machine at home. I am able to make outbound calls over the IAX trunk to the pstn, but I cannot for the life of me figure out how to route calls coming in on the PRI for my 2 DIDs to the IAX2 trunk, and subsequently, back to my home machine. Thanks in advance.

on your home box, put the work iax2 link into a context with an exten that calls you, say 1234

Then on work box-

Dial(SIP/yourdeskphone&iax2/yourhomebox/1234)

on your home box put the work link in a context that has something like this:

exten => 1234,1,Dial(SIP/5555&SIP/6666,20)

thus when a call comes in on work, as well as dialing your desk phone it also dials exten 1234 @ your home box, which in turn dials more phones at your house.

Hope that helps :smile: