Summary:ASTERISK-01329: [Request] Control over calling number for int/ext calls
Reporter:revk (revk)Labels:
Date Opened:2004-04-02 08:09:03.000-0600Date Closed:2011-06-07 14:05:03
Versions:Frequency of
Description:It would be useful to have some control over calling number that is different when making a call via the PRI line than to sip phones, or a more general way to overide CLI for specific calls in a Dial app.


Example. Calling a number for my desk also calls my mobile using a Dial app to call sip/007&zap/g1/<mymobile>.

If the call is from an internal phone, I would like the CLI used as this will be passed to the PRI line and my mobile shows who is calling from my office.

If the call is from an outside line I would like the CLI to be my extension as I cannot send someone elses CLI over the PSTN, but when my mobile calls I would like to be able to see which number the caller called so I can answer correctly.

I could set the calleridnum based on a pattern match with the existing calleridnum, but I can't do this differently for the two places the Dial command calls though...

So, it would be nice to have a syntax on the argument to Dial, e.g. zap/g1/number:cli or something, or some other format. Obviously it would be nice for this to be generic for sip, zap, iax, etc.
Comments:By: twisted (twisted) 2004-04-02 23:55:54.000-0600

This should be a [Request].  Changed in a accordance with bug posting ettiqute.

Also - your description/additional info is a bit confusing.  I'm assuming by CLI you mean CLID.  Also, why not just create context/macro rules to handle this behaviour?

By: Brian West (bkw918) 2004-04-02 23:57:47.000-0600

two words.... chan local


By: Brian West (bkw918) 2004-04-03 00:01:24.000-0600

Ok to be nice here is an example:
exten => 5551212,1,SetCallerID(12345678)
exten => 5551212,2,Dial(Zap/g1/123)

exten => 5554141,1,SetCallerID(87654321)
exten => 5554141,2,Dial(SIP/billybob)

now here is the keys to the castle:

exten => 123,1,Dial(Local/5551212@somecontext&Local/5554141@somecontext)

Also you can get created with this approach... Never forget about chan_local its the bomb!

By: Brian West (bkw918) 2004-04-03 00:03:52.000-0600

twisted pointed out that it may not be exactly what you need but its damn close.  With a few tweaks.

By: twisted (twisted) 2004-04-03 00:13:05.000-0600

Ahhh. chan_local.  I forgot about that one :P

Here's a better example that I think will more-fit his request.

extension 123 will be the internal extension, and 5551212 will be the cell, for this exercise.


;this will use the internally set CLID and dial the desk and the mobile.

exten => 123,1,SetCallerID(${CALLERID})
exten => 123,1,Dial(Zap/g2/5551212&SIP/007)


; this will use the existing caller id from the incoming external call, pass it to the desk, and dial the moble in out-from-ext below.

exten => 123,1,Dial(Local/5551212@out-from-ext&SIP/007)


; this sets the clid when dialing the mobile to "From Ext to 123", or simpy extension 123 on the mobile.  Exchange <8765309123> for your DID so that you know it's a call coming into your desk.

exten => 5551212,1,SetCallerID("External to 123" <8765309123>)
exten => 5551212,2,Dial(Zap/g2/5551212)

Just my .02.

By: twisted (twisted) 2004-04-03 00:23:26.000-0600

Seeing as that this can be fixed with simple configuration, I am going to mark this resolved as 'not a bug'

By: twisted (twisted) 2004-04-03 00:23:55.000-0600

Closed.  Resolved is for "Real Bugs(tm)"