3 way conference not working in asterisk 16.10.0

Hi,
I am trying to establish a 3 way conference. but it is not working properly.
Expected Scenario is,
User 1 (200) calls User 2(201), talking for a while
then User 1 (200) wants to speak with User 3 (202). so now User 2 should be in hold while User 3 attends the call. then User 1 presses the conference button so the mixing will be happened
these 3 users can speak in conference.

Failed scenario is,
200 calls 201, call established both are speaking for a while.
now 200 presses the #0 to call the 202, really whats happened is call between 200 and 201 is terminated and initiated the call between 200 and 202.
So i could not make the 3 way conference. I do not know why???

i have shared the error captures and configuration files here.

please help me, thanks in advance.

extensions.conf:

[general]
clearglobalvars=yes

[globals]
TRANSFER_CONTEXT=transfer

[transfer]
include => sip_extensions; (_2XX)

[sip_context]
;context for authenticated sip devices
include => sip_extensions; (_2XX)

[sip_extensions]
; all of the sip_extensions dial patterns are internal to the system.

; 2XX extensions are for local extensions
exten => _2XX,1,Verbose(1, Placing call to local SIP phone at ${EXTEN})
same => n,Set(__DYNAMIC_FEATURES=callerstartthreeway#calleestartthreeway)
same => n,Dial(SIP/${EXTEN},90)
same => n,Hangup(${HANGUPCAUSE})

[fc-tw-start]
exten => s,1,Verbose(1,Starting Three Way Calling Routine for ${CHANNEL}, Peer is ${BRIDGEPEER})
same => n,Set(ChanName=${CHANNEL})
same => n,Set(Tech=${SHIFT(ChanName,/)})
same => n,Set(Chan=${SHIFT(ChanName,/)})

same => n,Set(ConfNo=$[${Chan}+50]);
same => n,Verbose(1,Creating Conference number ${ConfNo})
same => n,ChannelRedirect(${BRIDGEPEER},conference-user,${ConfNo},1)

same => n,Verbose(1,Now prompting for new extension to connect to)
same => n,Read(DEST,dial,24,i,3,5);Assuming Max Digits = 24
same => n,GotoIf($["${DEST}" = "*" ]?cancel)
same => n,GotoIf($["${DEST}" = "" ]?cancel)

same => n,Set(__DYNAMIC_FEATURES=callerjointhreeway);Only enable join 3 way from this point... Revisit?
same => n,Dial(Local/${DEST}@sip_extensions/n,90)

;Todo - Check to make sure the dial happens with a valid number?
same => n,Hangup()

same => n(cancel),Verbose(1, Cancel 3 Way)

[fc-tw-join]
exten => s,1,Verbose(1,Joining Three Way Call for ${CHANNEL}, Peer is ${BRIDGEPEER})
same => n,Set(ChanName=${CHANNEL})
same => n,Set(Tech=${SHIFT(ChanName,/)})
same => n,Set(Chan=${SHIFT(ChanName,/)})

same => n,Set(ConfNo=$[${Chan}+50]);
same => n,ChannelRedirect(${BRIDGEPEER},conference-user,${ConfNo},1)
same => n,ConfBridge(${ConfNo},three-way,initiator-profile)

[conference-user]
;same => _X.,ChannelRedirect(${BRIDGEPEER},sip_context,${DEST},1)
exten => _X.,1,Verbose(1,Dropping ${CHANNEL} into Conference ${EXTEN})
same => n,ConfBridge(${EXTEN},three-way,user-profile)
same => n,Hangup()

features.conf:

[applicationmap]
; Three Way
callerstartthreeway => #0,self/caller,GoSub(fc-tw-start,s,1)
calleestartthreeway => #0,self/callee,GoSub(fc-tw-starts,1)
callerjointhreeway => **,self/caller,GoSub(fc-tw-join,s,1)
calleejointhreeway => **,self/callee,GoSub(fc-tw-join,s,1)

sip.conf:

[general]
context=default
allowguest=yes
transport=udp
bindaddr=0.0.0.0:5060

srvlookup=yes
pedantic=yes

tos_sip=cs3
tos_audio=ef
tos_video=af41

maxexpiry=3600
minexpiry=60
defaultexpiry=120
t1min=100

; Codecs
disallow=all
allow=ulaw:20

language=en

videosupport=no

t38pt_udptl=no

nat=force_rport,comedia

jbenable=yes
jbmaxsize = 120
jbimpl = adaptive

promiscredir=no

[sip-template](!)
context=sip_context
host=dynamic
defaultip=127.0.0.1
nat=force_rport,comedia
dtmfmode=rfc2833
type=friend
insecure=port,invite
; set limit so asterisk keeps track of calls.
call-limit=10
;qualify the connection so that we can check status
qualify=yes

; EXTENSIONS

[200](sip-template)
defaultuser=200
secret=1234
callerid=200

[201](sip-template)
defaultuser=201
secret=1234
callerid=201

[202](sip-template)
defaultuser=202
secret=1234
callerid=202

[203](sip-template)
defaultuser=203
secret=1234
callerid=203

Error captures:

kalaivani-Vostro-2520*CLI> sip show peers
Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description                      
200/200                   192.168.43.234                           D  Yes        Yes            40795    OK (1 ms)                                    
201/201                   192.168.43.1                             D  Yes        Yes            50300    OK (5 ms)                                    
202/202                   192.168.43.1                             D  Yes        Yes            16338    OK (97 ms)                                   
203/203                   (Unspecified)                            D  Yes        Yes            0        UNKNOWN                                      
204/204                   (Unspecified)                            D  Yes        Yes            0        UNKNOWN                                      
205/205                   (Unspecified)                            D  Yes        Yes            0        UNKNOWN                                      
6 sip peers [Monitored: 3 online, 3 offline Unmonitored: 0 online, 0 offline]
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
       > 0xb4c10b20 -- Strict RTP learning after remote address set to: 192.168.43.234:8002
    -- Executing [201@sip_context:1] Verbose("SIP/200-00000000", "1, Placing call to local SIP phone at 201") in new stack
  Placing call to local SIP phone at 201
    -- Executing [201@sip_context:2] Set("SIP/200-00000000", "__DYNAMIC_FEATURES=callerstartthreeway#calleestartthreeway") in new stack
    -- Executing [201@sip_context:3] Dial("SIP/200-00000000", "SIP/201,90") in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Called SIP/201
    -- SIP/201-00000001 is ringing
       > 0xb4f09ad0 -- Strict RTP learning after remote address set to: 192.168.43.1:61104
    -- SIP/201-00000001 answered SIP/200-00000000
    -- Channel SIP/201-00000001 joined 'simple_bridge' basic-bridge <5d639a32-253f-4862-babe-ede5f21aad43>
    -- Channel SIP/200-00000000 joined 'simple_bridge' basic-bridge <5d639a32-253f-4862-babe-ede5f21aad43>
       > 0xb4c10b20 -- Strict RTP switching to RTP target address 192.168.43.234:8002 as source
       > 0xb4c10b20 -- Strict RTP learning complete - Locking on source address 192.168.43.234:8002
[May 25 12:25:26] WARNING[4591][C-00000001]: chan_iax2.c:1229 jb_warning_output: Resyncing the jb. last_delay 0, this delay -93524567, threshold 1000, new offset 93524567
       > 0xb4f09ad0 -- Strict RTP switching to RTP target address 192.168.43.1:61104 as source
[May 25 12:25:26] WARNING[4593][C-00000001]: chan_iax2.c:1229 jb_warning_output: Resyncing the jb. last_delay 0, this delay -83597117, threshold 1000, new offset 83597117
       > 0xb4f09ad0 -- Strict RTP learning complete - Locking on source address 192.168.43.1:61104
    -- SIP/200-00000000 Internal Gosub(fc-tw-start,s,1) start
    -- Executing [s@fc-tw-start:1] Verbose("SIP/200-00000000", "1,Starting Three Way Calling Routine for SIP/200-00000000, Peer is SIP/201-00000001") in new stack
 Starting Three Way Calling Routine for SIP/200-00000000, Peer is SIP/201-00000001
    -- Executing [s@fc-tw-start:2] Set("SIP/200-00000000", "ChanName=SIP/200-00000000") in new stack
    -- Executing [s@fc-tw-start:3] Set("SIP/200-00000000", "Tech=SIP") in new stack
    -- Executing [s@fc-tw-start:4] Set("SIP/200-00000000", "Chan=200-00000000") in new stack
    -- Executing [s@fc-tw-start:5] Set("SIP/200-00000000", "ConfNo=250") in new stack
    -- Executing [s@fc-tw-start:6] Verbose("SIP/200-00000000", "1,Creating Conference number 250") in new stack
 Creating Conference number 250
    -- Executing [s@fc-tw-start:7] ChannelRedirect("SIP/200-00000000", "SIP/201-00000001,conference-user,250,1") in new stack
    -- Executing [s@fc-tw-start:8] Verbose("SIP/200-00000000", "1,Now prompting for new extension to connect to") in new stack
 Now prompting for new extension to connect to
    -- Executing [s@fc-tw-start:9] Read("SIP/200-00000000", "DEST,dial,24,i,3,5") in new stack
    -- Accepting a maximum of 24 digits.
    -- Channel SIP/201-00000001 left 'simple_bridge' basic-bridge <5d639a32-253f-4862-babe-ede5f21aad43>
    -- Executing [250@conference-user:1] Verbose("SIP/201-00000001", "1,Dropping SIP/201-00000001 into Conference 250") in new stack
 Dropping SIP/201-00000001 into Conference 250
    -- Executing [250@conference-user:2] ConfBridge("SIP/201-00000001", "250,three-way,user-profile") in new stack
[May 25 12:25:41] WARNING[4593][C-00000001]: app_confbridge.c:2570 confbridge_exec: Conference bridge profile three-way does not exist
  == Spawn extension (conference-user, 250, 2) exited non-zero on 'SIP/201-00000001'
    -- User entered '202'
    -- Executing [s@fc-tw-start:10] GotoIf("SIP/200-00000000", "0?cancel") in new stack
    -- Executing [s@fc-tw-start:11] GotoIf("SIP/200-00000000", "0?cancel") in new stack
    -- Executing [s@fc-tw-start:12] Set("SIP/200-00000000", "__DYNAMIC_FEATURES=callerjointhreeway") in new stack
    -- Executing [s@fc-tw-start:13] Dial("SIP/200-00000000", "Local/202@sip_extensions/n,90") in new stack
    -- Called Local/202@sip_extensions/n
    -- Executing [202@sip_extensions:1] Verbose("Local/202@sip_extensions-00000000;2", "1, Placing call to local SIP phone at 202") in new stack
  Placing call to local SIP phone at 202
    -- Executing [202@sip_extensions:2] Set("Local/202@sip_extensions-00000000;2", "__DYNAMIC_FEATURES=callerstartthreeway#calleestartthreeway") in new stack
    -- Executing [202@sip_extensions:3] Dial("Local/202@sip_extensions-00000000;2", "SIP/202,90") in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Called SIP/202
    -- SIP/202-00000002 is ringing
    -- Local/202@sip_extensions-00000000;1 is ringing
    -- SIP/202-00000002 is ringing
    -- SIP/202-00000002 is ringing
    -- SIP/202-00000002 is ringing
[May 25 12:26:00] WARNING[4603][C-00000001]: res_rtp_asterisk.c:7444 ast_rtp_read: RTP Read too short
       > 0xb520b8a0 -- Strict RTP learning after remote address set to: 192.168.43.1:10380
    -- SIP/202-00000002 answered Local/202@sip_extensions-00000000;2
    -- Local/202@sip_extensions-00000000;1 answered SIP/200-00000000
    -- Channel SIP/202-00000002 joined 'simple_bridge' basic-bridge <46168d1c-1745-4d17-9e12-a1ad48ff31da>
    -- Channel Local/202@sip_extensions-00000000;1 joined 'simple_bridge' basic-bridge <cd732312-32e0-41c0-be84-ff3b171cd986>
    -- Channel Local/202@sip_extensions-00000000;2 joined 'simple_bridge' basic-bridge <46168d1c-1745-4d17-9e12-a1ad48ff31da>
  == Spawn extension (fc-tw-start, s, 13) exited non-zero on 'SIP/200-00000000'
[May 25 12:26:00] NOTICE[4591][C-00000001]: app_stack.c:1080 gosub_run: SIP/200-00000000 Abnormal 'Gosub(fc-tw-start,s,1)' exit.  Popping routine return locations.
    -- Channel SIP/200-00000000 left 'simple_bridge' basic-bridge <5d639a32-253f-4862-babe-ede5f21aad43>
  == Spawn extension (sip_context, 201, 3) exited non-zero on 'SIP/200-00000000'
[May 25 12:26:00] WARNING[4607][C-00000001]: res_rtp_asterisk.c:7444 ast_rtp_read: RTP Read too short
[May 25 12:26:00] WARNING[4607][C-00000001]: res_rtp_asterisk.c:7444 ast_rtp_read: RTP Read too short
[May 25 12:26:00] WARNING[4607][C-00000001]: res_rtp_asterisk.c:7444 ast_rtp_read: RTP Read too short
[May 25 12:26:00] WARNING[4607][C-00000001]: res_rtp_asterisk.c:7444 ast_rtp_read: RTP Read too short
[May 25 12:26:00] WARNING[4607][C-00000001]: res_rtp_asterisk.c:7444 ast_rtp_read: RTP Read too short
[May 25 12:26:00] WARNING[4607][C-00000001]: res_rtp_asterisk.c:7444 ast_rtp_read: RTP Read too short
[May 25 12:26:00] WARNING[4607][C-00000001]: res_rtp_asterisk.c:7444 ast_rtp_read: RTP Read too short
       > 0xb520b8a0 -- Strict RTP switching to RTP target address 192.168.43.1:10380 as source
[May 25 12:26:01] WARNING[4607][C-00000001]: chan_iax2.c:1229 jb_warning_output: Resyncing the jb. last_delay 0, this delay -10803, threshold 1000, new offset 10803
       > 0xb520b8a0 -- Strict RTP learning complete - Locking on source address 192.168.43.1:10380
    -- Channel SIP/202-00000002 left 'simple_bridge' basic-bridge <46168d1c-1745-4d17-9e12-a1ad48ff31da>
    -- Channel Local/202@sip_extensions-00000000;2 left 'simple_bridge' basic-bridge <46168d1c-1745-4d17-9e12-a1ad48ff31da>
  == Spawn extension (sip_extensions, 202, 3) exited non-zero on 'Local/202@sip_extensions-00000000;2'
    -- Channel Local/202@sip_extensions-00000000;1 left 'simple_bridge' basic-bridge <cd732312-32e0-41c0-be84-ff3b171cd986>

Although the rules on what you can do in a feature action have been relaxed, I’m not aware that extends to ChannelRedirect.

; IMPORTANT NOTE: The applicationmap is not intended to be used for all Asterisk
; applications. When applications are used in extensions.conf, they are executed
; by the PBX core. In this case, these applications are executed outside of the
; PBX core, so it does not make sense to use any application which has any
; concept of dialplan flow. Examples of this would be things like Goto,
; Background, WaitExten, and many more. The exceptions to this are Gosub and
; Macro routines which must complete for the call to continue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.