[Freeswitch-users] Monitoring On-Hold/Off-Hold

mayamatakeshi mayamatakeshi at gmail.com
Thu Aug 6 00:03:06 PDT 2009


2009/8/6 João Mesquita <jmesquita at gmail.com>:
> I only see one way out of this. If you manage presence, an event like the
> following is sent:
>
> Event-Name: PRESENCE_IN
> Core-UUID: 189b12c0-7fb0-11de-b0bc-37eec03ad00f
> FreeSWITCH-Hostname: cl-t146-421cl
> FreeSWITCH-IPv4: XXXXXX
> FreeSWITCH-IPv6: %3A%3A1
> Event-Date-Local: 2009-08-05%2013%3A42%3A24
> Event-Date-GMT: Wed,%2005%20Aug%202009%2017%3A42%3A24%20GMT
> Event-Date-Timestamp: 1249494144628132
> Event-Calling-File: switch_channel.c
> Event-Calling-Function: switch_channel_presence
> Event-Calling-Line-Number: 472
> Channel-State: CS_HIBERNATE
> Channel-State-Number: 8
> Channel-Name: XXXXX
> Unique-ID: 4e73668e-81e7-11de-b0bc-37eec03ad00f
> Call-Direction: inbound
> Presence-Call-Direction: inbound
> Answer-State: answered
> Caller-Username: 1000
> Caller-Dialplan: XML
> Caller-Caller-ID-Name: Mesquita
> Caller-Caller-ID-Number: 1000
> Caller-Network-Addr: XXXXX
> Caller-Destination-Number: 1005
> Caller-Unique-ID: 4e73668e-81e7-11de-b0bc-37eec03ad00f
> Caller-Source: mod_sofia
> Caller-Context: XXXXX
> Caller-Channel-Name: XXXXX
> Caller-Profile-Index: 1
> Caller-Profile-Created-Time: 1249494132128119
> Caller-Channel-Created-Time: 1249494132128119
> Caller-Channel-Answered-Time: 1249494139500129
> Caller-Channel-Progress-Time: 1249494132368119
> Caller-Channel-Progress-Media-Time: 0
> Caller-Channel-Hangup-Time: 0
> Caller-Channel-Transfer-Time: 0
> Caller-Screen-Bit: true
> Caller-Privacy-Hide-Name: false
> Caller-Privacy-Hide-Number: false
> Other-Leg-Username: 1000
> Other-Leg-Dialplan: XML
> Other-Leg-Caller-ID-Name: Joao%20Mesquita
> Other-Leg-Caller-ID-Number: 1000
> Other-Leg-Network-Addr: 190.2.41.65
> Other-Leg-Destination-Number:
> sip%3A1005%40192.168.0.106%3A4559%3Bfs_nat%3Dyes%3Bfs_path%3Dsip%253A1005%2540190.2.41.65%253A4559
> Other-Leg-Unique-ID: 4e7622ac-81e7-11de-b0bc-37eec03ad00f
> Other-Leg-Source: mod_sofia
> Other-Leg-Context: XXXXX
> Other-Leg-Channel-Name: XXXXXX
> Other-Leg-Screen-Bit: true
> Other-Leg-Privacy-Hide-Name: false
> Other-Leg-Privacy-Hide-Number: false
> proto: src/switch_channel.c
> login: src/switch_channel.c
> from: XXXXXX
> rpid: unknown
> status: hold
> event_type: presence
> alt_event_type: dialog
> event_count: 3
>
> Content-Length: 543
> Content-Type: text/event-plain
>
> Other than that, I think it can be patched. I will take a look at it.

Thanks, that would be the best.

Just in case someone else needs this:
I have also tried to watch for
CHANNEL_EXECUTE/CHANNEL_EXECUTE_COMPLETE with Application set to
playback and some indication of MOH in the Application-Data header.
That would work but:
- they will be fired continuously if you set hold_music=some_file
- they will not be fired if you set hold_music=silence (of course)




More information about the FreeSWITCH-users mailing list