[Freeswitch-users] cant access mailbox if userid is non numeric
Brian West
brian at freeswitch.org
Mon Sep 29 09:33:09 PDT 2008
You have some options here. I highly recommend you check out the
changes I have done to the default configs btw.
<anti-action application="voicemail" data="default $${domain} $
{user_data(${dialed_ext}@$${domain} param real_mailbox)}"/>
And just set the param of the real_mailbox for that user and it'll go
snag it out of the directory for that user.
Same for the check version:
<action application="voicemail" data="check default $${domain} $
{user_data(${dialed_ext}@$${domain} param real_mailbox)}"/>
Now if you really want to get crazy you can do something like this:
<action application="set" data="real_mailbox=${user_data(${dialed_ext}@
$${domain} param real_mailbox)}"/>
<action application="voicemail" data="default $${domain} ${cond($
{real_mailbox} == "" ? ${real_mailbox} : ${dialed_ext})}"/>
That would use the real_mailbox param on the user or the dialed_ext...
I didn't test that but it looks correct.
Chances are I have done nothing but confuse you. :(
/b
On Sep 29, 2008, at 11:19 AM, xbipin wrote:
>
> what needs to be changed here, im a bit confused
>
> <extension name="Local_Extension">
> <condition field="destination_number" expression="^(10[01][0-9])
> $">
> <action application="set" data="dialed_ext=$1"/>
> <action application="export" data="dialed_ext=$1"/>
> </condition>
> <condition field="destination_number"
> expression="^${caller_id_number}$">
> <action application="set" data="voicemail_authorized=$
> {sip_authorized}"/>
> <action application="answer"/>
> <action application="sleep" data="1000"/>
> <action application="voicemail" data="check default $${domain}
> ${dialed_ext}"/>
> <!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s]
> <app> -->
> <anti-action application="bind_meta_app" data="1 b s
> execute_extension::dx
> XML features"/>
> <anti-action application="bind_meta_app" data="2 b s
> record_session::$${base_dir}/recordings/${caller_id_number}.$
> {strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
> <anti-action application="bind_meta_app" data="3 b s
> execute_extension::cf
> XML features"/>
> <anti-action application="set" data="transfer_ringback=${us-ring}"/>
> <anti-action application="set" data="call_timeout=30"/>
> <!-- <anti-action application="set"
> data="sip_exclude_contact=${network_addr}"/> -->
> <anti-action application="set" data="hangup_after_bridge=true"/>
> <!--<anti-action application="set"
> data
> =
> "continue_on_fail
> =
> NORMAL_TEMPORARY_FAILURE
> ,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION"/>
> -->
> <anti-action application="set" data="continue_on_fail=true"/>
> <anti-action application="db"
> data="insert/call_return/${dialed_ext}/${caller_id_number}"/>
> <anti-action application="db"
> data="insert/last_dial_ext/${dialed_ext}/${uuid}"/>
> <anti-action application="bridge" data="user/${dialed_ext}@$$
> {domain}"/>
> <anti-action application="answer"/>
> <!--<anti-action application="send_display" data="Voicemail for
> ${dialed_ext}"/>-->
> <anti-action application="sleep" data="1000"/>
> <anti-action application="voicemail" data="default $${domain}
> ${dialed_ext}"/>
> </condition>
> </extension>
>
>
>
>
> Brian West-3 wrote:
>>
>> You can also override this via the ${sip_mailbox} variable instead of
>> the dialed_ext that is a variable that is magically set for you based
>> on the mailbox = attr.
>>
>> /b
>>
>> On Sep 29, 2008, at 9:55 AM, xbipin wrote:
>>
>>>
>>> the dialplan is the standard config that comes with FS, no changes
>>> to it
>>>
>>>
>>>
>>> Yossi Neiman wrote:
>>>>
>>>> I believe the problem might lie in the dialplan that you are
>>>> using to
>>>> get the user into the mailbox. If you can resubmit this section
>>>> from
>>>> the user directory plus the snippet from the dialplan that pertains
>>>> to
>>>> this, that would make it easier to help you. Alternatively, you
>>>> can
>>>> stop by the #freeswitch channel on freenode and we can help in real
>>>> time
>>>> then.
>>>>
>>>> --
>>>> Yossi Neiman
>>>> Cartis Solutions, Inc.
>>>> http://www.cartissolutions.com
>>>>
>>>>
>>>>
>>>> xbipin wrote:
>>>>> under windows, i faced the following problem with FS. if i change
>>>>> the
>>>>> user_id
>>>>> to a non numeric value then the user can register to the FS but
>>>>> can
>>>>> access
>>>>> his mail box by calling 1005.
>>>>> as soon as i change the user_id to 1005 then dialing that i cana
>>>>> ccess my
>>>>> mailbox, y is this so? y cant the user have his name as user_id
>>>>> rather a
>>>>> number?
>>>>>
>>>>> <include>
>>>>> <user id="demo" mailbox="1005">
>>>>> <params>
>>>>>
>>>>>
>>>>> </params>
>>>>> <variables>
>>>>> <variable name="accountcode" value="1005"/>
>>>>> <variable name="user_context" value="default"/>
>>>>> <variable name="effective_caller_id_name" value="Ankur"/>
>>>>> <variable name="effective_caller_id_number" value="1005"/>
>>>>> </variables>
>>>>> </user>
>>>>> </include>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Yossi Neiman
>>>> President
>>>> Cartis Solutions, Inc.
>>>> P) 630-259-8100
>>>> http://www.cartissolutions.com
>>>>
>>>>
>>>> _______________________________________________
>>>> Freeswitch-users mailing list
>>>> Freeswitch-users at lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>> http://www.freeswitch.org
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/cant-access-mailbox-if-userid-is-non-numeric-tp19724293p19725513.html
>>> Sent from the Freeswitch-users mailing list archive at Nabble.com.
>>>
>>>
>>> _______________________________________________
>>> Freeswitch-users mailing list
>>> Freeswitch-users at 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 at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>
> --
> View this message in context: http://www.nabble.com/cant-access-mailbox-if-userid-is-non-numeric-tp19724293p19727009.html
> Sent from the Freeswitch-users mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
More information about the FreeSWITCH-users
mailing list