# CALLERID(pres) on isdn lines

**URL:** <https://community.asterisk.org/t/callerid-pres-on-isdn-lines/66728>\
**Category:** Asterisk Support\
**Created:** [May 16, 2016, 8:44am UTC](https://community.asterisk.org/t/callerid-pres-on-isdn-lines/66728 "2016-05-16T08:44:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Syco](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/syco/32/1565_2.png) [@Syco](https://community.asterisk.org/u/Syco)\
**Post date:** [May 16, 2016, 8:44am UTC](https://community.asterisk.org/t/callerid-pres-on-isdn-lines/66728/1 "2016-05-16T08:44:43Z")

</div>

Hello,  
I’m trying to figure out how to set the presentation number (not the callerpres) on an outgoing channel,  
and how to read the proper CALLERID(pres) from an incoming channel.  
My setup consists in a sangoma card and asterisk 11.15.

I did a trace on the sangoma card as explained in [http://wiki.sangoma.com/wanpipe-wireshark-pcap-pri-bri-wan-t1-e1-tracing](http://wiki.sangoma.com/wanpipe-wireshark-pcap-pri-bri-wan-t1-e1-tracing) and I see I receive the following data from the provider:  
cli: 0123456789  
cli\_flag: 0x0313  
cli\_pres: 0123456789  
cli\_pres\_flag: 0x0313

when I retrieve CALLERID(pres) in the dialplan it returns “allowed\_not\_screened”, but that’s wrong, value should be “allowed”.  
Also, cli and cli\_pres can be different, how can I read/write them?

When in the dialplan I do  
Set(VAR0=${CALLERID(num)}); 0123456789  
Set(VAR1=${CALLERID(pres)}); allowed\_not\_screened instead of allowed  
… agi that might modify VAR0 and VAR1, and set also VAR2 …  
Set(CALLERID(all)="$VAR0 \<$VAR0\>")  
Set(CALLERID(pres)=${VAR1})  
Dial(DAHDI/g0/${VAR2})

the call goes back out on a dahdi channel and my card receives:  
cli: 0123456789  
cli\_flag: 0x0310  
cli\_pres:  
cli\_pres\_flag: 0x0200

so cli\_flag get’s incorrectly readen (I can tell the agi to correct the value, but would be better for me to fix my configuration), and cli\_pres never gets set.

if the call comes with a different cli\_flag, for example 0x317, it gets correctly read as prohib.

I’m sure this problem could be explained better, but I hope someone can put me in the right direction.

Thanks all
