[Sems] *bangs head* Struggling with simple SER+SEMS..

Dave Bath dave at fuuz.com
Mon Apr 18 19:50:07 UTC 2005


Hi Stefan....

I can appreciate how it works with register.

However, because I am interoperating with a client which will *Not* send
a register request.... only an INVITE I had to do it this way.

I hope that makes sense! (well.. obviously not that the client does it
that way.. but that I had to write the script that way)

D

-----Original Message-----
From: Stefan Sayer [mailto:sayer at cs.tu-berlin.de] 
Sent: 18 April 2005 20:28
To: Dave Bath
Cc: sems at lists.iptel.org
Subject: Re: [Sems] *bangs head* Struggling with simple SER+SEMS..

Hello Dave,

Dave Bath wrote:
> Thank you so much!
> 
> That does seem to have fixed it!  
> 
> The reason for the save_noreply("location") is because the mode of use
> means that clients do not register with this server... they simply
send
> an invite..  
> 
> Perhaps I don't need to save the location at all? But I presume I do.
Ah I thought you'd want to save their location on invite requests, too.,

I don't know if this would work, at least it doesn't make much sense.

You do not need to save the location here at all, you save the location 
only when you receive a register.

Then you can change the other block here:
           # prevent timeout on the other side:
           t_reply("100","Trying - just wait a minute !");

           if (method=="INVITE") {
               if (uri=~"sip:600.*@") {
                   log(1,"-> Redirecting conference to SEMS");
                   if(!t_write_unix("/tmp/am_sock","conference")) {
                   t_reply("500","error contacting sems");
                   };
                  break;
               } else {
	        if (!lookup("location")) {
                    sl_send_reply("404", "Not Found");
                    break;
                 };
	      };
               break;
            }

And then you'll be able to call users that registered with the
registrar.

Have a look at the sample configuration in answer_machine/docs directory

for a complete ser.cfg and sems.conf

Stefan


> 
> The only problem I'm having now is with the BYE... I guess I must have
a
> break in the wrong place somewhere.. I assume I just need to forward
the
> BYE to SEMS and that's it.. it doesn't need processing by SER? Is this
> correct?
> 
> I will try and work on it, but perhaps if you have a moment you could
> tell me what's wrong with my BYE statement.
> 
> Many many thanks again.
> 
> Dave
> 
> PS.  I have quite complex SER installations running... I think perhaps
I
> am just not clear on how the interaction with SEMS works... I thought
> that SER still had to handle the generation of SIP messages? Perhaps I
> am mistaken?
> 
> 
> 
> -----Original Message-----
> From: Stefan Sayer [mailto:sayer at cs.tu-berlin.de] 
> Sent: 18 April 2005 17:41
> To: Dave Bath
> Cc: sems at lists.iptel.org
> Subject: Re: [Sems] *bangs head* Struggling with simple SER+SEMS..
> 
> Hello Dave,
> you have the save("location") twice, one is correct here:
> Dave Bath wrote:
> 
>>         if (method=="REGISTER") {
>>            save("location");
>>            break;
>>          };
> 
> the other here
> 
>>          if (method=="INVITE") {
>>              save("location");
> 
> will cause a 200 reply to be sent, and sems will also answer with a
200
> 
>>              if (uri=~"sip:600.*@") {
>>                  log(1,"-> Redirecting conference to SEMS");
>>                  if(!t_write_unix("/tmp/am_sock","conference")) {
> 
> here.
> 
> Usually you would not save the location on an invite - if you really 
> want to do this here then use save_noreply("location").
> 
> 
> Stefan
> 
> P.S.:
> I'd put the lookup("aliases"); before the first  if (!uri==myself) and

> delete the whole other block
> 
>            lookup("aliases");
>            if (!uri==myself) {
>              log(1,"Resolving external request");
>              append_hf("P-hint: outbound alias\r\n");
>              route(1);
>              break;
>            };
> 
> 
> 
> 
> 
> 





More information about the Sems mailing list