Get who has forward a call

Hi,

When a phone forwards a call :

Called SIP/2006
– Got SIP response 302 “Moved Temporarily” back from IPADDRESS:1061
– Now forwarding SIP/Trunk-SIP-000007f to ‘Local/0970262626@Interne’ (thanks to SIP/2006-00000080)
Executing [0970262626@Interne:1] Noop(Receving a call to transfert)

At this point, how can I get who are transfert a call in a variable (in this case I want to get SIP/2006) ?
Trying to Noop some callerId(num/name) but no one match SIP/2006.

Many thanks

I think you would need to copy the first parameter to the Dial, before starting the Dial into a (double?) underscore variable, and read it from the local channel extension, although you might want to check whether REDIRECTING has been set, in this case.

Please note that chan_sip is no longer supported.

It looks as though REDIRECTING will be set, for the first forward on a call. It will be set to the extension, not the device name. The way that people typically write dialplans, the extension should be 2006, in this case, but there is no requirement that dialplans should be written that way, and there is advice, not followed in your case, not to make the device name guessable.

I’m agree with you, I think the best way is to store the caller id before fordward, just in the case of forwarding.

Thanks you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.