I think so. Good lucky.
RODRIGO PIMENTA CARVALHO Inatel Competence Center Software Ph: +55 35 3471 9200 RAMAL 979 ________________________________ De: [email protected] <[email protected]> em nome de Travis Manson-Drake <[email protected]> Enviado: terça-feira, 29 de setembro de 2015 14:42 Para: OpenSIPS users mailling list Assunto: Re: [OpenSIPS-Users] Questions in opensips Rodrigo, Thank you for this! This helps out a lot in relation to pulling the info from a database. I think I may be able to do something with variable $fu Select PBX >From table Where CustomerContext like ‘%$fu%’ That way If I have multiple customercontext it can dynamically select the correct PBX From: [email protected] [mailto:[email protected]] On Behalf Of Rodrigo Pimenta Carvalho Sent: Tuesday, September 29, 2015 10:17 AM To: OpenSIPS users mailling list <[email protected]> Subject: Re: [OpenSIPS-Users] Questions in opensips Hi. I'm new to OpenSIPS too and I have received good help from experts that access this forum. But, one point that you have to do is access a database to get the information about the PBX, haven't you? For this, you can use the module AVPOP: modparam("avpops","db_url","sqlite:///usr/local/opensips_proxy/sqlite") # CUSTOMIZE ME That is, you can use a module that allows you to access the database. In this example, I use SQLite. Are you familiar with the database handling actions via such module? To get data from database, you can do something like this: avp_db_query(put sql query here, "$avp(myAvp)"); # the avp will contain the query result. About the others details, like forwarding calls, someone expert might reply to you. You SQL will be similar to: select PBX from table where Exten = 'extension' and CustomerContext = 'the customer context'; {exten} & {CustomerContext}, the query returns a value of which PBX Tell me if this information is useful for you, please. Regards. RODRIGO PIMENTA CARVALHO Inatel Competence Center Software Ph: +55 35 3471 9200 RAMAL 979 ________________________________ De: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> em nome de Travis Manson-Drake <[email protected]<mailto:[email protected]>> Enviado: terça-feira, 29 de setembro de 2015 13:54 Para: [email protected]<mailto:[email protected]> Assunto: [OpenSIPS-Users] Questions in opensips Hello everyone, I wanted to pick your brains and see if any of you have done something like this before, or might eb able to send me in the right direction. Here’s what I’m trying to accomplish. Thought process Sip packet comes into proxy - Proxy parses sip message, and checks from_uri (for example {exten}{CustomerConetxt}@proxyIPaddr) - once the proxy parses the data, we query a database. - based on the value of {exten} & {CustomerContext}, the query returns a value of which PBX this {exten}&{CustomerContext} belongs to. - once this info has been returned to the proxy it then manipulates the dest_uri to something like {exten}&{CustomerContext}@PBX DNS At this point the sip message is forwarded onto the appropriate PBX, and we simply Record_Route for future communications. I know I can hard code the PBX’s value in the sip server of the UAC, and just have the proxy do what it does. But what I’m really trying to go for is to simply hardcode the info for a sip proxy, have the UAC send its request to it, then it forwards on traffic to the appropriate PBX based upon the value of the from_uri With that being said: How would I do this? I had looked at sipmsgops and some of its functions however I can’t seem to find one that will enable me to pull just the dest uri, & extract info from it Is there also a function in sipmsgops for manipulating the dest_uri? Any input is greatly appreciated! Thank you for your time, Travis Manson-Drake Voice Systems Analyst L1 Simply Bits, LLC Now You’re Thinkin’ Smart! 5225 N. Sabino Canyon Road Tucson, AZ 85750 Phone: 520-545-0311 Fax: 520-545-7252 Support Hotline: 5205450333 www.simplybits.com<http://www.simplybits.com/> Internet - Phone - Business Technology Solutions | Simply Bits Providing buisnesses with qualtiy solutions for Internet Service, VoIP Phone Service, Fax to email, Website Design, Internet Marketing and much more. Leia mais...<http://www.simplybits.com/>
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
