Ticket #1547 (closed Bugs: invalid)

Opened 2 years ago

Last modified 2 years ago

Custom contexts/extensions not working

Reported by: colinjack Assigned to:
Priority: major Milestone:
Component: Core Version: 2.2rc1
Keywords: Cc:
Confirmation: SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description (Last modified by vgster)

Contexts in the extensions_custom.conf do not appear to be working (or being used):

extensions_additional.conf has an include for ext-did-custom:

[ext-did]
include => ext-did-custom
exten => fax,1,Goto(ext-fax,in_fax,1)
exten => s,1,Set(FROM_DID=s)

I have the following [ext-did-custom] context in extensions_custom.conf:

[ext-did-custom]
exten => s,1,NoOp("CallerID Modified with ext-did-custom") ;to show in log file
exten => s,n,Set(modifiedcallerid=${CALLERID(number):3:12})
exten => s,n,Set(CALLERID(number)=0${modifiedcallerid})
exten => s,n,NoOp("CallerID is now ${CALLERID(number)}")

It doesn't seem to be being called - this from the log:

Dec 17 12:07:47 VERBOSE[3220] logger.c: -- Executing NoOp("SIP/441953660050-08eb0b88", "Catch-All DID Match - Found 7777 - You probably want a DID for this.") in new stack
Dec 17 12:07:47 VERBOSE[3220] logger.c: -- Executing Goto("SIP/441953660050-08eb0b88", "ext-did|s|1") in new stack
Dec 17 12:07:47 VERBOSE[3220] logger.c: -- Goto (ext-did,s,1)
Dec 17 12:07:47 VERBOSE[3220] logger.c: -- Executing Set("SIP/441953660050-08eb0b88", "FROM_DID=s") in new stack
Dec 17 12:07:47 VERBOSE[3220] logger.c: -- Executing Gosub("SIP/441953660050-08eb0b88", "cidlookup|cidlookup_1|1") in new stack

Change History

12/17/06 08:34:07 changed by vgster

  • description changed.

(follow-up: ↓ 4 ) 12/18/06 14:39:36 changed by mccarthy@prkvw.com

I simply inserted a include => ext-did-custom in extensions_custom.conf

I had problems before I upgraded to 2.2rc1, my system got very confused.

ext-did-custom works for me after the upgrade.

I have a long way to go to comprehend the combined effects of module/trixbox/freepbx/asterisk/CentOS updates.

Anthony

12/19/06 00:32:38 changed by vgster

So is this working now?

(in reply to: ↑ 2 ) 12/19/06 01:34:33 changed by colinjack

Not entirely sure what you mean Anthony. Where did you put include => ext-did-custom in extensions_custom.conf?

My understanding is that any context with the string 'custom' in it should be created in extensions_custom.conf and that this will then automatically be called by include statements in extensions_additional.conf. All the contexts in extensions_additional.conf have a custom include in them by default it seems (although not created in extensions_custom.conf) ..

In response to vgster ... no it's not working.

12/22/06 22:26:34 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to invalid.

if you are having problems with include files, it is either a lack of understanding or an asterisk issue. The include is in the dialplan and that is *all* that freepbx can do for you. The rest is up to you and aserisk for figuring it out.

12/23/06 06:09:29 changed by colinjack

  • status changed from closed to reopened.
  • resolution deleted.

This is not a lack of knowledge of how includes work or how asterisk works. This is a problem with custom contexts not running correctly. When asterisk loads it parses the extensions*.conf files correctly and looks for the custom include contexts (reporting them as not existing etc. where necessary.) Fine. However the custom contexts do no appear to work. Even a basic NoOp? entry produces nothing in the logs.

Try it and see.

12/25/06 11:10:02 changed by IanR

This also explains why fax detection was problematic as the standard fix was to modify the -custom file.

12/25/06 14:59:45 changed by teleweb

I can confirm that adding extensions to extensions_custom.conf does indeed not work! I think it goes without saying that this is a major bug that should be fixed before release...

12/26/06 17:47:04 changed by RobThomas

  • status changed from reopened to closed.
  • resolution set to invalid.

Actually, it _is_ the way asterisk works. Unfortunately, the way asterisk works is NOT the way you're expecting it to. An 'include' never takes priority over the dialplan it is included from:

[custom-test]
exten => s,1,NoOp(c-t s 1)
exten => s,99,Busy(5)
include => custom-test-2

[custom-test-2]
exten => s,1,NoOp(c-t-2 s 1)
exten => s,2,NoOp(c-t-2 s 2)
voip-test*CLI> show dialplan custom-test
[ Context 'custom-test' created by 'pbx_config' ]
  's' =>            1. NoOp(c-t s 1)                              [pbx_config]
                    99. Busy(5)                                   [pbx_config]
  Include =>        'custom-test-2'                               [pbx_config]

-= 1 extension (2 priorities) in 1 context. =-
voip-test*CLI> show dialplan custom-test-2
[ Context 'custom-test-2' created by 'pbx_config' ]
  's' =>            1. NoOp(c-t-2 s 1)                            [pbx_config]
                    2. NoOp(c-t-2 s 2)                            [pbx_config]

-= 1 extension (2 priorities) in 1 context. =-
voip-test*CLI>
    -- Executing Goto("SIP/301-09c81478", "custom-test|s|1") in new stack
    -- Goto (custom-test,s,1)
    -- Executing NoOp("SIP/301-09c81478", "c-t s 1") in new stack
    -- Executing NoOp("SIP/301-09c81478", "c-t-2 s 2") in new stack

Basically, this means you can't _change_ anything that's automatically generated. However, what you want to achieve should be, I believe, available in from-pstn-custom, as that's called BEFORE include => ext-did.

Give it a shot.

--Rob

12/26/06 18:16:42 changed by RobThomas

Yes, it looks like that's correct. With multiple includes, the one that's included _first_ takes priority.

[custom-test]
include => custom-test-2
include => custom-test-1

[custom-test-1]
exten => s,1,NoOp(c-t s 1)
exten => s,99,Busy(5)

[custom-test-2]
exten => s,1,NoOp(c-t-2 s 1)
exten => s,2,NoOp(c-t-2 s 2)

Results in

    -- Executing Goto("SIP/301-09c86998", "custom-test|s|1") in new stack
    -- Goto (custom-test,s,1)
    -- Executing NoOp("SIP/301-09c86998", "c-t-2 s 1") in new stack
    -- Executing NoOp("SIP/301-09c86998", "c-t-2 s 2") in new stack

Whilst the other way round...

    -- Executing Goto("SIP/301-09c81440", "custom-test|s|1") in new stack
    -- Goto (custom-test,s,1)
    -- Executing NoOp("SIP/301-09c81440", "c-t s 1") in new stack
    -- Executing NoOp("SIP/301-09c81440", "c-t-2 s 2") in new stack

12/27/06 03:28:10 changed by colinjack

Thanks for that detailed explanation Rob ... nice to have someone who really knows their stuff. So from this I assume we must expect that the custom contexts included in all the extensions_additional.conf contexts will be called afterthe context in which they are included? That's great - now I just need to get my custom contexts organised ;)

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads