[Serusers] [DONE] send BYE to SEMS

Ezequiel Colombo ecolombo at arcotel.net
Mon Jun 7 20:02:00 CEST 2004


Thanks Jan, i search in the sems list for syntax and implement the
"user_prefix_separator" in my sems.cfg.

SEMS prepend a "voicemail[user_prefix_separator] in the Contact URI for the
ACK and 200OK responses sent to the caller, so i make this configuration in
my ser.cfg for relay BYE to SEMS

        if (method=="BYE") {
           if (uri=~"sip:voicemail\+") {
              log(1,"BYE for SEMS voicemail+");
              if (!t_lookup_request()) {log(1,"ROUTE_0: force new
transaction"); t_newtran();};
              if(!vm("/tmp/am_fifo","bye")){
                 log(1,"could not contact voicemail");
                 t_reply("500","could not contact voicemail");
               };
              break;
           } else {
              log(1,"BYE request for UAC");
              end_media_session();
           };
        };

When receive a BYE from my PSTN gateway the Request-URI look like "BYE
sip:voicemail+ecolombo at 172.16.200.54:5060 SIP/2.0"

Thanks again
Ezequiel Colombo

----- Original Message -----
From: "Jan Janak" <jan at iptel.org>
To: "Ezequiel Colombo" <ecolombo at arcotel.net>
Cc: <serusers at lists.iptel.org>
Sent: Monday, June 07, 2004 5:20 AM
Subject: Re: [Serusers] send BYE to SEMS


> SEMS puts a special delimiter into the username of the Contact header
> field it generates. The content of the contact header field will be in
> the Request-URI of BYE, so you can check if the Request-URI of BYE
> contains that delimiter. If so then you can call vm, otherwise call
> t_relay().
>
> See user_prefix_separator parameter of SEMS.
>
>   Jan.
>
> On 03-06 11:58, Ezequiel Colombo wrote:
> > Thanks Jan, but my problem is to differentiate if a received BYE is for
a
> > established call with SEMS or any UserAgent.
> > I need this to known if need a "vm(/tmp/am_fifo, bye) or t_relay the BYE
> > message.
> >
> > I have tried to make the two actions but dont work. The vm(bye) dont
create
> > transaction and dont work withouth this, but if i create a transaction
> > before vm(bye) the t_relay fail (try to create a new trans).
> >
> >  if BYE or CANCEL received
> >     I dont known if the BYE is for SEMS(localhost) or ANY
Client(otherhost)
> > [or exist any way tho check this ?]
> >     So i need send "bye" to SEMS for close the session
> >     AND
> >     t_relay the BYE (for Client(otherhost))
> >
> > This cause that "bye" for SEMS fail (require transaction) - t_relay OK
> > or
> > cause that t_relay fail (ERROR: t_newtran: transaction already in
process)
> > if i force a transaction before send "bye" to SEMS.
> >
> > Thanks
> > Ezequiel Colombo
> >
> > ----- Original Message -----
> > From: "Jan Janak" <jan at iptel.org>
> > To: "Ezequiel Colombo" <ecolombo at arcotel.net>
> > Cc: <serusers at lists.iptel.org>
> > Sent: Wednesday, June 02, 2004 9:08 PM
> > Subject: Re: [Serusers] send BYE to SEMS
> >
> >
> > > Record routing is used to forward BYE messages, so it should be routed
> > > to SEMS automatically if you call loose_route() in your scripts (see
the
> > > default config file).
> > >
> > >   Jan.
> > >
> > > On 01-06 16:36, Ezequiel Colombo wrote:
> > > > When the caller to the offline user (connected to SEMS) hungup first
the
> > BYE message must be sent to SEMS for release the call.
> > > > How i can send the BYE to SEMS only if the user that hungup are
talking
> > to SEMS ?
> > > >
> > > > Ex:
> > > >
> > > > if ( BYE or CANCEL ) {
> > > >    if (for established SEMS session) {
> > > >     vm("/tmp/am_fifo","bye")
> > > >    } else {
> > > >     end_media_session();
> > > >     t_relay();
> > > >    };
> > > > break;
> > > > };
> > > >
> > > > Thanks
> > > > Ezequiel Colombo
> > >
> > > > _______________________________________________
> > > > Serusers mailing list
> > > > serusers at lists.iptel.org
> > > > http://lists.iptel.org/mailman/listinfo/serusers
> > >
> > >
> >
>




More information about the sr-users mailing list