hello,
Now I am using ser-0.8.14. But it cann't work
well with sems.
I think that there is maybe some errors in my ser.cfg of
ser-0.8.14.
Can anyone help me? Thanks!
The following is part of ser.cfg:
if( is_user_in("Request-URI",
"voicemail")){
log(1, "yes,incoming voicemail
call\n");
if(!t_write_req("/tmp/am_fifo","voicemail")){
log("could not contact voicemail
server\n");
t_reply("500","could not contact voicemail
serv
};
}
else if(
is_user_in("Request-URI","announcement")){
#log(1, "incoming announcement call\n");
if(!t_write_req("/tmp/am_fifo","announcement")){
log("could not contact
announcement\n");
t_reply("500","could not contact
announcement");
};
}
This is the debug information of sems:
(1)
voicemail
The debug information is as the
following:
(17961) DEBUG: run (AmServer.cpp:172):
version= <0.2>
(17961) DEBUG: run (AmServer.cpp:182): fct_name=
<sip_request.voicemail>
(17961) DEBUG: execute (AmServer.cpp:240):
cmd.method= <INVITE>
(17961) DEBUG: execute (AmServer.cpp:241):
cmd.user= <zhangwei>
(17961) DEBUG: execute (AmServer.cpp:242):
cmd.email= <>
(17961) DEBUG: execute (AmServer.cpp:243): cmd.domain=
<sipsys.com>
(17961) DEBUG: execute (AmServer.cpp:244): cmd.dstip=
<210.72.128.102>
(17961) DEBUG: execute (AmServer.cpp:245): cmd.port=
<>
(17961) DEBUG: execute (AmServer.cpp:246): cmd.r_uri=
<sip:zhangwei@sipsys.com>
(17961) DEBUG: execute (AmServer.cpp:247):
cmd.from_uri= <sip:210.72.128.109:1302>
(17961) DEBUG: execute
(AmServer.cpp:248): cmd.from= <"leiwm@sipsys.com"
<sip:leiwm@
sipsys.com>>
(17961) DEBUG: execute
(AmServer.cpp:249): cmd.to= <<sip:zhangwei@sipsys.com>>
(17961) DEBUG: execute (AmServer.cpp:250): cmd.callid=
<b427eab561c74195a8105bfcc59
9a6d3@192.168.139.63>
(17961)
DEBUG: execute (AmServer.cpp:251): cmd.from_tag=
<1b41ffa0170543339e5505cd5
5548bbd>
(17961) DEBUG: execute
(AmServer.cpp:252): cmd.to_tag= <>
(17961) DEBUG: execute
(AmServer.cpp:255): cseq_str= <2>
(17961) DEBUG: execute
(AmServer.cpp:260): cseq= <2>(2)
(17961) DEBUG: execute
(AmServer.cpp:262): cmd.key= <19936:1411073482>
(17961) DEBUG: execute
(AmServer.cpp:263): cmd.route=
<<sip:210.72.128.101;ftag=1b41f
fa0170543339e5505cd55548bbd;lr=on>>
(17961)
DEBUG: execute (AmServer.cpp:264): cmd.next_hop=
<sip:210.72.128.101;ftag=1b4
1ffa0170543339e5505cd55548bbd;lr=on>
(17961)
DEBUG: execute (AmServer.cpp:270): hdrs: `P-MsgFlags: 0
P-hint: fixed NAT
contact for request
P-hint: SIP/RTP has been relayed !
'
(17961) DEBUG:
execute (AmServer.cpp:277): body: `v=0
o=- 0 0 IN IP4
192.168.139.63
s=session
c=IN IP4 210.72.128.101
b=CT:1000
t=0 0
m=audio 46036
RTP/AVP 97 0 8 18 4 101
a=rtpmap:97 red/8000
a=rtpmap:0
PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:4
G723/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101
0-16
a=encryption:rejected
'
(17961) DEBUG: execute (AmServer.cpp:288):
everything is OK !
(17961) ERROR: startSession (AmSession.cpp:456): 404
voicemail: no email address fo
r user <zhangwei>
(17961) DEBUG:
sendToFIFO (AmRequest.cpp:207):
msg=<:vm_reply:00004629788AE35A
404
voicemail: no email address for
user <zhangwei>
19936:1411073482
000046291BA1B558
Contact:
<sip:zhangwei@210.72.128.102>
.
.
>
(17961) DEBUG: write_to_fifo (AmRequest.cpp:750): Write to
fifo: completed
(17961) DEBUG: getReturnCode (AmRequest.cpp:436): response
from Ser: 500 command 'v
m_reply' not available
(17961) DEBUG: sendToFIFO
(AmRequest.cpp:229): sendToFifo returns ret=getReturnCode
=0
(17961)
ERROR: reply (AmRequest.cpp:332): AmRequestUAS::reply: 500 command
'vm_repl
y' not available
(17961) DEBUG: run (AmServer.cpp:172): version=
<0.2>
(17961) DEBUG: run (AmServer.cpp:182): fct_name=
<sip_request.bye>
(17961) DEBUG: execute (AmServer.cpp:240):
cmd.method= <CANCEL>
(17961) DEBUG: execute (AmServer.cpp:241):
cmd.user= <zhangwei>
(17961) DEBUG: execute (AmServer.cpp:242):
cmd.email= <>
(17961) DEBUG: execute (AmServer.cpp:243): cmd.domain=
<sipsys.com>
(17961) DEBUG: execute (AmServer.cpp:244): cmd.dstip=
<210.72.128.102>
(17961) DEBUG: execute (AmServer.cpp:245): cmd.port=
<>
(17961) DEBUG: execute (AmServer.cpp:246): cmd.r_uri=
<sip:zhangwei@sipsys.com>
(17961) DEBUG: execute (AmServer.cpp:247):
cmd.from_uri= <sip:leiwm@sipsys.com>
(17961) DEBUG: execute
(AmServer.cpp:248): cmd.from= <"leiwm@sipsys.com"
<sip:leiwm@
sipsys.com>>
(17961) DEBUG: execute
(AmServer.cpp:249): cmd.to= <<sip:zhangwei@sipsys.com>>
(17961)
DEBUG: execute (AmServer.cpp:250): cmd.callid=
<b427eab561c74195a8105bfcc59
9a6d3@192.168.139.63>
(17961)
DEBUG: execute (AmServer.cpp:251): cmd.from_tag=
<1b41ffa0170543339e5505cd5
5548bbd>
(17961) DEBUG: execute
(AmServer.cpp:252): cmd.to_tag= <>
(17961) DEBUG: execute
(AmServer.cpp:255): cseq_str= <2>
(17961) DEBUG: execute
(AmServer.cpp:260): cseq= <2>(2)
(17961) DEBUG: execute
(AmServer.cpp:262): cmd.key= <19936:1411073483>
(17961) DEBUG: execute
(AmServer.cpp:263): cmd.route= <>
(17961) DEBUG: execute
(AmServer.cpp:264): cmd.next_hop= <>
(17961) DEBUG: execute
(AmServer.cpp:270): hdrs: `P-MsgFlags: 0
'
(17961) DEBUG: execute
(AmServer.cpp:277): body: `'
(17961) DEBUG: execute (AmServer.cpp:288):
everything is OK !
(17961) DEBUG: sadSession (AmSession.cpp:322): searching
for session to destroy (ha
sh=b427eab561c74195a8105bfcc599a6d3@192.168.139.631b41ffa0170543339e5505cd55548bbd,
sess_key=)
(17961)
DEBUG: destroySession (AmSession.cpp:363): sess_it == sessions.end()
(17961)
DEBUG: sendToFIFO (AmRequest.cpp:207):
msg=<:vm_reply:000046293B78C6A5
481
Call/Transaction Does Not
Exist
19936:1411073483
Contact:
<sip:zhangwei@210.72.128.102>
.
.
>
(17961) DEBUG: write_to_fifo (AmRequest.cpp:750):
Write to fifo: completed
(17961) DEBUG: getReturnCode (AmRequest.cpp:436):
response from Ser: 500 command 'v
m_reply' not available
(17961) DEBUG:
sendToFIFO (AmRequest.cpp:229): sendToFifo returns
ret=getReturnCode
=0
(17961) ERROR: reply (AmRequest.cpp:332):
AmRequestUAS::reply: 500 command 'vm_repl
y' not available
(2) announcement
The 902001 user is in announcement group
The debug information is as the following:
(17961) DEBUG: run (AmServer.cpp:172): version=
<0.2>
(17961) DEBUG: run (AmServer.cpp:182): fct_name=
<sip_request.announcement>
(17961) DEBUG: execute (AmServer.cpp:240):
cmd.method= <INVITE>
(17961) DEBUG: execute (AmServer.cpp:241):
cmd.user= <902001>
(17961) DEBUG: execute (AmServer.cpp:242):
cmd.email= <>
(17961) DEBUG: execute (AmServer.cpp:243): cmd.domain=
<sipsys.com>
(17961) DEBUG: execute (AmServer.cpp:244): cmd.dstip=
<210.72.128.102>
(17961) DEBUG: execute (AmServer.cpp:245): cmd.port=
<>
(17961) DEBUG: execute (AmServer.cpp:246): cmd.r_uri=
<sip:902001@sipsys.com>
(17961) DEBUG: execute (AmServer.cpp:247):
cmd.from_uri= <sip:210.72.128.109:1358>
(17961) DEBUG: execute
(AmServer.cpp:248): cmd.from= <"leiwm@sipsys.com"
<sip:leiwm@
sipsys.com>>
(17961) DEBUG: execute
(AmServer.cpp:249): cmd.to= <<sip:902001@sipsys.com>>
(17961)
DEBUG: execute (AmServer.cpp:250): cmd.callid=
<c992a9220bc2411ab163f0863fe
a0471@192.168.139.63>
(17961)
DEBUG: execute (AmServer.cpp:251): cmd.from_tag=
<61c1f5139ea74614a9996ff80
a36814b>
(17961) DEBUG: execute
(AmServer.cpp:252): cmd.to_tag= <>
(17961) DEBUG: execute
(AmServer.cpp:255): cseq_str= <2>
(17961) DEBUG: execute
(AmServer.cpp:260): cseq= <2>(2)
(17961) DEBUG: execute
(AmServer.cpp:262): cmd.key= <886:408346041>
(17961) DEBUG: execute
(AmServer.cpp:263): cmd.route=
<<sip:210.72.128.101;ftag=61c1f
5139ea74614a9996ff80a36814b;lr=on>>
(17961)
DEBUG: execute (AmServer.cpp:264): cmd.next_hop=
<sip:210.72.128.101;ftag=61c
1f5139ea74614a9996ff80a36814b;lr=on>
(17961)
DEBUG: execute (AmServer.cpp:270): hdrs: `P-MsgFlags: 0
P-hint: fixed NAT
contact for request
P-hint: SIP/RTP has been relayed !
'
(17961) DEBUG:
execute (AmServer.cpp:277): body: `v=0
o=- 0 0 IN IP4
192.168.139.63
s=session
c=IN IP4 210.72.128.101
b=CT:1000
t=0
0
m=audio 46044 RTP/AVP 97 0 8 18 4 101
a=rtpmap:97 red/8000
a=rtpmap:0
PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:4
G723/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101
0-16
a=encryption:rejected
'
(17961) DEBUG: execute (AmServer.cpp:288):
everything is OK !
(17961) DEBUG: onInvite (Announcement.cpp:89): trying
'/usr/local/lib/sems/audio/51
sip.com/902001.wav'
(17961) DEBUG:
startSession (AmSession.cpp:450): Starting session... (hash=c992a922
0bc2411ab163f0863fea0471@192.168.139.6361c1f5139ea74614a9996ff80a36814b,sess_key=00
004629295AD0E1)
(17961)
DEBUG: parse_sdp_attribute (AmSdp.cpp:654): unknown attribute definition
'e
ncryption:rejected'
(17961) DEBUG: negotiate (AmSession.cpp:126):
dir=0; msg_flags=0
(17961) DEBUG: setLocalPort (AmRtpStream.cpp:141): setting
random local port
(17961) DEBUG: setLocalPort (AmRtpStream.cpp:178): local
rtp port set to 1570
(17961) DEBUG: sendToFIFO (AmRequest.cpp:207):
msg=<:vm_reply:0000462951FCB30A
200
OK
886:408346041
00004629295AD0E1
Contact:
<sip:902001@210.72.128.102>
Content-Type:
application/sdp
.
v=0
o=username 0 0 IN IP4
210.72.128.102
s=session
c=IN IP4 210.72.128.102
t=0 0
m=audio 1570
RTP/AVP 0
a=rtpmap:0 PCMU/8000
.
>
(17961) DEBUG: write_to_fifo (AmRequest.cpp:750):
Write to fifo: completed
(17961) DEBUG: getReturnCode (AmRequest.cpp:436):
response from Ser: 500 command 'v
m_reply' not available
(17961) DEBUG:
sendToFIFO (AmRequest.cpp:229): sendToFifo returns
ret=getReturnCode
=0
(17961) ERROR: reply (AmRequest.cpp:332):
AmRequestUAS::reply: 500 command 'vm_repl
y' not available
(17961) ERROR:
run (AmSession.cpp:183): 500 could not send response.
(17961) DEBUG:
sendToFIFO (AmRequest.cpp:207):
msg=<:vm_reply:000046294CC3BF35
500
could not send
response.
886:408346041
00004629295AD0E1
Contact:
<sip:902001@210.72.128.102>
.
.
>