Quantcast
Channel: FreePBX - FreePBX Community Forums
Viewing all articles
Browse latest Browse all 17559

Dynamic Route issue

$
0
0

Hey everyone - anyone who can help?

So, I have this page where it outputs some data we want to have playback to the caller (to update them on their order status)

1. https://friendlystranger.gr/check_order.php?order_number=1184

2. We then setup a Dynamic route in FreePBX:

3. Added a Custom Destination:

image

4. And finally added this in the “extensions_custom.conf” file:

[read-order-status]
exten => s,1,NoOp(Processing Order Status)
exten => s,n,Set(order_details=${dynroute})

; Extract the information
exten => s,n,Set(status=${CUT(CUT(order_details,|,1),:,2)})
exten => s,n,Set(courier=${CUT(CUT(order_details,|,2),:,2)})
exten => s,n,Set(tracking=${CUT(CUT(order_details,|,3),:,2)})

; Log the extracted details for debugging
exten => s,n,NoOp(Status: ${status}, Courier: ${courier}, Tracking: ${tracking})

; Playback the details
exten => s,n,Playback(your-order-status-is) 
exten => s,n,SayAlpha(${status})

exten => s,n,Playback(your-courier-is) 
exten => s,n,SayAlpha(${courier})

exten => s,n,Playback(your-tracking-number-is) 
exten => s,n,SayDigits(${tracking})

exten => s,n,Hangup()

However, although it’s pulling the data, its just going into a blackhole:

107097	[2024-09-01 00:58:17] VERBOSE[21117][C-00000137] app_read.c: Accepting a maximum of 4 digits.	
107098	[2024-09-01 00:58:17] VERBOSE[21117][C-00000137] file.c: <PJSIP/anonymous-0000027e> Playing 'custom/Call_originating_from_other_store.slin' (language 'gr')	
107099	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] app_read.c: User entered '1184'	
107100	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] pbx.c: Executing [s@dynroute-1:3] Set("PJSIP/anonymous-0000027e", "dynroute=") in new stack	
107101	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] pbx.c: Executing [s@dynroute-1:4] Set("PJSIP/anonymous-0000027e", "CURLOPT(dnstimeout)=5") in new stack	
107102	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] pbx.c: Executing [s@dynroute-1:5] Set("PJSIP/anonymous-0000027e", "CURLOPT(conntimeout)=5") in new stack	
107103	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] pbx.c: Executing [s@dynroute-1:6] Set("PJSIP/anonymous-0000027e", "CURLOPT(ftptimeout)=5") in new stack	
107104	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] pbx.c: Executing [s@dynroute-1:7] Set("PJSIP/anonymous-0000027e", "CURLOPT(httptimeout)=5") in new stack	
107105	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] pbx.c: Executing [s@dynroute-1:8] Set("PJSIP/anonymous-0000027e", "dynroute=status:wc-failed|courier:ACS|tracking:2548778541") in new stack	
107106	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] pbx.c: Executing [s@dynroute-1:9] Set("PJSIP/anonymous-0000027e", "dynroute=status:wc-failed|courier:ACS|tracking:2548778541") in new stack	
107107	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] pbx.c: Executing [s@dynroute-1:10] GotoIf("PJSIP/anonymous-0000027e", "0?dynroute-1,1,1") in new stack	
107108	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] pbx.c: Executing [s@dynroute-1:11] GotoIf("PJSIP/anonymous-0000027e", "0?read-order-status,s,1") in new stack	
107109	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] pbx.c: Executing [s@dynroute-1:12] Goto("PJSIP/anonymous-0000027e", "dynroute-1,1,1") in new stack	
107110	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] pbx_builtins.c: Goto (dynroute-1,1,1)	
107111	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] pbx.c: Executing [1@dynroute-1:1] Goto("PJSIP/anonymous-0000027e", "app-blackhole,busy,1") in new stack	
107112	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] pbx_builtins.c: Goto (app-blackhole,busy,1)	
107113	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] pbx.c: Executing [busy@app-blackhole:1] NoOp("PJSIP/anonymous-0000027e", "Blackhole Dest: Busy") in new stack	
107114	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] pbx.c: Executing [busy@app-blackhole:2] Progress("PJSIP/anonymous-0000027e", "") in new stack	
107115	[2024-09-01 00:58:24] VERBOSE[21117][C-00000137] pbx.c: Executing [busy@app-blackhole:3] Busy("PJSIP/anonymous-0000027e", "20") in new stack	
107116	[2024-09-01 00:58:27] VERBOSE[21117][C-00000137] pbx.c: Spawn extension (app-blackhole, busy, 3) exited non-zero on 'PJSIP/anonymous-0000027e'	
107117	[2024-09-01 00:58:27] VERBOSE[21118][C-00000137] app_mixmonitor.c: MixMonitor close filestream (mixed)	
107118	[2024-09-01 00:58:27] VERBOSE[21118][C-00000137] app_mixmonitor.c: End MixMonitor Recording PJSIP/anonymous-0000027e

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 17559

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>