Hello,
Sorry i am a newbie when it comes to asterisk and i am trying to learn as much as i can, my scenario is that i registered two extension phones to asterisk PBX server using SIP registration. My question is how can i make the call transfer to my ARI application after one of the phones is dial-ed or answered. In other words i want to use the ARI application in order to execute a function to the bridge to the two channels of the phones when they are answered.
My extensions.conf file:
[from-internal]
exten => _XX.,1,NoOp(Call from ${CALLERID(num)} to ${EXTEN})
same => n,Dial(PJSIP/${EXTEN},60)
same => n,Stasis(Intro-IVR)
same => n,Hangup()
Asterisk is not executing stasis after the phones answer the dial
-- Executing [6001@from-internal:1] NoOp("PJSIP/6002-00000005", "Call from 6002 to 6001") in new stack
-- Executing [6001@from-internal:2] Dial("PJSIP/6002-00000005", "PJSIP/6001,60") in new stack
-- Called PJSIP/6001
-- PJSIP/6001-00000006 is ringing
-- PJSIP/6001-00000006 is ringing
-- PJSIP/6001-00000006 answered PJSIP/6002-00000005
> 0x7f3d38026d80 -- Strict RTP learning after remote address set to: 10.0.10.246:5042
> 0x7f3d38015200 -- Strict RTP learning after remote address set to: 10.0.10.44:5004
-- Channel PJSIP/6001-00000006 joined 'simple_bridge' basic-bridge <9f6efcc1-3ea2-4ab6-815a-0c05c6d67f27>
-- Channel PJSIP/6002-00000005 joined 'simple_bridge' basic-bridge <9f6efcc1-3ea2-4ab6-815a-0c05c6d67f27>
> Bridge 9f6efcc1-3ea2-4ab6-815a-0c05c6d67f27: switching from simple_bridge technology to native_rtp
> Remotely bridged 'PJSIP/6002-00000005' and 'PJSIP/6001-00000006' - media will flow directly between them
> 0x7f3d38015200 -- Strict RTP learning after remote address set to: 10.0.10.44:5004
> 0x7f3d38026d80 -- Strict RTP switching to RTP target address 10.0.10.246:5042 as source
> 0x7f3d38015200 -- Strict RTP switching to RTP target address 10.0.10.44:5004 as source
-- Channel PJSIP/6001-00000006 left 'native_rtp' basic-bridge <9f6efcc1-3ea2-4ab6-815a-0c05c6d67f27>
-- Channel PJSIP/6002-00000005 left 'native_rtp' basic-bridge <9f6efcc1-3ea2-4ab6-815a-0c05c6d67f27>
== Spawn extension (from-internal, 6001, 2) exited non-zero on 'PJSIP/6002-00000005'