Re: [OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-14 Thread bluerain
thx for the suggestion, but anything after the fact (what I mean is once gets into asterisk script or context), is no good. What I am trying to accomplish is to have asterisk pick the correct context base on the sippeers table. The only way asterisk will identify by is the user name in the URL

Re: [OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-14 Thread bluerain
thx for the help, if you like you can read my reply to Mike. -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensip-as-transaprent-inbound-proxy-for-asterisk-tp7588047p7588082.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

Re: [OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-14 Thread bluerain
thx for the suggestion, I don't think asterisk reads the IP from any of the header or in any part of SIP message. I think asterisk read the IP from the IP at the network layer. anyhow, if you like you can read my reply to Mike. Thx again. Have you ever encounter the usr_loc module that stop

Re: [OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-14 Thread Brett Nemeroff
I believe the suggestion is to: 1. Allow all calls from OpenSIPs to hit your dial plan (insecure=invite) 2. In the dial plan, check for the existence of a custom header, this customer header should be inserted by opensips to indicate the original IP (append_hf(X-Original-IP: $si);) 3. do

Re: [OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-14 Thread Mike Tesliuk
check this resource http://www.opensips.org/Documentation/Script-CoreFunctions#toc43 2013/10/14 Brett Nemeroff br...@nemeroff.com I believe the suggestion is to: 1. Allow all calls from OpenSIPs to hit your dial plan (insecure=invite) 2. In the dial plan, check for the existence of a

Re: [OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-14 Thread Bakko
Hello, I'm use this procedure to know original IP (long way): first define a context on opensips trunk configurated on Asterisk., then I use this dialplan block: [opensip] exten = _X.,1,Set(uri=${CHANNEL(uri)}) same = n,Set(uri2=${CHANNEL(from)}) same = n,Set(uri=${CUT(uri,@,2)}) same =

Re: [OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-14 Thread bluerain
sorry, again, I am not looking for to know the source ip IN asterisk script. I need to direct the incoming call to different context within asterisk by the source IP. I DO NOT want to have 1 big context script in the extensions.conf. I want to be able to able to direct inbound call to different

Re: [OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-14 Thread bluerain
Yes, I know. But with that, I will end up with 1 HUGE context (script) in the extensions.conf. So if I have 10 different customer, I would have to have 1 HUGE context script to maintain. Vs. if I can direct differnet Inbound calls to different context from beginning then the script is much

Re: [OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-10 Thread Stefano Pisani
You do not need to manipulate core variables. You have to add a header to pass the source ip to asterisk. esample append_hf(X-src-ip: $si\r\n) Il 10/10/2013 02.05, bluerain ha scritto: Are you sure? Can you tell my which function call in opensips? I know how to manipulate the core

Re: [OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-10 Thread bluerain
cool, thx for that, I will try it! Thank you very much for your help! -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensip-as-transaprent-inbound-proxy-for-asterisk-tp7588047p7588055.html Sent from the OpenSIPS - Users mailing list archive at

Re: [OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-10 Thread bluerain
Just FYI, I tried, I insert your line in the method invite and right before the routing, Asterisk didn't seem to care. It still care about the prior Hop IP. So what I mean is that from 199.33.33.33 -- opensip 22.55.33.33 (and then I put your line) -- Asterisk server. Asterisk server identified

Re: [OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-10 Thread Mike Tesliuk
the sugestion from Stefano is to you transport the ip information from opensips to asterisk, when you are in asterisk you get that variable and validate the customer, if just opensips will talk with asterisk so you dont need the ip address on asterisk, just in opensips, you made all validation on

Re: [OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-10 Thread Bruce Wang
Hi bluerain, Our production setup is using OpenSIPS as proxy to many Asterisk instances via load_balancer module. I can see from the SIP logs on our Asterisk servers the SIP headers sent from OpenSIPS to Asterisk still contains the original IP (From, Contact, and the bottom one Via) Have you

Re: [OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-10 Thread Stefano Pisani
Just FYI you need to write down some code in asterisk to manage the new header obviusly Il 11/10/2013 02.30, bluerain ha scritto: Just FYI, I tried, I insert your line in the method invite and right before the routing, Asterisk didn't seem to care. It still care about the prior Hop IP. So

[OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-09 Thread bluerain
I've try to search on internet but not much info. I currently have Asterisk server setup to have sip trunk with customers on a peer type. This way, no registration need and that asterisk server will identify the inbound call base on IP address matching. But now I would like to put OPENSIPS in

Re: [OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-09 Thread Stefano Pisani
opensips can add an header with the real IP and asterisk can use that header to know the real IP Il 09/10/2013 17.02, bluerain ha scritto: I've try to search on internet but not much info. I currently have Asterisk server setup to have sip trunk with customers on a peer type. This way, no

Re: [OpenSIPS-Users] Opensip as transaprent inbound proxy for asterisk

2013-10-09 Thread bluerain
Are you sure? Can you tell my which function call in opensips? I know how to manipulate the core variable, but $si is read only. And I think if you define a peering resource in asterisk, it will try to match it by the source IP at the network layer and not within the INVITE. Please tell me