Hello,
o Randy Jackson [04/22/09 19:49]:
Stefan,
For a SER/SEMS configuration using the voicemail app, 4605 calls 4610.
4610 doesn’t answer and call is forwarded to 9200. If the forwarded
call is routed to SER/SEMS (i.e. see example below) when the SER
(ser-2.0.0-rc1) receives the below INVITE which contains the Diversion
header in the message header portion of the request, what module and
methods do you use to retrieve the parameters from the Diversion header,
like the URI? 9200 does not have a vm account. The vm app will not
answer the call for account 4610 based on the below INVITE. Thanks in
advance.
The question is: where do you get the email address from? If it's in DB
I think you could get the user from the diversion header into avp with
some clever textops and then do the DB query with it to get email
address and user into P-App-Param header.
If you are only using mode=box (only voicebox, no mail) though, it may
be simpler to get the user in SEMS like with this patch to voicemail app:
Index: AnswerMachine.cpp
===================================================================
--- AnswerMachine.cpp (revision 1354)
+++ AnswerMachine.cpp (working copy)
@@ -531,10 +531,16 @@
throw AmSession::Exception(500, "voicemail: no email address");
}
- user = get_header_keyvalue(iptel_app_param,"usr", "User");
+ // user = get_header_keyvalue(iptel_app_param,"usr", "User");
+ AmUriParser div_parser;
+ if (!div_parser.parse_contact(getHeader(req.hdrs, "Diversion"), 0,
end)) {
+ ERROR("could not parse Diversion header");
+ throw AmSession::Exception(500, "voicemail: no user found");
+ }
+ user = div_parser.uri_user;
if (!user.length())
user = req.user;
-
+
sender = get_header_keyvalue(iptel_app_param, "snd", "Sender");
if (!sender.length())
sender = req.from;
btw, isn't Diversion supersedet by History-Info?
BR
Stefan
INVITE sip:9200@192.168.1.1;user=phone
<mailto:9200@192.168.1.1;user=phone> SIP/2.0
Via: SIP/2.0/TCP 192.168.1.2;branch=z9hG4bKac816850588;alias
Max-Forwards: 70
From: <sip:4605@192.168.1.2>;tag=1c816838653
To: <sip:9200@_192.168.1.1_;user=phone>
Call-ID: 816837947271200020365(a)192.168.1.2
CSeq: 1 INVITE
Contact: <sip:4605@192.168.1.2;transport=tcp>
Supported: em,100rel,timer,replaces,path,resource-priority
Allow:
REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE
*Diversion: <sip:4610@192.168.1.1>;reason=no-answer;screen=no;privacy=off*
User-Agent:
Content-Type: application/sdp
Content-Length: 270
--
Stefan Sayer
VoIP Services
stefan.sayer(a)iptego.com
www.iptego.com
IPTEGO GmbH
Wittenbergplatz 1
10789 Berlin
Germany
Amtsgericht Charlottenburg, HRB 101010
Geschaeftsfuehrer: Alexander Hoffmann