IAX2 Trunking between two servers

I’ve configured two Asterisk Servers to be connected together via an IAX connection.
I’ve no trouble to connect them together and make calls, but I can’t manage to trunk(multiplex) the calls.

I only manage to have a one way trunk call.
What I mean is that for exemple when I make a call between two phones 1 and 2, each on a separate server, if 1 calls 2, I get the following result :
1 -> 2 : The uplink is not trunked, and the answer, downlink is trunked.

So that I’ve got half-trunked communication !

Has someone an idea to solve my problem?

post your iax conf files for us to look at.

Here’s the IAX configuration file, on the other server it’s the same, with the correct IP addresses, passwords and usernames.

; Informations générales
; ***********************************************************************
[general]
; Port et adresse d’entrée du lien IAX
bindport=4569
bindaddr=IP_ABRARACOURCIX

;iaxcompat=yes
;nochecksums=no
;amaflags=billing
language=fr
disallow=all
;allow=all
allow=ilbc
allow=g723.1
allow=g729
allow=gsm
;disallow=slin
;disallow=gsm
;disallow=alaw
;disallow=ulaw

; Buffer de gigue
jitterbuffer=yes
forcejitterbuffer=no
;dropcount=5
;maxjitterbuffer=100
;resyncthreshold=100
;maxexcessjitterbuffer=80
trunkfreq=30

; Enregistrement
;minregexpire=60
;maxregexpire=60

register => abraracourcix:XXXX@IP_CESAR

;authdebug=no
tos=lowdelay
autokill=yes
codecpriority=host

; Informations sur les utilisateurs
; ***********************************************************************
[guest]
type=user
context=default
callerid=“Guest IAX user”

; Serveur César
[cesar]
type=friend
context=appel_depuis_iax
username=cesar
auth=md5
secret=xxxxxxx
host=dynamic
defaultip=defaultIP_CESAR
canreinvite=yes
nat=yes
trunk=yes
notransfert=yes
jitterbuffer=yes
qualify=yes
sendani=yes

I’m using Asterisk 1.2.5 for information.

I found the mistake !

It comes from the fact that my serveur name cesar is not a DNS name in my Network. To solve the problem I replace cesar by its IP address

; Serveur César [cesar] type=friend context=appel_depuis_iax username=cesar auth=md5 secret=xxxxxxx host=dynamic defaultip=defaultIP_CESAR canreinvite=yes nat=yes trunk=yes notransfert=yes jitterbuffer=yes qualify=yes sendani=yes