Sending SIP calls via outbound proxy
Hi There, I'm trying to get freeswitch to originate all SIP calls through an outbound proxy. When I use the originate API command to create a call to a telephone number I see the SIP packets getting to my proxy just fine. However if I originate a call to a SIP address then proxy server is bypassed, instead FS is directly messaging the addressee. Here is the command that I'm trying to use that behaves unexpectedly: originate sofia/gateway/proxy/alice@bar.com &echo() However this command produces the results I'm expecting: originate sofia/gateway/proxy/15551234 &echo() Here is the result of my sofia status: freeswitch> sofia status API CALL [sofia(status)] output: Name Type Data State ================================================================================================= external profile sip:mod_sofia@X.X.X.X:5070 RUNNING (0) proxy gateway sip:ejjohnson_ippx@ejjohnson.org NOREG ================================================================================================= 1 profile 0 aliases I have also tried setting the sip_invite_domain channel var through the {} Could you let me know what I'm doing wrong? Much appreciated, Erick J
First example is WRONG you don't dial via a gateway that way. If you wish to dial alice@bar.com then try sofia/internal/alice@bar.com as you don't require a gateway to call alice right? /b On Dec 8, 2008, at 7:14 PM, Erick Johnson wrote:
Here is the command that I'm trying to use that behaves unexpectedly: originate sofia/gateway/proxy/alice@bar.com &echo()
However this command produces the results I'm expecting: originate sofia/gateway/proxy/15551234 &echo()
Hi Brian, Thanks for the reply, but I still don't think that answers my original question. I'm trying to get FS to act simply as a UAC in this instance, what I want is for FS to proxy ALL outbound calls through my proxy server at foo.com. So when FS originates a call to alice@bar.com I want the signaling path to be set up as: FreeSwitch ---> proxy.foo.com ---> alice@bar.com I found this thread: http://lists.freeswitch.org/pipermail/freeswitch-users/2008-November/008582.... but I still can't seem to get FS to stop resolving domain bar.com on it's own, even when I set the sip_invite_domain variable like so: originate {sip_invite_domain='proxy.foo.com'}sofia/external/alice@bar.com &echo() That is how I ended up using the "originate sofia/gateway/proxy/alice@bar.com &echo()" command. While I understand that's wrong, I don't know what the right config/cmd is to accomplish my task. Any other help is much appreciated. Thanks, Erick
First example is WRONG you don't dial via a gateway that way. If you wish to dial alice at bar.com then try sofia/internal/alice at bar.com as you don't require a gateway to call alice right?
/b
On Dec 8, 2008, at 7:14 PM, Erick Johnson wrote:
Here is the command that I'm trying to use that behaves unexpectedly: originate sofia/gateway/proxy/alice at bar.com &echo()
However this command produces the results I'm expecting: originate sofia/gateway/proxy/15551234 &echo()
-- Erick Johnson sip/email erick@junctionnetworks.com 1-800-801-3381 x7006 Software Engineer Junction Networks
Can you clarify why you need a gateway? Is the far side going to challenge us and request authentication credentials? So you want us to not resolve the domain of the target at all in any way? That kinda breaks the rules because you should always check the NAPTR's and SRV and resolve to the target in that manner its a requirement. If you want to force things to a proxy and let the proxy on the far side do the work then you do this: sofia/profile/alice@bar.com;fs_path=proxy.foo.com /b On Dec 9, 2008, at 12:06 PM, Erick Johnson wrote:
Hi Brian,
Thanks for the reply, but I still don't think that answers my original question. I'm trying to get FS to act simply as a UAC in this instance, what I want is for FS to proxy ALL outbound calls through my proxy server at foo.com.
So when FS originates a call to alice@bar.com I want the signaling path to be set up as:
FreeSwitch ---> proxy.foo.com ---> alice@bar.com
I found this thread: http://lists.freeswitch.org/pipermail/freeswitch-users/2008-November/008582.... but I still can't seem to get FS to stop resolving domain bar.com on it's own, even when I set the sip_invite_domain variable like so: originate {sip_invite_domain='proxy.foo.com'}sofia/external/alice@bar.com &echo()
That is how I ended up using the "originate sofia/gateway/proxy/alice@bar.com &echo()" command. While I understand that's wrong, I don't know what the right config/ cmd is to accomplish my task.
Any other help is much appreciated.
Thanks,
Erick
Thanks Brian, I never did want to use a gateway - I was just lost on how to force FS to use a proxy. fs_path seems to be what I'm looking for. However now what I run my originate command the channel gets terminated before FS even sends out a packet. The api call completes with NORMAL_UNSPECIFIED termination cause. API CALL [originate(sofia/external/erick@ejjohnson.org;fs_path=proxy.foo.net &echo())] output: -ERR NORMAL_UNSPECIFIED Looking at the logs the reason as to why it's been termintated isn't cleear to me. Any thoughts? Here is the pastebin for the log http://pastebin.freeswitch.org/6378 Thanks again E
Can you clarify why you need a gateway? Is the far side going to challenge us and request authentication credentials?
So you want us to not resolve the domain of the target at all in any way? That kinda breaks the rules because you should always check the NAPTR's and SRV and resolve to the target in that manner its a requirement. If you want to force things to a proxy and let the proxy on the far side do the work then you do this:
sofia/profile/alice at bar.com;fs_path=proxy.foo.com
/b
What SVN rev are you running? Also, could you do a SIP trace? TPORT_LOG=1 && /usr/local/freeswitch/bin/freeswitch Pastebin the output of that and we'll take it from there. -MC On Tue, Dec 9, 2008 at 11:41 AM, Erick Johnson <erick@junctionnetworks.com> wrote:
Both:
originate sofia/external/'erick@ejjohnson.org;fs_path=proxybeta.foo.net' &echo() originate sofia/external/erick@ejjohnson.org;fs_path=proxybeta.foo.net &echo()
produce the exact same result & log
:(
* I think you need to '' the sofia uri /b
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
originate 'sofia/internal/brian@bkw.org;fs_path=bob.com' &echo() /b On Dec 9, 2008, at 1:52 PM, Michael Collins wrote:
What SVN rev are you running? Also, could you do a SIP trace? TPORT_LOG=1 && /usr/local/freeswitch/bin/freeswitch Pastebin the output of that and we'll take it from there. -MC
On Tue, Dec 9, 2008 at 11:41 AM, Erick Johnson <erick@junctionnetworks.com> wrote:
Both:
originate sofia/ external/'erick@ejjohnson.org;fs_path=proxybeta.foo.net' &echo() originate sofia/external/ erick@ejjohnson.org;fs_path=proxybeta.foo.net &echo()
produce the exact same result & log
:(
* I think you need to '' the sofia uri /b
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I'm running latest trunk - Revision: 10682 I've been doing an ngrep on my external freeswitch SIP port and FS is not sending any SIP packets anywhere when I run the following command. Bumping up TPORT_LOG to 9 also confirms this, as no SIP packets are logged. originate 'sofia/external/erick@ejjohnson.org;fs_path=proxybeta.jnctn.net' &echo() Also, just to be clear, when I remove ";fs_path=..." from the command above a call is set up normally to erick@ejjohnson.org and the SIP packets are logged to console. Thanks guys.
What SVN rev are you running? Also, could you do a SIP trace? TPORT_LOG=1 && /usr/local/freeswitch/bin/freeswitch Pastebin the output of that and we'll take it from there. -MC
On Tue, Dec 9, 2008 at 11:41 AM, Erick Johnson <erick at junctionnetworks.com> wrote:
Both:
originate sofia/external/'erick at ejjohnson.org;fs_path=proxybeta.foo.net' &echo() originate sofia/external/erick at ejjohnson.org;fs_path=proxybeta.foo.net &echo()
produce the exact same result & log
:(
* I think you need to '' the sofia uri /b
participants (3)
-
Brian West
-
Erick Johnson
-
Michael Collins