- Executing [s@fun1:2] NoOp("SIP/mpapp2-00000000", "INIT_CHANNEL: SIP/mpapp2-00000000") in new stack
-- Executing [s@fun1:3] Set("SIP/mpapp2-00000000", "SHARED(INIT_CHANNEL,)=SIP/mpapp2-00000000") in new stack
-- Executing [s@fun1:4] Set("SIP/mpapp2-00000000", "SHARED(CONF,)=00491777000001") in new stack
[fun1]
exten => s,1,NoOp(${CONF})
exten => s,n,NoOp(INIT_CHANNEL: ${CDR(channel)})
exten => s,n,Set(SHARED(INIT_CHANNEL,${CDR(dstchannel)})=${CDR(channel)})
exten => s,n,Set(SHARED(CONF,${CDR(dstchannel)})=${CONF})
exten => s,n,MeetMe(${CONF},Akmqd)
exten => s,n,Hangup
[fun2]
exten => s,1,NoOp(${SHARED(CONF)})
exten => s,n,Wait(0.5)
exten => s,n,NoOp(${SHARED(INIT_CHANNEL)})
exten => s,n,MeetMe(${SHARED(CONF)},kxqd)
exten => s,n,AGI(kill_channel.sh,${SHARED(INIT_CHANNEL)})
exten => s,n,NoOp("NOT_IN_THE_MEETME")
exten => s,n,Hangup
[separator]
exten => s,1,Goto(fun1,s,1)
exten => s,2,Goto(fun2,s,1)
[fun1]
exten => s,1,NoOp(Data 1: CONF=${CONF} INIT_CHANNEL=${INIT_CHANNEL})
exten => s,n,MeetMe(${CONF},Akmqd)
exten => s,n,Hangup
[fun2]
exten => s,1,NoOp(Data 2: CONF=${CONF} INIT_CHANNEL=${INIT_CHANNEL})
exten => s,n,Wait(0.5)
exten => s,n,MeetMe(${CONF},kxqd)
exten => s,n,AGI(kill_channel.sh,${INIT_CHANNEL})
exten => s,n,NoOp("NOT_IN_THE_MEETME")
exten => s,n,Hangup
The underline char made also a difference.exten => _0049ZX.,1,NoOp(Starting Dialout Procedure app_sound_voippro INT ${EXTEN}) same => n,SIPAddHeader(P-Preferred-Identity: <sip:+4917683869864@locophono.com>) same => n,Set(__CONF=${EXTEN}) same => n,Set(__INIT_CHANNEL=${CDR(channel)}) same => n,Set(FILE(/var/lib/asterisk/conferences/${SIPCALLID})=${CONF}) same => n,Dial(SIP/${EXTEN}@sipout_voippro,30,rG(separator,s,1)) same => n,NoOp("Call should not end here") same => n,Hangup()
#codecs
codecs =opus,alaw,ulaw,g729,g722,mpeg4-generic,telephone-event,h264,vp8,flv,mpv
codecs_exclude_sip =mpeg4-generic,flv,mpv
codecs_exclude_streaming =flv,telephone-event
codecs_exclude_sip_rtmp =opus,g729,g722,mpeg4-generic,vp8,mpv
#websocket ports
ws.port =8080
wss.port =8443
rtp_force_synchronization=true
rtp_activity_detecting=false,0
generate_av_for_ua=all
stun_freshness_timeout=1000000000
streaming_video_decoder_fast_start=false
add_register_auth_headers=false
mixer_video_enabled=false
rtp_receive_buffer_size=131072
rtp_send_buffer_size =131072
Of course I tried to change out the stripCodec value with PCMU, PCMA and G722 but without any success.function call() {
var session = Flashphoner.getSessions()[0];
var constraints = {
audio: false,
video: false
};
//prepare outgoing call
var outCall = session.createCall({
callee: $("#callee").val(),
visibleName: $("#sipLogin").val(),
localVideoDisplay: localDisplay,
remoteVideoDisplay: remoteDisplay,
constraints: constraints,
receiveAudio: true,
receiveVideo: false,
stripCodecs:"SILK"
}).on(CALL_STATUS.RING, function(){
[...]
-- Executing [00491777000001@sipout_app_sound_voippro:1] NoOp("SIP/mpapp2-00000024", "Starting Dialout Procedure app_sound_voippro INT 00491777000001") in new stack
-- Executing [00491777000001@sipout_app_sound_voippro:2] SIPAddHeader("SIP/mpapp2-00000024", "P-Preferred-Identity: <sip:+4917683869864@locophono.com>") in new stack
-- Executing [00491777000001@sipout_app_sound_voippro:3] Set("SIP/mpapp2-00000024", "__CONF=00491777000001") in new stack
-- Executing [00491777000001@sipout_app_sound_voippro:4] Set("SIP/mpapp2-00000024", "__INIT_CHANNEL=SIP/mpapp2-00000024") in new stack
-- Executing [00491777000001@sipout_app_sound_voippro:5] Set("SIP/mpapp2-00000024", "FILE(/var/lib/asterisk/conferences/00491777000001)=cde54620-d931-11e8-a543-4303c23be106") in new stack
-- Executing [00491777000001@sipout_app_sound_voippro:6] Dial("SIP/mpapp2-00000024", "SIP/00491777000001@sipout_voippro,30,rG(separator,s,1)") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/00491777000001@sipout_voippro
-- SIP/sipout_voippro-00000025 is making progress passing it to SIP/mpapp2-00000024
-- SIP/sipout_voippro-00000025 answered SIP/mpapp2-00000024
-- Executing [s@separator:1] Goto("SIP/mpapp2-00000024", "fun1,s,1") in new stack
-- Executing [s@separator:2] Goto("SIP/sipout_voippro-00000025", "fun2,s,1") in new stack
-- Goto (fun1,s,1)
-- Goto (fun2,s,1)
-- Executing [s@fun1:1] NoOp("SIP/mpapp2-00000024", "Data 1: CONF=00491777000001 INIT_CHANNEL=SIP/mpapp2-00000024") in new stack
-- Executing [s@fun2:1] NoOp("SIP/sipout_voippro-00000025", "Data 2: CONF=00491777000001 INIT_CHANNEL=SIP/mpapp2-00000024") in new stack
-- Executing [s@fun2:2] Wait("SIP/sipout_voippro-00000025", "0.5") in new stack
-- Executing [s@fun1:2] MeetMe("SIP/mpapp2-00000024", "00491777000001,Akmqd") in new stack
-- Created MeetMe conference 1023 for conference '00491777000001'
-- Executing [s@fun2:3] MeetMe("SIP/sipout_voippro-00000025", "00491777000001,kxqd") in new stack
-- Attempting call on Local/s@inject-sound for application Playback(15_14) (Retry 1)
-- Called s@inject-sound
-- Executing [s@inject-sound:1] MeetMe("Local/s@inject-sound-00000024;2", "cde54620-d931-11e8-a543-4303c23be106,qd") in new stack
-- Local/s@inject-sound-00000024;1 answered
> Launching Playback(15_14) on Local/s@inject-sound-00000024;1
-- <Local/s@inject-sound-00000024;1> Playing '15_14.slin' (language 'en')
-- Created MeetMe conference 1022 for conference 'cde54620-d931-11e8-a543-4303c23be106'
[2018-10-26 17:14:32] NOTICE[14085]: pbx_spool.c:460 attempt_thread: Call completed to Local/s@inject-sound
{
"callId": "cde54620-d931-11e8-a543-4303c23be106",
"incoming": false,
"status": "ESTABLISHED",
"caller": "mpapp2",
"callee": "00491777000001",
"localAudioCodec": "PCMU",
"remoteAudioCodec": "PCMA",
"remoteVideoCodec": "H264",
"createDate": 1540566856382,
"hasAudio": true,
"hasVideo": false,
"visibleName": "mpapp2",
"mediaProvider": "WebRTC",
"sipStatus": 200,
"holdForTransfer": false,
"id": "cde54620-d931-11e8-a543-4303c23be106_null",
"msrp": false,
"history": false
}
It seems like Asterisk uses PCMA (alaw) codec. So check if file that you try to playback on Asterisk uses this codec too."localAudioCodec": "PCMU",
"remoteAudioCodec": "PCMA",
stripCodec forces WCS do not use codecs listed. For example if Asterisk wants to use PCMA you can exclude other codecs like this:Of course I tried to change out the stripCodec value with PCMU, PCMA and G722 but without any success
stripCodecs: "opus,OPUS,PCMU,G722,G729"
exec('echo "Set: CONF='.$output.'" >> /tempcids/'.$cidf);
exec('echo "Set: CONF='.$cid.'" >> /tempcids/'.$cidf);
Channel: Local/s@inject-sound
Application: Playback
Data: /path/to/sound/file
Archive: Yes
Set: CONF=1234567890
if(Browser.isFirefox()) {
var audioContext = new AudioContext();
var emptyAudioStream = audioContext.createMediaStreamDestination().stream;
constraints.customStream = emptyAudioStream;
}
Glad it works for you. It would be enough to purchase a monthly subscription from here https://flashphoner.com/simple-licenseCan I pay a fee for your work?