IAX2 trunk breaks and wont come back up. want to start over and need advice

I am running freepbx via trixbox ce 2.6.2

I have setup some IAX trunks and they work immediately. The problem is that if the internet connection goes down, I can never get the trunk to work again, even if I reboot both of the PBX in question.

I kind of guessed my way through the initial setup so I want to start over clean instead of trying to diagnose a problem that might just be simple user error.

Can someone tell me the optimal way to setup IAX2 trunks between to freebpx boxes? I can start there.

Also, any help on how to see the problems from the asterisk console. I am new and the vast amount of info on google is confusing. I am an old linux and cisco pro so I wil catch on quickly considering that the asterisk CLI seems to have some cisco influences.

Also, how can kill and restart an IAX trunk?

Thanks for any help in advance.

Try this method

I hope it helps

http://voipcoop.org/viewtopic.php?t=71

Our internet is flaky so I added a cron job that pushes an iax2 reload on the cli.

best luck.
Alejandro Gidi

can you post the command you use in cron?

Im just guessing that this is the ‘iax2 reload’ command from the asterisk CLI right?

I tried that but my IAX2 trunks didnt come back up. I will make my trunk config match yours and try again. Thanks for the info.

in that link you have a string in the register string…do I include the (Box “A” ) notation? as in should i do
this:
voip2:[email protected] (Box “A” )

or this:
voip2:[email protected]

Im guessing to skip the (Box “A” ) but am not 100% on that.

Thanks

I am unclear on this setup. Do I need to setup an extention on the remote box that matches the voip1 or voip2 username? Also, do I need to turn on the accept anon sip calls? I cant get the config from the link to work so I’m wondering what I am missing.

Thanks

Set up an IAX trunk on Box A:

Trunk Name: TheTrunk

peer details:

hostname=dynamic
type=friend
context=from-internal
password=SomeToughPassword
qualify=yes

Delete all user details and registration string is empty

Set up an IAX trunk on Box B:

Trunk Name: TheTrunk

peer details:

hostname=5.4.3.2 ;ip address or FQDN of Box A
type=friend
context=from-internal
password=SomeToughPassword
qualify=yes

Delete all user details

Register String:

TheTrunk:[email protected]

Change the 5.4.3.2 to match the ip or the FQDN of Box A

I manage a box overseas where the ISP changes the IP every 30 minutes or so. This setup keeps the IAX trunks open.