SOLVED Grandstream GDS3710 HD Video Door system

DoubleDriveLine

Active Member
Joined
Sep 23, 2017
Messages
144
Reaction score
46
I have one of these in my lab right now. For the most part it is working as desired but there is one function that is not working on my IPBX 2021 (yes I will get around to replacing it sometime soon. :)).

There is a function when the Door phone calls a Grandstream GXP2170 Phone a series of jpg images can be shown on the display as an almost video from the door phone. This is not true video as the 2170 does not support video codes. What happens is in the invite the door phone sends SIP header "Call-Info" containing a url. Looking at a Wireshark capture it looks like this.

1716303602990.png

When the phone receives that message it will display a series of jpg images from the camera. The issue is this header is stripped off by IPBX. I found a post from 2018 on the FreePBX forums that discusses this very issue and a fix for it. The fix as described there is not working in IPBX 2021.

Grandstream GDS3710 with GXP2170

@kovadam69 got it working by adding custom context in the extensions_custom.conf.

Code:
[macro-dialout-one-predial-hook]
exten => s,1,NoOp(******************** PRE DIAL HOOK ********************)
exten => s,n,SIPAddHeader(Call-Info: ${SIP_HEADER(Call-Info)}

I have added this code to my extensions_custom.conf but no luck. I tried adding it to the end, beginning, and right after the [from-internal-custom] section.

I even tried rebooting the PBX just to make sure it wasn't one of those issues where the change requires a reboot.

Does anyone have any thoughts on why this isn't working?

BTW this function works out of the box if you are using a Grandstream PBX. I of course don't use one of those systems.

The GDS and the GXP are both on the most recent firmware.
 
I have one of these in my lab right now. For the most part it is working as desired but there is one function that is not working on my IPBX 2021 (yes I will get around to replacing it sometime soon. :)).

There is a function when the Door phone calls a Grandstream GXP2170 Phone a series of jpg images can be shown on the display as an almost video from the door phone. This is not true video as the 2170 does not support video codes. What happens is in the invite the door phone sends SIP header "Call-Info" containing a url. Looking at a Wireshark capture it looks like this.

View attachment 5397

When the phone receives that message it will display a series of jpg images from the camera. The issue is this header is stripped off by IPBX. I found a post from 2018 on the FreePBX forums that discusses this very issue and a fix for it. The fix as described there is not working in IPBX 2021.

Grandstream GDS3710 with GXP2170

@kovadam69 got it working by adding custom context in the extensions_custom.conf.



I have added this code to my extensions_custom.conf but no luck. I tried adding it to the end, beginning, and right after the [from-internal-custom] section.

I even tried rebooting the PBX just to make sure it wasn't one of those issues where the change requires a reboot.

Does anyone have any thoughts on why this isn't working?

BTW this function works out of the box if you are using a Grandstream PBX. I of course don't use one of those systems.

The GDS and the GXP are both on the most recent firmware
Did you make a copy and paste error? Because what you posted for dialplan would fail due to a missing closing parentheses.

This won't work.
exten => s,n,SIPAddHeader(Call-Info: ${SIP_HEADER(Call-Info)}

This will because it has the closing ) for the SIPAddHeader() function.
exten => s,n,SIPAddHeader(Call-Info: ${SIP_HEADER(Call-Info)})
 
I think I found the issue. Here is a small section of the log.

Notice the line after PRE DIAL HOOK

Looks like this was chan_sip only.

Code:
12033[2024-05-21 14:13:27] VERBOSE[22039][C-00000007] pbx.c: Executing [s@macro-dial-one:46] Gosub("PJSIP/5529-0000000c", "sub-presencestate-display,s,1(5520)") in new stack
12034[2024-05-21 14:13:27] VERBOSE[22039][C-00000007] pbx.c: Executing [s@sub-presencestate-display:1] Goto("PJSIP/5529-0000000c", "state-away,1") in new stack
12035[2024-05-21 14:13:27] VERBOSE[22039][C-00000007] pbx_builtins.c: Goto (sub-presencestate-display,state-away,1)
12036[2024-05-21 14:13:27] VERBOSE[22039][C-00000007] pbx.c: Executing [state-away@sub-presencestate-display:1] Set("PJSIP/5529-0000000c", "PRESENCESTATE_DISPLAY=(Away)") in new stack
12037[2024-05-21 14:13:27] VERBOSE[22039][C-00000007] pbx.c: Executing [state-away@sub-presencestate-display:2] Return("PJSIP/5529-0000000c", "") in new stack
12038[2024-05-21 14:13:27] VERBOSE[22039][C-00000007] pbx.c: Executing [s@macro-dial-one:47] Set("PJSIP/5529-0000000c", "CONNECTEDLINE(name,i)=Some Name (Away)") in new stack
12039[2024-05-21 14:13:27] VERBOSE[22039][C-00000007] pbx.c: Executing [s@macro-dial-one:48] Set("PJSIP/5529-0000000c", "CONNECTEDLINE(num)=5520") in new stack
12040[2024-05-21 14:13:27] VERBOSE[22039][C-00000007] pbx.c: Executing [s@macro-dial-one:49] Set("PJSIP/5529-0000000c", "D_OPTIONS=HhTtr") in new stack
12041[2024-05-21 14:13:27] VERBOSE[22039][C-00000007] pbx.c: Executing [s@macro-dial-one:50] Macro("PJSIP/5529-0000000c", "dialout-one-predial-hook,") in new stack
12042[2024-05-21 14:13:27] VERBOSE[22039][C-00000007] pbx.c: Executing [s@macro-dialout-one-predial-hook:1] NoOp("PJSIP/5529-0000000c", "******************** PRE DIAL HOOK ********************") in new stack
12043[2024-05-21 14:13:27] WARNING[22039][C-00000007] chan_sip.c: This function can only be used on SIP channels.
12044[2024-05-21 14:13:27] VERBOSE[22039][C-00000007] pbx.c: Executing [s@macro-dialout-one-predial-hook:2] SIPAddHeader("PJSIP/5529-0000000c", "Call-Info: ") in new stack
12045[2024-05-21 14:13:27] VERBOSE[22039][C-00000007] pbx.c: Executing [s@macro-dial-one:51] ExecIf("PJSIP/5529-0000000c", "0?Set(D_OPTIONS=HhtrI)") in new stack
12046[2024-05-21 14:13:27] VERBOSE[22039][C-00000007] pbx.c: Executing [s@macro-dial-one:52] ExecIf("PJSIP/5529-0000000c", "0?Set(CWRING=r(callwaiting)):Set(CWRING=)") in new stack
12047[2024-05-21 14:13:27] VERBOSE[22039][C-00000007] pbx.c: Executing [s@macro-dial-one:53] NoOp("PJSIP/5529-0000000c", "") in new stack
12048[2024-05-21 14:13:27] VERBOSE[22039][C-00000007] pbx.c: Executing [s@macro-dial-one:54] ExecIf("PJSIP/5529-0000000c", "0?Set(D_OPTIONS=HhTtrg)") in new stack
12049[2024-05-21 14:13:27] VERBOSE[22039][C-00000007] pbx.c: Executing [s@macro-dial-one:55] Dial("PJSIP/5529-0000000c", "PJSIP/5520/sip:[email protected]:5060,15,HhTtrb(func-apply-sipheaders^s^1)") in new stack
 
The issue you are having is that you're using chan_pjsip but the solution is made for chan_sip. Won't work. This is what you will need:

exten => s,n,Set(HASH(__SIPHEADERS,Call-Info)=${PJSIP_HEADER(read,Call-Info)})

Chan_pjsip requires variables to be put on the outbound channel being dialed to, so you need to add information to the SIPHEADERS hash that will be applied on the outbound channel when func-apply-sipheaders is run.
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top