I tried uac_replace_to()
But no luck
пн, 17 сент. 2018 г. в 12:28, Alex Balashov <abalashov(a)evaristesys.com>om>:
That is not a safe way to change the To header,
since proxies aren't
supposed to modify the To or From headers.
The proper approach conceals the fact that modifications have taken place
from the caller:
https://kamailio.org/docs/modules/5.1.x/modules/uac.html#uac.f.uac_replace_…
--
Sent from mobile. Apologies for brevity and errors.
-----Original Message-----
From: Mojtaba <mespio(a)gmail.com>
To: "Kamailio (SER) - Users Mailing List" <sr-users(a)lists.kamailio.org>
Sent: Mon, 17 Sep 2018 5:23 AM
Subject: Re: [SR-Users] issue with rewrite to domain in failure route
The $td is read-only variable, and yoou could not change it's value.
If you want to change domain in To header, You should use testops
module in kamialio and replace domain in To header. for example:
subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/t:\1$avp(sip_address)\2/ig')
With Regards.Mojtaba
On Mon, Sep 17, 2018 at 1:19 PM Yuriy Gorlichenko <ovoshlook(a)gmail.com>
wrote:
Hi
I'm building some system with failover trunk
but my providers requires to set their doamin in domain part of To
Header
so when I rewrite it at the my failure_route
$td = FAILOVER_PROVIDER
my To filed looks like
To: <sip: 123(a)my.failover.providermy.main.provider>
what i tried:
Move this change to BRANCH_ROUTE:
here tried as
$td = as
uac_replace_to('',"newToFieldValue)
Move to the my custom route with both variants
But result is the same
kamailio 5.1
version: kamailio 5.1.5 (x86_64/linux) d06080
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP,
PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE
262144 MAX_URI_SIZE
1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et,
sigio_rt, select.
id: d06080
compiled on 00:43:08 Aug 23 2018 with gcc 6.3.0
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
--Mojtaba Esfandiari.S
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org