[asterisk-users] Asterisk loopback calls form one extension that playbacks to another that records for performance measuring

Alexandru Smeureanu alexandru.smeureanu at gmail.com
Sun Nov 28 07:42:10 CST 2010


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: 
Ping\r\nActionID: 2\r\n\r\n"));
                     // Send a ping request the asterisk server will 
send back a pong response.
                     clientSocket.Send(Encoding.ASCII.GetBytes("Action: 
originate\r\n"));
                     clientSocket.Send(Encoding.ASCII.GetBytes("Channel: 
Local/2020 at internal\r\n"));
                     clientSocket.Send(Encoding.ASCII.GetBytes("Exten: 
2021 \r\n"));
                     clientSocket.Send(Encoding.ASCII.GetBytes("Context: 
internal\r\n"));
 
clientSocket.Send(Encoding.ASCII.GetBytes("Priority: 1\r\n"));
                     clientSocket.Send(Encoding.ASCII.GetBytes("Async: 
true\r\nCallerid: MyCall \r\n"));
 
clientSocket.Send(Encoding.ASCII.GetBytes("ActionID: 3\r\n\r\n"));

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 at 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 at 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 at internal-b7c4;1
Uniqueid: 1290931314.32
AccountCode:
OldAccountCode:

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

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


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

Event: Newstate
Privilege: call,all
Channel: Local/2020 at 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 at internal-b7c4;1
Context: internal
Exten: 2021
Reason: 4
Uniqueid: 1290931314.32
CallerIDNum: <unknown>
CallerIDName: MyCall

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

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





More information about the asterisk-users mailing list