debugs from pri
q921.c:782 q921_reset: q921_state now is Q921_LINK_CONNECTION_RELEASED
q921.c:733 q921_dchannel_up: q921_state now is Q921_LINK_CONNECTION_ESTABLISHED
q921.c:782 q921_reset: q921_state now is Q921_LINK_CONNECTION_RELEASED
Sending Set Asynchronous Balanced Mode Extended
q921.c:211 q921_send_sabme: q921_state now is Q921_AWAITING_ESTABLISH
-- Got UA from network peer Link up.
q921.c:782 q921_reset: q921_state now is Q921_LINK_CONNECTION_RELEASED
q921.c:733 q921_dchannel_up: q921_state now is Q921_LINK_CONNECTION_ESTABLISHED
== Primary D-Channel on span 1 up
-- Executing [9123@from-internal:1] Macro("SIP/1518-b7c02190", "user-callerid|SKIPTTL|") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/1518-b7c02190", "AMPUSER=1518") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("SIP/1518-b7c02190", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("SIP/1518-b7c02190", "1|Set|REALCALLERIDNUM=1518") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/1518-b7c02190", "AMPUSER=1518") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/1518-b7c02190", "AMPUSERCIDNAME=Stuart Clarkson") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/1518-b7c02190", "0?report") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/1518-b7c02190", "AMPUSERCID=1518") in new stack
-- Executing [s@macro-user-callerid:8] Set("SIP/1518-b7c02190", "CALLERID(all)="Stuart Clarkson" <1518>") in new stack
-- Executing [s@macro-user-callerid:9] Set("SIP/1518-b7c02190", "REALCALLERIDNUM=1518") in new stack
-- Executing [s@macro-user-callerid:10] ExecIf("SIP/1518-b7c02190", "0|Set|CHANNEL(language)=") in new stack
-- Executing [s@macro-user-callerid:11] GotoIf("SIP/1518-b7c02190", "1?continue") in new stack
-- Goto (macro-user-callerid,s,20)
-- Executing [s@macro-user-callerid:20] NoOp("SIP/1518-b7c02190", "Using CallerID "Stuart Clarkson" <1518>") in new stack
-- Executing [9123@from-internal:2] Set("SIP/1518-b7c02190", "_NODEST=") in new stack
-- Executing [9123@from-internal:3] Macro("SIP/1518-b7c02190", "record-enable|1518|OUT|") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("SIP/1518-b7c02190", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] AGI("SIP/1518-b7c02190", "recordingcheck|20091117-181736|1258481856.0") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20091117-181736|1258481856.0: Outbound recording not enabled
-- AGI Script recordingcheck completed, returning 0
-- Executing [s@macro-record-enable:5] MacroExit("SIP/1518-b7c02190", "") in new stack
-- Executing [9123@from-internal:4] Macro("SIP/1518-b7c02190", "dialout-trunk|1|123|") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("SIP/1518-b7c02190", "DIAL_TRUNK=1") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/1518-b7c02190", "0?sub-pincheck|s|1") in new stack
-- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/1518-b7c02190", "0?disabletrunk|1") in new stack
-- Executing [s@macro-dialout-trunk:4] Set("SIP/1518-b7c02190", "DIAL_NUMBER=123") in new stack
-- Executing [s@macro-dialout-trunk:5] Set("SIP/1518-b7c02190", "DIAL_TRUNK_OPTIONS=tr") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("SIP/1518-b7c02190", "OUTBOUND_GROUP=OUT_1") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/1518-b7c02190", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,9)
-- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/1518-b7c02190", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:10] Set("SIP/1518-b7c02190", "DIAL_TRUNK_OPTIONS=") in new stack
-- Executing [s@macro-dialout-trunk:11] Macro("SIP/1518-b7c02190", "outbound-callerid|1") in new stack
-- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/1518-b7c02190", "0|SetCallerPres|") in new stack
-- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/1518-b7c02190", "0|Set|REALCALLERIDNUM=1518") in new stack
-- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/1518-b7c02190", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,6)
-- Executing [s@macro-outbound-callerid:6] Set("SIP/1518-b7c02190", "USEROUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("SIP/1518-b7c02190", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("SIP/1518-b7c02190", "TRUNKOUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/1518-b7c02190", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,12)
-- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/1518-b7c02190", "0|Set|CALLERID(all)=") in new stack
-- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/1518-b7c02190", "0|Set|CALLERID(all)=") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/1518-b7c02190", "0|SetCallerPres|prohib_passed_screen") in new stack
-- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/1518-b7c02190", "0|AGI|fixlocalprefix") in new stack
-- Executing [s@macro-dialout-trunk:13] Set("SIP/1518-b7c02190", "OUTNUM=123") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("SIP/1518-b7c02190", "custom=ZAP/g0") in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/1518-b7c02190", "0|Set|DIAL_TRUNK_OPTIONS=M(setmusic^)") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("SIP/1518-b7c02190", "dialout-trunk-predial-hook|") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/1518-b7c02190", "") in new stack
-- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/1518-b7c02190", "0?bypass|1") in new stack
-- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/1518-b7c02190", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:19] Dial("SIP/1518-b7c02190", "ZAP/g0/123|300|") in new stack
-- Making new call for cr 32770
-- Requested transfer capability: 0x00 - SPEECH
> Protocol Discriminator: Q.931 (
len=29
> Call Ref: len= 2 (reference 2/0x2) (Originator)
> Message type: SETUP (5)
> [04 03 80 90 a3]
> Bearer Capability (len= 5) [ Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)
> Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
> User information layer 1: A-Law (35)
> [18 03 a9 83 83]
> Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
> ChanSel: As indicated in following octets
> Ext: 1 Coding: 0 Number Specified Channel Type: 3
> Ext: 1 Channel: 3 ]
> [6c 06 00 81 31 35 31 38]
> Calling Number (len=
[ Ext: 0 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0)
> Presentation: Presentation permitted, user number passed network screening (1) '1518' ]
> [70 04 80 31 32 33]
> Called Number (len= 6) [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) '123' ]
q931.c:3092 q931_setup: call 32770 on channel 3 enters state 1 (Call Initiated)
-- Called g0/123
< Protocol Discriminator: Q.931 (
len=10
< Call Ref: len= 2 (reference 2/0x2) (Terminator)
< Message type: CALL PROCEEDING (2)
< [18 03 a9 83 83]
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
< ChanSel: As indicated in following octets
< Ext: 1 Coding: 0 Number Specified Channel Type: 3
< Ext: 1 Channel: 3 ]
-- Processing IE 24 (cs0, Channel Identification)
q931.c:3641 q931_receive: call 32770 on channel 3 enters state 3 (Outgoing call Proceeding)
-- Zap/3-1 is proceeding passing it to SIP/1518-b7c02190
< Protocol Discriminator: Q.931 (
len=5
< Call Ref: len= 2 (reference 2/0x2) (Terminator)
< Message type: ALERTING (1)
q931.c:3554 q931_receive: call 32770 on channel 3 enters state 4 (Call Delivered)
-- Zap/3-1 is ringing
< Protocol Discriminator: Q.931 (
len=5
< Call Ref: len= 2 (reference 2/0x2) (Terminator)
< Message type: CONNECT (7)
q931.c:3584 q931_receive: call 32770 on channel 3 enters state 10 (Active)
> Protocol Discriminator: Q.931 (
len=5
> Call Ref: len= 2 (reference 2/0x2) (Originator)
> Message type: CONNECT ACKNOWLEDGE (15)
-- Zap/3-1 answered SIP/1518-b7c02190
> Protocol Discriminator: Q.931 (
len=13
> Call Ref: len= 2 (reference 0/0x0) (Originator)
> Message type: RESTART (70)
> [18 03 a9 83 84]
> Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
> ChanSel: As indicated in following octets
> Ext: 1 Coding: 0 Number Specified Channel Type: 3
> Ext: 1 Channel: 4 ]
> [79 01 80]
> Restart Indentifier (len= 3) [ Ext: 1 Spare: 0 Resetting Indicated Channel (0) ]
< Protocol Discriminator: Q.931 (
len=13
< Call Ref: len= 2 (reference 0/0x0) (Terminator)
< Message type: RESTART ACKNOWLEDGE (78)
< [18 03 a9 83 84]
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
< ChanSel: As indicated in following octets
< Ext: 1 Coding: 0 Number Specified Channel Type: 3
< Ext: 1 Channel: 4 ]
< [79 01 80]
< Restart Indentifier (len= 3) [ Ext: 1 Spare: 0 Resetting Indicated Channel (0) ]
-- Processing IE 24 (cs0, Channel Identification)
-- Processing IE 121 (cs0, Restart Indicator)
q931.c:3808 q931_receive: call 32768 on channel 4 enters state 0 (Null)
-- B-channel 0/4 successfully restarted on span 1
q931.c:2964 q931_restart: call 32768 on channel 5 enters state 62 (Restart)
> Protocol Discriminator: Q.931 (
len=13
> Call Ref: len= 2 (reference 0/0x0) (Originator)
> Message type: RESTART (70)
> [18 03 a9 83 85]
> Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
> ChanSel: As indicated in following octets
> Ext: 1 Coding: 0 Number Specified Channel Type: 3
> Ext: 1 Channel: 5 ]
> [79 01 80]
> Restart Indentifier (len= 3) [ Ext: 1 Spare: 0 Resetting Indicated Channel (0) ]
< Protocol Discriminator: Q.931 (
len=13
< Call Ref: len= 2 (reference 0/0x0) (Terminator)
< Message type: RESTART ACKNOWLEDGE (78)
< [18 03 a9 83 85]
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
< ChanSel: As indicated in following octets
< Ext: 1 Coding: 0 Number Specified Channel Type: 3
< Ext: 1 Channel: 5 ]
< [79 01 80]
< Restart Indentifier (len= 3) [ Ext: 1 Spare: 0 Resetting Indicated Channel (0) ]
-- Processing IE 24 (cs0, Channel Identification)
-- Processing IE 121 (cs0, Restart Indicator)
q931.c:3808 q931_receive: call 32768 on channel 5 enters state 0 (Null)
-- B-channel 0/5 successfully restarted on span 1
q931.c:2964 q931_restart: call 32768 on channel 6 enters state 62 (Restart)
> Protocol Discriminator: Q.931 (
len=13
> Call Ref: len= 2 (reference 0/0x0) (Originator)
> Message type: RESTART (70)
> [18 03 a9 83 86]
> Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
> ChanSel: As indicated in following octets
> Ext: 1 Coding: 0 Number Specified Channel Type: 3
> Ext: 1 Channel: 6 ]
> [79 01 80]
> Restart Indentifier (len= 3) [ Ext: 1 Spare: 0 Resetting Indicated Channel (0) ]
< Protocol Discriminator: Q.931 (
len=13
< Call Ref: len= 2 (reference 0/0x0) (Terminator)
< Message type: RESTART ACKNOWLEDGE (78)
< [18 03 a9 83 86]
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
< ChanSel: As indicated in following octets
< Ext: 1 Coding: 0 Number Specified Channel Type: 3
< Ext: 1 Channel: 6 ]
< [79 01 80]
< Restart Indentifier (len= 3) [ Ext: 1 Spare: 0 Resetting Indicated Channel (0) ]
-- Processing IE 24 (cs0, Channel Identification)
-- Processing IE 121 (cs0, Restart Indicator)
q931.c:3808 q931_receive: call 32768 on channel 6 enters state 0 (Null)
-- B-channel 0/6 successfully restarted on span 1
q931.c:2964 q931_restart: call 32768 on channel 7 enters state 62 (Restart)
> Protocol Discriminator: Q.931 (
len=13
> Call Ref: len= 2 (reference 0/0x0) (Originator)
> Message type: RESTART (70)
> [18 03 a9 83 87]
> Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
> ChanSel: As indicated in following octets
> Ext: 1 Coding: 0 Number Specified Channel Type: 3
> Ext: 1 Channel: 7 ]
> [79 01 80]
> Restart Indentifier (len= 3) [ Ext: 1 Spare: 0 Resetting Indicated Channel (0) ]
< Protocol Discriminator: Q.931 (
len=13
< Call Ref: len= 2 (reference 0/0x0) (Terminator)
< Message type: RESTART ACKNOWLEDGE (78)
< [18 03 a9 83 87]
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
< ChanSel: As indicated in following octets
< Ext: 1 Coding: 0 Number Specified Channel Type: 3
< Ext: 1 Channel: 7 ]
< [79 01 80]
< Restart Indentifier (len= 3) [ Ext: 1 Spare: 0 Resetting Indicated Channel (0) ]
-- Processing IE 24 (cs0, Channel Identification)
-- Processing IE 121 (cs0, Restart Indicator)
q931.c:3808 q931_receive: call 32768 on channel 7 enters state 0 (Null)
-- B-channel 0/7 successfully restarted on span 1
q931.c:2964 q931_restart: call 32768 on channel 8 enters state 62 (Restart)
> Protocol Discriminator: Q.931 (
len=13
> Call Ref: len= 2 (reference 0/0x0) (Originator)
> Message type: RESTART (70)
> [18 03 a9 83 88]
> Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
> ChanSel: As indicated in following octets
> Ext: 1 Coding: 0 Number Specified Channel Type: 3
> Ext: 1 Channel: 8 ]
> [79 01 80]
> Restart Indentifier (len= 3) [ Ext: 1 Spare: 0 Resetting Indicated Channel (0) ]
< Protocol Discriminator: Q.931 (
len=13
< Call Ref: len= 2 (reference 0/0x0) (Terminator)
< Message type: RESTART ACKNOWLEDGE (78)
< [18 03 a9 83 88]
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
< ChanSel: As indicated in following octets
< Ext: 1 Coding: 0 Number Specified Channel Type: 3
< Ext: 1 Channel: 8 ]
< [79 01 80]
< Restart Indentifier (len= 3) [ Ext: 1 Spare: 0 Resetting Indicated Channel (0) ]
-- Processing IE 24 (cs0, Channel Identification)
-- Processing IE 121 (cs0, Restart Indicator)
q931.c:3808 q931_receive: call 32768 on channel 8 enters state 0 (Null)
-- B-channel 0/8 successfully restarted on span 1
q931.c:2964 q931_restart: call 32768 on channel 11 enters state 62 (Restart)
> Protocol Discriminator: Q.931 (
len=13
> Call Ref: len= 2 (reference 0/0x0) (Originator)
> Message type: RESTART (70)
> [18 03 a9 83 8b]
> Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
> ChanSel: As indicated in following octets
> Ext: 1 Coding: 0 Number Specified Channel Type: 3
> Ext: 1 Channel: 11 ]
> [79 01 80]
> Restart Indentifier (len= 3) [ Ext: 1 Spare: 0 Resetting Indicated Channel (0) ]
< Protocol Discriminator: Q.931 (
len=12
< Call Ref: len= 2 (reference 0/0x0) (Terminator)
< Message type: STATUS (125)
< [08 02 82 d2]
< Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Public network serving the local user (2)
< Ext: 1 Cause: Identified channel does not exist (82), class = Invalid message (e.g. parameter out of range) (5) ]
< [14 01 00]
< Call State (len= 3) [ Ext: 0 Coding: CCITT (ITU) standard (0) Call state: Null (0)
-- Processing IE 8 (cs0, Cause)
-- Processing IE 20 (cs0, Call State)
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Active, peerstate Connect Request
q931.c:2973 q931_disconnect: call 32770 on channel 3 enters state 11 (Disconnect Request)
> Protocol Discriminator: Q.931 (
len=9
> Call Ref: len= 2 (reference 2/0x2) (Originator)
> Message type: DISCONNECT (69)
> [08 02 81 90]
> Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Private network serving the local user (1)
> Ext: 1 Cause: Normal Clearing (16), class = Normal Event (1) ]
NEW_HANGUP DEBUG: Destroying the call, ourstate Disconnect Request, peerstate Disconnect Indication
-- Hungup 'Zap/3-1'
== Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on 'SIP/1518-b7c02190' in macro 'dialout-trunk'
== Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on 'SIP/1518-b7c02190'
-- Executing [h@macro-dialout-trunk:1] Macro("SIP/1518-b7c02190", "hangupcall|") in new stack
-- Executing [s@macro-hangupcall:1] ResetCDR("SIP/1518-b7c02190", "vw") in new stack
q921.c:782 q921_reset: q921_state now is Q921_LINK_CONNECTION_RELEASED
Sending Set Asynchronous Balanced Mode Extended
q921.c:211 q921_send_sabme: q921_state now is Q921_AWAITING_ESTABLISH
-- Executing [s@macro-hangupcall:2] NoCDR("SIP/1518-b7c02190", "") in new stack
-- Executing [s@macro-hangupcall:3] GotoIf("SIP/1518-b7c02190", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,6)
-- Executing [s@macro-hangupcall:6] GotoIf("SIP/1518-b7c02190", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] GotoIf("SIP/1518-b7c02190", "1?theend") in new stack
-- Goto (macro-hangupcall,s,11)
-- Executing [s@macro-hangupcall:11] Hangup("SIP/1518-b7c02190", "") in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/1518-b7c02190' in macro 'hangupcall'
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/1518-b7c02190'
Sending Set Asynchronous Balanced Mode Extended
-- Got UA from network peer Link up.
q921.c:782 q921_reset: q921_state now is Q921_LINK_CONNECTION_RELEASED
q921.c:733 q921_dchannel_up: q921_state now is Q921_LINK_CONNECTION_ESTABLISHED
== Primary D-Channel on span 1 up
-- Got SABME from network peer.
Sending Unnumbered Acknowledgement
q921.c:782 q921_reset: q921_state now is Q921_LINK_CONNECTION_RELEASED
q921.c:733 q921_dchannel_up: q921_state now is Q921_LINK_CONNECTION_ESTABLISHED
< Protocol Discriminator: Q.931 (
len=5
< Call Ref: len= 2 (reference 2/0x2) (Terminator)
< Message type: STATUS ENQUIRY (117)
-- Making new call for cr 32770
> Protocol Discriminator: Q.931 (
len=9
> Call Ref: len= 2 (reference 2/0x2) (Originator)
> Message type: RELEASE COMPLETE (90)
> [08 02 81 d1]
> Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Private network serving the local user (1)
> Ext: 1 Cause: Invalid call reference value (81), class = Invalid message (e.g. parameter out of range) (5) ]
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Null
NEW_HANGUP DEBUG: Destroying the call, ourstate Null, peerstate Null