A quick
solution if you need ds_select_dst() in combination with
ds_next_domain() is to call resetdsturi() in failure route. I will think
about and see if it is consistent to call it internally.
Works for me.
DCM>
What do you mean that "not any of the nodes receive the packet ..."?
Kamailio is standing before asterisks and relays packets to them. In
case, when there is no ds_next_domain() - packet is routed correctly
to the curtain node, defined by ds_select_dst(). While after
ds_next_domain() none of the 2 nodes receives the packet and call
terminates by the caller with "Request timeout". Looks like t_relay()
sends packet somewhere to blackhole.
Can you look at sip trace with ngrep to see
where they are sent?
Probably to the first destination that failed.
Yes. It sends packet to previous
gateway, while in INVITE another IP
mentioned ( look at 1 and 2 strings ):
13:59:36.533705 IP KAMAILIO_IP.sip> GW1_IP.sip: UDP, length 1020
E....H..@.4..(...(.........UINVITE sip:*44@GW2_IP:5060 SIP/2.0
Record-Route:
<sip:KAMAILIO_IP;lr=on;ftag=ustdc;did=c4e.a81165f4;nat=yes>
Via: SIP/2.0/UDP KAMAILIO_IP;branch=z9hG4bKccae.c54a1682.1
Max-Forwards: 69
To:<sip:*44@KAMAILIO_IP>
From: "2_101"<sip:2_101@KAMAILIO_IP>;tag=ustdc
Call-ID: yuwofwddoaqozwh(a)localhost.localdomain
CSeq: 527 INVITE
Contact:<sip:2_101@UAC_PUBLIC_IP:5061>
Content-Type: application/sdp
Allow:
INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,REFER,NOTIFY,SUBSCRIBE,INFO,MESSAGE
Supported: replaces,norefersub,100rel
User-Agent: Twinkle/1.4.2
Content-Length: 330
Looks like a bug.
This is not a bug in sip routing as long as $du is set, then it is the
field used for sip routing no matter you have in $ru -- $du is the
internal outbound proxy address overwriting request-uri address.
Maybe will be safe to introduce resetdsturi() in case of
ds_next_domain() to be safe in combinations like
ds_select_dst()+ds_next_domain().