[Serusers] BYE - Messages and asterisk

Sebastian Kühner skuehner at veraza.com
Tue Jul 5 20:42:24 CEST 2005


Hello,

I've ser running on 192.168.1.222:5061 and asterisk on 192.168.1.222:5060
and I want to forward international calls to asterisk. I'm writing a small
accounting application and I need the methods "ACK" and "BYE".

Here a part of my ser.cfg:

if (method=="INVITE") {
    # authenticated and authorized, now accounting is set
    setflag(1);
    record_route();
};

if (loose_route())
{
    # mark the BYEs -- they are requests within a dialog
    if(method=="BYE")
        setflag(1);

    t_relay();
    break;
};

if (uri=~"sip:00") {

    rewritehostport("192.168.1.222:5060");    //to asterisk...

}
else {
    sl_send_reply("404", "Not Found");
    break;
};

append_hf("P-hint: GATEWAY\r\n");

if (!t_relay()) {
    sl_reply_error();
    break;
};

Why don't I get the BYE messages?? I think I made it like it's written in
the documentation

Thanks!

Sebastian





More information about the sr-users mailing list