Do I need g729 license if I use SIP gateway?

Hi,

My Asterisk has 2 SIP extensiones using Cisco phones. The phones are configured just to use the codec g729. In set this in the phone web-gui and in the sip.conf

disallow=all allow=g729

The calls works fine from extension-to-extensions.

The Asterisk pbx do not use physicall Asterisk cards, I mean, there is no FXO/FXS,E1,T1 ports, I make calls using a TDM Gateway that has 4 fxo/1 fxs ports.

In this scenario do I need to buy g729 licenses to terminate calls to the SIP TDM Gateway?

Depends on the TDM gateway. When the gateway supports g729 no license for Asterisk ist needed as passthrough of g729 is included. In the other case, Asterisk has to transcode the RTP media and this is requiring a g729 for each parallel call which may occure.