[asterisk-users] Question about outgoing callerid

Jean-Yves Avenard jyavenard at gmail.com
Wed Oct 24 10:34:53 CDT 2007


Hi

I have an ISDN connection with 100 DIDs assigned to it...

What I'm trying to achieve is set the proper outgoing callerID while
showing the local caller's extension in the CDR.

There is a behaviour that I just can't explain.

the callerid field in sip.conf is set as :
callerid="Jean-Yves/E" <300>

the callerid in iax.conf is set a:
callerid="Jean-Yves/E" <300>
(just the same)

Prior to making the call using the zap interface, I do:
[macro-zaptel]
;ARG1=Number to call
; set default outgoing caller ID if FROMNUMBER is empty
exten => s,1,GotoIf($["${FROMNUMBER}" = ""]?2:4)
exten => s,2,Set(CALLERID(number)=03XXXXXXXX)
exten => s,3,Goto(s,5)
exten => s,4,Set(CALLERID(number)=${FROMNUMBER})
exten => s,5,SetMusicOnHold(random)
exten => s,6,Dial,Zap/g1/${ARG1}

Now, after making a call using SIP, in the CDR I have:
channel = SIP/ipp...
source  = 03XXXXXXXX
clid = "Jean-Yves/E" <03XXXXXXXX>
last data = Dial Zap/g1/0123456789

after making a call using IAX I get:
channel = IAX2/ia...
source = 300
clid = "Jean-Yves/E" <300>
last data = Dial Zap/g1/0123456789

So my questions are:
why are the source and clid different between when a call was made
through IAX or SIP?

Ultimately, I want the clid to show up like it does for IAX:
that is:
outgoing caller ID is set to the public DID (03XXXXXXXX)
but in the CDR, I see clid = 300 (which is the local extension/account)

Is this possible?

I am using asterisk 1.2.24
Thank you
Jean-Yves



More information about the asterisk-users mailing list