Summary: | ASTERISK-28535: Error when change my callerid(num) | ||
Reporter: | Roberto (tel.medola) | Labels: | pjsip |
Date Opened: | 2019-09-13 20:25:55 | Date Closed: | 2019-09-17 11:27:54 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | Core/CallerID |
Versions: | 13.11.2 13.28.0 13.28.1 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | CentOs 6.X; CentOs 7 ARA with PostgreSQL | Attachments: | |
Description: | When I change callerid (num), asterisk is improperly changing the ORIGIN number.
Example: I am dialing from extension 8249 to extension 8001. If I change this way set(callerid (num)) = 8001 ticketing looks like this: {noformat} clid = "Extension 8249" <8001> src = 8001 dst = 8001 {noformat} If I do not make a change, it is correctly, as below: {noformat} clid = "Extension 8249" <8249> src = 8249 dst = 8001 {noformat} In asterisk 11.17.1, I also change callerid (num) as explained above and the error does not occur. | ||
Comments: | By: Asterisk Team (asteriskteam) 2019-09-13 20:25:56.957-0500 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur. By: Kevin Harwell (kharwell) 2019-09-16 11:10:44.710-0500 I might be misunderstanding, but it sounds like it is working as it should be. The [CALLERID dialplan function |https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_CALLERID] gets or sets caller id data on the channel. So if you do something like this: {noformat} [globals] TECH=PJSIP exten => 8001,1,NoOp() same => n,Set(CALLERID(num)=8001) same => n,Dial(${TECH}/${EXTEN},20) same => n,Hangup() {noformat} Then that will set the caller id number on the caller's channel. In your case the caller is '8249', so the 'num' gets set on the channel associated with '8249'. By: Roberto (tel.medola) 2019-09-16 11:33:56.129-0500 Thanks for the answer. But in this case shouldn't the SRC remain the caller's number (8249)? It is changing the SRC to destination (DST). As in the example above: SRC = 8001 DST = 8001 I believe that if I am dialing from 8249, SRC should look the same, only changing the destination (8001). SRC = 8249 DST = 8001 At least it was like this in version 11.17 Settings below sample: sip.conf {noformat} [8001] name=8001 .. .. context=callcenter .. {noformat} extensions.conf {noformat} [callcenter] exten => _X.,1,NoOp(Test: ${EXTEN} ) ; ;Here returns de same number -> 8001. But there are other types of treatments to know where the user needs to dial. ; same => n, Set(CALLERID(num)=${CURL(http://localhost/asterisk/prefixo.php?exten=${EXTEN})}) same => n, NoOp(Result: ${EXTEN} ) ; ==>> 8001 same => n, Dial(SIP/${EXTEN}) {noformat} Thanks By: Kevin Harwell (kharwell) 2019-09-16 12:26:02.362-0500 When you say SRC and DST, are you referring to the writing of CDR records? And that before, given the above scenario, you were able to alter the callerid of the incoming channel (caller), and what was written to the CDR SRC did not change? But now it is being changed? By: Roberto (tel.medola) 2019-09-16 12:49:46.656-0500 When you say SRC and DST, are you referring to the writing of CDR records? -> Yes And that before, given the above scenario, you were able to alter the callerid of the incoming channel (caller), and what was written to the CDR SRC did not change? -> On asterisk 11.17 did not change, but now, at 13 is changing. But now it is being changed? -> Yes Remembering that what I need to change with callerid (num) is CDR(dst) and not CDR(src). The CDR(src) change is being made by asterisk 13 for some reason I couldn't understand why(always based on asterisk 11 behavior) Thanks! By: Kevin Harwell (kharwell) 2019-09-17 11:22:41.082-0500 This appears to be working as it should. The CDR core was pretty much rewritten in Asterisk 12, thus the difference(s) you are seeing. I [found this|https://community.asterisk.org/t/asterisk-13-upgrade-cdr-src-getting-changed-by-callerid-num/67803] answering a similar question asked on our forums a while back. From the person who did the rewrite (Matt Jordan): {quote} due to many of the architectural changes made in Asterisk 12, CDRs were completely rewritten. Much of the rewrite enforced a standardization on the behavior, such that the CDRs behave the same way regardless of the dialplan written. While this has made things a lot more predictable, some functionality was tweaked/modified/altered. Unfortunately, that was unavoidable. {quote} By: Kevin Harwell (kharwell) 2019-09-17 11:27:44.226-0500 If however, you want to alter the outbound/destination (DST) record setting the callerid in a pre-dial handler on the outbound leg _might_ get you what you want. Here is an example of how you _could_ do that: {noformat} [globals] TECH=PJSIP ; outbound pre-dial handler exten => predial_outbound,1,NoOp() same => n,Set(CALLERID(num)=8001) same => n,Return() exten => _1XX,1,NoOp() same => n,Dial(${TECH}/${EXTEN},,b(default^predial_outbound^1)) same => n,Hangup() {noformat} This essentially sets the caller id number on the outbound leg, which in turn _should_ set the DST field on the CDR. However, I am not sure what other side effects setting the outbound caller id might have in your setup. |