I am trying this approach to see who picked the line: Here is what i am doing:
EXEC DIAL SIP/ vaso &Zap/35||M(testing^30086) Macro: [macro-testing] exten => s,1,DumpChan() exten => s,2,AGI(whopicked.rb) exten => s,3,Hangup() >From console: -- SIP/ vaso -e26c answered Zap/14-1 -- Executing DumpChan("SIP/ vaso -e26c", "") in new stack -- Executing DumpChan("SIP/vaso-e26c", "") in new stack Dumping Info For Channel: SIP/vaso-e26c: ============================================================================ ==== Info: Name= SIP/vaso-e26c Type= SIP UniqueID= 1280487752.1809 CallerID= 8221 CallerIDName= (N/A) DNIDDigits= (N/A) State= Up (6) Rings= 0 NativeFormat= 2 WriteFormat= 4 ReadFormat= 4 1stFileDescriptor= 74 Framesin= 3 Framesout= 0 TimetoHangup= 0 ElapsedTime= 0h0m0s Context= macro-testing Extension= s Priority= 1 CallGroup= PickupGroup= Application= DumpChan Data= (Empty) Blocking_in= (Not Blocking) Variables: MACRO_DEPTH=1> ARG1=30086 MACRO_PRIORITY=1 MACRO_CONTEXT=siptest ============================================================================ ==== -- Executing AGI("SIP/vaso-e26c", "whopicked.rb") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/whopicked.rb AGI Tx >> agi_request: whopicked.rb AGI Tx >> agi_channel: SIP/vaso-e26c AGI Tx >> agi_language: en AGI Tx >> agi_type: SIP AGI Tx >> agi_uniqueid: 1280487752.1809 AGI Tx >> agi_callerid: 8221 AGI Tx >> agi_calleridname: unknown AGI Tx >> agi_callingpres: 3 AGI Tx >> agi_callingani2: 0 AGI Tx >> agi_callington: 33 AGI Tx >> agi_callingtns: 0 AGI Tx >> agi_dnid: unknown AGI Tx >> agi_rdnis: unknown AGI Tx >> agi_context: macro-testing AGI Tx >> agi_extension: s AGI Tx >> agi_priority: 2 AGI Tx >> agi_enhanced: 0.0 AGI Tx >> agi_accountcode: AGI Tx >> -- AGI Script whopicked.rb completed, returning 0 -- Executing Hangup("SIP/vaso-e26c", "") in new stack I need simple whopicked.agi (instead of .rb) which will simply take the value 30086 (that I pass to macro) And do this: UPDATE call_log SET local = 'CHANNEL' WHERE id = '30086' Where channel is agi_channel: SIP/vaso-e26c This should be simple - no ruby - just agi.
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users