[Home]

Summary:ASTERISK-12530: Channel hangup on iax transfer when dialplan in DB
Reporter:motto (motto)Labels:
Date Opened:2008-08-06 03:00:55Date Closed:2011-06-07 14:07:56
Priority:MinorRegression?No
Status:Closed/CompleteComponents:PBX/pbx_realtime
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
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.




****** ADDITIONAL INFORMATION ******

svn info
Path: .
URL: http://svn.digium.com/svn/asterisk/trunk
Repository Root: http://svn.digium.com/svn/asterisk
Repository UUID: 614ede4d-c843-0410-af14-a771ab80d22e
Revision: 135647
Node Kind: directory
Schedule: normal
Last Changed Author: seanbright
Last Changed Rev: 135598
Last Changed Date: 2008-08-05 16:26:34 +0300 (Tue, 05 Aug 2008)
Properties Last Updated: 2008-08-05 17:43:17 +0300 (Tue, 05 Aug 2008)

On Fedora Core release 6

Comments:By: Leif Madsen (lmadsen) 2008-09-10 08:59:13

Can you provide the steps to reproduce the issue, including your current database schema for the dialplan?

Also, can you explain why you are referencing a commit by seanbright? Were things working previously to this commit?

By: motto (motto) 2008-09-11 04:35:27

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@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@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@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@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.

By: motto (motto) 2008-11-21 03:37:15.000-0600

any update on it ?
any other debug info required ?

By: David Vossel (dvossel) 2009-02-09 15:17:25.000-0600

The way iax2 transfers work in trunk, 1.4 and 1.6.x was broken for a few months.  This issue has be resolved recently.  Please update to the latest trunk code and verify if your problem still exists.  

By: motto (motto) 2009-02-11 09:45:34.000-0600

Yes, it works now.
Thank you.

By: Joshua C. Colp (jcolp) 2009-02-11 09:46:41.000-0600

Closed per reporter. Prior changes have fixed this already. Good job dvossel!