From: <ast...@el...> - 2007-03-09 08:24:17
|
I have an odd question, related to some ideas I had about provisioning setups. Is there an easy way to expose the IE (information elements) in IAX communications? The reason I ask is that I want to be able to extract the service identifier IE from a client contacting Asterisk. The bad idea I have is that a client would use Bonjour/mDNS to locate an Asterisk server. Then, it would try to register with no username and password. IAX.conf would allow me to restrict by context the client, forcing it through some sort of voice prompts. The trick here is, if I can find a way to extract the service identifier, I can combine the results from the user supplied information to the voice prompts to generate a service identifier entry in IAXprov.conf which, allows for something interesting. The next time the client tries to call, Asterisk will associate that client with the provisioning entry and push down a provision data set to the client. This will reset the IAX configuration data on the client to new, user/device specific settings. For a small setup where all clients will be on the same subnet of a LAN as AstLinux, this somewhat solves the chicken-and-egg problem of provisioning where DHCP is operated by another device rather than the AstLinux box. The only trick being, the client must have mDNS query capability and default behavior as I described. Doing things this way, the client MAC address does not need to be known ahead of time to generate specific config files to be downloaded. Also, a specific end user could through voice prompts, select their own extension during configuration. The big drawback is that the client needs mDNS support, as well as supporting IAX optional components such as the service identifier or provisioning data push. Also, there is a potential crowding problem when multiple fresh clients try to go through the voice prompts at the same time, since they all have the same username/password registration (contested registration?) Can the service identifier be easily retrieved from within Asterisk, or would this require an ugly hack/patch? Would I be better off trying to do some sort of packet sniff and try to grab the service identifier externally, then pass that to an AGI script that the voice prompts would be running through? Or am I better off scanning the subnet with nmap to locate clients and do something (web GUI config and PHP direct access to individual client webpages to auto-config the clients)? |