[asterisk-bugs] [Asterisk 0013248]: Channel hangup on iax transfer when dialplan in DB

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Sep 11 04:35:28 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13248 
====================================================================== 
Reported By:                motto
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13248
Category:                   PBX/pbx_realtime
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 135647 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-08-06 03:00 CDT
Last Modified:              2008-09-11 04:35 CDT
====================================================================== 
Summary:                    Channel hangup on iax transfer when dialplan in DB
Description: 
IAX clients: A, B, C.
When A calls B, B answer A => call established. 
Than B tries to transfer the call to C => all channels hangups.
Reproduced always when using realtime dialplan (DB). 
If dialplan in the text file - it works fine.



====================================================================== 

---------------------------------------------------------------------- 
 (0092334) motto (reporter) - 2008-09-11 04:35
 http://bugs.digium.com/view.php?id=13248#c92334 
---------------------------------------------------------------------- 
Hi.
No, the thing were not working before. It was just the latest checkout
from SVN.

!!! Working case: !!!
Dialplan in the extensions.conf
3 IAX accounts (softclients - Zopier):
in iax.conf
====== cut ======
[700]
type=friend
host=dynamic
port=4569
secret=1234
transfer=mediaonly
====== cut ======
the same for 701 and 702 accounts
in extensions.conf
====== cut ======
 exten => _70X,1,Dial(IAX2/${EXTEN})
 exten => _70X,n,Goto(70X-${DIALSTATUS},1)
 exten => _70X-.,1,Voicemail(${EXTEN:0:3})
====== cut ======


asterisk console
====== cut ======
temple*CLI>
    -- Accepting AUTHENTICATED call from 192.168.1.12:
       > requested format = gsm,
       > requested prefs = (),
       > actual format = gsm,
       > host prefs = (gsm),
       > priority = mine
    -- Executing [701 at default:1] Dial("IAX2/700-5662", "IAX2/701") in new
stack
    -- Called 701
    -- Call accepted by 192.168.1.25 (format gsm)
    -- Format for call is gsm
    -- IAX2/701-5142 is ringing
    -- IAX2/701-5142 answered IAX2/700-5662
    -- Channel 'IAX2/701-5142' ready to transfer
    -- Channel 'IAX2/700-5662' ready to transfer
    -- Attempting media bridge of IAX2/700-5662 and IAX2/701-5142
temple*CLI> core show channels
Channel              Location             State   Application(Data)
IAX2/701-5142        (None)               Up      AppDial((Outgoing
Line))
IAX2/700-5662        701 at default:1        Up      Dial(IAX2/701)
2 active channels
1 active call
1 call processed
    -- Hungup 'IAX2/701-5142'
  == Spawn extension (default, 702, 1) exited non-zero on 'IAX2/700-5662'
    -- Executing [702 at default:1] Dial("IAX2/700-5662", "IAX2/702") in new
stack
    -- Called 702
    -- Call accepted by 192.168.1.13 (format gsm)
    -- Format for call is gsm
    -- IAX2/702-5982 is ringing
    -- IAX2/702-5982 answered IAX2/700-5662
temple*CLI> core show channels
Channel              Location             State   Application(Data)
IAX2/702-5982        (None)               Up      AppDial((Outgoing
Line))
IAX2/700-5662        702 at default:1        Up      Dial(IAX2/702)
2 active channels
1 active call
1 call processed
====== cut ======

so 700 called 701, 701 transfer call to 702 (native IAX transfer) = >
works





!!! NOT working case: !!!

in extconfig.conf
====== cut ======
iaxusers => odbc,astdb,iax_buddies
iaxpeers => odbc,astdb,iax_buddies
realtime_extensions => odbc,astdb,extensions
====== cut ======

in the DB
# select * from iax_buddies where name like '%70%';
  id  | name | mailbox | username | accountcode |  type  | secret |
# md5secret | dbsecret | inkeys | outkeys | auth | amaflags | callerid |
# context | defaultip |  host   | language | deny | permit | qualify |
# disallow | allow | ipaddr | port | regseconds | transfer
------+------+---------+----------+-------------+--------+--------+-----------+----------+--------+---------+------+----------+----------+---------+-----------+---------+----------+------+--------+---------+----------+-------+--------+------+------------+-----------
 1403 | 700  |         | 700      |             | friend | 1234   |
|          |        |         | md5  |          |          | users   |
| dynamic |          |      |        | yes     | all      | ulaw  |       
|
0 |          0 | mediaonly
 1404 | 701  |         | 701      |             | friend | 1234   |
|          |        |         | md5  |          |          | users   |
| dynamic |          |      |        | yes     | all      | ulaw  |       
|
0 |          0 | mediaonly
 1405 | 702  |         | 702      |             | friend | 1234   |
|          |        |         | md5  |          |          | users   |
| dynamic |          |      |        | yes     | all      | ulaw  |       
|
0 |          0 | mediaonly
(3 rows)



astdb=# select * from extensions where exten like '%700%';
  id  | context | exten  | priority |    app    |      appdata
------+---------+--------+----------+-----------+-------------------
 1366 | users   | 700    |        1 | Dial      | IAX2/700|35
 1369 | users   | 700    |        2 | Goto      | 700-${DIALSTATUS}
 1372 | users   | _700-. |        1 | Voicemail | 700
(3 rows)

astdb=# select * from extensions where exten like '%701%';
  id  | context | exten  | priority |    app    |      appdata
------+---------+--------+----------+-----------+-------------------
 1367 | users   | 701    |        1 | Dial      | IAX2/701|35
 1370 | users   | 701    |        2 | Goto      | 701-${DIALSTATUS}
 1373 | users   | _701-. |        1 | Voicemail | 701
(3 rows)

astdb=# select * from extensions where exten like '%702%';
  id  | context | exten  | priority |    app    |      appdata
------+---------+--------+----------+-----------+-------------------
 1368 | users   | 702    |        1 | Dial      | IAX2/702|35
 1371 | users   | 702    |        2 | Goto      | 702-${DIALSTATUS}
 1374 | users   | _702-. |        1 | Voicemail | 702
(3 rows)


asterisk console
====== cut ======
temple*CLI>
    -- Accepting AUTHENTICATED call from 192.168.1.12:
       > requested format = gsm,
       > requested prefs = (),
       > actual format = ulaw,
       > host prefs = (ulaw),
       > priority = mine
    -- Executing Dial("IAX2/700-10379", "IAX2/701,35")
    -- Called 701
    -- Call accepted by 192.168.1.25 (format ulaw)
    -- Format for call is ulaw
    -- IAX2/701-4371 is ringing
    -- IAX2/701-4371 answered IAX2/700-10379
    -- Channel 'IAX2/701-4371' ready to transfer
    -- Channel 'IAX2/700-10379' ready to transfer
    -- Attempting media bridge of IAX2/700-10379 and IAX2/701-4371
    -- Hungup 'IAX2/701-4371'
    -- Auto fallthrough, channel 'IAX2/700-10379' status is 'ANSWER'
    -- Hungup 'IAX2/700-10379'
temple*CLI> core show channels
Channel              Location             State   Application(Data)
0 active channels
0 active calls
3 calls processed
temple*CLI>



This with iax debug

    -- Executing Dial("IAX2/700-10901", "IAX2/701,35")
    -- Called 701
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass:
NEW
   Timestamp: 00008ms  SCall: 07508  DCall: 00000 [192.168.1.25:4569]
   VERSION         : 2
   CALLED NUMBER   : s
   CODEC_PREFS     : (ulaw)
   CALLING NUMBER  : 700
   CALLING PRESNTN : 1
   CALLING TYPEOFN : 16
   CALLING TRANSIT : 0
   CALLING NAME    : 700
   LANGUAGE        : en
   USERNAME        : 701
   FORMAT          : 4
   CAPABILITY      : 24580
   ADSICPE         : 2
   DATE TIME       : 2008-09-11  12:36:20

Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass:
ACK
   Timestamp: 00008ms  SCall: 00061  DCall: 07508 [192.168.1.25:4569]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass:
ACCEPT
   Timestamp: 00031ms  SCall: 00061  DCall: 07508 [192.168.1.25:4569]
   FORMAT          : 4

    -- Call accepted by 192.168.1.25 (format ulaw)
    -- Format for call is ulaw
Tx-Frame Retry[-01] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass:
ACK
   Timestamp: 00031ms  SCall: 07508  DCall: 00061 [192.168.1.25:4569]
Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 001 Type: CONTROL Subclass:
RINGING
   Timestamp: 00003ms  SCall: 00061  DCall: 07508 [192.168.1.25:4569]
Tx-Frame Retry[-01] -- OSeqno: 001 ISeqno: 002 Type: IAX     Subclass:
ACK
   Timestamp: 00003ms  SCall: 07508  DCall: 00061 [192.168.1.25:4569]
    -- IAX2/701-7508 is ringing
Tx-Frame Retry[000] -- OSeqno: 002 ISeqno: 002 Type: CONTROL Subclass:
RINGING
   Timestamp: 00048ms  SCall: 10901  DCall: 00069 [192.168.1.12:4569]
Rx-Frame Retry[ No] -- OSeqno: 002 ISeqno: 003 Type: IAX     Subclass:
ACK
   Timestamp: 00048ms  SCall: 00069  DCall: 10901 [192.168.1.12:4569]
Rx-Frame Retry[ No] -- OSeqno: 002 ISeqno: 001 Type: CONTROL Subclass:
ANSWER
   Timestamp: 04312ms  SCall: 00061  DCall: 07508 [192.168.1.25:4569]
Tx-Frame Retry[-01] -- OSeqno: 001 ISeqno: 003 Type: IAX     Subclass:
ACK
   Timestamp: 04312ms  SCall: 07508  DCall: 00061 [192.168.1.25:4569]
    -- IAX2/701-7508 answered IAX2/700-10901
Rx-Frame Retry[ No] -- OSeqno: 003 ISeqno: 001 Type: VOICE   Subclass: 4
   Timestamp: 04420ms  SCall: 00061  DCall: 07508 [192.168.1.25:4569]
Tx-Frame Retry[-01] -- OSeqno: 001 ISeqno: 004 Type: IAX     Subclass:
ACK
   Timestamp: 04420ms  SCall: 07508  DCall: 00061 [192.168.1.25:4569]
Tx-Frame Retry[000] -- OSeqno: 003 ISeqno: 002 Type: CONTROL Subclass:
ANSWER
   Timestamp: 04872ms  SCall: 10901  DCall: 00069 [192.168.1.12:4569]
Tx-Frame Retry[000] -- OSeqno: 004 ISeqno: 002 Type: CONTROL Subclass:
(20?)
   Timestamp: 04875ms  SCall: 10901  DCall: 00069 [192.168.1.12:4569]
Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 004 Type: CONTROL Subclass:
(20?)
   Timestamp: 04812ms  SCall: 07508  DCall: 00061 [192.168.1.25:4569]
Tx-Frame Retry[000] -- OSeqno: 005 ISeqno: 002 Type: IAX     Subclass:
TXREQ
   Timestamp: 04878ms  SCall: 10901  DCall: 00069 [192.168.1.12:4569]
   APPARENT ADDRES : IPV4 192.168.1.25:4569
   CALL NUMBER     : 61
   TRANSFER ID     : 129093917

Tx-Frame Retry[000] -- OSeqno: 002 ISeqno: 004 Type: IAX     Subclass:
TXREQ
   Timestamp: 04813ms  SCall: 07508  DCall: 00061 [192.168.1.25:4569]
   APPARENT ADDRES : IPV4 192.168.1.12:4569
   CALL NUMBER     : 69
   TRANSFER ID     : 129093917

Tx-Frame Retry[000] -- OSeqno: 006 ISeqno: 002 Type: VOICE   Subclass: 4
   Timestamp: 04880ms  SCall: 10901  DCall: 00069 [192.168.1.12:4569]
Rx-Frame Retry[ No] -- OSeqno: 004 ISeqno: 002 Type: IAX     Subclass:
ACK
   Timestamp: 04812ms  SCall: 00061  DCall: 07508 [192.168.1.25:4569]
Rx-Frame Retry[ No] -- OSeqno: 004 ISeqno: 003 Type: VOICE   Subclass: 4
   Timestamp: 04880ms  SCall: 00061  DCall: 07508 [192.168.1.25:4569]
Tx-Frame Retry[-01] -- OSeqno: 003 ISeqno: 005 Type: IAX     Subclass:
ACK
   Timestamp: 04880ms  SCall: 07508  DCall: 00061 [192.168.1.25:4569]
Rx-Frame Retry[ No] -- OSeqno: 002 ISeqno: 004 Type: IAX     Subclass:
ACK
   Timestamp: 04872ms  SCall: 00069  DCall: 10901 [192.168.1.12:4569]
Rx-Frame Retry[ No] -- OSeqno: 002 ISeqno: 005 Type: IAX     Subclass:
ACK
   Timestamp: 04875ms  SCall: 00069  DCall: 10901 [192.168.1.12:4569]
Rx-Frame Retry[ No] -- OSeqno: 002 ISeqno: 007 Type: IAX     Subclass:
ACK
   Timestamp: 04880ms  SCall: 00069  DCall: 10901 [192.168.1.12:4569]
Rx-Frame Retry[ No] -- OSeqno: 002 ISeqno: 007 Type: VOICE   Subclass: 4
   Timestamp: 05300ms  SCall: 00069  DCall: 10901 [192.168.1.12:4569]
Tx-Frame Retry[-01] -- OSeqno: 007 ISeqno: 003 Type: IAX     Subclass:
ACK
   Timestamp: 05300ms  SCall: 10901  DCall: 00069 [192.168.1.12:4569]
Tx-Frame Retry[000] -- OSeqno: 003 ISeqno: 005 Type: VOICE   Subclass: 4
   Timestamp: 05240ms  SCall: 07508  DCall: 00061 [192.168.1.25:4569]
Rx-Frame Retry[ No] -- OSeqno: 005 ISeqno: 004 Type: IAX     Subclass:
ACK
   Timestamp: 05240ms  SCall: 00061  DCall: 07508 [192.168.1.25:4569]
Rx-Frame Retry[ No] -- OSeqno: 005 ISeqno: 004 Type: IAX     Subclass:
TXREADY
   Timestamp: 05313ms  SCall: 00061  DCall: 07508 [192.168.1.25:4569]
   TRANSFER ID     : 129093917

    -- Channel 'IAX2/701-7508' ready to transfer
Tx-Frame Retry[-01] -- OSeqno: 004 ISeqno: 006 Type: IAX     Subclass:
ACK
   Timestamp: 05313ms  SCall: 07508  DCall: 00061 [192.168.1.25:4569]
Rx-Frame Retry[ No] -- OSeqno: 003 ISeqno: 007 Type: IAX     Subclass:
TXREADY
   Timestamp: 05644ms  SCall: 00069  DCall: 10901 [192.168.1.12:4569]
   TRANSFER ID     : 129093917

    -- Channel 'IAX2/700-10901' ready to transfer
    -- Attempting media bridge of IAX2/700-10901 and IAX2/701-7508
Tx-Frame Retry[000] -- OSeqno: 007 ISeqno: 004 Type: IAX     Subclass:
TXMEDIA
   Timestamp: 05775ms  SCall: 10901  DCall: 00069 [192.168.1.12:4569]
   CALL NUMBER     : 61
   TRANSFER ID     : 129093917
temple*CLI>
Tx-Frame Retry[000] -- OSeqno: 004 ISeqno: 006 Type: IAX     Subclass:
TXMEDIA
   Timestamp: 05588ms  SCall: 07508  DCall: 00061 [192.168.1.25:4569]
   CALL NUMBER     : 69
   TRANSFER ID     : 129093917
temple*CLI>
Rx-Frame Retry[ No] -- OSeqno: 006 ISeqno: 005 Type: IAX     Subclass:
ACK
   Timestamp: 05588ms  SCall: 00061  DCall: 07508 [192.168.1.25:4569]
Rx-Frame Retry[ No] -- OSeqno: 004 ISeqno: 008 Type: IAX     Subclass:
ACK
   Timestamp: 05775ms  SCall: 00069  DCall: 10901 [192.168.1.12:4569]
Rx-Frame Retry[ No] -- OSeqno: 006 ISeqno: 005 Type: IAX     Subclass:
TRANSFR
   Timestamp: 08480ms  SCall: 00061  DCall: 07508 [192.168.1.25:4569]
   CALLED NUMBER   : 702
temple*CLI>
Tx-Frame Retry[-01] -- OSeqno: 005 ISeqno: 007 Type: IAX     Subclass:
ACK
   Timestamp: 08480ms  SCall: 07508  DCall: 00061 [192.168.1.25:4569]
    -- Hungup 'IAX2/701-7508'
    -- Auto fallthrough, channel 'IAX2/700-10901' status is 'ANSWER'
    -- Hungup 'IAX2/700-10901

====== cut ======

700 dials to 701, 701 answer, hit transfer to 702 and all channels
hangup.

Note: if transfer initialized by caller (i.e. 700 -> 701, 700 transfer to
702) it will be working fine. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-09-11 04:35 motto          Note Added: 0092334                          
======================================================================




More information about the asterisk-bugs mailing list