<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
You can arm a failure_route for the Invites to the gateways, and
inside the failure_route change the status code to whatever you want
by doing <br>
t_reply("500","Cannot Route");<br>
<br>
or whatever message that you want.<br>
<br>
Regards,<br>
Vlad<br>
<pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a> </pre>
<br>
On 03/01/2012 08:33 AM, <a class="moz-txt-link-abbreviated" href="mailto:discodog62@aol.com">discodog62@aol.com</a> wrote:
<blockquote
cite="mid:8CEC58C607D56B0-5EC-F21F@webmail-d021.sysops.aol.com"
type="cite"><font color="black" face="arial" size="2">
<div><font face="arial"><font size="2">When I setup a call then
cancel the call I am getting a 487 from my gateway that is
relayed to the client.</font></font></div>
<div><font face="arial"><font size="2">I don't wish to show the
487 to the client. Is it possible to drop the reply for
the 487?</font></font></div>
<div><font face="arial"><font size="2"><br>
</font></font></div>
<font face="arial"><font size="2">I am hoping someone could let
me know if this is </font>possible<font size="2">.</font></font>
<div style="color: black; font-size: 10pt; font-family: arial;"><br>
</div>
<div style="color: black; font-size: 10pt; font-family: arial;">I
am running opensips 1.7 Here is a copy of my config as well.</div>
<div style="color: black; font-size: 10pt; font-family: arial;"><br>
</div>
<div>
<div><font face="arial">debug=4</font></div>
<div><font face="arial">log_stderror=no</font></div>
<div><font face="arial">log_facility=LOG_LOCAL0</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">fork=yes</font></div>
<div><font face="arial">children=4</font></div>
<div><font face="arial">disable_tcp=yes</font></div>
<div><font face="arial">auto_aliases=yes</font></div>
<div><font face="arial">sip_warning=yes</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">listen=udp:10.8.1.139:5060</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">group=nobody</font></div>
<div><font face="arial">user=nobody</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">server_header="ZZZ"</font></div>
<div><font face="arial">server_signature = off</font></div>
<div><font face="arial">user_agent_header="User-Agent: ZZZ"</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">####### Modules Section ########</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">#set module path</font></div>
<div><font face="arial">mpath="/usr/local/lib64/opensips/modules/"</font></div>
<div><font face="arial">loadmodule "db_text.so"</font></div>
<div><font face="arial">loadmodule "signaling.so"</font></div>
<div><font face="arial">loadmodule "sl.so"</font></div>
<div><font face="arial">loadmodule "tm.so"</font></div>
<div><font face="arial">loadmodule "rr.so"</font></div>
<div><font face="arial">loadmodule "maxfwd.so"</font></div>
<div><font face="arial">loadmodule "textops.so"</font></div>
<div><font face="arial">loadmodule "mi_fifo.so"</font></div>
<div><font face="arial">loadmodule "uri.so"</font></div>
<div><font face="arial">loadmodule "domain.so"</font></div>
<div><font face="arial">loadmodule "permissions.so"</font></div>
<div><font face="arial">loadmodule "userblacklist.so"</font></div>
<div><font face="arial">loadmodule "dialog.so"</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">modparam("domain|userblacklist|dialog|</font><span
style="font-family: arial;">permissions</span><span
style="font-family: arial;">",
"db_url","text:///zxa/server/opensipsDNC")</span></div>
<div><font face="arial">modparam("mi_fifo", "fifo_name",
"/tmp/opensips_fifo")</font></div>
<div><font face="arial">modparam("rr", "append_fromtag", 0)</font></div>
<div><font face="arial">modparam("uri", "use_uri_table", 0)</font></div>
<div><font face="arial">modparam("domain", "db_mode", 1) #
Use caching</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">####### Routing Logic ########</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"># main request routing logic</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">route{</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"><span class="Apple-tab-span"
style="white-space: pre;"> </span>xlog("=== TOP ===");</font></div>
<div><font face="arial"> xlog("%%%% tu= $tu | fu= $fu | od=
$od | ReceivedINT: $Ri | SourceIP: $si %%%");</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> if ( $si == "10.8.1.139")
&& ( $Ri == "10.8.1.139")</font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial"> exit;</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"><span class="Apple-tab-span"
style="white-space: pre;"> </span> </font></div>
<div><font face="arial"> if
(!check_address("1","$si","$sp","$proto"))</font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"><span class="Apple-tab-span"
style="white-space: pre;"> </span>xlog("=== ACCESS
FAILED ===");</font></div>
<div><font face="arial"><span class="Apple-tab-span"
style="white-space: pre;"> </span>xlog("=== $si| $sp |
$proto ===");</font></div>
<div><font face="arial">
sl_send_reply("403","Forbidden");</font></div>
<div><font face="arial"> exit;</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"> if
(!mf_process_maxfwd_header("10"))</font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial"><span class="Apple-tab-span"
style="white-space: pre;"> </span> xlog("=== TOO
MANY HOPS ===");</font></div>
<div><font face="arial"> sl_send_reply("483","Too Many
Hops");</font></div>
<div><font face="arial"> exit;</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"><span class="Apple-tab-span"
style="white-space: pre;"> </span>#CANCEL processing</font></div>
<div><font face="arial"> if (is_method("CANCEL"))</font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial"><span class="Apple-tab-span"
style="white-space: pre;"> </span> xlog("=== CANCEL
76 ===");</font></div>
<div><font face="arial"> if (t_check_trans())</font></div>
<div><font face="arial"> t_relay();</font></div>
<div><font face="arial"> exit;</font></div>
<div><font face="arial"> }</font></div>
<div><span class="Apple-tab-span" style="white-space: pre;"><font
face="arial"> </font></span></div>
<div><font face="arial"><span class="Apple-tab-span"
style="white-space: pre;"> </span>if
(is_method("PUBLISH"))</font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial"> sl_send_reply("503", "Service
Unavailable");</font></div>
<div><font face="arial"> exit;</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> if (has_totag())</font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial"> xlog("=== HAS TO TAG ===");</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"> if (loose_route()) </font></div>
<div><font face="arial"><span class="Apple-tab-span"
style="white-space: pre;"> </span>{</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> xlog("=== HAS LOOSE ===");</font></div>
<div><font face="arial"> if (is_method("BYE"))</font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial"> xlog("=== LOOSE BYE
===");</font></div>
<div><font face="arial"> route(3);</font></div>
<div><font face="arial"> exit;</font></div>
<div><font face="arial"> } else if
(is_method("INVITE")) {</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> xlog("=== RE-INVITE
LOOSE ===");</font></div>
<div><font face="arial"> record_route();</font></div>
<div><font face="arial"> } </font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> xlog("In loouse going to
Route 1");</font></div>
<div><font face="arial"> route(1);</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> } else {</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> if ( is_method("ACK") )</font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial"> xlog("=== LOOSE ELSE
ACK ==="); </font></div>
<div><font face="arial"> if ( t_check_trans() )</font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial"> t_relay();</font></div>
<div><font face="arial"> exit;</font></div>
<div><font face="arial"> } else {</font></div>
<div><font face="arial"> xlog("=== LOOSE
Discard ACK ===");</font></div>
<div><font face="arial"> exit;</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">
sl_send_reply("404","Not here");</font></div>
<div><font face="arial"> }</font></div>
<div><span class="Apple-tab-span" style="white-space: pre;"><font
face="arial"> </font></span></div>
<div><font face="arial"> exit;</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"> t_check_trans();</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"><span class="Apple-tab-span"
style="white-space: pre;"> </span>if (loose_route()) </font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial"> xlog("L_ERR","Attempt to route
with preloaded Route's [$fu/$tu/$ru/$ci]");</font></div>
<div><font face="arial"> if (!is_method("ACK"))</font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial">
sl_send_reply("403","Preload Route denied");</font></div>
<div><font face="arial"> exit;</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"> # record routing</font></div>
<div><font face="arial"> if
(!is_method("REGISTER|MESSAGE"))</font></div>
<div><font face="arial"><span class="Apple-tab-span"
style="white-space: pre;"> </span>{</font></div>
<div><font face="arial"> record_route();</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"> if (!is_uri_host_local())</font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial"> xlog("Not local so lets just
see what happens $rd");</font></div>
<div><font face="arial"> route(1);</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"> if ($rU==NULL)</font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial"> # request with no Username in
RURI</font></div>
<div><font face="arial"> sl_send_reply("484","Address
Incomplete");</font></div>
<div><font face="arial"> exit;</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"> <span class="Apple-tab-span"
style="white-space: pre;"> </span></font></div>
<div><font face="arial"> if (is_method("INVITE") &&
(!has_totag()) )</font></div>
<div><font face="arial"> { </font></div>
<div><font face="arial"> xlog("|||||| NEW CALL
||||||");</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> route(2);</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"> send_reply("420", "Invalid
Extension");</font></div>
<div><font face="arial"> exit;</font></div>
<div><font face="arial">}</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">route[1] {</font></div>
<div><font face="arial"> #---- RTP Proxy handling ---#</font></div>
<div><font face="arial"> xlog("=== ROUTE 1 ===");</font></div>
<div><font face="arial"> rewritehostport("10.8.1.44:5060");</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> if (is_method("INVITE")) {</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> t_on_reply("1");</font></div>
<div><font face="arial"> t_on_failure("1");</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> if (!t_relay())</font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial"> sl_reply_error();</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> exit;</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial">}</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">route[2] {</font></div>
<div><font face="arial"> xlog("=== ROUTE 2 ===");</font></div>
<div><font face="arial"> if
(!check_blacklist("userblacklist"))</font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial"> xlog('~~~ BLACKLISTED DID
Forbidden ~~~');</font></div>
<div><font face="arial"> sl_send_reply("403", "DID
Forbidden");</font></div>
<div><font face="arial"> exit;</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> route(1);</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">}</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">route[3] {</font></div>
<div><font face="arial"> xlog("=== ROUTE 3 ===");</font></div>
<div><font face="arial"> t_on_reply("1");</font></div>
<div><font face="arial"> t_on_failure("1");</font></div>
<div><font face="arial"> t_relay("udp:10.8.1.44:5060");</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">}</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">branch_route[1] {</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> xlog("new branch at $ru\n");</font></div>
<div><font face="arial">}</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">onreply_route[1] {</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> xlog("=== ON REPLY ROUTE 2 rs=
$rs | fu= $fu | si= $si | Ri= $Ri ===");</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> if (t_check_status("487")) </font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial"> xlog("487 at reply route");</font></div>
<div><font face="arial"> t_cancel_branch();</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"> drop;</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">}</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">failure_route[1] {</font></div>
<div><font face="arial"><span class="Apple-tab-span"
style="white-space: pre;"> </span>xlog("=== FAIL ROUTE
==="); </font></div>
<div><font face="arial"> xlog("=== FAIL ROUTE 2 fu= $fu |
od= $od | si= $si | Ri= $Ri ===");</font></div>
<div><font face="arial"> </font></div>
<div><font face="arial"><span class="Apple-tab-span"
style="white-space: pre;"> </span>if
(t_was_cancelled())</font></div>
<div><font face="arial"> {</font></div>
<div><font face="arial"> exit;</font></div>
<div><font face="arial"> }</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">}</font></div>
<div style="color: black; font-family: arial; font-size:
10pt;"><br>
</div>
</div>
<div style="color: black; font-size: 10pt; font-family: arial;"><br>
</div>
<div style="color: black; font-size: 10pt; font-family: arial;">Here
is a call flow that I have a question about. Sorry if this is
over kill.</div>
<div style="color: black; font-size: 10pt; font-family: arial;"><br>
</div>
<div style="color: black;">
<div>
<div><font face="'Courier New', Courier, mono" size="1">|
10.6.3.87 |10.8.1.139 | 10.8.1.44
|</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
| | </font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
Request: INVITE sip |
|SIP/SDP: Request: INVITE </font></div>
<div><font face="'Courier New', Courier, mono" size="1">|(5068)
------------------> (5060) | |</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
Status: 100 Giving |
|SIP: Status: 100 Giving a try</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|(5068)
<------------------ (5060) | |</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
| Request: INVITE sip
|SIP/SDP: Request: INVITE </font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
|(5060) ------------------> (5060)
|</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
| Status: 100 Trying
|SIP: Status: 100 Trying</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
|(5060) <------------------ (5060)
|</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
| Status: 180 Ringing
|SIP: Status: 180 Ringing</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
|(5060) <------------------ (5060)
|</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
Status: 180 Ringing |
|SIP: Status: 180 Ringing</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|(5068)
<------------------ (5060) | |</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
Request: CANCEL sip |
|SIP: Request: CANCEL </font></div>
<div><font face="'Courier New', Courier, mono" size="1">|(5068)
------------------> (5060) | |</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
Status: 200 canceli |
|SIP: Status: 200 canceling</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|(5068)
<------------------ (5060) | |</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
| Request: CANCEL sip
|SIP: Request: CANCEL </font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
|(5060) ------------------> (5060)
|</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
Request: ACK sip:18 |
|SIP: Request: ACK </font></div>
<div><font face="'Courier New', Courier, mono" size="1">|(5068)
------------------> (5060) | |</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
Request: BYE sip:18 |
|SIP: Request: BYE </font></div>
<div><font face="'Courier New', Courier, mono" size="1">|(5068)
------------------> (5060) | |</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
| Request: BYE sip:10
|SIP: Request: BYE </font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
|(5060) ------------------> (5060)
|</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
| Status: 200 OK
|SIP: Status: 200 OK</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
|(5060) <------------------ (5060)
|</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
| Status: 487 Request
|SIP: Status: 487 Request Terminated</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
|(5060) <------------------ (5060)
|</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
| Request: ACK sip:18
|SIP: Request: ACK </font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
|(5060) ------------------> (5060)
|</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
Status: 487 Request |
|SIP: Status: 487 Request Terminated</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|(5068)
<------------------ (5060) | |</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
Request: ACK sip:18 |
|SIP: Request: ACK </font></div>
<div><font face="'Courier New', Courier, mono" size="1">|(5068)
------------------> (5060) | |</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
| Status: 200 OK
|SIP: Status: 200 OK</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
|(5060) <------------------ (5060)
|</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|
Status: 200 OK |
|SIP: Status: 200 OK</font></div>
<div><font face="'Courier New', Courier, mono" size="1">|(5068)
<------------------ (5060) | |</font></div>
</div>
</div>
<div style="color: black; font-size: 10pt; font-family: arial;"><br>
</div>
<div style="color: black; font-size: 10pt; font-family: arial;"><br>
</div>
<div style="color: black; font-size: 10pt; font-family: arial;">Thanks,</div>
<div style="color: black; font-size: 10pt; font-family: arial;"><br>
</div>
<div style="color: black; font-size: 10pt; font-family: arial;">James</div>
</font>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>