Hi all,
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?
Thanks in advance.
route[to_gateway] {
if ( route_to_gw($hdr(X-GWID)) ) {
route(relay);
}
}
route[relay] {
if (is_method("INVITE")) {
t_on_branch("per_branch_ops");
t_on_reply("handle_nat");
t_on_failure("failure");
}
if (!t_relay()) {
send_reply(500,"Internal Error");
}
exit;
}
The database structure is as follows;
opensips=# select * from dr_gateways;
id | gwid | type | address | strip | pri_prefix | attrs |
probe_mode | state | socket | description
----+------+------+------------------------------+-------+------------+-------+------------+-------+--------+-------------
6 | 5 | 2 | sip:testgw.bulutfon.net:5060 | 0 | | |
0 | 0 | | 5
Here is the INVITE request sent to the destination, which fails as in the
screenshot.
INVITE sip:[email protected]:5060 SIP/2.0
Record-Route: <sip:2.2.2.2;lr;ftag=1jcyr93emrjDQ>
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bK372.d935ecb2.0
Via: SIP/2.0/UDP
1.1.1.1:6080;received=1.1.1.1;rport=6080;branch=z9hG4bK99mtDaevmN7Nj
Max-Forwards: 67
From: "+908508850000"
<sip:[email protected]:5060>;tag=1jcyr93emrjDQ
To: <sip:[email protected]:5060>
Call-ID: aefb8c60-426b-123b-8ca8-82a722ba4f75
CSeq: 51067506 INVITE
Contact: <sip:[email protected]:6080>
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 621
Remote-Party-ID: "+908508850000"
<sip:[email protected]:5060>;party=calling;screen=yes;privacy=off
v=0
o=FreeSWITCH 1651210438 1651210439 IN IP4 1.1.1.1
s=FreeSWITCH
c=IN IP4 1.1.1.1
t=0 0 ...
--
Volkan Oransoy
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users