[Asterisk-Users] Problem with callerid in sip to isdn gateway
Morten Isaksen
misak at misak.dk
Wed Jun 28 01:53:24 MST 2006
On 6/27/06, trixter aka Bret McDanel <trixter at 0xdecafbad.com> wrote:
>
> On Tue, 2006-06-27 at 15:00 +0200, Morten Isaksen wrote:
> > Hi!
> >
> > I have this setup:
> >
> > PABX <--ISDN30--> Asterisk 1 <--SIP--> Asterisk 2 <--ISDN30--> TELCO
> >
> > Digium TE410P is used in both Asterisk 1 and 2.
> >
> > When I set the CLIR bit on the PABX the Callerid / ANI is removed
> > somewhere between the SIP interface on Asterisk 1 and the SIP
> > interface on Asterisk 2.
> >
> Have you used a packet sniffer to ensure that its actually sent to
> asterisk 2? If it isnt then that may be the entire problem. Before
> trying to diagnose anything on the isdn side I would make sure that it
> is infact being sent correctly. Alternatively you can try some noops()
> on asterisk2 for when a call is received to display the caller id to the
> console, that may be easier for some than reading sip headers.
On Asterisk 1 the ${CALLERID(num)} is correct but on Asterisk 2
CALLERID(num) is set to "Unknown" if CALLINGPRES=32. If CALLINGPRES=0 then
the CALLERID(num) is passed to Asterisk 2.
I have solved the problem this way:
On Asterisk 1:
exten => _[2-9]XXXXXXX,1,sipaddheader(x-clir: ${CALLINGPRES})
exten => _[2-9]XXXXXXX,n,setcallerpres(allowed_not_screened)
exten => _[2-9]XXXXXXX,n,dial(SIP/${EXTEN}@sipsrv2)
On Asterisk 2:
exten => _X.,n,set(CLIR=${SIP_HEADER(x-clir)})
exten => _X.,n,gotoif($[$[${CLIR}=32]]?NOCID:CID)
exten => _X.,n(NOCID),SetCallerPres(prohib_not_screened)
exten => _X.,n(CID),dial(ZAP/g2/${EXTEN})
--
Morten Isaksen
http://www.misak.dk/blog/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060628/adb3faf1/attachment.htm
More information about the asterisk-users
mailing list