If I understand your problem correctly you need to set ANI/CALLERID on a peer by peer basis.
You can use the accountcode variable in the sip.conf file and set that to the DID or you can use another variable. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:asterisk-users- > [EMAIL PROTECTED] On Behalf Of Alex Balashov > Sent: Tuesday, June 05, 2007 6:26 PM > To: asterisk-users@lists.digium.com > Subject: [asterisk-users] Set caller ID based on SIP source. > > > Hi all, > > This may be a really stupid question, but, what preset global dialplan > variables can I use to determine the calling leg when using Dial()? > > Say I have phones (SIP peers) originating calls out of the same context, > and I need to set the ANI differently depending on who is calling out in > order to make it consistent with their inbound DIDs? > > Asterisk appears to provide a wealth of variables with information about > the called extension, but what about the call*ing* one? > > For now I've worked around this by landing every SIP peer in a distinct > dialplan context with certain shared attributes (internal routing) among > them and setting the caller ID that way. But surely there has got to be > a more reasonable way to do this with conditionals? > > Thanks, > > -- > Alex Balashov > Evariste Systems > Web : http://www.evaristesys.com/ > Tel : +1-678-954-0670 > Direct : +1-678-954-0671 > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users