[SR-Users] Help with routing block and Dispatcher Module

pablo rosales pablo2412 at gmail.com
Fri Jun 17 20:14:00 CEST 2016


Thank you very much, I did it this way, and it worked perfect!!!

if (is_subscriber("$ru", "subscriber", "2")) {
     ...
     logic
     ...
}

2016-06-13 3:05 GMT-06:00 Daniel-Constantin Mierla <miconda at gmail.com>:

> Hello,
>
> you have to show the request_route block with the part where the
> route(DISPATCH) is executed. You can use is_subscriber() to see if the
> target number is a local subscriber and route via location.
>
> Cheers,
> Daniel
>
> On 10/06/16 03:39, pablo rosales wrote:
>
> Hi everyone! I am a newbie with Kamailio.
>
> I'm trying to connect a kamailio server to an asterisk gateway. We are
> using basic Kamailio 4.4.x configuration file with mysql and rtpproxy
>
> we are having same issues with dispatcher module. we can not call between
> local subscribers.
>
> Basically, If I call to a local subscriber, the module always execute the
> route(DISPATCHER) code on the routing block, trying to send the call to my
>  gateway, but if I try to call to an external number, it works perfect. All
> calls are being send to my gateway.
>
>
>
> Here is my dispatcher code:
> # Dispatch requests
> route[DISPATCH] {
> # round robin dispatching on gateways group '1'
> if(!ds_select_dst("1", "4"))
> {
> send_reply("404", "No destination");
> exit;
> }
> ### xlog("L_DBG", "--- SCRIPT: going to <$ru> via <$du>\n");
> xlog(" --- DISPATCH: going to <$ru> via <$du>n");
> t_on_failure("RTF_DISPATCH");
> return;
> }
>
> ## Sample failure route
> failure_route[RTF_DISPATCH] {
> xlog(" --- DISPATCH: Starts RTF_DISPATCH \n");
> if (t_is_canceled()) {
> exit;
> }
> # next DST - only for 500 or local timeout
> if (t_check_status("500")
> or (t_branch_timeout() and !t_branch_replied()))
> {
> if(ds_next_dst())
> {
> t_on_failure("RTF_DISPATCH");
> route(RELAY);
> exit;
> }
> }
> }
>
>
>
>
>
> Can anybody help to see what I am doing wrong??
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlahttp://www.asipto.com - http://www.kamailio.orghttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160617/4c3bae45/attachment.html>


More information about the sr-users mailing list