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