I use VoiceMailMain((a)sip.domain.com) but you seem to want to send the
mailboix number instead of asking the user to send, try
exten => 9999, 1, VoiceMailMain,s2092
Iqbal
n 7/28/2005, "Aisling" <ashling.odriscoll(a)cit.ie> wrote:
Hi Everyone,
Unfortunately when I was upgrading my version of SER to 0.9.0 I deleted
my config file which contained code for forwarding to asterisk
voicemail.Therefore I am attempting to set up all over again (Doh! I
know!) :-(
Anyhow SER seems to be correctly forwarding to Asterisk, the user can
leave a message if the phone isn't picked up after 3 rings and then the
message is sent to the users email account. I want the user to also be
able to listen to their voicemails from the end user device. It is my
understanding from what I have coded, that user should be able to dial
9999 and when SER receives this it sends it to Asterisk' VoiceMailMain
where the user will be asked for an account name and password.
However there are problems when the user dials 9999. The user can hear
nothing on the phone. Errors appear on both the SER screen and Asterisk
screen so I am not sure what the problem is:
On SER it says:
Warning: sl_send_reply: I won't send a reply for ACK!!
Forwarding to asterisk14(27355) contact_parser(): Empty body
Parse_contact(): Error while parsing
Get_contact_uri: Error while parsing Contact body
On Asterisk it says:
-- Executing VoiceMailMain("SIP/2092-dd89", "2092") in new stack
-- Playing 'vm-login' (language 'en')
WARNING: app_voicemail.c:3333 vm_execmain: Couldn't read username
Spawn extension (test, 9999, 1) exited non-zero on 'SIP/2092-c660'
The relevant parts of my ser.cfg and asterisk config files are shown
below.
Many thanks,
Aisling.
------------------------------------------------------------------------
-----------------------------------
ser.cfg
------------------------------------------------------------------------
----------------------------------
#Call Type Processing Section
if(uri==myself){
if(uri=~"^sip:9[0-9]*@serveraddress"){
log(1, "forwarding to asterisk");
rewritehostport("serveraddress:port");
append_branch();
t_relay_to_udp("serveraddress", "port");
break;
}
if (method == "INVITE"){
t_on_failure("1");
route(3);
break;
}
failure_route[1]{
revert_uri();
rewritehostport("serveraddress:port");
append_branch();
t_relay_to_udp("serveraddress", "port");
break();
}
------------------------------------------------------------------------
--------------------------------------
sip.conf
------------------------------------------------------------------------
-------------------------------------
[general]
context=test
port=5062
bindaddr=0.0.0.0
srvlookup=yes
[2092]
type=friend
username=2092
canreinvite=no
context=test
mailbox=2092
host=dynamic
nat=no
dtmfmode=info
disallow=all
allow=alaw
allow=ulaw
[314]
type=friend
username=314
canreinvite=no
context=test
mailbox=314
host=dynamic
nat=no
dtmfmode=info
disallow=all
allow=alaw
allow=ulaw
------------------------------------------------------------------------
-----------------------------------
extensions.conf
------------------------------------------------------------------------
----------------------------------
[test]
;leave voice messages
exten => 2092, 1, Voicemail(u2092)
exten => 2092, 2, Hangup
exten => 314, 1, Voicemail(u314)
exten => 314, 2, Hangup
;play voice messages
exten => 9999, 1, VoiceMailMain, 2092
exten => 9999, 2, Hangup
exten => 9999, 1, VoiceMailMain, 314
exten => 9999, 2, Hangup
------------------------------------------------------------------------
-------------------------------------
voicemail.conf
------------------------------------------------------------------------
--------------------------------------
[default]
2092 => 1234, 2092, emailaddress
314 => 1234, 314, emailaddress
-------------------Legal Disclaimer---------------------------------------
The above electronic mail transmission is confidential and intended only for the person to
whom it is addressed. Its contents may be protected by legal and/or professional
privilege. Should it be received by you in error please contact the sender at the above
quoted email address. Any unauthorised form of reproduction of this message is strictly
prohibited. The Institute does not guarantee the security of any information
electronically transmitted and is not liable if the information contained in this
communication is not a proper and complete record of the message as transmitted by the
sender nor for any delay in its receipt.