I know this is an old thread, but I wanted to post an update for future seekers of information. Not only that, but the next time I foul it up I'll be able to look here and remember what I did. I recently had to make some changes to my system and I was again faced with the problem of only the first FXS port being able to dial out. The major breakthrough came when I bought the same model (Audiocodes MP-104a) in a FXO flavor. It had the same issue where only the first port would work correctly. I figured at this point it can't be the device. This was a brand new in the box unit, and it seemed unlikely to have anything corrupted. At this point I decided to look at the sip.conf file in asterisk. Something had to be different. It wasn't obvious at first, but when putting the info into sip.conf, the audiocodes devices must have type=friend, and not type=peer, like all the other sip devices I have. The other change I made was srvlookup=no. Those two minor changes and all the ports on both devices instantly worked right. I spent two days futzing with the settings in the devices before it occurred to me that it must be something external. I hope this tidbit saves someone else the hair tearing I went through. Once these things are configured they are solid as a rock, that's why I like them. Just a long process to get them there.