[SR-Users] Dispatcher PSTN

Kr0m amodelcalabozo at gmail.com
Thu Jun 7 18:30:27 CEST 2012


Hello

I am not able to dial to pstn with kamailio, the call is routed to my
pstn-gw(asterisk), but the final phone rings 4 or 5 seconds and then it is
hanged up.
My outbound route is:
route[PSTN] {
        if (strempty($sel(cfg_get.pstn.gw_ip))) {
                xlog("SCRIPT: PSTN rotuing enabled but pstn.gw_ip not
defined\n");
                return;
        }
        if(from_uri!=myself) {
                sl_send_reply("403", "Not Allowed");
                exit;
        }
        route(TOASTERISK);
        exit;
        return;
}


route[TOASTERISK] {
sl_send_reply("100","Trying");
uac_replace_from("$fn","sip:$fn@$fd");
route(NATMANAGE);
ds_select_dst("1","4");
t_on_failure("1");
t_relay();
}


failure_route[1] {
ds_mark_dst("i");
if (!ds_next_dst()) {
                t_reply("503", "Service unavailable: no more dst");
                exit;
}
route(TOASTERISK);
}

With a traffic capture i can see the traffic returning to my kamailio
server.

Any suggestion will be appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120607/527cfe28/attachment.htm>


More information about the sr-users mailing list