Hi, For the below issue that I have raised I thought I would take sip_request_user and do something like if sip_ request _user is >100 and sip_ request _user is <100. But the issue is sip_ request_user is a string and when I tried to convert the string to number using this condition local sip_request_user = tonumber("sip_request_user") and dial I get a error like this 2012-11-26 11:34:50.758062 [CRIT] switch_cpp.cpp:1227 to test2aaa2012-11-26 11:34:50.758062 [ERR] mod_lua.cpp:196 /usr/local/freeswitch/scripts/directory.lua:175: attempt to compare nil with number stack traceback: what can be done to change that string to number. Please let me know. Regards, Archana From: Archana Venugopan Sent: 26 November 2012 10:29 To: 'FreeSWITCH Users Help' Subject: Profile Hi, When I make a call from my extension then to another extension within the domain then I get the sip_profile as 'internal'. Core-UUID: 6fbd06fe-2fdd-11e2-b2f2-3ff7b399e7ed FreeSWITCH-Hostname: squay-laptop-1.squay.com FreeSWITCH-Switchname: squay-laptop-1.squay.com FreeSWITCH-IPv4: 192.168.2.29 FreeSWITCH-IPv6: %3A%3A1 Event-Date-Local: 2012-11-26%2010%3A12%3A45 Event-Date-GMT: Mon,%2026%20Nov%202012%2010%3A12%3A45%20GMT Event-Date-Timestamp: 1353924765298047 Event-Calling-File: sofia_reg.c Event-Calling-Function: sofia_reg_parse_auth Event-Calling-Line-Number: 2371 action: sip_auth sip_profile: internal sip_user_agent: Aastra%2053i/2.6.0.66 sip_auth_username: 100 sip_auth_realm: fsfailover.uk01.com sip_auth_nonce: d255b9f6-37b1-11e2-9f22-3ff7b399e7ed sip_auth_uri: sip%3A07867429523%40fsfailover.uk01.com sip_contact_user: 100 sip_contact_host: 192.168.2.234 sip_to_user: 07867429523 sip_to_host: fsfailover.uk01.com sip_from_user: 100 sip_from_host: fsfailover.uk01.com sip_request_user: 07867429523 sip_request_host: fsfailover.uk01.com sip_auth_qop: auth sip_auth_cnonce: 8da7d104 sip_auth_nc: 00000001 sip_auth_response: 9207e9f5ab74da1d6cd0414cd31e9354 sip_auth_method: INVITE key: id user: 100 domain: fsfailover.uk01.com ip: 192.168.2.234 But I am trying to make a call from my extension to offnet where I should get sip_profile 'external'. T below message from the xml file is getting displayed where I get external. Dialplan: sofia/internal/100@fsfailover.uk01.com Action bridge(sofia/external/0${msc_prefix}0786751162649@10.20.3.16<mailto:sofia/external/0$%7bmsc_prefix%7d07867429523@10.20.3.16>) In lua script how can I configure external?? I tried giving profile='external' but it throwed an error. Only sip_profile='internal' is working. Please help me out in this. Thanks Regards, Archana
It looks like you're passing the string "sip_request_user" to the tonumber function. I think you need to remove the quotes On Mon, Nov 26, 2012 at 6:42 AM, Archana Venugopan <a.venugopan@mundio.com>wrote:
Hi,****
** **
For the below issue that I have raised I thought I would take sip_request_user and do something like if sip_ request _user is >100 and sip_ request _user is <100. But the issue is sip_ request_user is a string and when I tried to convert the string to number using this condition ****
** **
local sip_request_user = tonumber("sip_request_user") ****
** **
and dial I get a error like this ****
2012-11-26 11:34:50.758062 [CRIT] switch_cpp.cpp:1227 to test2aaa2012-11-26 11:34:50.758062 [ERR] mod_lua.cpp:196 /usr/local/freeswitch/scripts/directory.lua:175: attempt to compare nil with number****
stack traceback:****
** **
what can be done to change that string to number. Please let me know.****
** **
Regards,****
Archana****
** **
*From:* Archana Venugopan *Sent:* 26 November 2012 10:29 *To:* 'FreeSWITCH Users Help' *Subject:* Profile****
** **
Hi,****
When I make a call from my extension then to another extension within the domain then I get the sip_profile as ‘internal’.****
** **
** **
Core-UUID: 6fbd06fe-2fdd-11e2-b2f2-3ff7b399e7ed****
FreeSWITCH-Hostname: squay-laptop-1.squay.com****
FreeSWITCH-Switchname: squay-laptop-1.squay.com****
FreeSWITCH-IPv4: 192.168.2.29****
FreeSWITCH-IPv6: %3A%3A1****
Event-Date-Local: 2012-11-26%2010%3A12%3A45****
Event-Date-GMT: Mon,%2026%20Nov%202012%2010%3A12%3A45%20GMT****
Event-Date-Timestamp: 1353924765298047****
Event-Calling-File: sofia_reg.c****
Event-Calling-Function: sofia_reg_parse_auth****
Event-Calling-Line-Number: 2371****
action: sip_auth****
sip_profile: internal****
sip_user_agent: Aastra%2053i/2.6.0.66****
sip_auth_username: 100****
sip_auth_realm: fsfailover.uk01.com****
sip_auth_nonce: d255b9f6-37b1-11e2-9f22-3ff7b399e7ed****
sip_auth_uri: sip%3A07867429523%40fsfailover.uk01.com****
sip_contact_user: 100****
sip_contact_host: 192.168.2.234****
sip_to_user: 07867429523****
sip_to_host: fsfailover.uk01.com****
sip_from_user: 100****
sip_from_host: fsfailover.uk01.com****
sip_request_user: 07867429523****
sip_request_host: fsfailover.uk01.com****
sip_auth_qop: auth****
sip_auth_cnonce: 8da7d104****
sip_auth_nc: 00000001****
sip_auth_response: 9207e9f5ab74da1d6cd0414cd31e9354****
sip_auth_method: INVITE****
key: id****
user: 100****
domain: fsfailover.uk01.com****
ip: 192.168.2.234****
** **
But I am trying to make a call from my extension to offnet where I should get sip_profile ‘external’. T below message from the xml file is getting displayed where I get external.****
** **
Dialplan: sofia/internal/100@fsfailover.uk01.com Action bridge( sofia/external/0${msc_prefix}0786751162649@10.20.3.16<sofia/external/0$%7bmsc_prefix%7d07867429523@10.20.3.16> )****
** **
In lua script how can I configure external?? I tried giving profile=’external’ but it throwed an error. Only sip_profile=’internal’ is working. Please help me out in this. Thanks ****
** **
Regards,****
Archana****
** **
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 (2)
-
Archana Venugopan
-
Bryant Lee