Refusing REFER requests
Is there any way to ask FS to refuse a REFER request? I mean, when a REFER is received, the first thing FS does is to disconnect the channel of the referrer. Then, it sends the other channel to the dialplan. But I want to prevent the unbridging of the call in some circumstances (meaning: some destinations for transfer are not valid). Obs: I don't want do disable support for REFER as I know it can be configured in the sofia profile. r, takeshi
disable-transfer on the profile. /b On Dec 9, 2010, at 8:11 AM, mayamatakeshi wrote:
Is there any way to ask FS to refuse a REFER request? I mean, when a REFER is received, the first thing FS does is to disconnect the channel of the referrer. Then, it sends the other channel to the dialplan. But I want to prevent the unbridging of the call in some circumstances (meaning: some destinations for transfer are not valid). Obs: I don't want do disable support for REFER as I know it can be configured in the sofia profile.
r, takeshi
do you want to disable transfer completly? or you want to twick it? Le 09/12/2010 15:11, mayamatakeshi a écrit :
Is there any way to ask FS to refuse a REFER request? I mean, when a REFER is received, the first thing FS does is to disconnect the channel of the referrer. Then, it sends the other channel to the dialplan. But I want to prevent the unbridging of the call in some circumstances (meaning: some destinations for transfer are not valid). Obs: I don't want do disable support for REFER as I know it can be configured in the sofia profile.
r, takeshi
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Meftah Tayeb inum: +883510001288000 Phone: +13602276297 Fax: +12538020313
On Thu, Dec 9, 2010 at 11:11 PM, mayamatakeshi <mayamatakeshi@gmail.com>wrote:
Is there any way to ask FS to refuse a REFER request? I mean, when a REFER is received, the first thing FS does is to disconnect the channel of the referrer. Then, it sends the other channel to the dialplan. But I want to prevent the unbridging of the call in some circumstances (meaning: some destinations for transfer are not valid). Obs: I don't want do disable support for REFER as I know it can be configured in the sofia profile.
Thanks for the answers. I checked the mod_sofia code (sofia.c) and there is no way to do this. But I can see that if I really needed it, I can check the URI in the REFER and refuse the call at mod_sofia level without completely disabling transfer. br, takeshi
Is this thing on? Did you not see my email where I said use disable-transfer option on the profile? /b On Dec 9, 2010, at 4:05 PM, mayamatakeshi wrote:
On Thu, Dec 9, 2010 at 11:11 PM, mayamatakeshi <mayamatakeshi@gmail.com> wrote: Is there any way to ask FS to refuse a REFER request? I mean, when a REFER is received, the first thing FS does is to disconnect the channel of the referrer. Then, it sends the other channel to the dialplan. But I want to prevent the unbridging of the call in some circumstances (meaning: some destinations for transfer are not valid). Obs: I don't want do disable support for REFER as I know it can be configured in the sofia profile.
Thanks for the answers. I checked the mod_sofia code (sofia.c) and there is no way to do this. But I can see that if I really needed it, I can check the URI in the REFER and refuse the call at mod_sofia level without completely disabling transfer.
br, takeshi
On Fri, Dec 10, 2010 at 7:08 AM, Brian West <brian@freeswitch.org> wrote:
Is this thing on? Did you not see my email where I said use disable-transfer option on the profile?
Yes, but I don't want to refuse all REFER request (that's what disable-transfer do). I only want to refuse some REFER requests when I detect the destination is invalid.
On Dec 9, 2010, at 4:05 PM, mayamatakeshi wrote:
On Thu, Dec 9, 2010 at 11:11 PM, mayamatakeshi <mayamatakeshi@gmail.com> wrote:
Is there any way to ask FS to refuse a REFER request? I mean, when a REFER is received, the first thing FS does is to disconnect the channel of the referrer. Then, it sends the other channel to the dialplan. But I want to prevent the unbridging of the call in some circumstances (meaning: some destinations for transfer are not valid). Obs: I don't want do disable support for REFER as I know it can be configured in the sofia profile.
Thanks for the answers. I checked the mod_sofia code (sofia.c) and there is no way to do this. But I can see that if I really needed it, I can check the URI in the REFER and refuse the call at mod_sofia level without completely disabling transfer.
br, takeshi
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
TAG_IF((profile->mflags & MFLAG_REFER), NUTAG_ALLOW("REFER")), This removes refer from the allowed methods in sofia so we will say that the method is NOT allowed. 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. /b On Dec 9, 2010, at 4:25 PM, mayamatakeshi wrote:
On Fri, Dec 10, 2010 at 7:08 AM, Brian West <brian@freeswitch.org> wrote: Is this thing on? Did you not see my email where I said use disable-transfer option on the profile?
Yes, but I don't want to refuse all REFER request (that's what disable-transfer do). I only want to refuse some REFER requests when I detect the destination is invalid.
On
On Fri, Dec 10, 2010 at 7:32 AM, Brian West <brian@freeswitch.org> wrote:
TAG_IF((profile->mflags & MFLAG_REFER), NUTAG_ALLOW("REFER")),
This removes refer from the allowed methods in sofia so we will say that the method is NOT allowed.
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.
I am not sure what you mean. 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: if (!(profile->mflags & MFLAG_REFER)) { nua_respond(nh, SIP_403_FORBIDDEN, NUTAG_WITH_THIS(nua), TAG_END()); goto done; } // my pseudo-code: if (REFER_URI =~ forbidded_transfer_target) { nua_respond(nh, SIP_403_FORBIDDEN, NUTAG_WITH_THIS(nua), TAG_END()); goto done; }
I think what Brian is getting at is that if you refuse/ignore the REFER you'll probably end up with a dropped call. Steve on iPhone On 9 Dec 2010, at 22:49, mayamatakeshi <mayamatakeshi@gmail.com> wrote:
On Fri, Dec 10, 2010 at 7:32 AM, Brian West <brian@freeswitch.org> wrote: TAG_IF((profile->mflags & MFLAG_REFER), NUTAG_ALLOW("REFER")),
This removes refer from the allowed methods in sofia so we will say that the method is NOT allowed.
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.
I am not sure what you mean. 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:
if (!(profile->mflags & MFLAG_REFER)) { nua_respond(nh, SIP_403_FORBIDDEN, NUTAG_WITH_THIS(nua), TAG_END()); goto done; }
// my pseudo-code:
if (REFER_URI =~ forbidded_transfer_target) { nua_respond(nh, SIP_403_FORBIDDEN, NUTAG_WITH_THIS(nua), TAG_END()); goto done; }
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Thanks, actually, I don't want to go with this, but I need to list my options trying to solve an issue with a terminal (and replacing the terminal is not a option). On Fri, Dec 10, 2010 at 4:01 PM, Steven Ayre <steveayre@gmail.com> wrote:
I think what Brian is getting at is that if you refuse/ignore the REFER you'll probably end up with a dropped call.
Steve on iPhone
On 9 Dec 2010, at 22:49, mayamatakeshi <mayamatakeshi@gmail.com> wrote:
On Fri, Dec 10, 2010 at 7:32 AM, Brian West <brian@freeswitch.org> wrote:
TAG_IF((profile->mflags & MFLAG_REFER), NUTAG_ALLOW("REFER")),
This removes refer from the allowed methods in sofia so we will say that the method is NOT allowed.
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.
I am not sure what you mean. 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:
if (!(profile->mflags & MFLAG_REFER)) { nua_respond(nh, SIP_403_FORBIDDEN, NUTAG_WITH_THIS(nua), TAG_END()); goto done; }
// my pseudo-code:
if (REFER_URI =~ forbidded_transfer_target) { nua_respond(nh, SIP_403_FORBIDDEN, NUTAG_WITH_THIS(nua), TAG_END()); goto done; }
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (4)
-
Brian West
-
mayamatakeshi
-
Meftah Tayeb
-
Steven Ayre