Sub-routine and verif Unconditional forwarding

Hello,

The user activates the forwarding with * 21 + GSM number

In my subroutine I try to check if unconditional forwarding is enabled or not. I want to put this subroutine in the incoming call

Is it possible to do this check and how?

Thank you

Please provide your features.conf, and the relevant part of your dialplan. Asterisk has now built in support for *21, so it all depends on the configuration.

I use Asterisk 13.11.2 (Xivo)

[general]
transferdigittimeout = 5
pickupexten = *8
featuredigittimeout = 1500
atxfernoanswertimeout = 15
atxferdropcall = no
atxferloopdelay = 10
atxfercallbackretries = 2
atxferabort = *0

[featuremap]
blindxfer = *1
disconnect = *0
automixmon = *3
atxfer = *2

Where is your extension “*21”?

It’s on the extensions.conf file :

cat /var/lib/xivo-confgend/asterisk/extensions.conf

[default]
include = xivo-features
include = xivo-extrafeatures
include = parkedcalls
exten = t,1,Hangup()
exten = i,1,Playback(no-user-find)
same = n,Hangup()
include = to-extern


[from-extern]
exten = i,1,Playback(no-user-find)
same = n,Hangup()
exten = s,1,NoOp()
same = n,GotoIf($[${CHANNEL(channeltype)} = SIP]?:not-sip)
same = n,GotoIf($["${XIVO_DID_NEXT_EXTEN}" = ""]?:error-loop)
same = n,Set(XIVO_DID_NEXT_EXTEN=${CUT(CUT(SIP_HEADER(To),@,1),:,2)})
same = n,Set(XIVO_FROM_S=1)
same = n,Goto(from-extern,${XIVO_DID_NEXT_EXTEN},1)
same = n(not-sip),NoOp()
same = n,Log(ERROR, This s extension can only be used from a SIP channel)
same = n,Hangup()
same = n(error-loop),NoOp()
same = n,Log(ERROR, Dialplan loop detected. Got SIP header To: ${SIP_HEADER(To)})
same = n,Hangup()
exten = _+.,1,Goto(${EXTEN:1},1)


[xivo-features]
exten = _*21.,1,Set(XIVO_BASE_CONTEXT=${CONTEXT})
same  =     n,Set(XIVO_BASE_EXTEN=${EXTEN})
same  =     n,GoSub(feature_forward,s,1(unc,${EXTEN:3}))

exten = *21,1,Set(XIVO_BASE_CONTEXT=${CONTEXT})
exten = *21,n,Set(XIVO_BASE_EXTEN=${EXTEN})
exten = *21,n,Gosub(feature_forward,s,1(unc))

You need to use XIVO’s support channels (possibly their per support forum?) as this question seems to be about their customisation of Asterisk.

I have no feedback on the forum :frowning:

The problem is that your question is about the operation of their feature_forward subroutine, not about the operation of Asterisk.