Thank you for your time Anthony. On a similar subject i am working on an ESL application and one of the options i am providing is for the playback application to loop, using the standard "loops" argument. My problem is that the loop count and max loops counter are not provided in the event which means my event handler moves on after one play request.
Is there anything i can do with FreeSWITCH to either lock the execution until all repeats have completed or to add the loop count values to the variables section? Would this be worth pursuing or is the general rule that developers should add this state information outside of FreeSWITCH (i.e. DB etc)? (I'd love to have a go at putting this in to the C source but would probably need some guidance)
[Event-Name] => CHANNEL_EXECUTE_COMPLETE
[Core-UUID] => 8426a146-8ede-4f5f-8dbc-8676fd1e499d
[FreeSWITCH-Hostname] => xon-fram-fs1
[FreeSWITCH-Switchname] => xon-fram-fs1
[FreeSWITCH-IPv4] => 193.104.89.37
[FreeSWITCH-IPv6] => ::1
[Event-Date-Local] => 2013-12-17 15:10:27
[Event-Date-GMT] => Tue, 17 Dec 2013 15:10:27 GMT
[Event-Date-Timestamp] => 1387293027029137
[Event-Calling-File] => switch_core_session.c
[Event-Calling-Function] => switch_core_session_exec
[Event-Calling-Line-Number] => 2786
[Event-Sequence] => 419095
[Channel-State] => CS_EXECUTE
[Channel-Call-State] => EARLY
[Channel-State-Number] => 4
[Unique-ID] => 252b3b39-bbf0-47ca-8ced-8ba9a3d05d5a
[Call-Direction] => inbound
[Presence-Call-Direction] => inbound
[Channel-HIT-Dialplan] => true
[Channel-Call-UUID] => 252b3b39-bbf0-47ca-8ced-8ba9a3d05d5a
[Answer-State] => early
[Channel-Read-Codec-Name] => PCMU
[Channel-Read-Codec-Rate] => 8000
[Channel-Read-Codec-Bit-Rate] => 64000
[Channel-Write-Codec-Name] => PCMU
[Channel-Write-Codec-Rate] => 8000
[Channel-Write-Codec-Bit-Rate] => 64000
[Caller-Direction] => inbound
[Caller-Username] => 3333320116
[Caller-Dialplan] => XML
[Caller-Caller-ID-Name] => Callum Guy
[Caller-Caller-ID-Number] => 3333320116
[Caller-Orig-Caller-ID-Name] => Callum Guy
[Caller-Orig-Caller-ID-Number] => 3333320116
[Caller-Network-Addr] => 193.104.89.45
[Caller-ANI] => 3333320116
[Caller-Destination-Number] => 7516
[Caller-Unique-ID] => 252b3b39-bbf0-47ca-8ced-8ba9a3d05d5a
[Caller-Source] => mod_sofia
[Caller-Context] => public
[Caller-Profile-Index] => 1
[Caller-Profile-Created-Time] => 1387292981649127
[Caller-Channel-Created-Time] => 1387292981649127
[Caller-Channel-Answered-Time] => 0
[Caller-Channel-Progress-Time] => 0
[Caller-Channel-Progress-Media-Time] => 1387292981779131
[Caller-Channel-Hangup-Time] => 0
[Caller-Channel-Transfer-Time] => 0
[Caller-Channel-Resurrect-Time] => 0
[Caller-Channel-Bridged-Time] => 0
[Caller-Channel-Last-Hold] => 0
[Caller-Channel-Hold-Accum] => 0
[Caller-Screen-Bit] => true
[Caller-Privacy-Hide-Name] => false
[Caller-Privacy-Hide-Number] => false
[variable_direction] => inbound
[variable_uuid] => 252b3b39-bbf0-47ca-8ced-8ba9a3d05d5a
[variable_session_id] => 236
[variable_sip_from_user] => 3333320116
[variable_sip_local_network_addr] => 193.104.89.37
[variable_sip_network_ip] => 193.104.89.45
[variable_sip_network_port] => 5060
[variable_sip_received_ip] => 193.104.89.45
[variable_sip_received_port] => 5060
[variable_sip_via_protocol] => udp
[variable_sip_authorized] => true
[variable_sip_acl_authed_by] => localnet.auto
[variable_sip_from_user_stripped] => 3333320116
[variable_sip_from_tag] => 1c24cb4bc2ab09d7o0
[variable_sofia_profile_name] => internal
[variable_recovery_profile_name] => internal
[variable_sip_invite_record_route] => <sip:193.104.89.45:5060;nat=yes;ftag=1c24cb4bc2ab09d7o0;lr=on;iclid2=200010006;oclid2=3333320116;did=85c.9a61dae1;vsf=AAAAAAEDAwMCAgABB3Y4VUIBHRoZXk0MAm0->
[variable_sip_full_via] => SIP/2.0/UDP 193.104.89.45;branch=z9hG4bK72b3.99485a8.0,SIP/2.0/UDP 192.168.5.195:5060;rport=39028;received=193.104.89.10;branch=z9hG4bK-57f95bc0
[variable_sip_from_display] => Callum Guy
[variable_sip_req_user] => 7516
[variable_sip_req_host] => 193.104.89.37
[variable_sip_to_user] => 8516
[variable_sip_contact_user] => 200010006
[variable_sip_contact_port] => 39028
[variable_sip_contact_host] => 193.104.89.10
[variable_sip_user_agent] => Linksys/SPA941-5.1.8
[variable_sip_via_host] => 193.104.89.45
[variable_max_forwards] => 69
[variable_switch_r_sdp] => v=0
o=- 406233639 406233639 IN IP4 192.168.5.195
s=-
c=IN IP4 193.104.89.46
t=0 0
m=audio 60514 RTP/AVP 0 2 4 8 18 96 97 98 101
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:4 G723/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729a/8000
a=rtpmap:96 G726-40/8000
a=rtpmap:97 G726-24/8000
a=rtpmap:98 G726-16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
[variable_ep_codec_string] => PCMU@8000h@30i@64000b,PCMA@8000h@30i@64000b
[variable_DP_MATCH] => ARRAY::a=rtpmap:101 telephone-event/8000|:101
[variable_call_uuid] => 252b3b39-bbf0-47ca-8ced-8ba9a3d05d5a
[variable_outside_call] => true
[variable_RFC2822_DATE] => Tue, 17 Dec 2013 15:09:41 +0000
[variable_export_vars] => RFC2822_DATE
[variable_rtp_payload_number] => 101
[variable_socket_host] => 192.168.4.44
[variable_rtp_use_codec_string] => G722,PCMU,PCMA,GSM
[variable_sip_audio_recv_pt] => 0
[variable_sip_use_codec_name] => PCMU
[variable_sip_use_codec_rate] => 8000
[variable_sip_use_codec_ptime] => 30
[variable_read_codec] => PCMU
[variable_read_rate] => 8000
[variable_write_codec] => PCMU
[variable_write_rate] => 8000
[variable_local_media_ip] => 193.104.89.37
[variable_local_media_port] => 30076
[variable_advertised_media_ip] => 193.104.89.37
[variable_sip_use_pt] => 0
[variable_rtp_use_ssrc] => 4004598365
[variable_sip_2833_send_payload] => 101
[variable_sip_2833_recv_payload] => 101
[variable_remote_media_ip] => 193.104.89.46
[variable_remote_media_port] => 60514
[variable_endpoint_disposition] => EARLY MEDIA
[variable_sip_local_sdp_str] => v=0
o=FreeSWITCH 1387262905 1387262906 IN IP4 193.104.89.37
s=FreeSWITCH
c=IN IP4 193.104.89.37
t=0 0
m=audio 30076 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:30
a=sendrecv
[variable_sound_prefix] => /usr/share/sounds/en/us/callie
[variable_read_result] => success
[variable_playback_terminators] => none
[variable_current_application_data] => /usr/share/sounds/CancelOutro.wav
[variable_current_application] => playback
[variable_playback_seconds] => 13
[variable_playback_ms] => 13158
[variable_playback_samples] => 105270
[variable_current_application_response] => FILE PLAYED
[Application] => playback
[Application-Data] => /usr/share/sounds/CancelOutro.wav
[Application-Response] => FILE PLAYED
[Application-UUID] => 83b9a666-b161-4df4-ac72-b2a47d07a2ca