[Freeswitch-users] Question about execute_on_answer
Helmut Kuper
helmut.kuper at ewetel.de
Mon Sep 13 10:19:26 PDT 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I have a xml dialplan which arms a session with execute_on_answer "lua
on_answer.lua"
on_anwer.lua is this:
direction = session:getVariable("Call-Direction")
uuid = session:get_uuid()
session:execute("log", "NOTICE INSERT "..direction..", "..uuid.."\n")
session:execute("info")
When a call is answered the script is executed, but direction is empty.
Top of info is this:
2010-09-13 19:09:23.583688 [INFO] mod_dptools.c:1003 CHANNEL_DATA:
Channel-State: [CS_EXECUTE]
Channel-Call-State: [ACTIVE]
Channel-State-Number: [4]
Unique-ID: [40e982cd-052c-4718-9567-7d64a937ba12]
Call-Direction: [inbound]
Presence-Call-Direction: [inbound]
Channel-Presence-ID: [2850 at 85.16.246.6]
Channel-Call-UUID: [40e982cd-052c-4718-9567-7d64a937ba12]
Answer-State: [answered]
Channel-Read-Codec-Name: [G722]
Channel-Read-Codec-Rate: [16000]
Channel-Write-Codec-Name: [G722]
Channel-Write-Codec-Rate: [16000]
Caller-Direction: [inbound]
Caller-Username: [2850]
Caller-Dialplan: [XML]
Caller-Caller-ID-Name: []
Caller-Caller-ID-Number: [2850]
Caller-ANI: [2850]
Caller-Destination-Number: [4919]
Caller-Unique-ID: [40e982cd-052c-4718-9567-7d64a937ba12]
Caller-Source: [mod_sofia]
Caller-Context: [et_internal_error]
Caller-RDNIS: [4919]
Caller-Profile-Index: [2]
Caller-Profile-Created-Time: [1284397763581765]
Caller-Channel-Created-Time: [1284397711332733]
Caller-Channel-Answered-Time: [1284397713461801]
Caller-Channel-Progress-Time: [1284397711963763]
Caller-Channel-Progress-Media-Time: [1284397713461801]
Caller-Channel-Hangup-Time: [0]
Caller-Channel-Transfer-Time: [0]
variable_direction: [inbound]
When I try to get "direction:" (last in info) the I got a value. So are
not all variables listed in info are readable in execute_on_answer script?
regards
helmut
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
iD8DBQFMjl0d4tZeNddg3dwRArjBAJ99nO1xHcIciCt2OGhE8Qi4iFHglwCeOtxG
vIpIFn2l1A6bsnXa9jWmzBE=
=V/E6
-----END PGP SIGNATURE-----
More information about the FreeSWITCH-users
mailing list