Here is the output from the pbx when we make an outbound call:
-- Executing [300xxxxxxxxxx@extension-outbound:1] Set("SIP/306.extension-b7a61778", "CALLERID(all)="Tech Support" <xxxxxxxxxx>") in new stack
-- Executing [300xxxxxxxxxx@extension-outbound:2] Set("SIP/306.extension-b7a61778", "OUTCODE=pch300") in new stack
-- Executing [300xxxxxxxxxx@extension-outbound:3] AGI("SIP/306.extension-b7a61778", "outCheckTimeRemaining.agi|pch300") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/outCheckTimeRemaining.agi
outCheckTimeRemaining.agi|pch300: I have checked for billable minutes in the DB: pch300 Billable: 0 Mins:
[Jul 14 13:41:08] ERROR[28572]: utils.c:966 ast_carefulwrite: write() returned error: Broken pipe
-- AGI Script outCheckTimeRemaining.agi completed, returning 0
-- Executing [300xxxxxxxxxx@extension-outbound:4] GotoIf("SIP/306.extension-b7a61778", "0?:6") in new stack
-- Goto (extension-outbound,300xxxxxxxxxx,6)
-- Executing [300xxxxxxxxxx@extension-outbound:6] Set("SIP/306.extension-b7a61778", "MY_AGENT=1010") in new stack
-- Executing [300xxxxxxxxxx@extension-outbound:7] Set("SIP/306.extension-b7a61778", "QDIALER_QUEUE=1010") in new stack
-- Executing [300xxxxxxxxxx@extension-outbound:8] Set("SIP/306.extension-b7a61778", "QDIALER_NUMBER=xxxxxxxxxx") in new stack
-- Executing [300xxxxxxxxxx@extension-outbound:9] Set("SIP/306.extension-b7a61778", "QDIALER_AGENT=SIP/306") in new stack
-- Executing [300xxxxxxxxxx@extension-outbound:10] Set("SIP/306.extension-b7a61778", "QDIALER_CHANNEL=SIP/306.extension-b7a61778") in new stack
-- Executing [300xxxxxxxxxx@extension-outbound:11] Set("SIP/306.extension-b7a61778", "QueueName=1010") in new stack
-- Executing [300xxxxxxxxxx@extension-outbound:12] NoOp("SIP/306.extension-b7a61778", "Outbound call -> A:1010 N:xxxxxxxxxx Q:1010 Ch:SIP/306.extension-b7a61778") in new stack
-- Executing [300xxxxxxxxxx@extension-outbound:13] Set("SIP/306.extension-b7a61778", "CDR(accountcode)=QDIALAGI") in new stack
-- Executing [300xxxxxxxxxx@extension-outbound:14] Set("SIP/306.extension-b7a61778", "ST=1310665268") in new stack
-- Executing [300xxxxxxxxxx@extension-outbound:15] Set("SIP/306.extension-b7a61778", "GM=QDV-SIP/306") in new stack
-- Executing [300xxxxxxxxxx@extension-outbound:16] Set("SIP/306.extension-b7a61778", "GLOBAL(QDV-SIP/306)=U") in new stack
== Setting global variable 'QDV-SIP/306' to 'U'
-- Executing [300xxxxxxxxxx@extension-outbound:17] Set("SIP/306.extension-b7a61778", "GLOBAL(QDV-SIP/306ans)=0") in new stack
== Setting global variable 'QDV-SIP/306ans' to '0'
-- Executing [300xxxxxxxxxx@extension-outbound:18] Macro("SIP/306.extension-b7a61778", "queuelog|1310665268|1310665267.168661|1010|SIP/306|ENTERQUEUE|-|xxxxxxxxxx") in new stack
-- Executing [s@macro-queuelog:1] QueueLog("SIP/306.extension-b7a61778", "1010|1310665267.168661|SIP/306|ENTERQUEUE|-|xxxxxxxxxx|") in new stack
-- Executing [300xxxxxxxxxx@extension-outbound:19] AGI("SIP/306.extension-b7a61778", "set-agent-outbound.agi|SIP/306.extension-b7a61778||300xxxxxxxxxx|"Tech Support" <3134817100>") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/set-agent-outbound.agi
-- Remote UNIX connection
-- Remote UNIX connection disconnected
-- AGI Script set-agent-outbound.agi completed, returning 0
-- Executing [300xxxxxxxxxx@extension-outbound:30] AGI("SIP/306.extension-b7a61778", "call_logger.php.agi|outstart|1310665269|1310665269|Outbound|xxxxxxxxxx|Remote Caller|pchxxxxxxxxxx|SIP/306.extension-b7a61778|300xxxxxxxxxx|NULL") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/call_logger.php.agi
-- AGI Script call_logger.php.agi completed, returning 0
-- Executing [300xxxxxxxxxx@extension-outbound:31] AGI("SIP/306.extension-b7a61778", "log-call.agi|outboundstart|1310665269|xxxxxxxxxx|pch300") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/log-call.agi
agent-log.agi|wrapupin||1|1310665239|: I have written the agent login to the DB:
[Jul 14 13:41:09] ERROR[28412]: utils.c:966 ast_carefulwrite: write() returned error: Broken pipe
-- AGI Script agent-log.agi completed, returning 0
-- Executing [h@callrouter:11] StopMonitor("SIP/enum03-b7a35ea0", "") in new stack
-- AGI Script log-call.agi completed, returning 0
-- Executing [300xxxxxxxxxx@extension-outbound:32] AGI("SIP/306.extension-b7a61778", "pending-calls.agi|out|SIP/306.extension-b7a61778|1310665267.168661|xxxxxxxxxx|1310665270|xxxxxxxxxx|pch300") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/pending-calls.agi
pending-calls.agi|out|SIP/306.extension-b7a61778|1310665267.168661|xxxxxxxxxx|1310665270|xxxxxxxxxx|pch300: SQL: INSERT INTO `pending_calls` (`status`, `queue`, `code`, `cid`, `details`,`unique_id`,`pickuptime`) VALUES(4,Outbound,pch300,xxxxxxxxxx,SIP/306.extension-b7a61778,1310665267.168661,1310665270)
[Jul 14 13:41:10] ERROR[28572]: utils.c:966 ast_carefulwrite: write() returned error: Broken pipe
-- AGI Script pending-calls.agi completed, returning 0
-- Executing [300xxxxxxxxxx@extension-outbound:33] Set("SIP/306.extension-b7a61778", "MONFILENAME=/var/spool/asterisk/monitor/extension/20110714/224110-3134817100-xxxxxxxxxx-pch300") in new stack
-- Executing [300xxxxxxxxxx@extension-outbound:34] Monitor("SIP/306.extension-b7a61778", "wav|/var/spool/asterisk/monitor/extension/20110714/224110-3134817100-xxxxxxxxxx-pch300|m") in new stack
-- Executing [300xxxxxxxxxx@extension-outbound:35] Dial("SIP/306.extension-b7a61778", "SIP/1xxxxxxxxxx@xxx.xxx.xxx.xxx:5060|300") in new stack
-- Called 1xxxxxxxxxx@xxx.xxx.xxx.xxx:5060
-- Executing [h@callrouter:14] GotoIf("SIP/enum03-b7a35ea0", "1?250") in new stack
-- Goto (callrouter,h,250)
-- Executing [h@callrouter:250] Playback("SIP/enum03-b7a35ea0", "rating_howto") in new stack
[Jul 14 13:41:12] WARNING[28412]: file.c:741 ast_readaudio_callback: Failed to write frame
-- <SIP/enum03-b7a35ea0> Playing 'rating_howto' (language 'en')
[Jul 14 13:41:12] WARNING[28412]: app_playback.c:439 playback_exec: ast_streamfile failed on SIP/enum03-b7a35ea0 for rating_howto
-- Executing [h@callrouter:251] Read("SIP/enum03-b7a35ea0", "RATING||1|||4") in new stack
-- Accepting a maximum of 1 digits.
-- User disconnected
== Spawn extension (callrouter, h, 251) exited non-zero on 'SIP/enum03-b7a35ea0'
-- SIP/xxx.xxx.xxx.xxx:5060-090d3980 is making progress passing it to SIP/306.extension-b7a61778
-- SIP/xxx.xxx.xxx.xxx:5060-090d3980 is making progress passing it to SIP/306.extension-b7a61778
-- SIP/xxx.xxx.xxx.xxx:5060-090d3980 answered SIP/306.extension-b7a61778