Try msg_apply_changes() before printing updated $td
On Thu, Apr 11, 2019 at 2:41 PM Andrew Chen <achen(a)fuze.com> wrote:
Hey guys,
Question.
I have this block of code at the beginning of route block:
if(is_ip($td))
{
xlog("L_INFO", "[$ci][$mi][CSeq $cs] IP detected in To
domain. Resolving. \n");
exec_avp("host $td | awk '{print substr($$5, 1,
length($$5)-1)}'", "$avp(s:newtd)");
xlog("L_INFO", "[$ci][$mi][CSeq $cs] new newtd =
$avp(s:newtd)");
$td = $avp(s:newtd);
xlog("L_INFO", "[$ci][$mi][CSeq $cs] new td = $td");
}
but $td never updates.
Apr 11 18:26:00 sjomaintpsg50 /usr/local/sbin/kamailio[6475]: INFO:
<script>: [8ROWdUOINx][1]*[CSeq* 20] IP detected in To domain. Resolving.
Apr 11 18:26:00 sjomaintpsg50 /usr/local/sbin/kamailio[6475]: INFO:
<script>: [8ROWdUOINx][1]*[CSeq* 20] new newtd =
sjomaintpsg50.fuzemeeting.com
Apr 11 18:26:00 sjomaintpsg50 /usr/local/sbin/kamailio[6475]: INFO:
<script>: [8ROWdUOINx][1]*[CSeq* 20] new td = 206.81.191.30
Is there a reason why?
Thanks
--
Andy Chen
Sr. Telephony Lead Engineer
achen@ <achen(a)thinkingphones.com>fuze.com
*Confidentiality Notice: The information contained in this e-mail and any
attachments may be confidential. If you are not an intended recipient, you
are hereby notified that any dissemination, distribution or copying of this
e-mail is strictly prohibited. If you have received this e-mail in error,
please notify the sender and permanently delete the e-mail and any
attachments immediately. You should not retain, copy or use this e-mail or
any attachment for any purpose, nor disclose all or any part of the
contents to any other person. Thank you.*
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users