[SR-Users] Asterisk and dispatcher

Ian French fretec at gmail.com
Wed Jan 23 19:44:51 CET 2013


>
> Hi,
>     I've been working my way through this tutorial (
> http://kb.asipto.com/asterisk:realtime:kamailio-3.0.x-asterisk-1.6.2-astdb)
> and all it working well thanks. In the other benifits section you mention
> that this configuration can be used with multiple instances of Asterisk.
> I've configured my [TOASTERISK] route


route[TOASTERISK] {
                ds_select_dst("1","4");
                $sht(forw=>$ft)=$du;
                sl_send_reply("100","Trying");
        xlog("L_INFO","INVITE: INVITE [$tU] Passed to [$du] Asterisk
Cluster [$rm:$au].\n");
        route(RELAY);
        exit;

How can i achieve the same for my [FROMASTERISK] route as now with

asterisk.bindip = "x.x.x.x" desc "Asterisk IP Address"
asterisk.bindport = "5060" desc "Asterisk Port"

and

route[FROMASTERISK] {
        if($si==$sel(cfg_get.asterisk.bindip)
                           && $sp==$sel(cfg_get.asterisk.bindport))
                xlog("L_INFO","INVITE: INVITE Passed From [$fu] Asterisk
Cluster To [$rm:$au].\n");
                return 1;
        return -1;
}

This allows calls only from cfg_get.asterisk.bindip (single gateway) where
I would like gateways in the dispatcher list to be selected and marked as a
positive match

if(ds_is_from_list("1"))
$sht(forw=>$ft)=$si;
                xlog("L_INFO","INVITE: INVITE Passed From [$fu] Asterisk
Cluster To [$rm:$au].\n");
                return 1;
           return -1;
}

Can you help?

Thanks in advance
Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130123/b4ad578d/attachment.htm>


More information about the sr-users mailing list