[Sems] voicemail redirection
Stefan Sayer
stefan.sayer at iptego.de
Thu Jul 12 18:23:22 CEST 2007
Hello again,
if you have the connection to SEMS on your only ser instance running on
port 5060, you will also have to detect in-dialog requests (e.g. BYE,
re-INVITE etc.) and send them to sems via t_write_unix.
For this you can set the sems.conf parameter user_prefix_separator like
user_prefix_separator=";",
then the Contact given out by SEMS will look like
Contact: sems+<user>@<local ip>
So for all in-dialog requests, you need to check whether ruri is
sems*@local_ip, and if so, send it to SEMS.
The easier way is to record route the INVITE at your home proxy and have
a separate ser instance on another port, which is only frontend to SEMS.
Use core/etc/ser-sems.cfg for this ser instance, and add at your home
proxy (any ser version) P-App-Name/P-App-Param headers.
Stefan
Umut Emin wrote:
> Hei *,
>
> so redirecting the invite to sems for voicemail, i have realized
> a strange behaviour :
> if i have (like in sems documentation)
>
> avp_db_load( "$ruri", "$email/$email_scheme");
>
> if(!t_write_unix("/tmp/sems_sock","voicemail/voicemail_headers")){
> log("could not contact voicemail server\n");
> sl_send_reply("500","could not contact voicemail server");
> break;
> }
>
> i get a 500 from ser to sems and connection cannot be established. See the
> traffic between ser and client interaction as attachment. sems error says:
> ....
> (17218) DEBUG: write_to_socket (AmUtils.cpp:614): write to unix socket: completed
> (17218) DEBUG: cacheMsg (AmCtrlInterface.cpp:186): recv-ed: <500 Reply failed>
> (17218) ERROR: send_msg (AmServer.cpp:152): AmServer::send_request: ser answered: 500 Reply failed
> (17218) ERROR: onInvite (AmSession.cpp:595): 500 could not send response
> (17218) DEBUG: init (AmCtrlInterface.cpp:231): AmUnixCtrlInterface::init @ /tmp/6309EC89-46964C1D00071CBF-40A09940
> ....
>
> hence if i change to this:
>
> avp_db_load( "$ruri", "$email/$email_scheme");
>
> if (t_write_unix("/tmp/sems_sock","voicemail/voicemail_headers")){
>
> break ;
>
> } else {
>
> # failure ser-sems, answer stateless
> sl_send_reply("500","Could not contact voicemail server");
> break;
> }
>
> i only do a break "more" in the second version and i have a running voicemail app.
> why does the first not work but the second?
>
> Greetz,
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Sems mailing list
> Sems at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/sems
Regards
Stefan Sayer
--
iptego - VoIP security
www.iptego.de
More information about the Sems
mailing list