[SR-Users] issue with rewrite to domain in failure route

Mojtaba mespio at gmail.com
Mon Sep 17 11:22:19 CEST 2018


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 at 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 at 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 at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



-- 
--Mojtaba Esfandiari.S



More information about the sr-users mailing list