[OpenSIPS-Users] Routing from PSTN A back to PSTN A
Nagorny, Dimitry
dimitry.nagorny at robot5.de
Tue Mar 15 17:23:51 CET 2016
Hi all,
when I shoot the following routing rule:
if ($rU=~"^[1]$" && src_ip==192.168.1.30) {
xlog("PBX to UA at PBX! $rU@$rd:$rp via $si");
$rU="185511";
$rd="192.168.1.30";
$rp="5060";
$du="sip:185511 at 192.168.1.30:5060";
xlog("PBX to UA at PBX! $rU@$rd:$rp via $si");
force_send_socket(udp:192.168.1.150:5060);
t_relay();
exit;
}
I don't get why OpenSIPS is reverting my changes somewhere internally so this happens:
U 192.168.1.30:5060 -> 192.168.1.150:5060 (PSTN to OpenSIPS)
INVITE sip:1 at 192.168.1.150;user=phone SIP/2.0
To: sip:1 at 192.168.1.150;user=phone
From: "bla" <sip:2031 at 192.168.1.30;user=phone>;tag=7d6bed4b820d54e0c0ae4cb86f442b81
#
U 192.168.1.150:5060 -> 192.168.1.30:5060
SIP/2.0 100 Giving a try
To: sip:1 at 192.168.1.150;user=phone
From: "bla" <sip:2031 at 192.168.1.3 0;user=phone>;tag=7d6bed4b820d54e0c0ae4cb86f442b81
#
U 192.168.1.150:5060 -> 192.168.1.30:5060
INVITE sip:185511 at 192.168.1.30:5060;user=phone SIP/2.0
To: sip:1 at 192.168.1.150;user=phone
From: "bla" <sip:2031 @192.168.1.30;user=phone>;tag=7d6bed4b820d54e0c0ae4cb86f442b81
#
U 192.168.1.30:5060 -> 192.168.1.150:5060
SIP/2.0 100 Trying
To: sip:1 at 192.168.1.150;user=phone
From: "bla" <sip:2031 at 192.168.1.30;user=phone>;tag=7d6bed4b820d54e0c0ae4cb86f442b81
I simply want if someone from inside or outside calls a known area of numbers that they are getting relayed to a different number. Is the above routing script part wrong for my purpose?
Very Respectfully
Dimitry Nagorny
Trainee
robot5 GmbH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160315/f33e0bcd/attachment.htm>
More information about the Users
mailing list