state is not a variable.
I added a session:getState() for you to trunk but I am not sure why you need it.
I'm having trouble getting the channel variable state in my Lua ivr example.I have tried bothsession:getVariable("state")session:getVariable("Channel-State")session:getVariable("answer_state")session:getVariable("Answer-State")but lua reports nil for all attemptsI did a uuid_dump and it appears normal....and both Channel-State and Answer-State Variables are present...does anyone know why my Lua IVR can not get these channel variables? Thanks--mattuuid_dump:Event-Name: CHANNEL_DATACore-UUID: ed5556a8-060f-4ce4-85bb-0a70b08120cfFreeSWITCH-Hostname: matthew-laptopFreeSWITCH-IPv4: 192.168.2.2FreeSWITCH-IPv6: %3A%3A1Event-Date-Local: 2009-09-19%2012%3A47%3A20Event-Date-GMT: Sat,%2019%20Sep%202009%2012%3A47%3A20%20GMTEvent-Date-Timestamp: 1253364440904749Event-Calling-File: mod_commands.cEvent-Calling-Function: uuid_dump_functionEvent-Calling-Line-Number: 3298Channel-State: CS_EXECUTEChannel-State-Number: 4Channel-Name: sofia/internal/1001Unique-ID: 12ee98af-d76d-483c-b9a9-59e7f08ca4e9Call-Direction: outboundPresence-Call-Direction: outboundAnswer-State: answeredChannel-Read-Codec-Name: PCMUChannel-Read-Codec-Rate: 8000Channel-Write-Codec-Name: PCMUChannel-Write-Codec-Rate: 8000Caller-Caller-ID-Name: FreeSWITCHCaller-Caller-ID-Number: 0000000000Caller-Network-Addr: 192.168.2.4Caller-Destination-Number: 1001Caller-Unique-ID: 12ee98af-d76d-483c-b9a9-59e7f08ca4e9Caller-Source: src/switch_ivr_originate.cCaller-Context: defaultCaller-Channel-Name: sofia/internal/1001Caller-Profile-Index: 1Caller-Profile-Created-Time: 1253364439936068Caller-Channel-Created-Time: 1253364439936068Caller-Channel-Answered-Time: 1253364440900612Caller-Channel-Progress-Time: 1253364439976071Caller-Channel-Progress-Media-Time: 0Caller-Channel-Hangup-Time: 0Caller-Channel-Transfer-Time: 0Caller-Screen-Bit: trueCaller-Privacy-Hide-Name: falseCaller-Privacy-Hide-Number: falsevariable_channel_name: sofia/internal/1001variable_sip_local_url: 1001%40192.168.2.2variable_sip_destination_url: %22user%22%20%3Csip%3A1001%40192.168.2.4%3A5061%3Bfs_nat%3Dyes%3Bfs_path%3Dsip%253A1001%2540192.168.2.4%253A5061%3Evariable_is_outbound: truevariable_ignore_early_media: truevariable_originate_early_media: falsevariable_sip_nat_detected: truevariable_sofia_profile_name: internalvariable_sip_call_id: 690ad846-1fbd-122d-1599-0010c6ceb785variable_sip_reply_host: 192.168.2.4variable_sip_reply_port: 5061variable_sip_user_agent: Linksys/PAP2T-5.1.6(LS)variable_switch_r_sdp: v%3D0%0D%0Ao%3D-%201231630%201231630%20IN%20IP4%20192.168.2.4%0D%0As%3D-%0D%0Ac%3DIN%20IP4%20192.168.2.4%0D%0At%3D0%200%0D%0Am%3Daudio%2016406%20RTP/AVP%200%20100%20101%0D%0Aa%3Drtpmap%3A0%20PCMU/8000%0D%0Aa%3Drtpmap%3A100%20NSE/8000%0D%0Aa%3Dfmtp%3A100%20192-193%0D%0Aa%3Drtpmap%3A101%20telephone-event/8000%0D%0Aa%3Dfmtp%3A101%200-15%0D%0Aa%3Dptime%3A20%0D%0Avariable_remote_media_ip: 192.168.2.4variable_remote_media_port: 16406variable_read_codec: PCMUvariable_read_rate: 8000variable_write_codec: PCMUvariable_write_rate: 8000variable_local_media_ip: 192.168.2.2variable_local_media_port: 20442variable_endpoint_disposition: ANSWERvariable_current_application_data: api_epik_pocket.luavariable_current_application: lua
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org