Asterisk loopback calls form one extension that playbacks to another that records for performance measuring

Home » Asterisk Users » Asterisk loopback calls form one extension that playbacks to another that records for performance measuring
Asterisk Users No Comments

I am attempting to Originate a call using Asterisk Manager on a Local
extension and linking with another Local extension.

One of them is going to play a wav and the other one will record. In the
end I will analyze the performance degradation of the wav crossing this
loopback.

The problem is that the two extensions close immediately after the call
in answered.
Please let me know if I am doing something wrong or if you have an idea
how I could obtain the same thing in another way.

The Asterisk Manager call
clientSocket.Send(Encoding.ASCII.GetBytes(“Action:
PingrnActionID: 2rnrn”));
// Send a ping request the asterisk server will
send back a pong response.
clientSocket.Send(Encoding.ASCII.GetBytes(“Action:
originatern”));
clientSocket.Send(Encoding.ASCII.GetBytes(“Channel:
Local/2020@internalrn”));
clientSocket.Send(Encoding.ASCII.GetBytes(“Exten:
2021 rn”));
clientSocket.Send(Encoding.ASCII.GetBytes(“Context:
internalrn”));

clientSocket.Send(Encoding.ASCII.GetBytes(“Priority: 1rn”));
clientSocket.Send(Encoding.ASCII.GetBytes(“Async:
truernCallerid: MyCall rn”));

clientSocket.Send(Encoding.ASCII.GetBytes(“ActionID: 3rnrn”));

The extensions

[internal]
exten => 2020,1,Answer
exten => 2020,3,Playback(demo-congrats)
exten => 2020,4,Hangup

exten => 2021,1,Answer
exten => 2021,2,Record(_demo-congrats,0,10)
exten => 2021,3,Hangup

Response: Success

ActionID: 3

Message: Originate successfully queued

Event: Newchannel
Privilege: call,all
Channel: Local/2020@internal-b7c4;1
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum:
CallerIDName:
AccountCode:
Exten: 2020
Context: internal
Uniqueid: 1290931314.32

Event: Newchannel
Privilege: call,all
Channel: Local/2020@internal-b7c4;2
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum:
CallerIDName:
AccountCode:
Exten: 2020
Context: internal
Uniqueid: 1290931314.33

Event: NewAccountCode
Privilege: call,all
Channel: Local/2020@internal-b7c4;1
Uniqueid: 1290931314.32
AccountCode:
OldAccountCode:

Event: NewCallerid
Privilege: call,all
Channel: Local/2020@internal-b7c4;1
CallerIDNum:
CallerIDName: MyCall
Uniqueid: 1290931314.32
CID-CallingPres: 0 (Presentation Allowed, Not Screened)

Event: Newexten
Privilege: dialplan,all
Channel: Local/2020@internal-b7c4;2
Context: internal
Extension: 2020
Priority: 1
Application: Answer
AppData:
Uniqueid: 1290931314.33

Event: Newstate
Privilege: call,all
Channel: Local/2020@internal-b7c4;2
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum:
CallerIDName: MyCall
Uniqueid: 1290931314.33

Event: Newstate
Privilege: call,all
Channel: Local/2020@internal-b7c4;1
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum:
CallerIDName: MyCall
Uniqueid: 1290931314.32

Event: OriginateResponse
Privilege: call,all
ActionID: 3
Response: Success
Channel: Local/2020@internal-b7c4;1
Context: internal
Exten: 2021
Reason: 4
Uniqueid: 1290931314.32
CallerIDNum:
CallerIDName: MyCall

Event: Hangup
Privilege: call,all
Channel: Local/2020@internal-b7c4;1
Uniqueid: 1290931314.32
CallerIDNum:
CallerIDName: MyCall
Cause: 0
Cause-txt: Unknown

Event: Hangup
Privilege: call,all
Channel: Local/2020@internal-b7c4;2
Uniqueid: 1290931314.33
CallerIDNum:
CallerIDName: MyCall
Cause: 0
Cause-txt: Unknown