TRY THIS CLI log with name of Outbound Route

Rrrr

Tink
Joined
May 28, 2009
Messages
343
Reaction score
25
Someone who can tip me on how to display the selected Outbound Route name in the CLI log?

I would like to add the proper script to macro-dialout-trunk-predial-hook as I sometimes have a hard time figuring out which outbound route was chosen (yes, too many options...).
 

kenn10

Well-Known Member
Joined
Dec 16, 2007
Messages
3,796
Reaction score
2,212
I would like to see it in the CDR report. I wish we could have a little more control over displayed fields in that report. I don't really care about the "SYSTEM" field and would like to see this in its place. Or it could go in the Userfield column.
 

tm1000

Schmoozecom INC/FreePBX
Joined
Dec 1, 2009
Messages
1,360
Reaction score
78
You wont conflict with that name. Many variables are set on the fly during a call so it's hard to get a full list of them. You can always do a gotoif but thats a waste of time, just use what you are using below. Less dialplan.
So for users that need more than just a log entry, how about setting a new channel variable such as ${OUTBOUND_ROUTE_NAME} which can be used (with manual coding) to populate the CDR or whatever the user wants. How does one make sure the variable name doesn't conflict with any existing ones?

*edit, currently testing this line:
PHP:
$ext->add($context, $exten, '', new ext_setvar('__OUTBOUND_ROUTE_NAME',$route['name']));

which gives this in the log:
Code:
[2014-05-27 13:27:14] VERBOSE[29819][C-00000366] pbx.c: -- Executing [<<redacted>>@from-internal:5] Set("SIP/102-00000284", "__OUTBOUND_ROUTE_NAME=long_dist") in new stack
 

Members online

Forum statistics

Threads
25,838
Messages
167,930
Members
19,261
Latest member
diazgza
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.
Top