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!) L
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