Hello all, Is there a way I can dial at number at a registered extension. Basically what I'd like to do is use Freeswitch as a SBC for a number of asterisk machines and I'd like to pass an incoming sip invite to a specific number at each one. Right now I'm specifying the IP in the bridge command like this sofia/default/NNNNNNNNNNN@xx.xx.xx.xx but if I dial the registered user directly it dials the contact address at the registered user and does not pass the inbound number. Basically what I'm trying to do is this: pstn -> ITSP -> freeswitch -> asterisk (1-n) Thanks, Spencer
maybe look at using something like mod_easyroute. You setup a database of mappings between DID and endpoints. It is designed for the situation you describe. On Sun, Mar 14, 2010 at 3:13 PM, Spencer Thomason < spencer@5ninesolutions.com> wrote:
Hello all, Is there a way I can dial at number at a registered extension. Basically what I'd like to do is use Freeswitch as a SBC for a number of asterisk machines and I'd like to pass an incoming sip invite to a specific number at each one. Right now I'm specifying the IP in the bridge command like this sofia/default/NNNNNNNNNNN@xx.xx.xx.xx but if I dial the registered user directly it dials the contact address at the registered user and does not pass the inbound number. Basically what I'm trying to do is this:
pstn -> ITSP -> freeswitch -> asterisk (1-n)
Thanks, Spencer
_______________________________________________ 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
-- -Rupa
That looks promising, thanks. I was hoping to have FS do it automatically. I.e. inbound dids are assigned to specific asterisk boxes, ITSP dials inbound did of freeswitch, freeswitch dials inbound did @ whereever the registration came from instead of having the IP address hard coded into a route. On Mar 14, 2010, at 2:12 PM, Rupa Schomaker wrote:
maybe look at using something like mod_easyroute. You setup a database of mappings between DID and endpoints. It is designed for the situation you describe.
On Sun, Mar 14, 2010 at 3:13 PM, Spencer Thomason <spencer@5ninesolutions.com
wrote: Hello all, Is there a way I can dial at number at a registered extension. Basically what I'd like to do is use Freeswitch as a SBC for a number of asterisk machines and I'd like to pass an incoming sip invite to a specific number at each one. Right now I'm specifying the IP in the bridge command like this sofia/default/NNNNNNNNNNN@xx.xx.xx.xx but if I dial the registered user directly it dials the contact address at the registered user and does not pass the inbound number. Basically what I'm trying to do is this:
pstn -> ITSP -> freeswitch -> asterisk (1-n)
Thanks, Spencer
_______________________________________________ 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
-- -Rupa _______________________________________________ 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
You sure can still have it call a registration.. You're mixing the dialplan and user directly as if they are a single entity. They aren't. /b On Mar 14, 2010, at 5:02 PM, Spencer Thomason wrote:
That looks promising, thanks. I was hoping to have FS do it automatically. I.e. inbound dids are assigned to specific asterisk boxes, ITSP dials inbound did of freeswitch, freeswitch dials inbound did @ whereever the registration came from instead of having the IP address hard coded into a route.
I guess my question is, is there some function which will return the IP address of a registered user? Similar to sofia_contact but only the IP address? Spencer On Mar 14, 2010, at 3:18 PM, Brian West wrote:
You sure can still have it call a registration.. You're mixing the dialplan and user directly as if they are a single entity. They aren't.
/b
On Mar 14, 2010, at 5:02 PM, Spencer Thomason wrote:
That looks promising, thanks. I was hoping to have FS do it automatically. I.e. inbound dids are assigned to specific asterisk boxes, ITSP dials inbound did of freeswitch, freeswitch dials inbound did @ whereever the registration came from instead of having the IP address hard coded into a route.
_______________________________________________ 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
Yes, sofia_contact with regex to extract the IP portion? You had the answer yourself. João Mesquita On Sun, Mar 14, 2010 at 8:00 PM, Spencer Thomason < spencer@5ninesolutions.com> wrote:
I guess my question is, is there some function which will return the IP address of a registered user? Similar to sofia_contact but only the IP address?
Spencer
On Mar 14, 2010, at 3:18 PM, Brian West wrote:
You sure can still have it call a registration.. You're mixing the dialplan and user directly as if they are a single entity. They aren't.
/b
On Mar 14, 2010, at 5:02 PM, Spencer Thomason wrote:
That looks promising, thanks. I was hoping to have FS do it automatically. I.e. inbound dids are assigned to specific asterisk boxes, ITSP dials inbound did of freeswitch, freeswitch dials inbound did @ whereever the registration came from instead of having the IP address hard coded into a route.
_______________________________________________ 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
Duh.. :-) Thanks! On Mar 14, 2010, at 4:17 PM, João Mesquita wrote:
Yes, sofia_contact with regex to extract the IP portion? You had the answer yourself.
João Mesquita
On Sun, Mar 14, 2010 at 8:00 PM, Spencer Thomason <spencer@5ninesolutions.com
wrote: I guess my question is, is there some function which will return the IP address of a registered user? Similar to sofia_contact but only the IP address?
Spencer
On Mar 14, 2010, at 3:18 PM, Brian West wrote:
You sure can still have it call a registration.. You're mixing the dialplan and user directly as if they are a single entity. They aren't.
/b
On Mar 14, 2010, at 5:02 PM, Spencer Thomason wrote:
That looks promising, thanks. I was hoping to have FS do it automatically. I.e. inbound dids are assigned to specific asterisk boxes, ITSP dials inbound did of freeswitch, freeswitch dials inbound did @ whereever the registration came from instead of having the IP address hard coded into a route.
_______________________________________________ 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
_______________________________________________ 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
So just in case anyone else ever needs to do this.. here's what I ended up with: <include> <extension name="NNNNNNNNNNN-did"> <condition field="destination_number" expression="^(NNNNNNNNNNN)$"> <action application="set" data="domain_name=$${domain}"/> <action application="set" data="accountcode=<ACCTNUM>"/> <action application="bridge" data="sofia/default/$1${regex($ {sofia_contact(${accountcode}@$${domain})}|^[^\@]+(.*)|%1)}" /> </condition> </extension> </include> Basically the extension UAs register to is created as the same as the account code. We then use their ip at registration to dial a did on their end. Spencer On Mar 14, 2010, at 5:25 PM, Spencer Thomason wrote:
Duh.. :-) Thanks!
On Mar 14, 2010, at 4:17 PM, João Mesquita wrote:
Yes, sofia_contact with regex to extract the IP portion? You had the answer yourself.
João Mesquita
On Sun, Mar 14, 2010 at 8:00 PM, Spencer Thomason <spencer@5ninesolutions.com
wrote: I guess my question is, is there some function which will return the IP address of a registered user? Similar to sofia_contact but only the IP address?
Spencer
On Mar 14, 2010, at 3:18 PM, Brian West wrote:
You sure can still have it call a registration.. You're mixing the dialplan and user directly as if they are a single entity. They aren't.
/b
On Mar 14, 2010, at 5:02 PM, Spencer Thomason wrote:
That looks promising, thanks. I was hoping to have FS do it automatically. I.e. inbound dids are assigned to specific asterisk boxes, ITSP dials inbound did of freeswitch, freeswitch dials inbound did @ whereever the registration came from instead of having the IP address hard coded into a route.
_______________________________________________ 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
_______________________________________________ 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
Wiki is your friend to that type of info! Contribute to it, please! JM On Sun, Mar 14, 2010 at 11:20 PM, Spencer Thomason < spencer@5ninesolutions.com> wrote:
So just in case anyone else ever needs to do this.. here's what I ended up with:
<include> <extension name="NNNNNNNNNNN-did"> <condition field="destination_number" expression="^(NNNNNNNNNNN)$"> <action application="set" data="domain_name=$${domain}"/> <action application="set" data="accountcode=<ACCTNUM>"/> <action application="bridge" data="sofia/default/$1${regex(${sofia_contact(${accountcode}@$${domain})}|^[^\@]+(.*)|%1)}" /> </condition> </extension> </include>
Basically the extension UAs register to is created as the same as the account code. We then use their ip at registration to dial a did on their end.
Spencer
On Mar 14, 2010, at 5:25 PM, Spencer Thomason wrote:
Duh.. :-) Thanks!
On Mar 14, 2010, at 4:17 PM, João Mesquita wrote:
Yes, sofia_contact with regex to extract the IP portion? You had the answer yourself.
João Mesquita
On Sun, Mar 14, 2010 at 8:00 PM, Spencer Thomason < spencer@5ninesolutions.com> wrote:
I guess my question is, is there some function which will return the IP address of a registered user? Similar to sofia_contact but only the IP address?
Spencer
On Mar 14, 2010, at 3:18 PM, Brian West wrote:
You sure can still have it call a registration.. You're mixing the dialplan and user directly as if they are a single entity. They aren't.
/b
On Mar 14, 2010, at 5:02 PM, Spencer Thomason wrote:
That looks promising, thanks. I was hoping to have FS do it automatically. I.e. inbound dids are assigned to specific asterisk boxes, ITSP dials inbound did of freeswitch, freeswitch dials inbound did @ whereever the registration came from instead of having the IP address hard coded into a route.
_______________________________________________ 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
_______________________________________________ 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
_______________________________________________ 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
FYI, I added this as example 16 on the dialplan xml page on the wiki. -MC 2010/3/14 João Mesquita <jmesquita@freeswitch.org>
Wiki is your friend to that type of info! Contribute to it, please!
JM
On Sun, Mar 14, 2010 at 11:20 PM, Spencer Thomason < spencer@5ninesolutions.com> wrote:
So just in case anyone else ever needs to do this.. here's what I ended up with:
<include> <extension name="NNNNNNNNNNN-did"> <condition field="destination_number" expression="^(NNNNNNNNNNN)$"> <action application="set" data="domain_name=$${domain}"/> <action application="set" data="accountcode=<ACCTNUM>"/> <action application="bridge" data="sofia/default/$1${regex(${sofia_contact(${accountcode}@$${domain})}|^[^\@]+(.*)|%1)}" /> </condition> </extension> </include>
Basically the extension UAs register to is created as the same as the account code. We then use their ip at registration to dial a did on their end.
Spencer
On Mar 14, 2010, at 5:25 PM, Spencer Thomason wrote:
Duh.. :-) Thanks!
On Mar 14, 2010, at 4:17 PM, João Mesquita wrote:
Yes, sofia_contact with regex to extract the IP portion? You had the answer yourself.
João Mesquita
On Sun, Mar 14, 2010 at 8:00 PM, Spencer Thomason < spencer@5ninesolutions.com> wrote:
I guess my question is, is there some function which will return the IP address of a registered user? Similar to sofia_contact but only the IP address?
Spencer
On Mar 14, 2010, at 3:18 PM, Brian West wrote:
You sure can still have it call a registration.. You're mixing the dialplan and user directly as if they are a single entity. They aren't.
/b
On Mar 14, 2010, at 5:02 PM, Spencer Thomason wrote:
That looks promising, thanks. I was hoping to have FS do it automatically. I.e. inbound dids are assigned to specific asterisk boxes, ITSP dials inbound did of freeswitch, freeswitch dials inbound did @ whereever the registration came from instead of having the IP address hard coded into a route.
_______________________________________________ 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
_______________________________________________ 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
_______________________________________________ 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
Oh, check the RURI example on default configs. That might give you a hint. João Mesquita On Sun, Mar 14, 2010 at 8:00 PM, Spencer Thomason < spencer@5ninesolutions.com> wrote:
I guess my question is, is there some function which will return the IP address of a registered user? Similar to sofia_contact but only the IP address?
Spencer
On Mar 14, 2010, at 3:18 PM, Brian West wrote:
You sure can still have it call a registration.. You're mixing the dialplan and user directly as if they are a single entity. They aren't.
/b
On Mar 14, 2010, at 5:02 PM, Spencer Thomason wrote:
That looks promising, thanks. I was hoping to have FS do it automatically. I.e. inbound dids are assigned to specific asterisk boxes, ITSP dials inbound did of freeswitch, freeswitch dials inbound did @ whereever the registration came from instead of having the IP address hard coded into a route.
_______________________________________________ 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
participants (5)
-
Brian West
-
João Mesquita
-
Michael Collins
-
Rupa Schomaker
-
Spencer Thomason