Redirecting incoming calls to another line - Not accepting call completion offers

Hello,
I have a wierd problem:

I have a GSM module and all incoming calls are pointed to an extension 211.

Now I set on my extension 211 (Grandstream phone) redirection to 212. So every incoming call should be ringing on 212. But there is some error:

 Called PJSIP/211/sip:211@<phone_IP>:5060
       > 0x7f4c38107810 -- Strict RTP switching to RTP target address <GSm_GW_IP>:8038 as source
  == Using SIP RTP Audio TOS bits 184
  == Using SIP RTP Audio TOS bits 184 in TCLASS field.
  == Using SIP RTP Audio CoS mark 5
    -- Connected line update to PJSIP/GSM-00000054 prevented.
    -- Now forwarding PJSIP/GSM-00000054 to 'Local/212@from-internal' (thanks to PJSIP/211-00000055)
    -- Not accepting call completion offers from call-forward recipient Local/212@from-internal-0000007a;1
    -- PJSIP/211-00000055 Internal Gosub(app-missedcall-hangup,211,1) start

Why it is Not accepting call completion offers from call-forward recipient Local/212@from-internal-0000007a;1

What does it means and please what should I do to fix that?

Thanks for advices

That is not the source of your issue. It is no an error or problem.

You would need to provide the complete log and not just a specific part of the output like this.

Hello, thanks for reply.

here is full dialplan:
foot - Pastebin.com

It would appear as though, I don’t know why because it’s happening in FreePBX logic, it is directing calls for 212 to 211, which then happens over and over.

That is wierd, it should end on 212.
I made this redirect on Grandstream phone (there is a sw button function for that) and it looks like the internal service of Grandstream phone uses same feature code (*72) as FreePBX for doing it.

Because if I call *72 the redirect menu shows on the phone and if I disable this function on Grandstream,
it hits feature code on FreePBX after call *72.

Any idea how tofix that, or what can cause this problem? Every hint helpes me , because I am quite lost with that.

Setup voicemail on 212.

Hmmm… Sorry I don’t catch it… Can you be more specific?

My goal is that if I go away from my line (211) I set redirection to 212 so if anyone call to my line (211) it imidiate ring on 212.

And also oposite - If I go away from 212 I redirect it to 211…

How it is can be done via Voicemail?

I’m trying to make my own redirection by using extensions_custom.conf and dynamic routes:

[from-internal-xfer]
include => Redirection-custom


[Redirection-custom]
exten => *1212, 1, NoOp(Redirection from 211 to 212)
 same => n, Set(__Redirection211=ENABLED)
 same => n, Playback(call-forwarding)
 same => n, Playback(enabled)
 same => n, NoOP(Status: ${Redirection211})
 same => n, Hangup()

And in dynamic routes I have
Dynamic Route Lookup Source:
Source Type: Asterisk variable
Enable Substitutions: No
Asterisk Variable: ${Redirection211}

And in Dynamic Route Entries:
Match - ENABLED, Destination Extension 211
Match - DISABLED, Destination Extension 212

But obviously the variable Redirection211 has not been globaly seted and Dynnamic routes does not know it because in dialplan I see:

Executing [8101@from-pstn:25] Goto("PJSIP/GSM-0000008d", "dynroute-2,s,1") in new stack
    -- Goto (dynroute-2,s,1)
    -- Executing [s@dynroute-2:1] Set("PJSIP/GSM-0000008d", "dynroute=") in new stack
    -- Executing [s@dynroute-2:2] Set("PJSIP/GSM-0000008d", "dynroute=") in new stack
    -- Executing [s@dynroute-2:3] Set("PJSIP/GSM-0000008d", "dynroute=") in new stack
    -- Executing [s@dynroute-2:4] GotoIf("PJSIP/GSM-0000008d", "1?dynroute-2,1,1") in new stack
    -- Goto (dynroute-2,1,1)
    -- Executing [1@dynroute-2:1] Goto("PJSIP/GSM-0000008d", "ext-group,1001,1") in new stack
    -- Goto (ext-group,1001,1)

How can I set my own variable as Global please?

Got the solution!

At first… the loop was caused by frozen redirection on second phone setted by FreePBX. So I disable it and after that it’s work fine.

And second problem: The setting global variable has been soluted by adding variables into globals_custom.conf and in extensions_custom.conf setted by:
Set(GLOBAL(REDIRECTION211)=ENABLED)

Also is better use from-internal-custom, than from-internal-xfer

Last question:

I would like to call *1212 only from line 211.
But when I set:
exten => *1212/211, 1, NoOp()

It tells me:
[2023-11-14 13:10:23] NOTICE[31580]: res_pjsip_session.c:3967 new_invite: 211: Call (UDP:172.16.10.95:5060) to extension '*1212' rejected because extension not found in context 'from-internal'.

so what would I do please?

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