On Sun, Dec 19, 2010 at 2:40 PM, Joshua Colp <jc...@digium.com> wrote:
> I'm surprised nobody has suggested using the setvar functionality. It's 
> extremely
> useful for stuff like this and would allow you to keep all CallerID 
> information
> with the actual configuration of the device.
>
> Using a configuration entry for sip.conf in another response as an example:
>
> [101]
> type=friend
> username=101
> secret=0000
> mailbox=101
> callerid="User One" <101>
> host=dynamic
> nat=yes
> dtmfmode=rfc2833
> canreinvite=no
> reinvite=no
> qualify=yes
> setvar=EXTERNAL_CALLERID="User One" <3012323434>
>
> And then in extensions.conf:
>
> exten => _1NXXNXXXXXX,1,Set(CALLERID(all)=${EXTERNAL_CALLERID})
> exten => _1NXXNXXXXXX,n,Dial(SIP/${ext...@vitel-outbound)
>
> Of course you could add some sanity checking there to make sure that
> ${EXTERNAL_CALLERID} contains a value and if not default to your
> main DID.
>
> --
> Joshua Colp
> Digium, Inc. | Software Developer
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
> Check us out at:  www.digium.com  & www.asterisk.org

Joshua, that seems reasonable. I have two "best practice" questions
before moving further if anyone would like to chime in.

First, when using multiple accounts from the same DID provider, is it
ideal to use IP based routing using one context as I currently am or
have a separate contexts for each account in the sip.conf?

Secondly, it never crossed my mind that the caller-ID was being set in
the sip.conf and extensions.conf. I guess the extension.conf takes
precedence. At this point is was not my intention to use the sip.conf
and I can easily remove it and set the variable in the extension.conf.
I am just not familiar with what is ideal.

Most of my configuration has come from snippets I've found per example.

Thanks

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to