Hi everyone, Again stuck at the dispatcher module.Do anyone happen to have a working config for kamailio with dispatcher list from mysql database ? if not can someone please guide me on this ?
Do i need to pass module parameters for the column and the table names ?
I have the following config :
loadmodule "dispatcher.so"
if(uri=~"^sip:1[2-9][0-9]{9}@") { if(is_user_in("credentials","longdistance")) { #route(PSTN); #exit; ds_select_dst("1","8"); forward(); } else{ sl_send_reply("403","No Permissions for Long Distance calls"); exit; }; };
Hello,
On 1/7/11 6:47 PM, Amit Nepal wrote:
Hi everyone, Again stuck at the dispatcher module.Do anyone happen to have a working config for kamailio with dispatcher list from mysql database ? if not can someone please guide me on this ?
Do i need to pass module parameters for the column and the table names ?
I have the following config :
loadmodule "dispatcher.so"
have you set the db_url parameter for dispatcher module? If not, then dispatcher does not connect to database.
Cheers, Daniel
if(uri=~"^sip:1[2-9][0-9]{9}@") { if(is_user_in("credentials","longdistance")) { #route(PSTN); #exit; ds_select_dst("1","8"); forward(); } else{ sl_send_reply("403","No Permissions for Long Distance calls"); exit; }; };
Yes, I set the dburl now and i have the following :
modparam("dispatcher", "db_url", DBURL) >>> this sets the dburl. Now it shows not found to the caller but also makes calls to the destination, and a copy of call is also forwarded to the asterisk.. any thing wrong with my config ?
if(uri=~"^sip:1[2-9][0-9]{9}@") { if(is_user_in("credentials","longdistance")) { ds_select_dst("1","8"); forward(); } else{ sl_send_reply("403","No Permissions for Long Distance calls"); exit; };
Thank You Amit Nepal Systems Administrator Phoenix Internet Phone: 602-385-0731 602-234-0917#112 http://www.phoenixinternet.net
On 1/7/2011 10:57 AM, Daniel-Constantin Mierla wrote:
Hello,
On 1/7/11 6:47 PM, Amit Nepal wrote:
Hi everyone, Again stuck at the dispatcher module.Do anyone happen to have a working config for kamailio with dispatcher list from mysql database ? if not can someone please guide me on this ?
Do i need to pass module parameters for the column and the table names ?
I have the following config :
loadmodule "dispatcher.so"
have you set the db_url parameter for dispatcher module? If not, then dispatcher does not connect to database.
Cheers, Daniel
if(uri=~"^sip:1[2-9][0-9]{9}@") { if(is_user_in("credentials","longdistance")) { #route(PSTN); #exit; ds_select_dst("1","8"); forward(); } else{ sl_send_reply("403","No Permissions for Long Distance calls"); exit; }; };
Hi, I placed an exit below the forward(); and it works now . I guess , the flow was going down for route[location] when exit was not there. Now the call is not hanging up even after cancel or bye is sent. Any ideas ?
Thank You Amit Nepal
On 1/7/2011 11:08 AM, Amit Nepal wrote:
s_select_dst("1","8"); forward();
Hello,
On 1/7/11 7:32 PM, Amit Nepal wrote:
Hi, I placed an exit below the forward(); and it works now . I guess , the flow was going down for route[location] when exit was not there. Now the call is not hanging up even after cancel or bye is sent. Any ideas ?
you are doing stateless forwarding, so you must relay the cancel where the invite was sent. Alternatively use t_relay() instead of forward() and then just use t_relay() for cancel as well, without going to dispatcher -- better look at default config file for kamailio 3.1.x to understand some of SIP routing logic.
There you see also how you should handle within dialog requests, such as bye.
Cheers, Daniel
Thank You Amit Nepal
On 1/7/2011 11:08 AM, Amit Nepal wrote:
s_select_dst("1","8"); forward();
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Thanks Daniel,
On 1/7/2011 12:06 PM, Daniel-Constantin Mierla wrote:
Hello,
On 1/7/11 7:32 PM, Amit Nepal wrote:
Hi, I placed an exit below the forward(); and it works now . I guess , the flow was going down for route[location] when exit was not there. Now the call is not hanging up even after cancel or bye is sent. Any ideas ?
you are doing stateless forwarding, so you must relay the cancel where the invite was sent. Alternatively use t_relay() instead of forward() and then just use t_relay() for cancel as well, without going to dispatcher -- better look at default config file for kamailio 3.1.x to understand some of SIP routing logic.
There you see also how you should handle within dialog requests, such as bye.
Cheers, Daniel
Thank You Amit Nepal
On 1/7/2011 11:08 AM, Amit Nepal wrote:
s_select_dst("1","8"); forward();
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users