[Home]

Summary:ASTERISK-29214: ARI: specifying "CALLERID(subaddr)" variables on channel create doesn't work
Reporter:Marin Odrljin (modrljin)Labels:
Date Opened:2020-12-16 12:58:38.000-0600Date Closed:
Priority:MinorRegression?No
Status:Open/NewComponents:Channels/chan_dahdi Resources/res_ari Resources/res_ari_channels
Versions:16.15.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Debian 8/9/10Attachments:( 0) debug_log_29214
( 1) debug_log_29214_new
Description:When originating call (originate: POST /channels) toward DAHDI channels (originate: POST /channels) in order to send caller subaddress I'm setting following variables:
{code}
CALLERID(subaddr)=042000111
CALLERID(subaddr-valid)=1
CONNECTEDLINE(subaddr)=042000111
CONNECTEDLINE(subaddr-valid)=1
{code}
and this works fine. Subaddress '042000111' is correctly received on the remote ISDN devices.

With Asterisk 16 we have started to use early bridging and that's why we are using create and dial REST API. We are setting the same variables on channel creation (create: POST /channels/create), but subaddress is not forwarded via DAHDI channel to remote devices. Variables are successfully set on channel with create channel POST, I can read them from channel afterwards.

Issue is clearly visible in PRI debug where *Calling Party Subaddress* is existing when using originate, but missing when using create/dial.

*originate:*
{code}
ARI debug:

POST /ari/channels?endpoint=DAHDI%2Fr11%2F339%3A042000222&priority=1&app=AriStart&callerId=%3C1099%3E&timeout=60 HTTP/1.1
content-type: application/json
content-length: 149
host: 127.0.0.1
connection: close
authorization: *****

{"variables":{"CALLERID(subaddr-valid)":"1","CALLERID(subaddr)":"042000111","CONNECTEDLINE(subaddr-valid)":"1","CONNECTEDLINE(subaddr)":"042000111"}}

-----

PRI debug:

PRI Span: 1 > Calling Party Number (len= 8) [ Ext: 0  TON: National Number (2)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
PRI Span: 1 >                                 Presentation: Presentation allowed, User-provided, verified and passed (1)  '1099' ]
PRI Span: 1 > [6d 0a 80 30 34 32 30 30 30 31 31 31]
PRI Span: 1 > Calling Party Subaddress (len=12) [ Ext: 1  Type: NSAP (X.213/ISO 8348 AD2) (0)  O: 0  '042000111' ]
PRI Span: 1 > [70 04 80 33 33 39]
PRI Span: 1 > Called Party Number (len= 6) [ Ext: 1  TON: Unknown Number Type (0)  NPI: Unknown Number Plan (0)  '339' ]
PRI Span: 1 > [71 0a 80 30 34 32 30 30 30 32 32 32]
PRI Span: 1 > Called Party Subaddress (len=12) [ Ext: 1  Type: NSAP (X.213/ISO 8348 AD2) (0)  O: 0  '042000222' ]
{code}

*create / dial:*
{code}
ARI debug:

POST /ari/channels/create?endpoint=DAHDI%2Fr11%2F339%3A042000222&app=AriStart HTTP/1.1
content-type: application/json
content-length: 172
host: 127.0.0.1
connection: close
authorization: *****

{"variables":{"CALLERID(subaddr-valid)":"1","CALLERID(subaddr)":"042000111","CALLERID(num)":"1099","CONNECTEDLINE(subaddr-valid)":"1","CONNECTEDLINE(subaddr)":"042000111"}}

POST /ari/channels/1608140359.118/dial?caller=1608140358.117&timeout=0 HTTP/1.1
host: 127.0.0.1
connection: close
authorization: *****

-----

PRI debug:

PRI Span: 1 > Calling Party Number (len= 8) [ Ext: 0  TON: National Number (2)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
PRI Span: 1 >                                 Presentation: Presentation allowed, User-provided, verified and passed (1)  '1099' ]
PRI Span: 1 > [70 04 80 33 33 39]
PRI Span: 1 > Called Party Number (len= 6) [ Ext: 1  TON: Unknown Number Type (0)  NPI: Unknown Number Plan (0)  '339' ]
PRI Span: 1 > [71 0a 80 30 34 32 30 30 30 32 32 32]
PRI Span: 1 > Called Party Subaddress (len=12) [ Ext: 1  Type: NSAP (X.213/ISO 8348 AD2) (0)  O: 0  '042000222' ]
{code}
Comments:By: Asterisk Team (asteriskteam) 2020-12-16 12:58:39.470-0600

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. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

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.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Joshua C. Colp (jcolp) 2020-12-21 06:35:07.021-0600

Can you please also attach a debug level log from Asterisk[1].

[1] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

By: Marin Odrljin (modrljin) 2020-12-21 09:31:03.870-0600

Attached file "debug_log_29214".
In this example there is an inbound call coming on PJSIP channel and outbound call on DAHDI channel created by create and dial (early bridging). On outbound call app is adding caller number subbaddress 042000111 and called number subaddress 042000222

By: Joshua C. Colp (jcolp) 2020-12-21 09:34:28.837-0600

That appears to be verbose level and includes no debug messages. Was logging set up as needed?

By: Marin Odrljin (modrljin) 2020-12-21 13:06:38.431-0600

Yes, I set up following
{code}
core set verbose 6
core set debug 6
pjsip set logger on
pri set debug on span 1
ari set debug
{code}

With this debugging I'm using Asterisk 16.13.0 but I suppose this shouldn't be the problem

By: Joshua C. Colp (jcolp) 2020-12-21 13:13:01.581-0600

That's not the complete steps on the wiki. How did you create the file? If you did it from the CLI, does editing logger.conf instead work to produce debug messages?

By: Marin Odrljin (modrljin) 2020-12-21 14:08:24.202-0600

In logger.conf I have permanently following line:
{code}
full => notice,warning,error,debug(6),verbose(6)
{code}

Additinonaly before reproducing this issue I have created from CLI:
{code}
logger add channel debug_log_29214 notice,warning,error,debug,verbose,dtmf
core set verbose 6
core set debug 6
module reload logger
pjsip set logger on
pri set debug on span 1
ari set debug
{code}

Then I've seen a file "debug_log_29214" is created but it contained only approx. 10 lines and that seemed wrong to me so I took a part of log from file "full". It is not a first time I'm creating a debug log file.

By: Marin Odrljin (modrljin) 2020-12-21 15:09:44.386-0600

I have attached new file "debug_log_29214_new". It is created by changing logger.conf and restarting asterisk. After start I have executed the same commands in CLI as before. I don't see that it contains more information, but please check it and let me know.