Ticket #3934 (closed Patches: fixed)

Opened 4 years ago

Last modified 3 years ago

Routing fix to add callerid to pattern matches.

Reported by: drmessano Assigned to: mbrevda
Priority: minor Milestone: 2.7
Component: Core - Trunks/Routing Version: 2.6-branch
Keywords: Cc:
Confirmation: Unreviewed Distro:
Backend Engine: All Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description (Last modified by drmessano)

Supplements #3889. Adds CID to the call and loops back through for the pattern match.

Attachments

functions.inc.php.diff (0.8 kB) - added by drmessano on 01/01/10 14:18:44.

Change History

10/28/09 03:21:39 changed by mbrevda

Danny, would you kindly past sniplets of the relevant parts of the dialplan, showing the before and after affect of this patch?

12/12/09 21:32:33 changed by drmessano

Before:

[bad-number] include => bad-number-custom exten => _X.,n,ResetCDR() exten => _X.,n,NoCDR() exten => _X.,n,Wait(1) exten => _X.,n,Playback(silence/1&cannot-complete-as-dialed&check-number-dial-ag$ exten => _X.,n,Wait(1) exten => _X.,n,Congestion(20) exten => _X.,n,Hangup

After:

AMPBADNUMBER=true in amportal.conf

[bad-number] include => bad-number-custom exten => _X.,1,GotoIf?($["${CALLERID}" != ""]?nomatch) exten => _X.,n,Macro(user-callerid,) exten => _X.,n,Goto(from-internal) exten => _X.,n(nomatch),ResetCDR() exten => _X.,n,NoCDR() exten => _X.,n,Wait(1) exten => _X.,n,Playback(silence/1&cannot-complete-as-dialed&check-number-dial-ag$ exten => _X.,n,Wait(1) exten => _X.,n,Congestion(20) exten => _X.,n,Hangup

AMPBADNUMBER=false in amportal.conf

exten => _X.,1,GotoIf?($["${CALLERID}" != ""]?nomatch) exten => _X.,n,Macro(user-callerid,) exten => _X.,n,Goto(from-internal) exten => _X.,n(nomatch),NoOp?()

12/12/09 21:41:51 changed by drmessano

With formatting :)

Before:

[bad-number]
include => bad-number-custom
exten => _X.,n,ResetCDR()
exten => _X.,n,NoCDR()
exten => _X.,n,Wait(1)
exten => _X.,n,Playback(silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer)
exten => _X.,n,Wait(1) exten => _X.,n,Congestion(20) exten => _X.,n,Hangup

After:

AMPBADNUMBER=true in amportal.conf

[bad-number]
include => bad-number-custom
exten => _X.,1,GotoIf?($["${CALLERID}" != ""]?nomatch)
exten => _X.,n,Macro(user-callerid,)
exten => _X.,n,Goto(from-internal)
exten => _X.,n(nomatch),ResetCDR()
exten => _X.,n,NoCDR()
exten => _X.,n,Wait(1)
exten => _X.,n,Playback(silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer)
exten => _X.,n,Wait(1)
exten => _X.,n,Congestion(20)
exten => _X.,n,Hangup

AMPBADNUMBER=false in amportal.conf

[bad-number]
include => bad-number-custom
exten => _X.,1,GotoIf?($["${CALLERID}" != ""]?nomatch)
exten => _X.,n,Macro(user-callerid,)
exten => _X.,n,Goto(from-internal)
exten => _X.,n(nomatch),NoOp()

12/14/09 10:35:56 changed by drmessano

  • owner changed from p_lindheimer to mbrevda.

(in reply to: ↑ 5 ; follow-ups: ↓ 5 ↓ 6 ↓ 9 ) 12/14/09 12:36:20 changed by mbrevda

Thanks, that helps. However, I highly doubt that setting the callerID in a context that we hope never to reach is going to help us here... The callerID needs to be set somewhere about [outbound-allroutes] which will allow it to be set right before the call is sent to the trunks. You can try testing as follows. Replace

exten => foo,1,Noop(bar)

with

exten => _!,1,Macro(user-callerid,SKIPTTL,)

which should cause each and every call going thru the context to have callerID set. If that works, you can remove the setting of callerid from the individual trunk contexts.

Good Luck

(in reply to: ↑ 5 ) 12/14/09 18:53:58 changed by drmessano

  • description changed.

Replying to mbrevda:

Thanks, that helps. However, I highly doubt that setting the callerID in a context that we hope never to reach is going to help us here... The callerID needs to be set somewhere about [outbound-allroutes] which will allow it to be set right before the call is sent to the trunks. You can try testing as follows. Replace {{{ exten => foo,1,Noop(bar) }}} with {{{ exten => _!,1,Macro(user-callerid,SKIPTTL,) }}} which should cause each and every call going thru the context to have callerID set. If that works, you can remove the setting of callerid from the individual trunk contexts. Good Luck

12/14/09 18:55:05 changed by drmessano

  • description changed.

12/14/09 18:56:24 changed by drmessano

  • description changed.

(in reply to: ↑ 5 ) 12/14/09 18:59:24 changed by drmessano

Replying to mbrevda:

Thanks, that helps. However, I highly doubt that setting the callerID in a context that we hope never to reach is going to help us here...

The idea was to fail on the other matches without callerid, and loop through with callerid set, which is working here just fine. I like the idea of moving where the callerid is set and fixing it at the source. Will try as suggest and see if it breaks anything.

01/01/10 14:18:44 changed by drmessano

  • attachment functions.inc.php.diff added.

01/01/10 14:23:01 changed by drmessano

Added patch with the change suggested by mbrevda. This is working well in my testing.

01/02/10 11:52:03 changed by mbrevda

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

(In [8460]) closes #3934; re: #3889; Addition of /<callerid> to dial patterns in outbound routes

01/02/10 15:27:28 changed by mbrevda

(In [8462]) closes #3993; Remove extra CID lookup in outbound routes; re #3889 & #3934

01/04/10 18:24:12 changed by p_lindheimer

(In [8469]) reverts r8391, r8460, r8462 re #3934 and re #3889 and re #3993 changes break outbound dialplan, need to revisit this to get a dialplan that does not break exiting code (the pri 1 instruction in each outbound route was not getting executed with the last changes)

02/07/10 15:09:41 changed by p_lindheimer

  • milestone changed from 2.6 to 2.7.