<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt">you need this:<br>http://wiki.freeswitch.org/wiki/Multi-tenant<br><div><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><span>but before reading that, you need to read the FreeSWITCH book.</span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><span>http://www.packtpub.com/freeswitch-1-2/book</span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style:
normal;"><span>then you will start answering questions on this mailing list, instead of asking :-))</span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><span></span></div><div><br></div> <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1"> <font face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> Matt <code.name.eric@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday,
September 26, 2013 4:34 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Freeswitch-users] Caller Domain Variable?<br> </font> </div> <div class="y_msg_container"><br>I am so sorry - I am not sure how to give an example of the sip packet<br>as I just touched Freeswitch for the first time two days ago.<br><br>However, to provide more detail:<br><br>I have two sip profiles named foo-192.168.20.0 and foo-192.168.21.0.<br><br>In them, I force the domains to foo-20 and foo-21, respectively.<br><br>When dialing the voicemail extension, the example invocation is:<br><br><action application="voicemail" data="check default ${domain_name}/><br><br>This fails because ${domain_name} expands to something else altogether.<br><br>So, I am looking for a way to use the caller domain when invoking<br>voicemail. I could use separate contexts. If I knew that I would have a<br>consistent sip profile and domain naming system, I could do some
text<br>manipulation to construct the domain name. At the moment, I am using an<br>if/elseif in a lua script like this:<br><br>session:answer()<br>session:sleep(1000)<br><br>sofia_profile_name = session:getVariable("sofia_profile_name")<br><br>if (sofia_profile_name == "foo-192.168.19.0") then<br> caller_domain = "foo-20"<br>elseif (sofia_profile_name == "foo-192.168.21.0") then<br> caller_domain = "foo-21" <br>end<br><br>session:execute("voicemail", "check default " .. caller_domain)<br> <br>The vars reported by info do not seem to have the caller's domain<br>(foo-20 or foo-21).<br><br>Again, I may be asking the wrong questions as I have just started<br>working with this about 60 hours ago.<br><br>Matt<br><br><br><br>On 9/25/13 5:31 PM, Michael Jerris wrote:<br>> Every chunk of the sip packet you can imagine gets a variable set that you should be able to access. Can you give an example of the sip packet
and what your not seeing in the vars?<br>><br>> On Sep 25, 2013, at 8:24 AM, Matt <<a ymailto="mailto:code.name.eric@gmail.com" href="mailto:code.name.eric@gmail.com">code.name.eric@gmail.com</a>> wrote:<br>><br>>> Is there a way to access the caller's domain?<br>>><br>>> I do not see it in app info.<br>>><br>>> I can use sofia_profile_name to determine the domain name. However, it<br>>> would be more convenient access the domain name directly so as to have a<br>>> DRY approach.<br>>><br>>> Matt<br>>><br>><br>> _________________________________________________________________________<br>> Professional FreeSWITCH Consulting Services:<br>> <a ymailto="mailto:consulting@freeswitch.org" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>> <a href="http://www.freeswitchsolutions.com/"
target="_blank">http://www.freeswitchsolutions.com</a><br>><br>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>> <a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br>><br>> Official FreeSWITCH Sites<br>> <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>> <a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br>> <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br>><br>> FreeSWITCH-users mailing list<br>> <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>> UNSUBSCRIBE:<a
href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>> <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br><br><br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a ymailto="mailto:consulting@freeswitch.org" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a><br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br><a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br><a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br><a
href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br><br><br></div> </div> </div> </div></body></html>