[OpenSIPS-Users] ACK not forwarding
ahmeddd
lamiriahmedamin at gmail.com
Mon Oct 30 12:32:31 EDT 2017
hallo,
I'm ahmed and I'm working on opensips.
Actually, I sow your questions on the forum and I have a problem that I
think you have the answer.
Actually, I did a simple senario to route calls between users registered in
opensips server, but when it comes to real IP phones( that each one has its
own ip address ), it doasn't work. ( trunk ).
for example: my opensips address: 10.42.15.18
and my IP phone address is : 10.42.13.82
it is all about sip trunk I think.
I am blocked in this part and searched a lot for a solution, maybe there is
a detail that I have missed.
which function is responsible for handling requests and responses with an IP
phone ?
I used this code :
account only INVITEs
if ($rU=="49894614950666"){
$rU = $tU;
rewritehostport("10.42.13.82:5060");
$du = "sip:49894614950666 at 10.42.13.82;user=phone";
t_relay();
xlog("reference to URI of 'To' header ====>
$tu");
xlog("reference to domain in URI of 'TO' header
====> $td");
# route the call out based on RURI
route(3);
}
route[3]{
seturi("sip:49894614950666 at 10.42.13.82;user=phone");
$du = "sip:49894614950666 at 10.42.13.82;user=phone";
#replace the domain part of RURI to point to test8s2 or test8s
rewriteuri("sip:49894614950666 at 10.42.13.82;user=phone");
xlog("route 2 : forwarding to $tU \n $ruri \n");
xlog("Received $rm from $fu (callid: $ci)\n");
forward();
# if(nat_uac_test("8")) {
# xlog("We have incoming SDP, let's fix if it's behind NAT\n");
# fix_nated_sdp("2");
# }
if (is_method("INVITE")) {
t_on_branch("2");
t_on_reply("2");
t_on_failure("1");
}
# if (isflagset(10)) {
# add_rr_param(";nat=yes");
# }
if (!t_relay()) {
sl_reply_error();
};
exit;
}
When calling from a soft phone the requested number, the server sends a
request INVITE as follow :
INVITE sip:49894614950666 at 10.42.15.18;transport=TCP SIP/2.0
Via: SIP/2.0/TCP 10.42.15.12:5060;branch=z9hG4bK-524287-1---dedd27ee7475c0f1
Max-Forwards: 70
Contact: <sip:test11 at 10.42.15.12:5060;transport=tcp>
To: <sip:49894614950666 at 10.42.15.18;transport=TCP>
From: <sip:test11 at 10.42.15.18;transport=TCP>;tag=2f025b44
Call-ID: tdO14DnlADH9Okx6Sr0p4A..
CSeq: 1 INVITE
Content-Type: application/sdp
User-Agent: Z 3.15.40006 rv2.8.20
Allow-Events: presence, kpml, talk
Content-Length: 237
and the target VM resend an INVITE request to Opensips server, but then, the
server start to send to himself messages and not responding the target
machine...
I wonder that the "To" field in the INVITE message is false !
opensips only sends a invite to the IP phone and ignore messages coming from
it, does not respond after with any ack.
what should I add or modify ?
thank you a lot.
--
Sent from: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html
More information about the Users
mailing list