<br><div class="gmail_quote">On Fri, Dec 10, 2010 at 7:32 AM, Brian West <span dir="ltr"><<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word">TAG_IF((profile->mflags & MFLAG_REFER), NUTAG_ALLOW("REFER")),<div><br></div><div>This removes refer from the allowed methods in sofia so we will say that the method is NOT allowed.</div>
<div><br></div><div>If you want to refuse when the destination is invalid then give up now because you will need to know before the refer is sent to know that.</div></div></blockquote><div><br></div><div>I am not sure what you mean.<br>
I was thinking in adding a new parameter for mod_sofia like "forbidden_transfer_target" and add code in sofia.c right after that MFLAG check:<br><br> if (!(profile->mflags & MFLAG_REFER)) {<br> nua_respond(nh, SIP_403_FORBIDDEN, NUTAG_WITH_THIS(nua), TAG_END());<br>
goto done;<br> }<br><br>// my pseudo-code:<br><br> if (REFER_URI =~ forbidded_transfer_target) {<br> nua_respond(nh, SIP_403_FORBIDDEN, NUTAG_WITH_THIS(nua), TAG_END());<br> goto done;<br>
}<br></div></div><br>