[Home]

Summary:ASTERISK-27003: chan_sip doesn't send CONNECTEDLINE info over sip trunk
Reporter:Dmitry Melekhov (slesru)Labels:
Date Opened:2017-05-17 01:13:28Date Closed:2017-05-23 07:00:13
Priority:MinorRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:13.13.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Centos 6 x86-64Attachments:( 0) myDebugLog
( 1) myDebugLog-asterisk
( 2) myDebugLog-ast-lud
( 3) myDebugLog-transit
Description:I need to translate CONNECTEDLINE info from one asterisk to another and then to ISDN.

Here is how asterisks are connected in my test environment:
{noformat}
asterisk(192.168.22.19)---IP link--ast-lud(192.168.72.254)--ISDN PRI----PBX.
{noformat}

As PBX user I place call to ast-lud to following dial-plan
{noformat}
exten => 5085,1,Dial(SIP/6000@asterisk)
;exten => 5085,1,Dial(OOH323/6000)
exten => 5085,n,Hangup
{noformat}
asterisk on ast-lud:
{noformat}
[asterisk]
type=friend
host=192.168.22.19            
insecure=port,invite
nat=no                        
canreinvite=yes        
disallow=all
;allow=all            
allow=alaw            
allow=ulaw
;allow=g729
dtmfmode=rfc2833
context=asterisk
trustrpid = yes
sendrpid = yes
{noformat}
on asterisk:
{noformat}
[ast-lud]
type=friend
host=192.168.72.254            
insecure=port,invite
nat=no                          
canreinvite=yes        
disallow=all
;allow=all                    
allow=alaw                      
allow=ulaw
;allow=g729
dtmfmode=rfc2833
context=h323
trustrpid = yes
sendrpid = yes
{noformat}
And then dialplan is:
{noformat}
exten => 6000,1,Set(CHANNEL(language)=ru)
exten => 6000,n,Set(CONNECTEDLINE(name,i)=Conf. 6000)
exten => 6000,n,Set(CONNECTEDLINE(pres)=allowed)
exten => 6000,n,Answer
exten => 6000,n,Meetme(6000,TL(10800000:60000))
exten => 6000,n,Hangup
{noformat}
But, as I can see from debug CONNECTEDLINE info is not even sent by asterisk-
I'll upload debug logs.

If I use ooh323 to connect asterisks, then I see Conf. 6000 on my phone..
Comments:By: Asterisk Team (asteriskteam) 2017-05-17 01:13:29.980-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].

By: Dmitry Melekhov (slesru) 2017-05-17 01:16:08.683-0500

log from asterisk

By: Dmitry Melekhov (slesru) 2017-05-17 01:16:28.847-0500

log from ast-lud

By: Richard Mudgett (rmudgett) 2017-05-17 09:17:49.422-0500

IIRC you need to set the CONNECTEDLINE(num) to 6000 as I don't think party information gets sent without a number because of how SIP operates.  For the most part you cannot have a name without a number also being set.
{noformat}
same = n,Set(CONNECTEDLINE(num,i)=6000)
{noformat}
or you could set both at the same time
{noformat}
same = n,Set(CONNECTEDLINE(all,i)="Conf 6000" <6000>)
{noformat}


By: Dmitry Melekhov (slesru) 2017-05-17 10:18:05.051-0500

Thank you!
I suspected this, so I tried to set number and name, with almost the same result.
Really for some reason chan_ooh323 didn't pass num, only name in this case,
but using  chan_sip I didn't get this CONNECTEDLINE info at all.
Tomorrow I'll try again and provide debug logs....


By: Dmitry Melekhov (slesru) 2017-05-17 23:54:48.733-0500

Changed dialplan to

exten => 6000,n,Set(CONNECTEDLINE(all,i)="Conf 6000" <6000>)
exten => 6000,n,Set(CONNECTEDLINE(pres)=allowed)

I see name (but no num ,looks like there is bug in chan_ooh323 too) if I place call over chan_ooh323.
But there is no name and number if call is by chan_sip.

I'll attach debug log (sorry, it will contain some unrelated info from other calls) from asterisk with above dialplan...

Thank you!



By: Dmitry Melekhov (slesru) 2017-05-17 23:56:26.230-0500

call is from 6401 to 6000


By: Dmitry Melekhov (slesru) 2017-05-22 02:13:00.994-0500

btw, looks like the same problem exists in chan_pjsip- not completely sure, just did quick test.

By: Joshua C. Colp (jcolp) 2017-05-22 06:59:25.137-0500

The executed dialplan doesn't match what you stated it should be:

{noformat}
[May 18 08:47:57] VERBOSE[6508][C-0000bd28] pbx.c: Executing [6000@meetmectx:2] Set("SIP/ast-lud-00002a0e", "CONNECTEDLINE(name,i)=Conf. 6000") in new stack
[May 18 08:47:57] VERBOSE[6508][C-0000bd28] pbx.c: Executing [6000@meetmectx:3] Set("SIP/ast-lud-00002a0e", "CONNECTEDLINE(pres)=allowed") in new stack
{noformat}

There is still no number present in there. Can you ensure that you are using what you stated and test again?


By: Dmitry Melekhov (slesru) 2017-05-22 23:45:56.861-0500

Hello!

Yes, I did something wrong, looks like I forgot to reload dialplan.

If I set both name and number , then everything is fine, i.e. if I use CONNECTEDLINE  on asterisk and set both name and number,
then asterisk passes this info over chan_sip.

So, my bug report is incorrect, everything works as expected if call is terminated on asterisk.

But my real problem is transit call, what I want to have is to pass connected name over sip trunk in following scheme:

avaya pbx---isdn pri--asterisk--chan_sip---asterisk--isdn pri--avaya pbx.

If I use chan_ooh323, then connected name is passed, but looks like chan_sip needs both name and number.

Anyway, avaya sends only name:

[May 23 08:21:39] VERBOSE[22766] chan_dahdi.c: PRI Span: 1 < Display (CS6) (len=14) [ Out of Service ]

I'll attach log file , which contains call through right avaya to ast-lud to asterisk and then to left avaya.

Is it possible to send connected name over chan_sip if number is not provided?

Thank you!

By: Dmitry Melekhov (slesru) 2017-05-22 23:48:59.992-0500

This is call log, using dial plan on
ast-lud:
exten => 5085,1,Dial(SIP/6095@asterisk)
exten => 5085,n,Hangup


asterisk:
exten => 6095,1,Dial(DAHDI/g1/1695)
exten => 6095,n,Hangup

By: Joshua C. Colp (jcolp) 2017-05-23 04:27:50.949-0500

No, a number is required for chan_sip in order to send out a connected line update.

By: Dmitry Melekhov (slesru) 2017-05-23 04:52:10.619-0500

:-(
But may be it possible to get name from ISDN and number from dialplan?

Unfortunately this doesn't work:

exten => 6095,1,Set(CONNECTEDLINE(number,i)=1695)
exten => 6095,n,Dial(DAHDI/g1/1695)

and even this:
exten => 6095,1,Set(CONNECTEDLINE(all,i)="Test" <1695>)
exten => 6095,n,Dial(DAHDI/g1/1695)

only if I set  I option, then I see connected line info  from dialplan on my phone
exten => 6095,1,Set(CONNECTEDLINE(all,i)="Test" <1695>)
exten => 6095,n,Dial(DAHDI/g1/1695,,I)

i.e. if connected line info from ISDN is ignored.

So problem is that avaya PBX doesn't supply number, only name, and chan_sip needs both.
Can I somehow override this info from ISDN and add number to it (any fake number or empty is OK for me)?
There are some Dial options for callerid manipulations , but I don't see any for connected line, except for completely ignoring received info (I).

Thank you!

By: Dmitry Melekhov (slesru) 2017-05-23 05:50:56.673-0500

Oops, found it:

https://wiki.asterisk.org/wiki/display/AST/Digit+Manipulation+Channel+Variables

Tested following dialplan (removed commented lines)

[macro-setname]
exten => s,1,Set(CONNECTEDLINE(number)=<>)
exten => s,n,MacroExit

exten => 6095,1,Set(__CONNECTED_LINE_CALLER_SEND_MACRO=setname)
exten => 6095,n,Dial(DAHDI/g1/1695)

And:
[May 23 14:45:39] VERBOSE[11153][C-0000c332] pbx.c: Executing [s@macro-setname:1] Set("SIP/ast-lud-00002b38", "CONNECTEDLINE(number)=<>") in new stack
[May 23 14:45:39] VERBOSE[11153][C-0000c332] pbx.c: Executing [s@macro-setname:2] MacroExit("SIP/ast-lud-00002b38", "") in new stack
.......
Remote-Party-ID: "Out of Service" <sip:%3C%3E@192.168.72.254>;party=called;privacy=off;screen=no

So, there is no bug, and everything is just works...

I'm  very-very sorry for wasting your time.

Thank you!