Zaptel Redirect and Reload problem

Hello

We just bought a couple of TE220 PCI Express with EC and we instaled it on test systems, and we found some problems regarding Zap channels. We use Asterisk 1.4.13 and Zaptel 1.4.6.

First of all when making incoming call and this call gets Hangup it works just fine until i do a reload. Than calls dont get hangup on Zap side. Please look at the next post for the hangup log. Unloadin and loading module fixes the problem, but I dont have any zap or pri command in CLI. And in some cases the incoming calls report number busy.

[macro-trunk-busy]
exten => s,1,Playtones(busy)
exten => s,n,Busy()
exten => h,1,Macro(hangupcall)

Second thing is getting a redirected number in incoming call. In pri debug I can see that redirected number is recived (some time later after SIP dial) in two formats:

DisplayIE:

< Protocol Discriminator: Q.931 (8) len=18
< Call Ref: len= 2 (reference 24/0x18) (Originator)
< Message type: INFORMATION (123)
< [28 0b 43 54 20 33 30 36 30 30 36 31 38]
< Display (len=11) [ CT 30600618 ]
– Processing IE 40 (cs0, Display)
Sending Receiver Ready (86)

And as Redirection number:

< Protocol Discriminator: Q.931 (8) len=21
< Call Ref: len= 2 (reference 24/0x18) (Originator)
< Message type: FACILITY (98)
< [27 01 80]
< Notification indicator (len= 3): Ext: 1 User suspended (0)
< [76 0b 01 80 30 33 30 36 30 30 36 31 38]
< IE: Redirection Number (len = 13)
– Processing IE 39 (cs0, Notification Indicator)
– Processing IE 118 (cs0, Redirection Number)
Sending Receiver Ready (87)

You can allso look at the third post for redirect number log. Is there anything avaliable that I would recive this number and updated callerid or is it possible to send this message in SIP Header using Display message? Or mybe you have some other idea?

Thank you for your help.

HANGUP LOG

[code]-- ACKing all packets from 22 to (but not including) 23
– Since there was nothing left, stopping T200 counter
– Stopping T203 counter since we got an ACK
– Nothing left, starting T203 counter
– Got RR response to our frame
– Restarting T203 counter
[Nov 22 13:16:46] WARNING[323]: chan_sip.c:12543 handle_response: Remote host can’t match request NOTIFY to call ‘4e24f7164a53d6023466fd4a41811019@10.241.224.66’. Giving up.
– Got SIP response 603 “Decline” back from 10.241.226.33
– SIP/428-082dd080 is busy
[Nov 22 13:16:46] NOTICE[893]: cdr.c:434 ast_cdr_free: CDR on channel ‘SIP/428-082dd080’ not posted
== Everyone is busy/congested at this time (1:1/0/0)
[Nov 22 13:16:46] DEBUG[893]: db.c:197 ast_db_get: Unable to find key ‘80404040’ in family ‘CCBS’
– AGI Script agi://127.0.0.1/?dialparties&extensions=428 completed, returning 0
[Nov 22 13:16:46] DEBUG[893]: app_macro.c:337 _macro_exec: Executed application: agi
– Executing [s@macro-dial-extension-dialparties:3] Macro(“Zap/2-1”, “DialStatusHandler|1”) in new stack
– Executing [s@macro-DialStatusHandler:1] NoOp(“Zap/2-1”, “DialStatusHandler start…”) in new stack
[Nov 22 13:16:46] DEBUG[893]: app_macro.c:337 _macro_exec: Executed application: Noop
– Executing [s@macro-DialStatusHandler:2] NoOp(“Zap/2-1”, “Status ->!BUSY!”) in new stack
[Nov 22 13:16:46] DEBUG[893]: app_macro.c:337 _macro_exec: Executed application: Noop
– Executing [s@macro-DialStatusHandler:3] NoOp(“Zap/2-1”, "Internal status -> ") in new stack
[Nov 22 13:16:46] DEBUG[893]: app_macro.c:337 _macro_exec: Executed application: Noop
– Executing [s@macro-DialStatusHandler:4] Set(“Zap/2-1”, “STAT_LEN=4”) in new stack
[Nov 22 13:16:46] DEBUG[893]: app_macro.c:337 _macro_exec: Executed application: Set
– Executing [s@macro-DialStatusHandler:5] GotoIf(“Zap/2-1”, “0?6:7”) in new stack
– Goto (macro-DialStatusHandler,s,7)
[Nov 22 13:16:46] DEBUG[893]: app_macro.c:337 _macro_exec: Executed application: GoToIf
– Executing [s@macro-DialStatusHandler:7] Goto(“Zap/2-1”, “s-BUSY|1”) in new stack
– Goto (macro-DialStatusHandler,s-BUSY,1)
[Nov 22 13:16:46] DEBUG[893]: app_macro.c:337 _macro_exec: Executed application: Goto
– Executing [s-BUSY@macro-DialStatusHandler:1] NoOp(“Zap/2-1”, “Busy”) in new stack
[Nov 22 13:16:46] DEBUG[893]: app_macro.c:337 _macro_exec: Executed application: Noop
– Executing [s-BUSY@macro-DialStatusHandler:2] NoOp(“Zap/2-1”, "CCBS_ENABLED -> ") in new stack
[Nov 22 13:16:46] DEBUG[893]: app_macro.c:337 _macro_exec: Executed application: Noop
– Executing [s-BUSY@macro-DialStatusHandler:3] GotoIf(“Zap/2-1”, “0?4:5”) in new stack
– Goto (macro-DialStatusHandler,s-BUSY,5)
[Nov 22 13:16:46] DEBUG[893]: app_macro.c:337 _macro_exec: Executed application: GotoIf
– Executing [s-BUSY@macro-DialStatusHandler:5] Goto(“Zap/2-1”, “s|100”) in new stack
– Goto (macro-DialStatusHandler,s,100)
[Nov 22 13:16:46] DEBUG[893]: app_macro.c:337 _macro_exec: Executed application: Goto
– Executing [s@macro-DialStatusHandler:100] GotoIf(“Zap/2-1”, “0?110}”) in new stack
[Nov 22 13:16:46] DEBUG[893]: app_macro.c:337 _macro_exec: Executed application: GotoIf
– Executing [s@macro-DialStatusHandler:101] Macro(“Zap/2-1”, “trunk-busy”) in new stack
– Executing [s@macro-trunk-busy:1] Busy(“Zap/2-1”, “”) in new stack

[ 00 01 2e 1c 08 02 80 1f 03 1e 02 81 88 ]

Informational frame:
SAPI: 00 C/R: 0 EA: 0
TEI: 000 EA: 1
N(S): 023 0: 0
N®: 014 P: 0
9 bytes of data
– Restarting T203 counter
Stopping T_203 timer
Starting T_200 timer
Protocol Discriminator: Q.931 (8) len=9
Call Ref: len= 2 (reference 31/0x1F) (Terminator)
Message type: PROGRESS (3)
[1e 02 81 88]
Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Private network serving the local user (1)
Ext: 1 Progress Description: Inband information or appropriate pattern now available. (8) ]
pbx1*CLI>
< [ 00 01 01 30 ]

< Supervisory frame:
< SAPI: 00 C/R: 0 EA: 0
< TEI: 000 EA: 1
< Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
< N®: 024 P/F: 0
< 0 bytes of data
– ACKing all packets from 22 to (but not including) 24
– ACKing packet 23, new txqueue is -1 (-1 means empty)
– Since there was nothing left, stopping T200 counter
– Nothing left, starting T203 counter
– Restarting T203 counter
– Remote UNIX connection
– Remote UNIX connection disconnected[/code]

REDIRECT NUMBER LOG

[code]-- ACKing all packets from 69 to (but not including) 70
– Since there was nothing left, stopping T200 counter
– Stopping T203 counter since we got an ACK
– Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8) len=31
< Call Ref: len= 2 (reference 24/0x18) (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)
< Ext: 1 User information layer 1: A-Law (35)
< [18 03 a9 83 81]
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
< ChanSel: Reserved
< Ext: 1 Coding: 0 Number Specified Channel Type: 3
< Ext: 1 Channel: 1 ]
< [6c 08 41 83 34 30 30 34 31 32]
< Calling Number (len=10) [ Ext: 0 TON: Subscriber Number (4) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
< Presentation: Presentation allowed of network provided number (3) ‘400412’ ]
< [70 04 80 34 32 38]
< Called Number (len= 6) [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) ‘428’ ]
– Making new call for cr 24
– Processing Q.931 Call Setup
– Processing IE 4 (cs0, Bearer Capability)
– Processing IE 24 (cs0, Channel Identification)
– Processing IE 108 (cs0, Calling Party Number)
– Processing IE 112 (cs0, Called Party Number)
q931.c:3296 q931_receive: call 24 on channel 1 enters state 6 (Call Present)
Sending Receiver Ready (85)
pbx1*CLI>

[ 02 01 01 aa ]
pbx1CLI>
Supervisory frame:
SAPI: 00 C/R: 1 EA: 0
TEI: 000 EA: 1
Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
N®: 085 P/F: 0
0 bytes of data
– Restarting T203 counter
– Restarting T203 counter
q931.c:2622 q931_setup_ack: call 24 on channel 1 enters state 25 (Overlap Receiving)
pbx1
CLI>
[ 00 01 8c aa 08 02 80 18 0d 18 03 a9 83 81 1e 02 81 82 ]
pbx1CLI>
Informational frame:
SAPI: 00 C/R: 0 EA: 0
TEI: 000 EA: 1
N(S): 070 0: 0
N®: 085 P: 0
14 bytes of data
– Restarting T203 counter
Stopping T_203 timer
Starting T_200 timer
Protocol Discriminator: Q.931 (8) len=14
Call Ref: len= 2 (reference 24/0x18) (Terminator)
Message type: SETUP ACKNOWLEDGE (13)
[18 03 a9 83 81]
Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
ChanSel: Reserved
Ext: 1 Coding: 0 Number Specified Channel Type: 3
Ext: 1 Channel: 1 ]
[1e 02 81 82]
Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Private network serving the local user (1)
Ext: 1 Progress Description: Called equipment is non-ISDN. (2) ]
– Accepting call from ‘400412’ to ‘428’ on channel 0/1, span 1
– Executing [428@incoming-external-zaptel:1] NoOp(“Zap/1-1”, “”" <400412>") in new stack
– Executing [428@incoming-external-zaptel:2] Goto(“Zap/1-1”, “outgoing-internal-extension|428|1”) in new stack
– Goto (outgoing-internal-extension,428,1)
– Executing [428@outgoing-internal-extension:1] Macro(“Zap/1-1”, “dial-extension-dialparties|trT|428”) in new stack
– Executing [s@macro-dial-extension-dialparties:1] Set(“Zap/1-1”, “ORIGINALCALLERID=”" <400412>") in new stack
[Nov 22 13:12:22] DEBUG[32333]: app_macro.c:337 _macro_exec: Executed application: Set
– Executing [s@macro-dial-extension-dialparties:2] AGI(“Zap/1-1”, “agi://127.0.0.1/?dialparties&extensions=428”) in new stack
pbx1
CLI>
< [ 00 01 01 8e ]
pbx1*CLI>
< Supervisory frame:
< SAPI: 00 C/R: 0 EA: 0
< TEI: 000 EA: 1
< Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
< N®: 071 P/F: 0
< 0 bytes of data
– ACKing all packets from 69 to (but not including) 71
– ACKing packet 70, new txqueue is -1 (-1 means empty)
– Since there was nothing left, stopping T200 counter
– Nothing left, starting T203 counter
– Restarting T203 counter
[Nov 22 13:12:22] DEBUG[32333]: db.c:197 ast_db_get: Unable to find key ‘428’ in family ‘CFU’
[Nov 22 13:12:22] DEBUG[32333]: db.c:197 ast_db_get: Unable to find key ‘428’ in family ‘CFB’
[Nov 22 13:12:22] DEBUG[32333]: db.c:197 ast_db_get: Unable to find key ‘428’ in family ‘CFNR’
[Nov 22 13:12:22] DEBUG[32333]: db.c:197 ast_db_get: Unable to find key ‘428’ in family ‘DND’
[Nov 22 13:12:22] DEBUG[32333]: db.c:197 ast_db_get: Unable to find key ‘428’ in family ‘CW’
[Nov 22 13:12:22] DEBUG[32333]: db.c:197 ast_db_get: Unable to find key ‘428’ in family ‘PR’
[Nov 22 13:12:22] DEBUG[32333]: db.c:197 ast_db_get: Unable to find key ‘428’ in family ‘AA’
[Nov 22 13:12:22] DEBUG[32333]: db.c:197 ast_db_get: Unable to find key ‘400412’ in family ‘CLIR’
[Nov 22 13:12:22] DEBUG[32333]: db.c:197 ast_db_get: Unable to find key ‘428’ in family ‘VM’
[Nov 22 13:12:22] DEBUG[32333]: db.c:197 ast_db_get: Unable to find key ‘428’ in family ‘DEVICE’
– AGI Script Executing Application: (DIAL) Options: (SIP/428|20|trT)
– Called 428
q931.c:2570 q931_call_proceeding: call 24 on channel 1 enters state 9 (Incoming Call Proceeding)

[ 00 01 8e aa 08 02 80 18 02 18 03 a9 83 81 ]

Informational frame:
SAPI: 00 C/R: 0 EA: 0
TEI: 000 EA: 1
N(S): 071 0: 0
N®: 085 P: 0
10 bytes of data
– Restarting T203 counter
Stopping T_203 timer
Starting T_200 timer
Protocol Discriminator: Q.931 (8) len=10
Call Ref: len= 2 (reference 24/0x18) (Terminator)
Message type: CALL PROCEEDING (2)
[18 03 a9 83 81]
Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
ChanSel: Reserved
Ext: 1 Coding: 0 Number Specified Channel Type: 3
Ext: 1 Channel: 1 ]
q931.c:2598 q931_alerting: call 24 on channel 1 enters state 7 (Call Received)

[ 00 01 90 aa 08 02 80 18 01 1e 02 81 88 ]

Informational frame:
SAPI: 00 C/R: 0 EA: 0
TEI: 000 EA: 1
N(S): 072 0: 0
N®: 085 P: 0
9 bytes of data
T_200 timer already going (2)
Protocol Discriminator: Q.931 (8) len=9
Call Ref: len= 2 (reference 24/0x18) (Terminator)
Message type: ALERTING (1)
[1e 02 81 88]
Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Private network serving the local user (1)
Ext: 1 Progress Description: Inband information or appropriate pattern now available. (8) ]
– SIP/428-081cdd20 is ringing
pbx1*CLI>
< [ 00 01 01 90 ]

< Supervisory frame:
< SAPI: 00 C/R: 0 EA: 0
< TEI: 000 EA: 1
< Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
< N®: 072 P/F: 0
< 0 bytes of data
– ACKing all packets from 70 to (but not including) 72
– ACKing packet 71, new txqueue is 72 (-1 means empty)
– Something left to transmit (72), restarting T200 counter
pbx1*CLI>
< [ 00 01 01 92 ]

< Supervisory frame:
< SAPI: 00 C/R: 0 EA: 0
< TEI: 000 EA: 1
< Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
< N®: 073 P/F: 0
< 0 bytes of data
– ACKing all packets from 71 to (but not including) 73
– ACKing packet 72, new txqueue is -1 (-1 means empty)
– Since there was nothing left, stopping T200 counter
– Nothing left, starting T203 counter
– Restarting T203 counter
pbx1*CLI>
< [ 02 01 aa 92 08 02 00 18 7b 28 0b 43 54 20 33 30 36 30 30 36 31 38 ]

< Informational frame:
< SAPI: 00 C/R: 1 EA: 0
< TEI: 000 EA: 1
< N(S): 085 0: 0
< N®: 073 P: 0
< 18 bytes of data
– ACKing all packets from 72 to (but not including) 73
– Since there was nothing left, stopping T200 counter
– Stopping T203 counter since we got an ACK
– Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8) len=18
< Call Ref: len= 2 (reference 24/0x18) (Originator)
< Message type: INFORMATION (123)
< [28 0b 43 54 20 33 30 36 30 30 36 31 38]
< Display (len=11) [ CT 30600618 ]
– Processing IE 40 (cs0, Display)
Sending Receiver Ready (86)

[ 02 01 01 ac ]

Supervisory frame:
SAPI: 00 C/R: 1 EA: 0
TEI: 000 EA: 1
Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
N®: 086 P/F: 0
0 bytes of data
– Restarting T203 counter
– Restarting T203 counter
pbx1*CLI>
< [ 02 01 ac 92 08 02 00 18 62 27 01 80 76 0b 01 80 30 33 30 36 30 30 36 31 38 ]

< Informational frame:
< SAPI: 00 C/R: 1 EA: 0
< TEI: 000 EA: 1
< N(S): 086 0: 0
< N®: 073 P: 0
< 21 bytes of data
– ACKing all packets from 72 to (but not including) 73
– Since there was nothing left, stopping T200 counter
– Stopping T203 counter since we got an ACK
– Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8) len=21
< Call Ref: len= 2 (reference 24/0x18) (Originator)
< Message type: FACILITY (98)
< [27 01 80]
< Notification indicator (len= 3): Ext: 1 User suspended (0)
< [76 0b 01 80 30 33 30 36 30 30 36 31 38]
< IE: Redirection Number (len = 13)
– Processing IE 39 (cs0, Notification Indicator)
– Processing IE 118 (cs0, Redirection Number)
Sending Receiver Ready (87)

[ 02 01 01 ae ]

Supervisory frame:
SAPI: 00 C/R: 1 EA: 0
TEI: 000 EA: 1
Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
N®: 087 P/F: 0
0 bytes of data
– Restarting T203 counter
– Restarting T203 counter
[Nov 22 13:12:22] DEBUG[23025]: chan_zap.c:1413 zt_enable_ec: Echo cancellation already on
– SIP/428-081cdd20 answered Zap/1-1
q931.c:2699 q931_connect: call 24 on channel 1 enters state 8 (Connect Request)
pbx1CLI>
[ 00 01 92 ae 08 02 80 18 07 18 03 a9 83 81 1e 02 81 82 ]
pbx1
CLI>
Informational frame:
SAPI: 00 C/R: 0 EA: 0
TEI: 000 EA: 1
N(S): 073 0: 0
N®: 087 P: 0
14 bytes of data
– Restarting T203 counter
Stopping T_203 timer
Starting T_200 timer
Protocol Discriminator: Q.931 (8) len=14
Call Ref: len= 2 (reference 24/0x18) (Terminator)
Message type: CONNECT (7)
[18 03 a9 83 81]
Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
ChanSel: Reserved
Ext: 1 Coding: 0 Number Specified Channel Type: 3
Ext: 1 Channel: 1 ]
[1e 02 81 82]
Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Private network serving the local user (1)
Ext: 1 Progress Description: Called equipment is non-ISDN. (2) ]
pbx1CLI>
< [ 00 01 01 94 ]
pbx1
CLI>
< Supervisory frame:
< SAPI: 00 C/R: 0 EA: 0
< TEI: 000 EA: 1
< Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
< N®: 074 P/F: 0
< 0 bytes of data
– ACKing all packets from 72 to (but not including) 74
– ACKing packet 73, new txqueue is -1 (-1 means empty)
– Since there was nothing left, stopping T200 counter
– Nothing left, starting T203 counter
– Restarting T203 counter
pbx1CLI>
< [ 02 01 ae 94 08 02 00 18 0f 18 03 a9 83 81 ]
pbx1
CLI>
< Informational frame:
< SAPI: 00 C/R: 1 EA: 0
< TEI: 000 EA: 1
< N(S): 087 0: 0
< N®: 074 P: 0
< 10 bytes of data
– ACKing all packets from 73 to (but not including) 74
– Since there was nothing left, stopping T200 counter
– Stopping T203 counter since we got an ACK
– Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8) len=10
< Call Ref: len= 2 (reference 24/0x18) (Originator)
< Message type: CONNECT ACKNOWLEDGE (15)
< [18 03 a9 83 81]
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
< ChanSel: Reserved
< Ext: 1 Coding: 0 Number Specified Channel Type: 3
< Ext: 1 Channel: 1 ]
– Processing IE 24 (cs0, Channel Identification)
q931.c:3454 q931_receive: call 24 on channel 1 enters state 10 (Active)
Sending Receiver Ready (88)
pbx1CLI>
[ 02 01 01 b0 ]
pbx1
CLI>
Supervisory frame:
SAPI: 00 C/R: 1 EA: 0
TEI: 000 EA: 1
Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
N®: 088 P/F: 0
0 bytes of data
– Restarting T203 counter
– Restarting T203 counter
– Remote UNIX connection
– Remote UNIX connection disconnected[/code]