larynx 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +191 -0
- data/Rakefile +55 -0
- data/bin/larynx +7 -0
- data/examples/guess.rb +39 -0
- data/examples/guess_form.rb +34 -0
- data/examples/multiple_apps.rb +63 -0
- data/lib/larynx/application.rb +24 -0
- data/lib/larynx/call_handler.rb +174 -0
- data/lib/larynx/callbacks.rb +32 -0
- data/lib/larynx/command.rb +73 -0
- data/lib/larynx/commands.rb +88 -0
- data/lib/larynx/fields.rb +143 -0
- data/lib/larynx/form.rb +19 -0
- data/lib/larynx/logger.rb +8 -0
- data/lib/larynx/observable.rb +35 -0
- data/lib/larynx/prompt.rb +88 -0
- data/lib/larynx/response.rb +57 -0
- data/lib/larynx/restartable_timer.rb +26 -0
- data/lib/larynx/session.rb +20 -0
- data/lib/larynx/version.rb +3 -0
- data/lib/larynx.rb +109 -0
- data/spec/fixtures/answer.rb +125 -0
- data/spec/fixtures/channel_data.rb +147 -0
- data/spec/fixtures/dtmf.rb +52 -0
- data/spec/fixtures/execute.rb +52 -0
- data/spec/fixtures/execute_complete.rb +133 -0
- data/spec/fixtures/reply_ok.rb +6 -0
- data/spec/larynx/call_handler_spec.rb +290 -0
- data/spec/larynx/command_spec.rb +76 -0
- data/spec/larynx/eventmachince_spec.rb +14 -0
- data/spec/larynx/fields_spec.rb +194 -0
- data/spec/larynx/prompt_spec.rb +222 -0
- data/spec/larynx_spec.rb +4 -0
- data/spec/spec_helper.rb +47 -0
- metadata +96 -0
@@ -0,0 +1,125 @@
|
|
1
|
+
RESPONSES[:answer] = {
|
2
|
+
:header => [ "Content-Length: 5461", "Content-Type: text/event-plain" ],
|
3
|
+
:content => <<-DATA
|
4
|
+
Event-Name: CHANNEL_ANSWER
|
5
|
+
Core-UUID: 6c700780-3071-11df-b56b-6db4bb905cad
|
6
|
+
FreeSWITCH-Hostname: ubuntu
|
7
|
+
FreeSWITCH-IPv4: 172.16.150.131
|
8
|
+
FreeSWITCH-IPv6: %3A%3A1
|
9
|
+
Event-Date-Local: 2010-03-15%2013%3A33%3A51
|
10
|
+
Event-Date-GMT: Mon,%2015%20Mar%202010%2020%3A33%3A51%20GMT
|
11
|
+
Event-Date-Timestamp: 1268685231210884
|
12
|
+
Event-Calling-File: switch_channel.c
|
13
|
+
Event-Calling-Function: switch_channel_perform_mark_answered
|
14
|
+
Event-Calling-Line-Number: 2275
|
15
|
+
Channel-State: CS_EXECUTE
|
16
|
+
Channel-State-Number: 4
|
17
|
+
Channel-Name: sofia/internal/1000%40172.16.150.131
|
18
|
+
Unique-ID: 10d28adc-3072-11df-b572-6db4bb905cad
|
19
|
+
Call-Direction: inbound
|
20
|
+
Presence-Call-Direction: inbound
|
21
|
+
Channel-Presence-ID: 1000%40172.16.150.131
|
22
|
+
Answer-State: answered
|
23
|
+
Channel-Read-Codec-Name: GSM
|
24
|
+
Channel-Read-Codec-Rate: 8000
|
25
|
+
Channel-Write-Codec-Name: GSM
|
26
|
+
Channel-Write-Codec-Rate: 8000
|
27
|
+
Caller-Username: 1000
|
28
|
+
Caller-Dialplan: XML
|
29
|
+
Caller-Caller-ID-Name: FreeSWITCH
|
30
|
+
Caller-Caller-ID-Number: 1000
|
31
|
+
Caller-Network-Addr: 172.16.150.1
|
32
|
+
Caller-ANI: 1000
|
33
|
+
Caller-Destination-Number: 502
|
34
|
+
Caller-Unique-ID: 10d28adc-3072-11df-b572-6db4bb905cad
|
35
|
+
Caller-Source: mod_sofia
|
36
|
+
Caller-Context: default
|
37
|
+
Caller-Channel-Name: sofia/internal/1000%40172.16.150.131
|
38
|
+
Caller-Profile-Index: 1
|
39
|
+
Caller-Profile-Created-Time: 1268685231100705
|
40
|
+
Caller-Channel-Created-Time: 1268685231100705
|
41
|
+
Caller-Channel-Answered-Time: 1268685231210884
|
42
|
+
Caller-Channel-Progress-Time: 0
|
43
|
+
Caller-Channel-Progress-Media-Time: 0
|
44
|
+
Caller-Channel-Hangup-Time: 0
|
45
|
+
Caller-Channel-Transfer-Time: 0
|
46
|
+
Caller-Screen-Bit: true
|
47
|
+
Caller-Privacy-Hide-Name: false
|
48
|
+
Caller-Privacy-Hide-Number: false
|
49
|
+
variable_uuid: 10d28adc-3072-11df-b572-6db4bb905cad
|
50
|
+
variable_sip_network_ip: 172.16.150.1
|
51
|
+
variable_sip_network_port: 49356
|
52
|
+
variable_sip_received_ip: 172.16.150.1
|
53
|
+
variable_sip_received_port: 49356
|
54
|
+
variable_sip_via_protocol: udp
|
55
|
+
variable_sip_authorized: true
|
56
|
+
variable_sip_number_alias: 1000
|
57
|
+
variable_sip_auth_username: 1000
|
58
|
+
variable_sip_auth_realm: 172.16.150.131
|
59
|
+
variable_number_alias: 1000
|
60
|
+
variable_user_name: 1000
|
61
|
+
variable_domain_name: 172.16.150.131
|
62
|
+
variable_toll_allow: domestic,international,local
|
63
|
+
variable_accountcode: 1000
|
64
|
+
variable_user_context: default
|
65
|
+
variable_effective_caller_id_name: Extension%201000
|
66
|
+
variable_effective_caller_id_number: 1000
|
67
|
+
variable_outbound_caller_id_name: FreeSWITCH
|
68
|
+
variable_outbound_caller_id_number: 0000000000
|
69
|
+
variable_callgroup: techsupport
|
70
|
+
variable_record_stereo: true
|
71
|
+
variable_default_gateway: example.com
|
72
|
+
variable_default_areacode: 918
|
73
|
+
variable_transfer_fallback_extension: operator
|
74
|
+
variable_sip_from_user: 1000
|
75
|
+
variable_sip_from_uri: 1000%40172.16.150.131
|
76
|
+
variable_sip_from_host: 172.16.150.131
|
77
|
+
variable_sip_from_user_stripped: 1000
|
78
|
+
variable_sip_from_tag: xvdctAVPQ7M2GTz894Ag0hwAxyRg6LXG
|
79
|
+
variable_sofia_profile_name: internal
|
80
|
+
variable_sip_full_via: SIP/2.0/UDP%20192.168.1.8%3A49356%3Brport%3D49356%3Bbranch%3Dz9hG4bKPjFv5ZnQfvMYjc67aUDNQiyR.gwUmvlQRh%3Breceived%3D172.16.150.1
|
81
|
+
variable_sip_from_display: FreeSWITCH
|
82
|
+
variable_sip_full_from: %22FreeSWITCH%22%20%3Csip%3A1000%40172.16.150.131%3E%3Btag%3DxvdctAVPQ7M2GTz894Ag0hwAxyRg6LXG
|
83
|
+
variable_sip_full_to: %3Csip%3A502%40172.16.150.131%3E
|
84
|
+
variable_sip_req_user: 502
|
85
|
+
variable_sip_req_uri: 502%40172.16.150.131
|
86
|
+
variable_sip_req_host: 172.16.150.131
|
87
|
+
variable_sip_to_user: 502
|
88
|
+
variable_sip_to_uri: 502%40172.16.150.131
|
89
|
+
variable_sip_to_host: 172.16.150.131
|
90
|
+
variable_sip_contact_user: 1000
|
91
|
+
variable_sip_contact_port: 49356
|
92
|
+
variable_sip_contact_uri: 1000%40192.168.1.8%3A49356
|
93
|
+
variable_sip_contact_host: 192.168.1.8
|
94
|
+
variable_channel_name: sofia/internal/1000%40172.16.150.131
|
95
|
+
variable_sip_call_id: yThniylY3WFVenFCmjsJZuhDvKe5IOc3
|
96
|
+
variable_sip_user_agent: Telephone%200.14.3
|
97
|
+
variable_sip_via_host: 192.168.1.8
|
98
|
+
variable_sip_via_port: 49356
|
99
|
+
variable_sip_via_rport: 49356
|
100
|
+
variable_max_forwards: 70
|
101
|
+
variable_presence_id: 1000%40172.16.150.131
|
102
|
+
variable_switch_r_sdp: v%3D0%0D%0Ao%3D-%203477674031%203477674031%20IN%20IP4%20192.168.1.8%0D%0As%3Dpjmedia%0D%0Ac%3DIN%20IP4%20192.168.1.8%0D%0At%3D0%200%0D%0Aa%3DX-nat%3A0%0D%0Am%3Daudio%204002%20RTP/AVP%20103%20102%20104%20117%203%200%208%209%20101%0D%0Aa%3Drtpmap%3A103%20speex/16000%0D%0Aa%3Drtpmap%3A102%20speex/8000%0D%0Aa%3Drtpmap%3A104%20speex/32000%0D%0Aa%3Drtpmap%3A117%20iLBC/8000%0D%0Aa%3Dfmtp%3A117%20mode%3D30%0D%0Aa%3Drtpmap%3A3%20GSM/8000%0D%0Aa%3Drtpmap%3A0%20PCMU/8000%0D%0Aa%3Drtpmap%3A8%20PCMA/8000%0D%0Aa%3Drtpmap%3A9%20G722/8000%0D%0Aa%3Drtpmap%3A101%20telephone-event/8000%0D%0Aa%3Dfmtp%3A101%200-15%0D%0Aa%3Drtcp%3A4003%20IN%20IP4%20192.168.1.8%0D%0A
|
103
|
+
variable_sip_use_codec_name: GSM
|
104
|
+
variable_sip_use_codec_rate: 8000
|
105
|
+
variable_sip_use_codec_ptime: 20
|
106
|
+
variable_read_codec: GSM
|
107
|
+
variable_read_rate: 8000
|
108
|
+
variable_write_codec: GSM
|
109
|
+
variable_write_rate: 8000
|
110
|
+
variable_endpoint_disposition: RECEIVED
|
111
|
+
variable_open: true
|
112
|
+
variable_tts_engine: cepstral
|
113
|
+
variable_tts_voice: allison
|
114
|
+
variable_socket_host: 172.16.150.1
|
115
|
+
variable_current_application: answer
|
116
|
+
variable_sip_local_sdp_str: v%3D0%0Ao%3DFreeSWITCH%201268660489%201268660490%20IN%20IP4%20172.16.150.131%0As%3DFreeSWITCH%0Ac%3DIN%20IP4%20172.16.150.131%0At%3D0%200%0Am%3Daudio%2024742%20RTP/AVP%203%20101%0Aa%3Drtpmap%3A3%20GSM/8000%0Aa%3Drtpmap%3A101%20telephone-event/8000%0Aa%3Dfmtp%3A101%200-16%0Aa%3DsilenceSupp%3Aoff%20-%20-%20-%20-%0Aa%3Dptime%3A20%0Aa%3Dsendrecv%0A
|
117
|
+
variable_local_media_ip: 172.16.150.131
|
118
|
+
variable_local_media_port: 24742
|
119
|
+
variable_sip_use_pt: 3
|
120
|
+
variable_rtp_use_ssrc: 794051412
|
121
|
+
variable_remote_media_ip: 192.168.1.8
|
122
|
+
variable_remote_media_port: 4002
|
123
|
+
variable_sip_nat_detected: true
|
124
|
+
DATA
|
125
|
+
}
|
@@ -0,0 +1,147 @@
|
|
1
|
+
RESPONSES[:channel_data] = {
|
2
|
+
:header => [
|
3
|
+
"Event-Name: CHANNEL_DATA",
|
4
|
+
"Core-UUID: 6c700780-3071-11df-b56b-6db4bb905cad",
|
5
|
+
"FreeSWITCH-Hostname: ubuntu",
|
6
|
+
"FreeSWITCH-IPv4: 172.16.150.131",
|
7
|
+
"FreeSWITCH-IPv6: %3A%3A1",
|
8
|
+
"Event-Date-Local: 2010-03-15%2013%3A33%3A51",
|
9
|
+
"Event-Date-GMT: Mon,%2015%20Mar%202010%2020%3A33%3A51%20GMT",
|
10
|
+
"Event-Date-Timestamp: 1268685231112882",
|
11
|
+
"Event-Calling-File: mod_event_socket.c",
|
12
|
+
"Event-Calling-Function: parse_command",
|
13
|
+
"Event-Calling-Line-Number: 1763",
|
14
|
+
"Channel-Username: 1000",
|
15
|
+
"Channel-Dialplan: XML",
|
16
|
+
"Channel-Caller-ID-Name: FreeSWITCH",
|
17
|
+
"Channel-Caller-ID-Number: 1000",
|
18
|
+
"Channel-Network-Addr: 172.16.150.1",
|
19
|
+
"Channel-ANI: 1000",
|
20
|
+
"Channel-Destination-Number: 502",
|
21
|
+
"Channel-Unique-ID: 10d28adc-3072-11df-b572-6db4bb905cad",
|
22
|
+
"Channel-Source: mod_sofia",
|
23
|
+
"Channel-Context: default",
|
24
|
+
"Channel-Channel-Name: sofia/internal/1000%40172.16.150.131",
|
25
|
+
"Channel-Profile-Index: 1",
|
26
|
+
"Channel-Profile-Created-Time: 1268685231100705",
|
27
|
+
"Channel-Channel-Created-Time: 1268685231100705",
|
28
|
+
"Channel-Channel-Answered-Time: 0",
|
29
|
+
"Channel-Channel-Progress-Time: 0",
|
30
|
+
"Channel-Channel-Progress-Media-Time: 0",
|
31
|
+
"Channel-Channel-Hangup-Time: 0",
|
32
|
+
"Channel-Channel-Transfer-Time: 0",
|
33
|
+
"Channel-Screen-Bit: true",
|
34
|
+
"Channel-Privacy-Hide-Name: false",
|
35
|
+
"Channel-Privacy-Hide-Number: false",
|
36
|
+
"Channel-State: CS_EXECUTE",
|
37
|
+
"Channel-State-Number: 4",
|
38
|
+
"Channel-Name: sofia/internal/1000%40172.16.150.131",
|
39
|
+
"Unique-ID: 10d28adc-3072-11df-b572-6db4bb905cad",
|
40
|
+
"Call-Direction: inbound",
|
41
|
+
"Presence-Call-Direction: inbound",
|
42
|
+
"Channel-Presence-ID: 1000%40172.16.150.131",
|
43
|
+
"Answer-State: ringing",
|
44
|
+
"Channel-Read-Codec-Name: GSM",
|
45
|
+
"Channel-Read-Codec-Rate: 8000",
|
46
|
+
"Channel-Write-Codec-Name: GSM",
|
47
|
+
"Channel-Write-Codec-Rate: 8000",
|
48
|
+
"Caller-Username: 1000",
|
49
|
+
"Caller-Dialplan: XML",
|
50
|
+
"Caller-Caller-ID-Name: FreeSWITCH",
|
51
|
+
"Caller-Caller-ID-Number: 1000",
|
52
|
+
"Caller-Network-Addr: 172.16.150.1",
|
53
|
+
"Caller-ANI: 1000",
|
54
|
+
"Caller-Destination-Number: 502",
|
55
|
+
"Caller-Unique-ID: 10d28adc-3072-11df-b572-6db4bb905cad",
|
56
|
+
"Caller-Source: mod_sofia",
|
57
|
+
"Caller-Context: default",
|
58
|
+
"Caller-Channel-Name: sofia/internal/1000%40172.16.150.131",
|
59
|
+
"Caller-Profile-Index: 1",
|
60
|
+
"Caller-Profile-Created-Time: 1268685231100705",
|
61
|
+
"Caller-Channel-Created-Time: 1268685231100705",
|
62
|
+
"Caller-Channel-Answered-Time: 0",
|
63
|
+
"Caller-Channel-Progress-Time: 0",
|
64
|
+
"Caller-Channel-Progress-Media-Time: 0",
|
65
|
+
"Caller-Channel-Hangup-Time: 0",
|
66
|
+
"Caller-Channel-Transfer-Time: 0",
|
67
|
+
"Caller-Screen-Bit: true",
|
68
|
+
"Caller-Privacy-Hide-Name: false",
|
69
|
+
"Caller-Privacy-Hide-Number: false",
|
70
|
+
"variable_uuid: 10d28adc-3072-11df-b572-6db4bb905cad",
|
71
|
+
"variable_sip_network_ip: 172.16.150.1",
|
72
|
+
"variable_sip_network_port: 49356",
|
73
|
+
"variable_sip_received_ip: 172.16.150.1",
|
74
|
+
"variable_sip_received_port: 49356",
|
75
|
+
"variable_sip_via_protocol: udp",
|
76
|
+
"variable_sip_authorized: true",
|
77
|
+
"variable_sip_number_alias: 1000",
|
78
|
+
"variable_sip_auth_username: 1000",
|
79
|
+
"variable_sip_auth_realm: 172.16.150.131",
|
80
|
+
"variable_number_alias: 1000",
|
81
|
+
"variable_user_name: 1000",
|
82
|
+
"variable_domain_name: 172.16.150.131",
|
83
|
+
"variable_toll_allow: domestic,international,local",
|
84
|
+
"variable_accountcode: 1000",
|
85
|
+
"variable_user_context: default",
|
86
|
+
"variable_effective_caller_id_name: Extension%201000",
|
87
|
+
"variable_effective_caller_id_number: 1000",
|
88
|
+
"variable_outbound_caller_id_name: FreeSWITCH",
|
89
|
+
"variable_outbound_caller_id_number: 0000000000",
|
90
|
+
"variable_callgroup: techsupport",
|
91
|
+
"variable_record_stereo: true",
|
92
|
+
"variable_default_gateway: example.com",
|
93
|
+
"variable_default_areacode: 918",
|
94
|
+
"variable_transfer_fallback_extension: operator",
|
95
|
+
"variable_sip_from_user: 1000",
|
96
|
+
"variable_sip_from_uri: 1000%40172.16.150.131",
|
97
|
+
"variable_sip_from_host: 172.16.150.131",
|
98
|
+
"variable_sip_from_user_stripped: 1000",
|
99
|
+
"variable_sip_from_tag: xvdctAVPQ7M2GTz894Ag0hwAxyRg6LXG",
|
100
|
+
"variable_sofia_profile_name: internal",
|
101
|
+
"variable_sip_full_via: SIP/2.0/UDP%20192.168.1.8%3A49356%3Brport%3D49356%3Bbranch%3Dz9hG4bKPjFv5ZnQfvMYjc67aUDNQiyR.gwUmvlQRh%3Breceived%3D172.16.150.1",
|
102
|
+
"variable_sip_from_display: FreeSWITCH",
|
103
|
+
"variable_sip_full_from: %22FreeSWITCH%22%20%3Csip%3A1000%40172.16.150.131%3E%3Btag%3DxvdctAVPQ7M2GTz894Ag0hwAxyRg6LXG",
|
104
|
+
"variable_sip_full_to: %3Csip%3A502%40172.16.150.131%3E",
|
105
|
+
"variable_sip_req_user: 502",
|
106
|
+
"variable_sip_req_uri: 502%40172.16.150.131",
|
107
|
+
"variable_sip_req_host: 172.16.150.131",
|
108
|
+
"variable_sip_to_user: 502",
|
109
|
+
"variable_sip_to_uri: 502%40172.16.150.131",
|
110
|
+
"variable_sip_to_host: 172.16.150.131",
|
111
|
+
"variable_sip_contact_user: 1000",
|
112
|
+
"variable_sip_contact_port: 49356",
|
113
|
+
"variable_sip_contact_uri: 1000%40192.168.1.8%3A49356",
|
114
|
+
"variable_sip_contact_host: 192.168.1.8",
|
115
|
+
"variable_channel_name: sofia/internal/1000%40172.16.150.131",
|
116
|
+
"variable_sip_call_id: yThniylY3WFVenFCmjsJZuhDvKe5IOc3",
|
117
|
+
"variable_sip_user_agent: Telephone%200.14.3",
|
118
|
+
"variable_sip_via_host: 192.168.1.8",
|
119
|
+
"variable_sip_via_port: 49356",
|
120
|
+
"variable_sip_via_rport: 49356",
|
121
|
+
"variable_max_forwards: 70",
|
122
|
+
"variable_presence_id: 1000%40172.16.150.131",
|
123
|
+
"variable_sip_nat_detected: true",
|
124
|
+
"variable_switch_r_sdp: v%3D0%0D%0Ao%3D-%203477674031%203477674031%20IN%20IP4%20192.168.1.8%0D%0As%3Dpjmedia%0D%0Ac%3DIN%20IP4%20192.168.1.8%0D%0At%3D0%200%0D%0Aa%3DX-nat%3A0%0D%0Am%3Daudio%204002%20RTP/AVP%20103%20102%20104%20117%203%200%208%209%20101%0D%0Aa%3Drtpmap%3A103%20speex/16000%0D%0Aa%3Drtpmap%3A102%20speex/8000%0D%0Aa%3Drtpmap%3A104%20speex/32000%0D%0Aa%3Drtpmap%3A117%20iLBC/8000%0D%0Aa%3Dfmtp%3A117%20mode%3D30%0D%0Aa%3Drtpmap%3A3%20GSM/8000%0D%0Aa%3Drtpmap%3A0%20PCMU/8000%0D%0Aa%3Drtpmap%3A8%20PCMA/8000%0D%0Aa%3Drtpmap%3A9%20G722/8000%0D%0Aa%3Drtpmap%3A101%20telephone-event/8000%0D%0Aa%3Dfmtp%3A101%200-15%0D%0Aa%3Drtcp%3A4003%20IN%20IP4%20192.168.1.8%0D%0A",
|
125
|
+
"variable_remote_media_ip: 192.168.1.8",
|
126
|
+
"variable_remote_media_port: 4002",
|
127
|
+
"variable_sip_use_codec_name: GSM",
|
128
|
+
"variable_sip_use_codec_rate: 8000",
|
129
|
+
"variable_sip_use_codec_ptime: 20",
|
130
|
+
"variable_read_codec: GSM",
|
131
|
+
"variable_read_rate: 8000",
|
132
|
+
"variable_write_codec: GSM",
|
133
|
+
"variable_write_rate: 8000",
|
134
|
+
"variable_endpoint_disposition: RECEIVED",
|
135
|
+
"variable_open: true",
|
136
|
+
"variable_tts_engine: cepstral",
|
137
|
+
"variable_tts_voice: allison",
|
138
|
+
"variable_current_application_data: 172.16.150.1%3A8084%20async%20full",
|
139
|
+
"variable_current_application: socket",
|
140
|
+
"variable_socket_host: 172.16.150.1",
|
141
|
+
"Content-Type: command/reply",
|
142
|
+
"Reply-Text: %2BOK%0A",
|
143
|
+
"Socket-Mode: async",
|
144
|
+
"Control: full",
|
145
|
+
],
|
146
|
+
:content => nil
|
147
|
+
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
RESPONSES[:dtmf] = {
|
2
|
+
:header => [ "Content-Length: 1576", "Content-Type: text/event-plain" ],
|
3
|
+
:content => <<-DATA
|
4
|
+
Event-Name: DTMF
|
5
|
+
Core-UUID: 6c700780-3071-11df-b56b-6db4bb905cad
|
6
|
+
FreeSWITCH-Hostname: ubuntu
|
7
|
+
FreeSWITCH-IPv4: 172.16.150.131
|
8
|
+
FreeSWITCH-IPv6: %3A%3A1
|
9
|
+
Event-Date-Local: 2010-03-15%2016%3A56%3A45
|
10
|
+
Event-Date-GMT: Mon,%2015%20Mar%202010%2023%3A56%3A45%20GMT
|
11
|
+
Event-Date-Timestamp: 1268697405660619
|
12
|
+
Event-Calling-File: switch_channel.c
|
13
|
+
Event-Calling-Function: switch_channel_dequeue_dtmf
|
14
|
+
Event-Calling-Line-Number: 399
|
15
|
+
Channel-State: CS_EXECUTE
|
16
|
+
Channel-State-Number: 4
|
17
|
+
Channel-Name: sofia/internal/1000%40172.16.150.131
|
18
|
+
Unique-ID: 65255882-308e-11df-b59d-6db4bb905cad
|
19
|
+
Call-Direction: inbound
|
20
|
+
Presence-Call-Direction: inbound
|
21
|
+
Channel-Presence-ID: 1000%40172.16.150.131
|
22
|
+
Answer-State: answered
|
23
|
+
Channel-Read-Codec-Name: GSM
|
24
|
+
Channel-Read-Codec-Rate: 8000
|
25
|
+
Channel-Write-Codec-Name: GSM
|
26
|
+
Channel-Write-Codec-Rate: 8000
|
27
|
+
Caller-Username: 1000
|
28
|
+
Caller-Dialplan: XML
|
29
|
+
Caller-Caller-ID-Name: FreeSWITCH
|
30
|
+
Caller-Caller-ID-Number: 1000
|
31
|
+
Caller-Network-Addr: 172.16.150.1
|
32
|
+
Caller-ANI: 1000
|
33
|
+
Caller-Destination-Number: 502
|
34
|
+
Caller-Unique-ID: 65255882-308e-11df-b59d-6db4bb905cad
|
35
|
+
Caller-Source: mod_sofia
|
36
|
+
Caller-Context: default
|
37
|
+
Caller-Channel-Name: sofia/internal/1000%40172.16.150.131
|
38
|
+
Caller-Profile-Index: 1
|
39
|
+
Caller-Profile-Created-Time: 1268697398481019
|
40
|
+
Caller-Channel-Created-Time: 1268697398481019
|
41
|
+
Caller-Channel-Answered-Time: 1268697398550787
|
42
|
+
Caller-Channel-Progress-Time: 0
|
43
|
+
Caller-Channel-Progress-Media-Time: 0
|
44
|
+
Caller-Channel-Hangup-Time: 0
|
45
|
+
Caller-Channel-Transfer-Time: 0
|
46
|
+
Caller-Screen-Bit: true
|
47
|
+
Caller-Privacy-Hide-Name: false
|
48
|
+
Caller-Privacy-Hide-Number: false
|
49
|
+
DTMF-Digit: 1
|
50
|
+
DTMF-Duration: 1600
|
51
|
+
DATA
|
52
|
+
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
RESPONSES[:execute] = {
|
2
|
+
:header => [ "Content-Length: 1630", "Content-Type: text/event-plain" ],
|
3
|
+
:content => <<-DATA
|
4
|
+
Event-Name: CHANNEL_EXECUTE
|
5
|
+
Core-UUID: 0be3fbde-2cba-11df-94af-1b000cb72781
|
6
|
+
FreeSWITCH-Hostname: ubuntu
|
7
|
+
FreeSWITCH-IPv4: 172.16.150.131
|
8
|
+
FreeSWITCH-IPv6: %3A%3A1
|
9
|
+
Event-Date-Local: 2010-03-11%2008%3A12%3A05
|
10
|
+
Event-Date-GMT: Thu,%2011%20Mar%202010%2016%3A12%3A05%20GMT
|
11
|
+
Event-Date-Timestamp: 1268323925328573
|
12
|
+
Event-Calling-File: switch_core_session.c
|
13
|
+
Event-Calling-Function: switch_core_session_exec
|
14
|
+
Event-Calling-Line-Number: 1803
|
15
|
+
Channel-State: CS_EXECUTE
|
16
|
+
Channel-State-Number: 4
|
17
|
+
Channel-Name: sofia/internal/1000%40172.16.150.131
|
18
|
+
Unique-ID: 2cf9f510-2db1-11df-95b7-1b000cb72781
|
19
|
+
Call-Direction: inbound
|
20
|
+
Presence-Call-Direction: inbound
|
21
|
+
Channel-Presence-ID: 1000%40172.16.150.131
|
22
|
+
Answer-State: answered
|
23
|
+
Channel-Read-Codec-Name: GSM
|
24
|
+
Channel-Read-Codec-Rate: 8000
|
25
|
+
Channel-Write-Codec-Name: GSM
|
26
|
+
Channel-Write-Codec-Rate: 8000
|
27
|
+
Caller-Username: 1000
|
28
|
+
Caller-Dialplan: XML
|
29
|
+
Caller-Caller-ID-Name: FreeSWITCH
|
30
|
+
Caller-Caller-ID-Number: 1000
|
31
|
+
Caller-Network-Addr: 172.16.150.1
|
32
|
+
Caller-ANI: 1000
|
33
|
+
Caller-Destination-Number: 502
|
34
|
+
Caller-Unique-ID: 2cf9f510-2db1-11df-95b7-1b000cb72781
|
35
|
+
Caller-Source: mod_sofia
|
36
|
+
Caller-Context: default
|
37
|
+
Caller-Channel-Name: sofia/internal/1000%40172.16.150.131
|
38
|
+
Caller-Profile-Index: 1
|
39
|
+
Caller-Profile-Created-Time: 1268323925227630
|
40
|
+
Caller-Channel-Created-Time: 1268323925227630
|
41
|
+
Caller-Channel-Answered-Time: 1268323925298055
|
42
|
+
Caller-Channel-Progress-Time: 0
|
43
|
+
Caller-Channel-Progress-Media-Time: 0
|
44
|
+
Caller-Channel-Hangup-Time: 0
|
45
|
+
Caller-Channel-Transfer-Time: 0
|
46
|
+
Caller-Screen-Bit: true
|
47
|
+
Caller-Privacy-Hide-Name: false
|
48
|
+
Caller-Privacy-Hide-Number: false
|
49
|
+
Application: speak
|
50
|
+
Application-Data: Hello%20world
|
51
|
+
DATA
|
52
|
+
}
|
@@ -0,0 +1,133 @@
|
|
1
|
+
RESPONSES[:execute_complete] = {
|
2
|
+
:header => [ "Content-Length: 5793", "Content-Type: text/event-plain" ],
|
3
|
+
:content => <<-DATA
|
4
|
+
Event-Name: CHANNEL_EXECUTE_COMPLETE
|
5
|
+
Core-UUID: 0a3bd7a4-2a47-11df-8f89-ddea2631ab78
|
6
|
+
FreeSWITCH-Hostname: ubuntu
|
7
|
+
FreeSWITCH-IPv4: 172.16.150.131
|
8
|
+
FreeSWITCH-IPv6: %3A%3A1
|
9
|
+
Event-Date-Local: 2010-03-07%2016%3A39%3A02
|
10
|
+
Event-Date-GMT: Mon,%2008%20Mar%202010%2000%3A39%3A02%20GMT
|
11
|
+
Event-Date-Timestamp: 1268008742244659
|
12
|
+
Event-Calling-File: switch_core_session.c
|
13
|
+
Event-Calling-Function: switch_core_session_exec
|
14
|
+
Event-Calling-Line-Number: 1824
|
15
|
+
Channel-State: CS_EXECUTE
|
16
|
+
Channel-State-Number: 4
|
17
|
+
Channel-Name: sofia/internal/1000%40172.16.150.131
|
18
|
+
Unique-ID: f81a3fbc-2a4a-11df-8f9d-ddea2631ab78
|
19
|
+
Call-Direction: inbound
|
20
|
+
Presence-Call-Direction: inbound
|
21
|
+
Channel-Presence-ID: 1000%40172.16.150.131
|
22
|
+
Answer-State: answered
|
23
|
+
Channel-Read-Codec-Name: GSM
|
24
|
+
Channel-Read-Codec-Rate: 8000
|
25
|
+
Channel-Write-Codec-Name: GSM
|
26
|
+
Channel-Write-Codec-Rate: 8000
|
27
|
+
Caller-Username: 1000
|
28
|
+
Caller-Dialplan: XML
|
29
|
+
Caller-Caller-ID-Name: FreeSWITCH
|
30
|
+
Caller-Caller-ID-Number: 1000
|
31
|
+
Caller-Network-Addr: 172.16.150.1
|
32
|
+
Caller-ANI: 1000
|
33
|
+
Caller-Destination-Number: 502
|
34
|
+
Caller-Unique-ID: f81a3fbc-2a4a-11df-8f9d-ddea2631ab78
|
35
|
+
Caller-Source: mod_sofia
|
36
|
+
Caller-Context: default
|
37
|
+
Caller-Channel-Name: sofia/internal/1000%40172.16.150.131
|
38
|
+
Caller-Profile-Index: 1
|
39
|
+
Caller-Profile-Created-Time: 1268008732274835
|
40
|
+
Caller-Channel-Created-Time: 1268008732274835
|
41
|
+
Caller-Channel-Answered-Time: 1268008732325458
|
42
|
+
Caller-Channel-Progress-Time: 0
|
43
|
+
Caller-Channel-Progress-Media-Time: 0
|
44
|
+
Caller-Channel-Hangup-Time: 0
|
45
|
+
Caller-Channel-Transfer-Time: 0
|
46
|
+
Caller-Screen-Bit: true
|
47
|
+
Caller-Privacy-Hide-Name: false
|
48
|
+
Caller-Privacy-Hide-Number: false
|
49
|
+
variable_uuid: f81a3fbc-2a4a-11df-8f9d-ddea2631ab78
|
50
|
+
variable_sip_network_ip: 172.16.150.1
|
51
|
+
variable_sip_network_port: 61230
|
52
|
+
variable_sip_received_ip: 172.16.150.1
|
53
|
+
variable_sip_received_port: 61230
|
54
|
+
variable_sip_via_protocol: udp
|
55
|
+
variable_sip_authorized: true
|
56
|
+
variable_sip_number_alias: 1000
|
57
|
+
variable_sip_auth_username: 1000
|
58
|
+
variable_sip_auth_realm: 172.16.150.131
|
59
|
+
variable_number_alias: 1000
|
60
|
+
variable_user_name: 1000
|
61
|
+
variable_domain_name: 172.16.150.131
|
62
|
+
variable_toll_allow: domestic,international,local
|
63
|
+
variable_accountcode: 1000
|
64
|
+
variable_user_context: default
|
65
|
+
variable_effective_caller_id_name: Extension%201000
|
66
|
+
variable_effective_caller_id_number: 1000
|
67
|
+
variable_outbound_caller_id_name: FreeSWITCH
|
68
|
+
variable_outbound_caller_id_number: 0000000000
|
69
|
+
variable_callgroup: techsupport
|
70
|
+
variable_record_stereo: true
|
71
|
+
variable_default_gateway: example.com
|
72
|
+
variable_default_areacode: 918
|
73
|
+
variable_transfer_fallback_extension: operator
|
74
|
+
variable_sip_from_user: 1000
|
75
|
+
variable_sip_from_uri: 1000%40172.16.150.131
|
76
|
+
variable_sip_from_host: 172.16.150.131
|
77
|
+
variable_sip_from_user_stripped: 1000
|
78
|
+
variable_sofia_profile_name: internal
|
79
|
+
variable_sip_full_via: SIP/2.0/UDP%20192.168.20.2%3A61230%3Brport%3D61230%3Bbranch%3Dz9hG4bKPjywNOvUq.sdNaFl0hFfl2j92kst3ChkRT%3Breceived%3D172.16.150.1
|
80
|
+
variable_sip_req_user: 502
|
81
|
+
variable_sip_req_uri: 502%40172.16.150.131
|
82
|
+
variable_sip_req_host: 172.16.150.131
|
83
|
+
variable_sip_to_user: 502
|
84
|
+
variable_sip_to_uri: 502%40172.16.150.131
|
85
|
+
variable_sip_to_host: 172.16.150.131
|
86
|
+
variable_sip_contact_user: 1000
|
87
|
+
variable_sip_contact_port: 61230
|
88
|
+
variable_sip_contact_uri: 1000%40192.168.20.2%3A61230
|
89
|
+
variable_sip_contact_host: 192.168.20.2
|
90
|
+
variable_channel_name: sofia/internal/1000%40172.16.150.131
|
91
|
+
variable_sip_user_agent: Telephone%200.14.3
|
92
|
+
variable_sip_via_host: 192.168.20.2
|
93
|
+
variable_sip_via_port: 61230
|
94
|
+
variable_sip_via_rport: 61230
|
95
|
+
variable_max_forwards: 70
|
96
|
+
variable_presence_id: 1000%40172.16.150.131
|
97
|
+
variable_switch_r_sdp: v%3D0%0D%0Ao%3D-%203476997537%203476997537%20IN%20IP4%20192.168.20.2%0D%0As%3Dpjmedia%0D%0Ac%3DIN%20IP4%20192.168.20.2%0D%0At%3D0%200%0D%0Aa%3DX-nat%3A0%0D%0Am%3Daudio%204010%20RTP/AVP%20103%20102%20104%20117%203%200%208%209%20101%0D%0Aa%3Drtpmap%3A103%20speex/16000%0D%0Aa%3Drtpmap%3A102%20speex/8000%0D%0Aa%3Drtpmap%3A104%20speex/32000%0D%0Aa%3Drtpmap%3A117%20iLBC/8000%0D%0Aa%3Dfmtp%3A117%20mode%3D30%0D%0Aa%3Drtpmap%3A3%20GSM/8000%0D%0Aa%3Drtpmap%3A0%20PCMU/8000%0D%0Aa%3Drtpmap%3A8%20PCMA/8000%0D%0Aa%3Drtpmap%3A9%20G722/8000%0D%0Aa%3Drtpmap%3A101%20telephone-event/8000%0D%0Aa%3Dfmtp%3A101%200-15%0D%0Aa%3Drtcp%3A4011%20IN%20IP4%20192.168.20.2%0D%0A
|
98
|
+
variable_sip_use_codec_name: GSM
|
99
|
+
variable_sip_use_codec_rate: 8000
|
100
|
+
variable_sip_use_codec_ptime: 20
|
101
|
+
variable_read_codec: GSM
|
102
|
+
variable_read_rate: 8000
|
103
|
+
variable_write_codec: GSM
|
104
|
+
variable_write_rate: 8000
|
105
|
+
variable_tts_engine: cepstral
|
106
|
+
variable_tts_voice: allison
|
107
|
+
variable_socket_host: 172.16.150.1
|
108
|
+
variable_sip_local_sdp_str: v%3D0%0Ao%3DFreeSWITCH%201267985798%201267985799%20IN%20IP4%20172.16.150.131%0As%3DFreeSWITCH%0Ac%3DIN%20IP4%20172.16.150.131%0At%3D0%200%0Am%3Daudio%2022934%20RTP/AVP%203%20101%0Aa%3Drtpmap%3A3%20GSM/8000%0Aa%3Drtpmap%3A101%20telephone-event/8000%0Aa%3Dfmtp%3A101%200-16%0Aa%3DsilenceSupp%3Aoff%20-%20-%20-%20-%0Aa%3Dptime%3A20%0Aa%3Dsendrecv%0A
|
109
|
+
variable_local_media_ip: 172.16.150.131
|
110
|
+
variable_local_media_port: 22934
|
111
|
+
variable_sip_use_pt: 3
|
112
|
+
variable_rtp_use_ssrc: 2898819412
|
113
|
+
variable_sip_nat_detected: true
|
114
|
+
variable_endpoint_disposition: ANSWER
|
115
|
+
variable_sip_to_tag: gDK3D6pXtFm3e
|
116
|
+
variable_sip_from_tag: elWUmu5et-auCRPijiEAiLkCgci1M67D
|
117
|
+
variable_sip_cseq: 14587
|
118
|
+
variable_sip_call_id: bjGKd9gAHJVCxd1uVy9knG.iFWn-n2h4
|
119
|
+
variable_sip_from_display: FreeSWITCH
|
120
|
+
variable_sip_full_from: %22FreeSWITCH%22%20%3Csip%3A1000%40172.16.150.131%3E%3Btag%3DelWUmu5et-auCRPijiEAiLkCgci1M67D
|
121
|
+
variable_sip_full_to: %3Csip%3A502%40172.16.150.131%3E%3Btag%3DgDK3D6pXtFm3e
|
122
|
+
variable_remote_media_ip_reported: 192.168.20.2
|
123
|
+
variable_remote_media_ip: 172.16.150.1
|
124
|
+
variable_remote_media_port_reported: 4010
|
125
|
+
variable_remote_media_port: 4010
|
126
|
+
variable_rtp_auto_adjust: true
|
127
|
+
variable_current_application_data: Hello%20world
|
128
|
+
variable_current_application: speak
|
129
|
+
Application: speak
|
130
|
+
Application-Data: Hello%20world
|
131
|
+
Application-Response: _none_
|
132
|
+
DATA
|
133
|
+
}
|