[Asterisk-Dev] Bug Num 0000456

Linus Surguy linus at magrathea-telecom.co.uk
Wed Dec 3 05:31:58 MST 2003

> >exten => _1XX,1,Dial(ZAP/${EXTEN})
> >
> >We ca't use SetCallerID as of course it varies by user, and we want to be
> >absolutely sure the user can't get around this by changing context or
> >
> >What have I missed?

> A whole lot, it seems.
> Given  callerid=2222  on the 'source' channel
> exten => _1XX,1,SetCallerId(212555${CALLERIDNUM})
> exten => _1XX,1,Dial(ZAP/${EXTEN})
> The calller*id for this call would be 212-555-2222

But that doesnt do what we want. I want to completely ignore what the user
has sent as a callerid, instead overwriting with our choice on a user by
user basis.

If we have a user [a] & [b] in iax.conf and we set:

callerid="2125552222" <2125552222>

callerid="2125554444" <2125552222>

and then just use exten => _1XX,1,Dial(ZAP/${EXTEN})

This works wonderfully *unless* the IAX call has a NULL caller id, in which
case the outbound callerid is NULL. For our purposes we've hacked chan_iax2
to overwrite it with callerid= even if a NULL caller id is passed with the
inbound call.

With this explanation, what is the correct way of doing this?


More information about the asterisk-dev mailing list