Hi, I'm having some doubts on how to use/do some things with dispatcher module and failure route. I'll try to explain my problem. On my main route block I select the destination (using ds_select_dst) to where I want to send the message, and indicate that responses should pass through the failure_route, I also add a header with some things that are needed by the next proxy. On the failure route when I get 408 Time Out I mark the previous destination and select the next destination. until here everything goes fine. After this I want to change the message that I'm going to send to next proxy, for this I need to remove the header that I inserted previously on the main route block and access the destination URI that the ds_next_dst updates. My first doubt is that when I print the destination URI it has the previous destination ( the one used in the main route block) but when it relay's the message it goes to the right destination (the one returned from ds_next_dst), Is there any reason for this ? I'm using $du to access it, is this wrong? My second doubt is, what sip message do I have access to in the failure route (the one I received or the one I sent out)? I ask this because I try to remove the header I inserted in the main route block and it does not remove anything but when I relay the message the header I tried to remove goes on the message.
Thanks in advance, José Carlos Silva
Hi, I want configurate the openser to use Jabber module. but I don't undertand this params
modparam("jabber","db_url","mysql://user:password@127.0.0.1/sip_jab") modparam("jabber","jaddress","jabber.server.com") modparam("jabber","jport",5222) modparam("jabber","workers",2) modparam("jabber","max_jobs",10) modparam("jabber","cache_time",200) modparam("jabber","delay_time",60) modparam("jabber","jdomain","jabber.server.com=*") modparam("jabber","aliases","4;aim.jabber.server.com;icq.jabber.server.com;msn.jabber.server.com=%;yahoo.jabber.server.com;")
I don't have DNS name server.com I only have public IP addess. I change: jabber.server.com for jabber.127.0.0.1 this is OK?
the same to aim.jabber.server.com icq.jabber.server.com msn.jabber.server.com yahoo.jabber.server.com
Hello,
On 07/21/06 18:00, Javier Ramirez wrote:
Hi, I want configurate the openser to use Jabber module. but I don't undertand this params
modparam("jabber","db_url","mysql://user:password@127.0.0.1/sip_jab") modparam("jabber","jaddress","jabber.server.com") modparam("jabber","jport",5222) modparam("jabber","workers",2) modparam("jabber","max_jobs",10) modparam("jabber","cache_time",200) modparam("jabber","delay_time",60) modparam("jabber","jdomain","jabber.server.com=*") modparam("jabber","aliases","4;aim.jabber.server.com;icq.jabber.server.com;msn.jabber.server.com=%;yahoo.jabber.server.com;")
I don't have DNS name server.com
server.com is just as example. You can replace it with your local domain. If you do not use domain names it is harder to decide for which network the message is intended to.
Cheers, Daniel
I only have public IP addess. I change: jabber.server.com for jabber.127.0.0.1 this is OK?
the same to aim.jabber.server.com icq.jabber.server.com msn.jabber.server.com yahoo.jabber.server.com
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
can I add to /etc/host this
aim.jabber.server.com 127.0.0.1 msn.jabber.server.com 127.0.0.1 icq.jabber.server.com 127.0.0.1 yahoo.jabber.server.com 127.0.0.1 jabber.server.com 127.0.0.1
----- Original Message ----- From: Daniel-Constantin Mierla To: Javier Ramirez Cc: users@openser.org Sent: Monday, July 24, 2006 4:35 AM Subject: Re: [Users] Jabber
Hello,
On 07/21/06 18:00, Javier Ramirez wrote:
Hi, I want configurate the openser to use Jabber module. but I don't undertand this params
modparam("jabber","db_url","mysql://user:password@127.0.0.1/sip_jab") modparam("jabber","jaddress","jabber.server.com") modparam("jabber","jport",5222) modparam("jabber","workers",2) modparam("jabber","max_jobs",10) modparam("jabber","cache_time",200) modparam("jabber","delay_time",60) modparam("jabber","jdomain","jabber.server.com=*") modparam("jabber","aliases","4;aim.jabber.server.com;icq.jabber.server.com;msn.jabber.server.com=%;yahoo.jabber.server.com;")
I don't have DNS name server.com
server.com is just as example. You can replace it with your local domain. If you do not use domain names it is harder to decide for which network the message is intended to.
Cheers, Daniel
I only have public IP addess. I change: jabber.server.com for jabber.127.0.0.1 this is OK?
the same to aim.jabber.server.com icq.jabber.server.com msn.jabber.server.com yahoo.jabber.server.com
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
__________ NOD32 1.1672 (20060721) Information __________
This message was checked by NOD32 antivirus system. http://www.eset.com
why die the openser ? what is wrong ?
I add this: in /etc/host 127.0.0.1 aim.jabber.server.com 127.0.0.1 msn.jabber.server.com 127.0.0.1 icq.jabber.server.com 127.0.0.1 yahoo.jabber.server.com 127.0.0.1 jabber.server.com 127.0.0.1 server.com
and run: openser -f jabber2.cfg -E -dddddddddddddddd
0(4710) read 193612823 from /dev/urandom 0(4710) seeding PRNG with 1347370384 0(4710) test random number 149130666 0(4710) WARNING: fix_socket_list: could not rev. resolve 192.168.0.4 0(4710) WARNING: fix_socket_list: could not rev. resolve 192.168.0.4 Listening on udp: 127.0.0.1 [127.0.0.1]:5060 udp: 192.168.0.4 [192.168.0.4]:5060 tcp: 127.0.0.1 [127.0.0.1]:5060 tcp: 192.168.0.4 [192.168.0.4]:5060 Aliases: tcp: localhost:5060 udp: localhost:5060 *: 192.168.0.4:*
print - initializing textops - initializing stateless - initializing
and openser die.....
this is my configuration file:
# # configuration for Jabber module testing # (sample config file using the module with presence support) # # $ID: daniel $ #
debug=2 # debug level (cmd line: -dddddddddd) fork=yes # (cmd. line: -D) log_stderror=yes # (cmd line: -E)
children=2 check_via=no # (cmd. line: -v) dns=off # (cmd. line: -r) rev_dns=off # (cmd. line: -R) port=5060 alias="192.168.0.4"
# ------------------ module loading ----------------------------------
#modules loadmodule "modules/print/print.so" loadmodule "modules/textops/textops.so" loadmodule "modules/tm/tm.so" loadmodule "modules/maxfwd/maxfwd.so" loadmodule "modules/sl/sl.so" loadmodule "modules/mysql/mysql.so" loadmodule "modules/jabber/jabber.so" loadmodule "modules/registrar/registrar.so" loadmodule "modules/usrloc/usrloc.so" loadmodule "modules/pa/pa.so"
# ----------------- setting module-specific parameters ---------------
# -- registrar params --
modparam("registrar", "default_expires", 120) #modparam("registrar", "use_domain", 1)
# -- usrloc params -- #modparam("usrloc", "use_domain", 1) modparam("usrloc", "db_mode", 0)
# -- jabber params --
modparam("jabber","db_url","mysql://root@127.0.0.1/sip_jab") modparam("jabber","jaddress","jabber.server.com") modparam("jabber","jport",5222) modparam("jabber","workers",2) modparam("jabber","max_jobs",10) modparam("jabber","cache_time",200) modparam("jabber","delay_time",60) modparam("jabber","jdomain","jabber.server.com=*") modparam("jabber","aliases","4;aim.jabber.server.com;icq.jabber.server.com;msn.jabber.server.com=%;yahoo.jabber.server.com;")
route{
#if ( !mf_process_maxfwd_header("10") ) #{ # sl_send_reply("483","To Many Hops"); # drop(); #};
if (uri=~"[@:]sip.server.com([;:].*)*") { # for testing purposes, simply okay all REGISTERs if (method=="REGISTER") { if (t_newtran()) { save("location"); log("REGISTER received -> reply okay\n"); }; if(search("egistration")) { log("XJAB: Going ONline in Jabber network!!!\n"); if(jab_go_online()) { sl_send_reply("200", "Accepted"); } else { sl_send_reply("404","Not found"); }; } else { log("XJAB: Going OFFline in Jabber network!!!\n"); if(jab_go_offline()) { sl_send_reply("200", "Accepted"); } else { sl_send_reply("404","Not found"); }; }; break; }; if (method=="SUBSCRIBE") { if (t_newtran()) { handle_subscription("registrar"); }; break; }; if(!lookup("location")) { sl_send_reply("404","Not found"); break; }; };
if ((search("To:.*@icq.jabber.server.com")) || (search("To:.*@jabber.server.com")) || (search("To:.*@msn.jabber.server.com")) || (search("To:.*@yahoo.jabber.server.com"))) { if (! t_newtran()) { sl_reply_error(); break; }; if (method=="MESSAGE") { log("MESSAGE received -> manage it with XJAB\n"); if(search("\n:on")) { if (jab_go_online()) { sl_send_reply("200","Accepted"); }else{ sl_send_reply("404","Not found"); }; break; }; if(search("\n:off")) { if (jab_go_offline()) { sl_send_reply("200","Accepted"); }else{ sl_send_reply("404","Not found"); }; break; };
if(search("\n:join")) { if (jab_join_jconf()) { sl_send_reply("200","Accepted"); }else{ sl_send_reply("404","Not Found"); }; break; };
if(search("\n:exit")) { if (jab_exit_jconf()) { sl_send_reply("200","Accepted"); }else{ sl_send_reply("404","Not Found"); }; break; };
if (jab_send_message()) { sl_send_reply("200","Accepted"); }else{ sl_send_reply("503","Service Unavailable"); }; break; }; if (method=="SUBSCRIBE") { handle_subscription("jabber"); break; }; log("NON_Message request received for JABBER gateway->dropt!\n"); sl_send_reply("202","Accepted"); break; }; if (!t_relay()) { sl_reply_error(); };
#forward(uri:host,uri:port); }
Hi Jose,
you have a transaction with multiple branches. If you want to add something specific per branch, use the branch route (you need to arm it before t_relay).
regards, bogdan
Jose Silva wrote:
Hi, I'm having some doubts on how to use/do some things with dispatcher module and failure route. I'll try to explain my problem. On my main route block I select the destination (using ds_select_dst) to where I want to send the message, and indicate that responses should pass through the failure_route, I also add a header with some things that are needed by the next proxy. On the failure route when I get 408 Time Out I mark the previous destination and select the next destination. until here everything goes fine. After this I want to change the message that I'm going to send to next proxy, for this I need to remove the header that I inserted previously on the main route block and access the destination URI that the ds_next_dst updates. My first doubt is that when I print the destination URI it has the previous destination ( the one used in the main route block) but when it relay's the message it goes to the right destination (the one returned from ds_next_dst), Is there any reason for this ? I'm using $du to access it, is this wrong? My second doubt is, what sip message do I have access to in the failure route (the one I received or the one I sent out)? I ask this because I try to remove the header I inserted in the main route block and it does not remove anything but when I relay the message the header I tried to remove goes on the message.
Thanks in advance, José Carlos Silva
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi, I am using the branch_route but I still have a problem... The message I have access to has a lump, and what I want to change is the content of that lump. Is there a way I can do this, or is there a way to remove all the lumps via script and add the content that I want afterwards?
Thanks, Jose Silva
2006/8/22, Bogdan-Andrei Iancu bogdan@voice-system.ro:
Hi Jose,
you have a transaction with multiple branches. If you want to add something specific per branch, use the branch route (you need to arm it before t_relay).
regards, bogdan
Jose Silva wrote:
Hi, I'm having some doubts on how to use/do some things with dispatcher module and failure route. I'll try to explain my problem. On my main route block I select the destination (using ds_select_dst) to where I want to send the message, and indicate that responses should pass through the failure_route, I also add a header with some things that are needed by the next proxy. On the failure route when I get 408 Time Out I mark the previous destination and select the next destination. until here everything goes fine. After this I want to change the message that I'm going to send to next proxy, for this I need to remove the header that I inserted previously on the main route block and access the destination URI that the ds_next_dst updates. My first doubt is that when I print the destination URI it has the previous destination ( the one used in the main route block) but when it relay's the message it goes to the right destination (the one returned from ds_next_dst), Is there any reason for this ? I'm using $du to access it, is this wrong? My second doubt is, what sip message do I have access to in the failure route (the one I received or the one I sent out)? I ask this because I try to remove the header I inserted in the main route block and it does not remove anything but when I relay the message the header I tried to remove goes on the message.
Thanks in advance, José Carlos Silva
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi Jose,
no, there is noway to remove or modify a lump already added (at least not from script). You can to take care not to add prior to branch_route some lumps you might need to remove in branch_route!.
regards, bogdan
Jose Silva wrote:
Hi, I am using the branch_route but I still have a problem... The message I have access to has a lump, and what I want to change is the content of that lump. Is there a way I can do this, or is there a way to remove all the lumps via script and add the content that I want afterwards?
Thanks, Jose Silva
2006/8/22, Bogdan-Andrei Iancu bogdan@voice-system.ro:
Hi Jose,
you have a transaction with multiple branches. If you want to add something specific per branch, use the branch route (you need to arm it before t_relay).
regards, bogdan
Jose Silva wrote:
Hi, I'm having some doubts on how to use/do some things with dispatcher module and failure route. I'll try to explain my problem. On my main route block I select the destination (using ds_select_dst) to where I want to send the message, and indicate that responses should pass through the failure_route, I also add a header with some things that are needed by the next proxy. On the failure route when I get 408 Time Out I mark the previous destination and select the next destination. until here everything goes fine. After this I want to change the message that I'm going to send to next proxy, for this I need to remove the header that I inserted previously on the main route block and access the destination URI that the ds_next_dst updates. My first doubt is that when I print the destination URI it has the previous destination ( the one used in the main route block) but when it relay's the message it goes to the right destination (the one returned from ds_next_dst), Is there any reason for this ? I'm using $du to access it, is this wrong? My second doubt is, what sip message do I have access to in the failure route (the one I received or the one I sent out)? I ask this because I try to remove the header I inserted in the main route block and it does not remove anything but when I relay the message the header I tried to remove goes on the message.
Thanks in advance, José Carlos Silva
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users