I am trying to get one system to be able to dial external numbers from another system. I had this working at one point and rebuilt my demo system and upgraded to 2.5 of FreePBX. Since then I have not been able to make this work again.
The following is my configuration of the two IAX trunks. I can call extensions on each system without any problems. Also, before the change I was able to add extensions on System 2 to a ring group on System 1. That no longer works either.
System 1 is behind a router with all the appropriate ports open.
The easiest way to do this is with dundi. You have to advertise your outbound routes to the other system. If you go to this link http://cohutta.com/Dundi_How_to.pdf there is an excellent tutorial to get you started. If you follow it exactly, you will be able to call each others extensions, dial out of each others systems and use ring groups, queues etc.
Once you set up your dundi stuff if you run into problems just shout.
I followed the document and it was worst. It took over 30 seconds to connect to extensions on each system and still could not reach external numbers.
I went back to a simple IAX trunk which should work. I have tried several configurations and did a bit of debugging.
Debug output from system 2:
[Dec 9 16:04:13] VERBOSE[6455] logger.c: VERSION : 2
[Dec 9 16:04:13] VERBOSE[6455] logger.c: CALLED NUMBER : xxxxxxxxxx
[Dec 9 16:04:13] VERBOSE[6455] logger.c: CODEC_PREFS : (ulaw|gsm|alaw)
[Dec 9 16:04:13] VERBOSE[6455] logger.c: CALLING NUMBER : 7000
[Dec 9 16:04:13] VERBOSE[6455] logger.c: CALLING PRESNTN : 0
[Dec 9 16:04:13] VERBOSE[6455] logger.c: CALLING TYPEOFN : 0
[Dec 9 16:04:13] VERBOSE[6455] logger.c: CALLING TRANSIT : 0
[Dec 9 16:04:13] VERBOSE[6455] logger.c: CALLING NAME : Operator
[Dec 9 16:04:13] VERBOSE[6455] logger.c: LANGUAGE : en
[Dec 9 16:04:13] VERBOSE[6455] logger.c: FORMAT : 4
[Dec 9 16:04:13] VERBOSE[6455] logger.c: CAPABILITY : 57358
[Dec 9 16:04:13] VERBOSE[6455] logger.c: ADSICPE : 2
[Dec 9 16:04:13] VERBOSE[6455] logger.c: DATE TIME : 2008-12-09 16:04:12
[Dec 9 16:04:13] VERBOSE[6455] logger.c:
[Dec 9 16:04:13] VERBOSE[6448] logger.c: Rx-Frame Retry[ No] – OSeqno: 000 ISeqno: 001 Type: IAX Subclass: REJECT
[Dec 9 16:04:13] VERBOSE[6448] logger.c: Timestamp: 00007ms SCall: 13924 DCall: 16384 [10.0.0.8:4569]
[Dec 9 16:04:13] VERBOSE[6448] logger.c: CAUSE : No such context/extension
[Dec 9 16:04:13] VERBOSE[6448] logger.c: CAUSE CODE : 3
[Dec 9 16:04:13] VERBOSE[6448] logger.c:
[Dec 9 16:04:13] WARNING[6448] chan_iax2.c: Call rejected by 10.0.0.8: No such context/extension
Error message on System 1
[Dec 9 16:04:13] NOTICE[20963] chan_iax2.c: Rejected connect attempt from 10.0.0.2, request ‘[email protected]’ does not exist
Just for testing purposes only I place an include from-internal statement in the default context and was able to make calls. I was told from an asterisk developer that this is because a peer connection will use default context for unauthenticated connections.