[Asterisk-Dev] Working on new feature.. need comments

Kevin P. Fleming kpfleming at starnetworks.us
Mon Jan 3 10:43:19 MST 2005


Brian Wilkins wrote:
> Right, but if I do AGI(${SCRIPT}, variables), then I do not need the Dial() 
> Application. The SCRIPT variable would be used to create different scripts 
> for different accounts per se and each peer is assigned to an account. So 
> essentially you could have SIP_DIGIUM.AGI, SIP_VONAGE.AGI, 
> SIP_BROADVOICE.AGI, get it? Then under each SIP peer you could define either

Then you will need some other means of extracting this script name, 
because it will not appear in a channel variable at all.

I can't see any way of doing this without adding an app to chan_sip to 
extract the value for you from its peer list in memory; that is the only 
place it is available.

However, if it was me, I'd store these mappings from SIP peer names to 
script names into the astdb (DBPut/DBGet) or in SQLLite (res_sqllite) 
and not abuse chan_sip as a "database" at all. That does mean a little 
more work on the admin side, though, since you can't manage the 
peer->script mapping in the same place you manage the peer.



More information about the asterisk-dev mailing list