As it turned out the MOH is only working when I initiate then call from the GXP2140.
When someone else is calling, from another SIP phone or from the PSTN then the MOH ain't working
2015-04-24 17:12:15.192047 [DEBUG] switch_core_session.c:1053 Send signal sofia/internal/
sip:18@10.0.200.18:5060 [BREAK]
2015-04-24 17:12:15.192047 [DEBUG] switch_core_session.c:1053 Send signal sofia/internal/
sip:18@10.0.200.18:5060 [BREAK]
2015-04-24 17:12:15.212049 [DEBUG] sofia.c:6614 Channel sofia/internal/
sip:18@10.0.200.18:5060 entering state [received][100]
2015-04-24 17:12:15.212049 [DEBUG] sofia.c:6624 Remote SDP:
v=0
o=18 8000 8001 IN IP4 10.0.200.18
s=SIP Call
c=IN IP4 0.0.0.0
t=0 0
m=audio 5004 RTP/AVP 0 8 18 9 2 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:9 G722/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendonly
a=ptime:20
2015-04-24 17:12:15.212049 [DEBUG] switch_channel.c:1787 (sofia/internal/
sip:18@10.0.200.18:5060) Callstate Change ACTIVE -> HELD
2015-04-24 17:12:15.212049 [DEBUG] switch_core_session.c:1188 Send signal sofia/internal/
17@192.168.176.6 [BREAK]
2015-04-24 17:12:15.232050 [DEBUG] switch_core_session.c:908 Send signal sofia/internal/
17@192.168.176.6 [BREAK]
2015-04-24 17:12:15.352060 [DEBUG] switch_ivr.c:614 sofia/internal/
17@192.168.176.6 Command Execute playback(/usr/local/freeswitch/sounds/music/output.mp3)
EXECUTE sofia/internal/
17@192.168.176.6 playback(/usr/local/freeswitch/sounds/music/output.mp3)
2015-04-24 17:12:15.352060 [DEBUG] switch_ivr_play_say.c:1314 Codec Activated L16@8000hz 1 channels 20ms
2015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:3615 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:3670 Audio Codec Compare [PCMU:0:8000:20:64000:1] ++++ is saved as a match
2015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:3615 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:3615 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:3615 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:3670 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
2015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:3615 Audio Codec Compare [G729:18:8000:20:8000:1]/[PCMU:0:8000:20:64000:1]
2015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:3615 Audio Codec Compare [G729:18:8000:20:8000:1]/[PCMA:8:8000:20:64000:1]
2015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:3615 Audio Codec Compare [G722:9:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:3615 Audio Codec Compare [G722:9:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:3615 Audio Codec Compare [G726-32:2:8000:20:0:1]/[PCMU:0:8000:20:64000:1]
2015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:3615 Audio Codec Compare [G726-32:2:8000:20:0:1]/[PCMA:8:8000:20:64000:1]
2015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:3531 Set telephone-event payload to 101
2015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:3852 Set 2833 dtmf send payload to 101
2015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:5100 Audio params changed for sofia/internal/
sip:18@10.0.200.18:5060 from
10.0.200.18:5004 to
0.0.0.0:50042015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:5111 AUDIO RTP [sofia/internal/
sip:18@10.0.200.18:5060] 192.168.176.6 port 23704 -> 0.0.0.0 port 5004 codec: 0 ms: 20
2015-04-24 17:12:15.452067 [DEBUG] switch_core_media.c:5140 AUDIO RTP CHANGING DEST TO: [
0.0.0.0:5004]
2015-04-24 17:12:15.452067 [DEBUG] sofia.c:7259 Processing updated SDP
2015-04-24 17:12:15.452067 [DEBUG] switch_core_session.c:1053 Send signal sofia/internal/
sip:18@10.0.200.18:5060 [BREAK]
2015-04-24 17:12:15.472069 [DEBUG] sofia.c:6614 Channel sofia/internal/
sip:18@10.0.200.18:5060 entering state [completed][200]
2015-04-24 17:12:15.472069 [DEBUG] switch_core_session.c:1053 Send signal sofia/internal/
sip:18@10.0.200.18:5060 [BREAK]
2015-04-24 17:12:15.472069 [DEBUG] switch_core_session.c:1053 Send signal sofia/internal/
sip:18@10.0.200.18:5060 [BREAK]
2015-04-24 17:12:15.472069 [DEBUG] switch_core_session.c:1053 Send signal sofia/internal/
sip:18@10.0.200.18:5060 [BREAK]
2015-04-24 17:12:15.492071 [DEBUG] sofia.c:6614 Channel sofia/internal/
sip:18@10.0.200.18:5060 entering state [ready][200]
2015-04-24 17:12:15.492071 [DEBUG] sofia.c:6624 Remote SDP:
v=0
o=18 8000 8000 IN IP4 10.0.200.18
s=SIP Call
c=IN IP4 10.0.200.18
t=0 0
m=audio 5004 RTP/AVP 0 8 101
a=sendrecv
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
2015-04-24 17:12:15.492071 [DEBUG] switch_core_media.c:3615 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2015-04-24 17:12:15.492071 [DEBUG] switch_core_media.c:3670 Audio Codec Compare [PCMU:0:8000:20:64000:1] ++++ is saved as a match
2015-04-24 17:12:15.492071 [DEBUG] switch_core_media.c:3615 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2015-04-24 17:12:15.492071 [DEBUG] switch_core_media.c:3615 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2015-04-24 17:12:15.492071 [DEBUG] switch_core_media.c:3615 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2015-04-24 17:12:15.492071 [DEBUG] switch_core_media.c:3670 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
2015-04-24 17:12:15.492071 [DEBUG] switch_core_media.c:3531 Set telephone-event payload to 101
2015-04-24 17:12:15.492071 [DEBUG] switch_core_media.c:3852 Set 2833 dtmf send payload to 101
2015-04-24 17:12:15.492071 [DEBUG] sofia.c:7318 Processing updated SDP
2015-04-24 17:12:15.492071 [DEBUG] switch_core_media.c:5100 Audio params changed for sofia/internal/
sip:18@10.0.200.18:5060 from
0.0.0.0:5004 to
10.0.200.18:50042015-04-24 17:12:15.492071 [DEBUG] switch_core_media.c:5111 AUDIO RTP [sofia/internal/
sip:18@10.0.200.18:5060] 192.168.176.6 port 23704 -> 10.0.200.18 port 5004 codec: 0 ms: 20
2015-04-24 17:12:15.492071 [DEBUG] switch_core_media.c:5140 AUDIO RTP CHANGING DEST TO: [
10.0.200.18:5004]
2015-04-24 17:12:15.752091 [DEBUG] switch_ivr_play_say.c:1747 done playing file /usr/local/freeswitch/sounds/music/output.mp3
2015-04-24 17:12:15.752091 [DEBUG] switch_core_session.c:908 Send signal sofia/internal/
17@192.168.176.6 [BREAK]
2015-04-24 17:12:15.752091 [DEBUG] switch_ivr_bridge.c:395 Send signal sofia/internal/
sip:18@10.0.200.18:5060 [BREAK]
2015-04-24 17:12:15.752091 [DEBUG] switch_channel.c:1961 (sofia/internal/
sip:18@10.0.200.18:5060) Callstate Change HELD -> UNHELD
2015-04-24 17:12:15.752091 [DEBUG] switch_core_io.c:1026 (sofia/internal/
sip:18@10.0.200.18:5060) Callstate Change UNHELD -> ACTIVE