Voicemail problem

I am learning * now. I just configed the system as following:

Asterisk 1.2.1 on Fedora C4 with one X100P FXO card.

When I try to dial in through another PSTN and try to reach a X-Lite softphone extension, if no answer it will not redirect to the voicemail. The X-lite just keep ringing and ringing, even after I hang up the PSTN call, the X-lite is still ringing. It never try to redirect to the voicemail

If I make the extension busy, then I can get the voivemail as normal.

What would be the problem here? I follow the book and my extensions.conf is like :

exten => 101,1,Dial(${JOHN},10,r)
exten => 101,2,VoiceMail(u101@default)
exten => 101,102,VoiceMail(b101@default)

Thanks for help!

ok … now can we see the output at the console for the call (or the log messages) ??

[root@localhost ~]# asterisk -r
Asterisk 1.2.1, Copyright © 1999 - 2005 Digium.
Written by Mark Spencer markster@digium.com

Connected to Asterisk 1.2.1 currently running on localhost (pid = 1861)
Verbosity is at least 3
– Starting simple switch on ‘Zap/1-1’
– Executing Answer(“Zap/1-1”, “”) in new stack
– Executing Playback(“Zap/1-1”, “this-call-may-be-monitored-or-recorded”) in new stack
– Playing ‘this-call-may-be-monitored-or-recorded’ (language ‘en’)
– Executing BackGround(“Zap/1-1”, “enter-ext-of-person”) in new stack
– Playing ‘enter-ext-of-person’ (language ‘en’)
== CDR updated on Zap/1-1
– Executing Dial(“Zap/1-1”, “SIP/may”) in new stack
– Called may
– SIP/may-5664 is ringing [color=red]***1[/color]
– SIP/may-5664 answered Zap/1-1 [color=red]***2[/color]
== Spawn extension (incoming, 102, 1) exited non-zero on ‘Zap/1-1’
– Hungup ‘Zap/1-1’

Note:
***1: Start ringing and keep going on and on
***2: Manual hang up at the X-lite

we’re obviously missing key parts of your config since what you posted doesn’t show anything about messages about being recorded or whatever. what does the rest of extensions.conf look like?

log from X-lite:

=========================================
RECEIVE TIME: 88154808
RECEIVE << 192.168.0.101:5060
INVITE sip:may@192.168.0.4:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.101:5060;branch=z9hG4bK3f005b1c;rport
From: "G J " sip:604xxxxxxx@192.168.0.101;tag=as7ce1db96
To: sip:may@192.168.0.4:5060
Contact: sip:604xxxxxxx@192.168.0.101
Call-ID: 071e54f23bf533cd0dfde1a25d8b349c@192.168.0.101
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Fri, 20 Jan 2006 17:52:49 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Type: application/sdp
Content-Length: 263

v=0
o=root 1861 1861 IN IP4 192.168.0.101
s=session
c=IN IP4 192.168.0.101
t=0 0
m=audio 16326 RTP/AVP 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

SEND TIME: 88154810
SEND >> 192.168.0.101:5060
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.101:5060;branch=z9hG4bK3f005b1c;rport
From: "G J " sip:604xxxxxxx@192.168.0.101;tag=as7ce1db96
To: sip:may@192.168.0.4:5060;tag=1776936638
Contact: sip:may@192.168.0.4:5060
Call-ID: 071e54f23bf533cd0dfde1a25d8b349c@192.168.0.101
CSeq: 102 INVITE
Server: X-Lite release 1105x
Content-Length: 0

SEND TIME: 88154815
SEND >> 192.168.0.101:5060
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.0.101:5060;branch=z9hG4bK3f005b1c;rport
From: "G J " sip:604xxxxxxx@192.168.0.101;tag=as7ce1db96
To: sip:may@192.168.0.4:5060;tag=1776936638
Contact: sip:may@192.168.0.4:5060
Call-ID: 071e54f23bf533cd0dfde1a25d8b349c@192.168.0.101
CSeq: 102 INVITE
Server: X-Lite release 1105x
Content-Length: 0

SEND TIME: 88200921
SEND >> 192.168.0.101:5060
SIP/2.0 200 Ok
Via: SIP/2.0/UDP 192.168.0.101:5060;branch=z9hG4bK3f005b1c;rport
From: "G J " sip:604xxxxxxx@192.168.0.101;tag=as7ce1db96
To: sip:may@192.168.0.4:5060;tag=1776936638
Contact: sip:may@192.168.0.4:5060
Call-ID: 071e54f23bf533cd0dfde1a25d8b349c@192.168.0.101
CSeq: 102 INVITE
Content-Type: application/sdp
Server: X-Lite release 1105x
Content-Length: 302

v=0
o=may 88154809 88200920 IN IP4 192.168.0.4
s=X-Lite
c=IN IP4 192.168.0.4
t=0 0
m=audio 8000 RTP/AVP 3 0 8 98 97 101
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:3 gsm/8000
a=rtpmap:98 iLBC/8000
a=rtpmap:97 speex/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

RECEIVE TIME: 88200923
RECEIVE << 192.168.0.101:5060
ACK sip:may@192.168.0.4:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.101:5060;branch=z9hG4bK6629be65;rport
From: "G J " sip:6042xxxxxxx@192.168.0.101;tag=as7ce1db96
To: sip:may@192.168.0.4:5060;tag=1776936638
Contact: sip:604xxxxxxx@192.168.0.101
Call-ID: 071e54f23bf533cd0dfde1a25d8b349c@192.168.0.101
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0

SEND TIME: 88201871
SEND >> 192.168.0.101:5060
BYE sip:604xxxxxxxxxx@192.168.0.101 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.4:5060;rport;branch=z9hG4bK4616A27ACD5C4A79BB894D50E5AEF041
From: sip:may@192.168.0.4:5060;tag=1776936638
To: "G J " sip:604xxxxxxx@192.168.0.101;tag=as7ce1db96
Contact: sip:may@192.168.0.4:5060
Call-ID: 071e54f23bf533cd0dfde1a25d8b349c@192.168.0.101
CSeq: 42171 BYE
Max-Forwards: 70
User-Agent: X-Lite release 1105x
Content-Length: 0

RECEIVE TIME: 88201873
RECEIVE << 192.168.0.101:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.4:5060;rport;branch=z9hG4bK4616A27ACD5C4A79BB894D50E5AEF041;received=192.168.0.4
From: sip:may@192.168.0.4:5060;tag=1776936638
To: "G J " sip:604xxxxxxx@192.168.0.101;tag=as7ce1db96
Call-ID: 071e54f23bf533cd0dfde1a25d8b349c@192.168.0.101
CSeq: 42171 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Max-Forwards: 70
Contact: sip:604xxxxxxx@192.168.0.101
Content-Length: 0
X-Asterisk-HangupCause: Normal Clearing

Here is the extensions.conf. Thanks for help!

[root@localhost asterisk]# more extensions.conf
[globals]

[incoming]
exten => s,1,Answer()
exten => s,2,Playback(this-call-may-be-monitored-or-recorded)
exten => s,3,Background(enter-ext-of-person)
exten => 101,1,Dial(SIP/jian)
exten => 101,2,Playback(vm-nobodyavail)
exten => 101,3,Hangup()
exten => 101,102,Playback(tt-allbusy)
exten => 101,103,Hangup()
exten => 102,1,Dial(SIP/may)
exten => 102,2,Playback(vm-nobodyavail)
exten => 102,3,Hangup()
exten => 102,102,Playback(tt-allbusy)
exten => 102,103,Hangup()
exten => i,1,Playback(pbx-invalid)
exten => i,2,Goto(incoming,s,1)
exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup()

[internal]
include => outbound-local
include => outbound-toll-free
exten => 101, 1,Dial(SIP/jian,10,r)
exten => 101,2,VoiceMail(u101@default)
exten => 101,102,VoiceMail(b101@default)
exten => 102, 1,Dial(SIP/may,10,r)
;exten => may, 1,Dial(SIP/may)
exten => 102, 2,VoiceMail(u102@default)
exten => 102, 102, VoiceMail(b102@default)

exten => 500,1,VoiceMailMain()

[outbound-local]
exten => _9NXXXXXXXXX,1,Dial(Zap/1/${EXTEN:1})
exten => _9NXXXXXXXXX,2,Congestion()
exten => _9NXXXXXXXXX,102,Congestion()

[outbound-toll-free]
exten => _918XXXXXXXXX,1,Dial(Zap/1/${EXTEN:1})
exten => _918XXXXXXXXX,2,Congestion()
exten => _918XXXXXXXXX,102,Congestion()

I believe Dial() rings with no timeout. You can specify one in the Dial command…

The problem lies in your [incoming] context. First, you are not specifing a timeout in the dial command, and second, even if there were a timeout, your next priorities just play a message then hang up.

Change your dialplan in the incoming context to:

exten => 101,1, Dial(SIP/jian,20) ; dials jian and waits 20 secs for answer
exten => 101,2, VoiceMail(u101@default) ; no ans, send to unavail VM
exten => 101,102, VoiceMail(b101@default) ; busy, send to busy VM

Basically, just copy your extensions from the [internal] context to your [incoming] context. Then it should do what you expect.

Justin

thank you, neuchatel.

I modified the file and now it’s can record the VM when unavaliable. But after recording, if I just hangup, the line will keep busy until I stop the Asterisk. If I press “#” then hangup, then Asterrisk will really hangup.

Here is my new extensions.conf:

[incoming]
exten => s,1,Answer()
exten => s,2,Playback(this-call-may-be-monitored-or-recorded)
exten => s,3,Background(enter-ext-of-person)
exten => 101,1,Dial(SIP/jian,20)
exten => 101,2,VoiceMail(u101@default)
exten => 101,3,Hangup() [color=blue] do I need this line here?[/color]
exten => 101,102,VoiceMail(b101@default)
exten => 101,103,Hangup() [color=blue] do I need this line here?[/color]
exten => 102,1,Dial(SIP/may,20)
exten => 102,2,VoiceMail(u102@default)
exten => 102,3,Hangup()
exten => 102,102,VoiceMail(b102@default)
exten => 102,103,Hangup()
exten => i,1,Playback(pbx-invalid)
exten => i,2,Goto(incoming,s,1)
exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup()

Read through this thread where I had a problem with Asterisk detecting the far-end disconnect: http://forums.digium.com/viewtopic.php?t=3703

See if that helps.

Justin

Hi, Justin,

I added that busydetect=yes line and it works!

Thank you.