<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">Hi all,<br />
<br />
I have an interesting issue with one of my test setups. I have a simple routing script which gets the gateway id directly from the header originating from a Freeswith box. The system finds and sets the request URL as anticipated. But even if I can see the request on the proxy, I can't see the traffic on the destination. Interestingly, the same proxy can register to the same destination with uac_registrant as a UAC. And I can receive calls from the same destination. Is there anything missing to route this traffic correctly?<br />
<br />
Thanks in advance.<br />
<br />
<span style="font-family:Andale Mono">route[to_gateway] {</span><br />
<span style="font-family:Andale Mono">        if ( route_to_gw($hdr(X-GWID)) ) {</span><br />
<span style="font-family:Andale Mono">                route(relay);</span><br />
<span style="font-family:Andale Mono">        }</span><br />
<span style="font-family:Andale Mono">}</span><br />
<span style="font-family:Andale Mono">route[relay] {</span><br />
<span style="font-family:Andale Mono">        if (is_method("INVITE")) {</span><br />
<span style="font-family:Andale Mono">                t_on_branch("per_branch_ops");</span><br />
<span style="font-family:Andale Mono">                t_on_reply("handle_nat");</span><br />
<span style="font-family:Andale Mono">                t_on_failure("failure");</span><br />
<span style="font-family:Andale Mono">        }</span><br />
<span style="font-family:Andale Mono">        if (!t_relay()) {</span><br />
<span style="font-family:Andale Mono">                send_reply(500,"Internal Error");</span><br />
<span style="font-family:Andale Mono">        }</span><br />
<span style="font-family:Andale Mono">        exit;</span><br />
<span style="font-family:Andale Mono">}</span><br />
<br />
<span style="font-family:arial, sans-serif">The database structure is as follows;</span><br />
<br />
<span style="font-family: Monaco, Courier New, monospace">opensips=# select * from dr_gateways;</span><br />
<span style="font-family: Monaco, Courier New, monospace"> id | gwid | type |           address            | strip | pri_prefix | attrs | probe_mode | state | socket | description</span><br />
<span style="font-family: Monaco, Courier New, monospace">----+------+------+------------------------------+-------+------------+-------+------------+-------+--------+-------------</span><br />
<span style="font-family: Monaco, Courier New, monospace">  6 | 5    |    2 | sip:</span><a style="font-family: Monaco, Courier New, monospace" href="http://testgw.bulutfon.net:5060" target="_blank">testgw.bulutfon.net:5060</a><span style="font-family: Monaco, Courier New, monospace"> |     0 |            |       |          0 |     0 |        | 5</span><br />
<br />
Here is the INVITE request sent to the destination, which fails as in the screenshot.<br />
<br />
<span style="font-family: Monaco, Courier New, monospace">INVITE </span><a style="font-family: Monaco, Courier New, monospace" href="http://sip:905551234567@testgw.bulutfon.net:5060" target="_blank">sip:905551234567@testgw.bulutfon.net:5060</a><span style="font-family: Monaco, Courier New, monospace"> SIP/2.0</span><br />
<span style="font-family: Monaco, Courier New, monospace">Record-Route: <sip:2.2.2.2;lr;ftag=1jcyr93emrjDQ></span><br />
<span style="font-family: Monaco, Courier New, monospace">Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bK372.d935ecb2.0</span><br />
<span style="font-family: Monaco, Courier New, monospace">Via: SIP/2.0/UDP 1.1.1.1:6080;received=1.1.1.1;rport=6080;branch=z9hG4bK99mtDaevmN7Nj</span><br />
<span style="font-family: Monaco, Courier New, monospace">Max-Forwards: 67</span><br />
<span style="font-family: Monaco, Courier New, monospace">From: "+908508850000" <</span><a style="font-family: Monaco, Courier New, monospace" href="http://sip:908508850000@testgw.bulutfon.net:5060" target="_blank">sip:908508850000@testgw.bulutfon.net:5060</a><span style="font-family: Monaco, Courier New, monospace">>;tag=1jcyr93emrjDQ</span><br />
<span style="font-family: Monaco, Courier New, monospace">To: <</span><a style="font-family: Monaco, Courier New, monospace" href="http://sip:905551234567@testgw.bulutfon.net:5060" target="_blank">sip:905551234567@testgw.bulutfon.net:5060</a><span style="font-family: Monaco, Courier New, monospace">></span><br />
<span style="font-family: Monaco, Courier New, monospace">Call-ID: aefb8c60-426b-123b-8ca8-82a722ba4f75</span><br />
<span style="font-family: Monaco, Courier New, monospace">CSeq: 51067506 INVITE</span><br />
<span style="font-family: Monaco, Courier New, monospace">Contact: <</span><a style="font-family: Monaco, Courier New, monospace" href="http://sip:mod_sofia@1.1.1.1:6080" target="_blank">sip:mod_sofia@1.1.1.1:6080</a><span style="font-family: Monaco, Courier New, monospace">></span><br />
<span style="font-family: Monaco, Courier New, monospace">Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY</span><br />
<span style="font-family: Monaco, Courier New, monospace">Supported: timer, path, replaces</span><br />
<span style="font-family: Monaco, Courier New, monospace">Allow-Events: talk, hold, conference, refer</span><br />
<span style="font-family: Monaco, Courier New, monospace">Content-Type: application/sdp</span><br />
<span style="font-family: Monaco, Courier New, monospace">Content-Disposition: session</span><br />
<span style="font-family: Monaco, Courier New, monospace">Content-Length: 621</span><br />
<span style="font-family: Monaco, Courier New, monospace">Remote-Party-ID: "+908508850000" <</span><a style="font-family: Monaco, Courier New, monospace" href="http://sip:+908508850000@testgw.bulutfon.net:5060" target="_blank">sip:+908508850000@testgw.bulutfon.net:5060</a><span style="font-family: Monaco, Courier New, monospace">>;party=calling;screen=yes;privacy=off</span><br />
<br />
<span style="font-family: Monaco, Courier New, monospace">v=0</span><br />
<span style="font-family: Monaco, Courier New, monospace">o=FreeSWITCH 1651210438 1651210439 IN IP4 1.1.1.1</span><br />
<span style="font-family: Monaco, Courier New, monospace">s=FreeSWITCH</span><br />
<span style="font-family: Monaco, Courier New, monospace">c=IN IP4 1.1.1.1</span><br />
<span style="font-family: Monaco, Courier New, monospace">t=0 0 ...</span><br />
<br />
<img width="562" height="245" alt="Screen Shot 2022-04-29 at 15.13.21.png" src="cid:ii_l2kj2x7q1" /><br />
--</div>
</div>
<div name="messageSignatureSection"><br />
<div dir="ltr">Volkan Oransoy</div>
</div>
</body>
</html>