are you using separate dialplan to dial the external extension used in remote agents?
if not use the below dialplan with m tag, before that you need to upload the wav file in the asterisk music on hold folder
ie: create a folder mkdir /var/lib/asterisk/mymoh
upload your wav(8k Htz 16bit pcm mono) file to /var/lib/asterisk/mymoh
better upload 2 or more file to play in random
create a moh class in vi /etc/asterisk/musiconhold.conf
[xyzmoh]
mode=files
directory=/var/lib/asteirsk/mymoh
then the dialplan to dial the external extensoin, use a prefix in remote agent and same in dialplan ,lets say i use 9999 as prefix
exten => _9999XXXXXXXXXX,1,AGI(
agi://127.0.0.1:4577/call_log)
exten => _9999XXXXXXXXXX,n,Dial(SIP/trunk/${EXTEN:4},,tTm(xyzmoh))
exten => _9999XXXXXXXXXX,n,Hangup
were XXXXXXXXXX should match your extenernal number to dialled.
reload asterisk once to upload all the configuratin.