thank you int transformation worked for the dispatcher module now i can define gw dynamically. much appretiate your sugestion.
On Tue, Apr 9, 2013 at 5:59 AM, sr-users-request@lists.sip-router.orgwrote:
Send sr-users mailing list submissions to sr-users@lists.sip-router.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users or, via email, send a message with subject or body 'help' to sr-users-request@lists.sip-router.org
You can reach the person managing the list at sr-users-owner@lists.sip-router.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of sr-users digest..."
Today's Topics:
- Help with dispatcher module (julian arsanches)
- how to configure presence module with websocket (???? ?????)
- Re: Help with dispatcher module (Javi Gallart)
- Re: path uri problem (Andrew Pogrebennyk)
- Diversion header authentication (phillman25)
- Re: path uri problem (Juha Heinanen)
Message: 1 Date: Mon, 8 Apr 2013 18:17:36 -0400 From: julian arsanches guandulito.com@gmail.com Subject: [SR-Users] Help with dispatcher module To: sr-users@lists.sip-router.org Message-ID: <CAG0Kfxv6-TV4Ghep= Wj0BNVYXH0TLR6FW281fQA9WsOKGsK1Kw@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1"
thanks for all support from the forum before hand. i am having an issue with my setup, i am trying to make the dispatcher dynamic by asigning a value from a variable, that variable is define on my dispatcher.lst but i am getting an error, if anyone can help thanks.
my config on the relay route first i strip the prefix from my dial string, and set variable y with that code, then i strip it and dial it. but it does not work. again thanks if anyone can helpme.
xlog(" anrtes de strip >> el r-uri($ru)>($ru{s.substr,0,3})\n");
$var(x) = $ru; #>> set varx as an string
$var(y)=$(var(x){s.substr,4,3}); #>>>>strip the first 3 digits to find my route
xlog("dsroute $var(y) my test ($ru)\n"); #check for variables loaded
strip(3); # strip the prefix to route to destinatio
xlog("despues de strip time [$Tf] method ($rm) r-uri ($ru) 2nd via el code ($var(y)\n"); #check for loaded variables after strip
ds_select_dst("$var(y)", "4");#>>carrer dynamic don't work variable is load propperly but i get the following error
*##Apr 8 17:59:32 ip-10-0-1-206 /usr/sbin/kamailio[8975]: ERROR: <script>: despues de strip time [Mon Apr 8 17:59:32 2013] method (ACK) r-uri (sip:54.236.192.19) 2nd via el code (54). >>> i see a the right code in the variable* *##Apr 8 17:59:32 ip-10-0-1-206 /usr/sbin/kamailio[8975]: ERROR: <core> [sr_module.c:1726]: Could not convert PV to int *
#ds_select_dst("097", "4");#statically define works
xlog("print el destination y el $var(y) ($du)>>($td)>>> ($ru)\n");
if (!t_relay_to_udp()) {
sl_reply_error(); };
exit;
}
dispatcher.lst
#lineformat #setit(integer)destination(sipuri)flags(integer,optional)
#Asterisks
007 sip:1.1.1.1:5060 ##route 1 024 sip:2.2.2.2:5060 ##route 2 100 sip:1.1.1.100:5060 ##route 100 103 sip:1.1.1.103:5060 ###route 103