[Asterisk-Users] SER redirect

Sharon asteriskgirl at gmail.com
Tue Jan 31 10:19:21 MST 2006


i have ser and asterisk on 2 different boxes.

my ser.cfg

if (method=="REGISTER") {

                if(!www_authorize("ser domain name", "subscriber")){
                        www_challenge("ser domain name", "0");
                        break;
                }
                        sl_send_reply("200", "ok");
               break;
       };


     rewritehostport ("ip addr of asterisk box:5060");
          sl_send_reply ("300", "redirect");

}

asterisk setting in sip.conf:

i am not adding ser as a peer neither am i adding the peer registered with
ser  in the sip.conf

i wanted ser to pass a redirect to the client registered with ser (this part
works)

then ser is out of the call and the client and asterisk talk but on my
asterisk box i'm seeing the following error

Using INVITE request as basis request - a00f4ba8fc3b881d at xx.xx.xxx.xxx
Sending to xxx.xxx.xx.xx : 5060 (NAT)
 chan_sip.c:realtime_peer: Cannot Determine peer name ip=xx.xxx.xxx.xxx
Found no matching peer or user for 'xx.xx.xx.xx:5060"

its looking for same ip of the ser client to send back the reply.





On 1/31/06, Jean-Michel Hiver <jhiver at ykoz.net> wrote:
>
> Sharon a écrit :
>
> > my setup is
> >
> > client--registers--> ser-----redirect--->client---- ---invite------>
> > asterisk ------> pstn
> >
> > when this happens
> >
> > i configured the ser.cfg with the rewriteuri and redirect logic and i
> > am seeing 300 redirect being passed to the client registerd to ser but
> > when it sends a invite to asterisk, asterisk looks for the same ip
> > address of the client to send reply to and i receive a error on the
> > asterisk server
> >
> > realtime_peer: Cannot Determine peer name ip=xxx.xxx.xxx.xxx
> >
> > I would appreciate if someone can help me figure this out.
>
> I have the same setup and here is what I do:
>
>
> In ser.cfg:
>
>   # -----------------------------------------------------------------
>   # Pass on stuff going to PSTN to Asterisk
>   # -----------------------------------------------------------------
>   if (uri=~"^sip:0[0-9]*@.*") {
>       rewritehostport ("*<your_asterisk_box_ip>*:5060");
>       if (!t_relay()) {
>           # sl_send_reply ("403", "prout");
>           sl_reply_error();
>       };
>       break;
>   };
>
> In sip.conf: (asterisk)
>
> [ser-stuff]
> type=friend
> context=world
> host=<my_ser_host>
> canreinvite=no
>
>
> Also be careful. If <someuser>@yourserbox.ip calls not to have any
> [someuser] sections in sip.conf, because it broke stuff for me.
>
> Good luck!
> Jean-Michel.
>
> --
> Jean-Michel Hiver - http://ykoz.net/
> Découvrez la Réunion des Technologies IP & Telecom
> TEL: +262 (0)262 55 03 98 - RCS 434 273 330 SAINT PIERRE
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060131/41788d96/attachment.htm


More information about the asterisk-users mailing list