Voice message can't hear

I have a

user: 6000
dialplan: numberplan-custom-2
voice message for the dial plan: numberplan-voice-2
voip provider: sip.xxx.xxx.net
softphone: X-Lite
Java application: Implemented using Asterisk-Java

The X-Lite scenario is this. When I register my X-Lite using 6000 user and call the extension 6000, the voice message will respond.

The Java Application scenario is this. When I run the Java application, It will call the mobile number I provided from the code. However, when I answer the call no voice message. my code goes something like this.

OriginateAction originateAction = new OriginateAction(); originateAction.setChannel("SIP/639152195485@pynkglobal-sip"); originateAction.setContext("numberplan-custom-2"); originateAction.setExten("6000"); originateAction.setPriority(new Integer(1)); originateAction.setTimeout(new Long(50000));

Is there anything wrong with the parameters I provided? Thanks

the asterisk-java code looks fine. It would send the call to

exten => 6000,1,…

Upon answer.

Thanks for the quick response. It is working now. However, there is some flaws. When I run the Java app there are times that the extension 6000 it automatically answers the call and I can see from the logs the voice message. But there are times that it calls my mobile phone. Do you know what’s the problem?

not without seeing some console output…

Hi, after running the code above, I’m getting this CLI logs:

Manager 'admin' logged on from > Channel SIP/pynkglobal-sip-00721ac0 was answered. -- Executing [6000@numberplan-custom-2:1] Goto("SIP/pynkglobal-sip-00721ac0", "voicemenu-custom-2|s|1") in new stack -- Goto (voicemenu-custom-2,s,1) -- Executing [s@voicemenu-custom-2:1] Answer("SIP/pynkglobal-sip-00721ac0", "") in new stack -- Executing [s@voicemenu-custom-2:2] Playback("SIP/pynkglobal-sip-00721ac0", "mobiclear-welcome") in new stack == Manager 'admin' logged off from -- <SIP/pynkglobal-sip-00721ac0> Playing 'mobiclear-welcome' (language 'en') -- Executing [s@voicemenu-custom-2:3] Read("SIP/pynkglobal-sip-00721ac0", "test||4|skip|1|15") in new stack -- Accepting a maximum of 4 digits. -- User entered nothing. -- Executing [s@voicemenu-custom-2:4] Playback("SIP/pynkglobal-sip-00721ac0", "mobiclear-goodbye") in new stack -- <SIP/pynkglobal-sip-00721ac0> Playing 'mobiclear-goodbye' (language 'en') -- Executing [s@voicemenu-custom-2:5] Hangup("SIP/pynkglobal-sip-00721ac0", "") in new stack == Spawn extension (voicemenu-custom-2, s, 5) exited non-zero on 'SIP/pynkglobal-sip-00721ac0'
But my mobilphone doesn’t recieve any calls. But somethimes it calls sometimes not.

try turning on SIP debugging and capture the CLI output again. You last trace missed the beginning of the call.