[asterisk-users] Trouble getting sound from a call

Michael Rice mike at mhi-tx.com
Mon Jul 30 10:10:04 CDT 2007


Having some issues with getting sound from a call.
I have 4 systems. 3 main systems which handle calls for our 3 locations. 
The 4th system is the central voice mail system. When an inbound call 
gets passed to someones voice mail its done with an IAX2 connection. The 
same happens after hours when we have our night mode set. If you dial 
the main number after hours you are passed straight to the voice mail 
server where I have an IVR set to answer/handle the calls:

[ivr-1]
include => heading-out
exten => h,1,Hangup
exten => s,1,Set(LOOPCOUNT=0)
exten => s,n,Set(__DIR-CONTEXT=default)
exten => s,n,Set(_IVR_CONTEXT_${CONTEXT}=${IVR_CONTEXT})
exten => s,n,Set(_IVR_CONTEXT=${CONTEXT})
exten => s,n,GotoIf($["${CDR(disposition)}" = "ANSWERED"]?begin)
exten => s,n,Answer
exten => s,n,Wait(1)
exten => s,n(begin),Set(TIMEOUT(digit)=3)
exten => s,n,Set(TIMEOUT(response)=60)
exten => s,n,Background(custom/mhi-main-greeting)
exten => s,n,WaitExten()
exten => #,1,Goto(app-directory,#,1)
exten => #,n,dbDel(${BLKVM_OVERRIDE})
exten => #,n,Set(__NODEST=)
exten => #,n,Goto(app-pbdirectory,pbdirectory,1)
exten => hang,1,Playback(vm-goodbye)
exten => hang,n,Hangup
exten => i,1,dbDel(${BLKVM_OVERRIDE})
exten => i,n,Set(__NODEST=)
exten => i,n,Goto(ivr-1,s,begin)
exten => t,1,dbDel(${BLKVM_OVERRIDE})
exten => t,n,Set(__NODEST=)
exten => t,n,Goto(app-blackhole,hangup,1)
exten => 0,1,Goto(incoming,252,1)

[heading-out]
include => call-sa-users
include => call-dal-users
include => call-hou-users

[call-dal-users]
exten => 101,1,Dial(IAX2/toPBX2/${EXTEN})
exten => 101,n,Hangup
exten => 102,1,Dial(IAX2/toPBX2/${EXTEN})
exten => 102,n,Hangup
exten => 103,1,Dial(IAX2/toPBX2/${EXTEN})
exten => 103,n,Hangup
exten => 104,1,Dial(IAX2/toPBX2/${EXTEN})
exten => 104,n,Hangup

[call-hou-users]
exten => 150,1,Dial(IAX2/toPBX3/${EXTEN})
exten => 150,n,Hangup
exten => 151,1,Dial(IAX2/toPBX3/${EXTEN})
exten => 151,n,Hangup
exten => 152,1,Dial(IAX2/toPBX3/${EXTEN})
exten => 152,n,Hangup
exten => 153,1,Dial(IAX2/toPBX3/${EXTEN})
exten => 153,n,Hangup

[call-sa-users]
exten => 200,1,Dial(IAX2/toPBX1/${EXTEN})
exten => 200,n,Hangup
exten => 201,1,Dial(IAX2/toPBX1/${EXTEN})
exten => 201,n,Hangup
exten => 202,1,Dial(IAX2/toPBX1/${EXTEN})
exten => 202,n,Hangup
exten => 203,1,Dial(IAX2/toPBX1/${EXTEN})
exten => 203,n,Hangup

[app-directory]
include => app-directory-custom
exten => #,1,Answer
exten => #,n,Wait(1)
exten => 
#,n,AGI(directory,${DIR-CONTEXT},heading-out,${DIRECTORY:0:1}${DIRECTORY_OPTS})
exten => #,n,Playback(vm-goodbye)
exten => #,n,Hangup
exten => i,1,Playback(privacy-incorrect)



If you know the persons extension who you want to call you can dial it 
and if they don't answer you get passed back to the voice mail system 
and the persons message is played, you can hear it play, and you are 
able to leave them a message. The problem comes if you hit # to enter 
the directory. Once you find the person you are looking for and you hit 
1 to dial them their phone rings, if they pick up you can talk to them 
fine and there are no audio problems. If they don't answer and you get 
passed back to the voice mail system I see the system answer the call

     -- Executing Goto("IAX2/sapeer-1", "ivr-1|s|1") in new stack
     -- Goto (ivr-1,s,1)
     -- Executing Set("IAX2/sapeer-1", "LOOPCOUNT=0") in new stack
     -- Executing Set("IAX2/sapeer-1", "__DIR-CONTEXT=default") in new stack
     -- Executing Set("IAX2/sapeer-1", "_IVR_CONTEXT_ivr-1=") in new stack
     -- Executing Set("IAX2/sapeer-1", "_IVR_CONTEXT=ivr-1") in new stack
     -- Executing GotoIf("IAX2/sapeer-1", "0?begin") in new stack
     -- Executing Answer("IAX2/sapeer-1", "") in new stack
     -- Executing Wait("IAX2/sapeer-1", "1") in new stack
     -- Executing Set("IAX2/sapeer-1", "TIMEOUT(digit)=3") in new stack
     -- Digit timeout set to 3
     -- Executing Set("IAX2/sapeer-1", "TIMEOUT(response)=60") in new stack
     -- Response timeout set to 60
     -- Executing BackGround("IAX2/sapeer-1", 
"custom/mhi-main-greeting") in new stack
     -- Playing 'custom/mhi-main-greeting' (language 'en')
   == CDR updated on IAX2/sapeer-1
     -- Executing Goto("IAX2/sapeer-1", "app-directory|#|1") in new stack
     -- Goto (app-directory,#,1)
     -- Executing Answer("IAX2/sapeer-1", "") in new stack
     -- Executing Wait("IAX2/sapeer-1", "1") in new stack
     -- Executing AGI("IAX2/sapeer-1", "directory|default|heading-out|") 
in new stack
     -- Launched AGI Script /var/lib/asterisk/agi-bin/directory
     -- Playing 'dir-intro-fn' (language 'en')
   ==  directory|default|heading-out|: Found 
/var/spool/asterisk/voicemail/default/231/greet.wav
   directory|default|heading-out|: -- Playing 'dir-instr' (language 'en')
     -- AGI Script directory completed, returning 0
     -- Executing Dial("IAX2/sapeer-1", "IAX2/toPBX1/231") in new stack
     -- Called toPBX1/231
     -- Call accepted by 192.168.81.2 (format ulaw)
     -- Format for call is ulaw
     -- IAX2/toPBX1-2 is ringing
     -- IAX2/toPBX1-2 stopped sounds
     -- Accepting AUTHENTICATED call from 192.168.81.2:
        > requested format = ulaw,
        > requested prefs = (ulaw|alaw|gsm),
        > actual format = ulaw,
        > host prefs = (),
        > priority = caller
     -- Executing Set("IAX2/sapeer-3", "VBOX=231") in new stack
     -- Executing VoiceMail("IAX2/sapeer-3", "b231 at default") in new stack
     -- IAX2/toPBX1-2 answered IAX2/sapeer-1
     -- Attempting native bridge of IAX2/sapeer-1 and IAX2/toPBX1-2
     -- Channel 'IAX2/sapeer-1' ready to transfer
     -- Releasing IAX2/sapeer-1 and IAX2/toPBX1-2
     -- Playing '/var/spool/asterisk/voicemail/default/231/busy' 
(language 'en')
     -- Playing 'vm-intro' (language 'en')
     -- Playing 'beep' (language 'en')
     -- Recording the message
     -- x=0, open writing: 
/var/spool/asterisk/voicemail/default/231/tmp/Rt0dUz format: wav, 0x8e96088
Jul 30 08:51:03 WARNING[22531]: app.c:643 ast_play_and_record_full: No 
audio available on IAX2/sapeer-3??
     -- User hung up
   == Spawn extension (incoming, b231, 2) exited non-zero on 'IAX2/sapeer-3'
     -- Hungup 'IAX2/sapeer-3'
     -- Hungup 'IAX2/toPBX1-2'
   == Spawn extension (heading-out, 231, 1) exited non-zero on 
'IAX2/sapeer-1'
     -- Hungup 'IAX2/sapeer-1'

I never hear the audio where it shows to be playing my greeting. I am 
also unable to record a voice message. I could sure use some help 
getting this working. Thanks




More information about the asterisk-users mailing list