[OpenSIPS-Users] using dialplan to prefix dialed number for specific accounts

Brett Nemeroff brett at nemeroff.com
Tue Apr 5 17:02:37 CEST 2011


On Tue, Apr 5, 2011 at 6:28 AM, Andrew Pogrebennyk <
andrew.pogrebennyk at portaone.com> wrote:

> Hi,
> for some accounts identified by ANI I need to add a prefix e.g. 001234
> before the dialed number. Initially I've been using the dialplan module with
> ANI being used as a key for lookup by dpid in dialplan table. But dpid is
> declared int so I cannot accommodate account numbers greater than
> 2147483647. And it doesn't look like I can ALTER dpid to bigint or something
> like that, without having to hack with the source code.
> Still I'd like to use the dialplan module for that. Any hints?
>
>
You could have another table that maps account_ids to dpids. If performance
of this is an issue, store the mapping in memcache, when cache expires,
perform an avp_db_query and re-cache.

-Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110405/efee0551/attachment-0001.htm>


More information about the Users mailing list