Hello Daniel,
Thank you for reply, based on you example. Can I do some thing like that.

modparam("dispatcher", "dstid_avp", "$avp(dsdst_id)")


        switch ($fd) {
          case "domain1.tld":
                $avp(dsdst_id)=1;
                break;
          case "domain2.tld":
                $avp(dsdst_id)=2;
                break;
         }

         ds_select_dst($avp(dsdst_id),4);

Slava.




From: "Daniel Tryba" <d.tryba@pocos.nl>
To: "sr-users" <sr-users@lists.sip-router.org>
Sent: Friday, July 3, 2015 6:18:03 AM
Subject: Re: [SR-Users] dispather

On Thursday 02 July 2015 09:12:41 Slava Bendersky wrote:
> Is dispatcher module can do call routing based on domain ?
> This only inbound traffic.
> So if call come from @domain1.tld -----> asterisk box 1 @domain2.tld ----->
> asterisk box 2.

Sure, just make the dispatcher target dynamic with an avp:

if($fd=="domain1.tld")
{
 $avp(dispatcher_id)=1;
}
...

ds_select_dst($avp(dispatcher_id),4);

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users