Re: [OpenSIPS-Users] Send SIP MESSAGE
ok, super ! Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 12/20/2012 09:41 PM, Dragomir Haralambiev wrote: I see there is problem: I chnage this line: system("mkfifo -m 666 ".$mypath ); With this: system("mkfifo -m 0666 ".$mypath ); Now all is OK! 2012/12/20 Bogdan-Andrei Iancu: Hi, The problem is that your opensips runs as UNIX user 'foo' (let's say) which has no write permissions over the fifo reply file which is create by your php script (under user 'bar'). So, what you need to do is to be sure, from file permissions perspective, that opensips can write into the fifo created by your script. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 12/20/2012 12:30 AM, Dragomir Haralambiev wrote: Hi Bogdan, I rewrite send_im.php in Perl but I receive follow message: ERROR:mi_fifo:get_reply_filename: forbidden filename: webfifo_0.347865528267906 ERROR:mi_fifo:mi_fifo_server: trimming filename DBG:mi_fifo:mi_fifo_server: entered consume DBG:mi_fifo:mi_fifo_server: done consume Here is Perl script: #!/usr/bin/perl $web_contact="sip:dae...@mydomain.net"; $fifo="/tmp/opensips_fifo"; $signature="web_im_0.1.0"; #/* open reply fifo */ $myfilename="webfifo_".rand(); $mypath="/tmp/".$myfilename; $outbound_proxy="."; $sip_address = "555888"; $instant_message = "Hello opensips"; system("mkfifo -m 666 ".$mypath ); #/* construct FIFO command */ $fifo_cmd=":t_uac_dlg:".$myfilename."\n". "MESSAGE\n". $sip_address."\n". $outbound_proxy."\n". ".\n". "\"From: ".$web_contact."\r\n". "To: ".$sip_address."\r\n". "p-version: ".$signature."\r\n". "Contact: ".$web_contact."\r\n". "Content-Type: text/plain; charset=UTF-8\r\n". "\"\n". "\"".$instant_message."\"". "\n\n"; #/* create fifo for replies */ open (FIFO, "> $fifo"); print FIFO $fifo_cmd; close FIFO; unlink($mypath); 2012/12/19 Bogdan-Andrei Iancu Hi Dragomir, Use the MI command t_uac_dlg - http://www.opensips.org/html/docs/modules/1.8.x/tm.html#id294568 In the sources tree, there is an example in php : examples/web_im/send_im.php Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 12/19/2012 04:25 PM, Dragomir Haralambiev wrote: Hello, I need to send SIP MESSAGE to new registered user. How to do that using opensips 1.8.2? Best regards, PlayMen ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips 1.6.4-2 and dlg_end_dlg
Hello Yes the problem was there. In local route I had exec function to do dlg_end_dlg. Thank you very much. From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Thursday, December 20, 2012 10:40 AM To: dpa Cc: users@lists.opensips.org Subject: Re: [OpenSIPS-Users] opensips 1.6.4-2 and dlg_end_dlg yes, it is, as when you do dlg_end_dlg, opensips will generate and send 2 BYEs (one to caller, one to callee); and each time opensips sends a locally generated request, local route is triggered. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 12/20/2012 10:34 AM, dpa wrote: Bogdan, as I understand when I am doing fifo dlg_end_dlg through FIFO command from console the config of local route is activated? From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Thursday, December 20, 2012 9:57 AM To: dpa; users@lists.opensips.org Subject: Re: [OpenSIPS-Users] opensips 1.6.4-2 and dlg_end_dlg Hi, You are doing something wrong there - based on the script, it seems you do "dlg_end_dlg", which triggers sending BYE -> local route -> you do an exec there to do again dlg_end_dlg. So you try to do nested FIFO commands which does not work - FIFO engine will not read a new command until the current is not finished. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 12/20/2012 07:36 AM, dpa wrote: Hello Bogdan The gdb information in attachment. Unfortunately for some unknown reason I cannot see logs. I will check the problem and write later. From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Wednesday, December 19, 2012 11:17 AM To: dpa Cc: 'OpenSIPS users mailling list' Subject: Re: [OpenSIPS-Users] opensips 1.6.4-2 and dlg_end_dlg Try to set debug=4 and see the logs from the MI fifo process when running the dlg_end_dlg command. Also, try the get a backtrace from the MO FIFO proc after blocking. For that, before the dlg command, do "opensipsctl fifo ps" to find out the PID of the FIFO process. After running the dlg command and blocking, use "gdb /path/to/opensips FIFO_PID" and run "bt" inside - these will give some ideas on where the process blocked. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 12/19/2012 10:07 AM, dpa wrote: < So only the MI fifo part blocks?> As I understand, yes. "do you see any errors in the logs?" I see only "INFO:core:buf_init: initializing..." in log file "also, does it recover after some time (like minutes) ?" To speak the truth I didn`t wait recovering. I used Ctrl+Z to stop process of dlg_end_dlg and tried another fifo command. ps -A show me that opensipsctl process appears. From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Wednesday, December 19, 2012 9:44 AM To: dpa Cc: 'OpenSIPS users mailling list' Subject: Re: [OpenSIPS-Users] opensips 1.6.4-2 and dlg_end_dlg So only the MI fifo part blocks ? do you see any errors in the logs? also, does it recover after some time (like minutes) ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 12/19/2012 09:42 AM, dpa wrote: Hello Bogdan "it simply blocks and does not answer" I can make calls. But no fifo command available. From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] Sent: Wednesday, December 19, 2012 9:39 AM To: OpenSIPS users mailling list Cc: dpa Subject: Re: [OpenSIPS-Users] opensips 1.6.4-2 and dlg_end_dlg Hi, Does your opensips actually crashes when you run the dlg_end_dlg command ? or it simply blocks and does not answer ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 12/19/2012 07:37 AM, dpa wrote: Hello! I discovered a problem with using dlg_end_dlg fifo command. When I try to make it, dialog hasn't been ended and I cannot see in console that command has been finished success. In /tmp directory (where opensips_fifo is located) I found some new files "opensips_receiver_x", where x - some numbers. Ls -la shows that files were generated when I make dlg_end_dlg command. Moreover after this I cannot make any fifo command. After opensips restart I can make any fifo command but until dlg_end_dlg. There were no problems with it but recently I decided to make opensips generates core file if it crashes. I use this documentation http://www.opensips.org/Resources/DocsTsCrash. I used "-w" option and make changes in "/proc/sys/kernel/core_pattern". May be some problems with it? Thank you for any help! ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users <>___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Get user_agent after lookup
Thanks! Is normaly to have a lot of records but they must to have only one user_agent field. 2012/12/21 Duane Larson : > You can do an AVPop query > http://www.opensips.org/html/docs/modules/1.8.x/avpops.html#id292750 > > But what if there are multiple location records for the same user? > > > > > On Thu, Dec 20, 2012 at 3:54 PM, Dragomir Haralambiev > wrote: >> >> $ua - get user agent field from incoming SIP message. >> I need to know user agent who will receive the local call. >> The location table contain this information in user_agent field. >> I need to receive this field after run lookup("location","m") . >> >> >> 2012/12/20 Duane Larson : >> > http://www.opensips.org/Resources/DocsCoreVar18#toc92 >> > >> > Is that what you want? >> > >> > On Thu, Dec 20, 2012 at 2:59 PM, Dragomir Haralambiev >> > >> > wrote: >> >> >> >> Hello All, >> >> >> >> I rum save("location") wnen reseive REGISTER. >> >> Ho to get user_agent field from location table after run >> >> lookup("location","m") ? >> >> >> >> if ( lookup("location","m") ) { >> >> ? >> >> } >> >> >> >> Thanks in advance, >> >> PlayMen >> >> >> >> ___ >> >> Users mailing list >> >> Users@lists.opensips.org >> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > >> > >> > >> > >> > -- >> > -- >> > *--*--*--*--*--* >> > Duane >> > *--*--*--*--*--* >> > -- >> > >> > ___ >> > Users mailing list >> > Users@lists.opensips.org >> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > -- > -- > *--*--*--*--*--* > Duane > *--*--*--*--*--* > -- > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Get user_agent after lookup
You can do an AVPop query http://www.opensips.org/html/docs/modules/1.8.x/avpops.html#id292750 But what if there are multiple location records for the same user? On Thu, Dec 20, 2012 at 3:54 PM, Dragomir Haralambiev wrote: > $ua - get user agent field from incoming SIP message. > I need to know user agent who will receive the local call. > The location table contain this information in user_agent field. > I need to receive this field after run lookup("location","m") . > > > 2012/12/20 Duane Larson : > > http://www.opensips.org/Resources/DocsCoreVar18#toc92 > > > > Is that what you want? > > > > On Thu, Dec 20, 2012 at 2:59 PM, Dragomir Haralambiev < > goup2...@gmail.com> > > wrote: > >> > >> Hello All, > >> > >> I rum save("location") wnen reseive REGISTER. > >> Ho to get user_agent field from location table after run > >> lookup("location","m") ? > >> > >> if ( lookup("location","m") ) { > >> ? > >> } > >> > >> Thanks in advance, > >> PlayMen > >> > >> ___ > >> Users mailing list > >> Users@lists.opensips.org > >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > > > > > > -- > > -- > > *--*--*--*--*--* > > Duane > > *--*--*--*--*--* > > -- > > > > ___ > > Users mailing list > > Users@lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- -- *--*--*--*--*--* Duane *--*--*--*--*--* -- ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Get user_agent after lookup
$ua - get user agent field from incoming SIP message. I need to know user agent who will receive the local call. The location table contain this information in user_agent field. I need to receive this field after run lookup("location","m") . 2012/12/20 Duane Larson : > http://www.opensips.org/Resources/DocsCoreVar18#toc92 > > Is that what you want? > > On Thu, Dec 20, 2012 at 2:59 PM, Dragomir Haralambiev > wrote: >> >> Hello All, >> >> I rum save("location") wnen reseive REGISTER. >> Ho to get user_agent field from location table after run >> lookup("location","m") ? >> >> if ( lookup("location","m") ) { >> ? >> } >> >> Thanks in advance, >> PlayMen >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > -- > -- > *--*--*--*--*--* > Duane > *--*--*--*--*--* > -- > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Get user_agent after lookup
http://www.opensips.org/Resources/DocsCoreVar18#toc92 Is that what you want? On Thu, Dec 20, 2012 at 2:59 PM, Dragomir Haralambiev wrote: > Hello All, > > I rum save("location") wnen reseive REGISTER. > Ho to get user_agent field from location table after run > lookup("location","m") ? > > if ( lookup("location","m") ) { > ? > } > > Thanks in advance, > PlayMen > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- -- *--*--*--*--*--* Duane *--*--*--*--*--* -- ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Get user_agent after lookup
Hello All, I rum save("location") wnen reseive REGISTER. Ho to get user_agent field from location table after run lookup("location","m") ? if ( lookup("location","m") ) { ? } Thanks in advance, PlayMen ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] modules/db_mysql help
OpenSIPS doesn't need to connect to MySQL depending on what you want to do with OpenSIPS and the modules you want to use. For example... Look at the auth_db module http://www.opensips.org/html/docs/modules/1.8.x/auth_db.html If you are going to have users and passwords then you would need this module. And you would need to configure the db_url parameter to point to your database. On Thu, Dec 20, 2012 at 1:18 PM, Amit Mukherjee wrote: > Will you please elaborate how opensip connects with mysql.. And for what > purpose it uses it. > That connectivity,I need to deal with. > On Dec 20, 2012 10:31 PM, "Ovidiu Sas" wrote: > >> If you want to use mysql with opensips, then you don't need to do >> anything. >> If you want to use mysql without opensips, then you don't need the >> opensips mysql module. >> If you want to implement a connector to mysql, then you need to look >> on the mysql website. >> >> -ovidiu >> >> On Thu, Dec 20, 2012 at 11:56 AM, Amit Mukherjee >> wrote: >> > Well can any one assist me on the topic that, how opensip is using mysql >> > module.. >> > It is provided in "modules/db_mysql" directory.. >> > I need to understand mysql implantation by opensip.. >> > Any function link in a main folder or clue would be so helpful.. >> > Thanks in advance >> > >> > On Dec 18, 2012 2:44 PM, "Amit Mukherjee" wrote: >> >> >> >> i am need to use modules/db_mysql module for my project. >> >> can you please assist me the way to use that module as a seperate one. >> >> -- >> >> thanks >> >> >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -- -- *--*--*--*--*--* Duane *--*--*--*--*--* -- ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] RTP Proxy problem
Dear all, I had to use both flags IE and EI in rtpproxy_offer and rtpproxy_anwser. Now it's working fine. Thanks a lot On 18 December 2012 13:39, Patrick Wakano wrote: > I have configured a scenario very similar to yours and I had to use both > the flags 'e' and 'i' accordingly to indicate the direction of the > message when calling rtpproxy_offer() or rtpproxy_answer(). > I think, in your case, for INVITEs going to PSTN GW, you have to use the > flags "ei", and for 200OK of this dialog use flags "ie". For INVITEs coming > from the PSTN GW, you have to use flags "ie" and for 200Ok of this dialog > use flags "ei". > If that doesn't work try to change the 'e' and 'i' order. > > > > > On Fri, Dec 14, 2012 at 12:54 PM, Răzvan Crainea wrote: > >> Hi, Wesley! >> >> How exactly have you used the E/I flags? Have you tried to combine them >> rtpproxy("ie") or rtpproxy("ei")? Taking a look in the Rtpproxy code, it's >> kind of awkward how these flags are handled. >> >> Best regards, >> >> Razvan Crainea >> OpenSIPS Core Developerhttp://www.opensips-solutions.com >> >> On 12/14/2012 01:59 PM, Wesley Volcov wrote: >> >> Hey Guys, >> >> Some ideas? >> >> Regards, >> >> Wesley Volcov >> >> On 11 December 2012 11:35, Wesley Volcov wrote: >> >>> Dear all, >>> >>> I could fix the rtpproxy problem, it was a compilation problem. >>> >>> But now, I'm having a audio problem. >>> >>> Let me explain: >>> >>> I have a Opensips with 2 IP addres, a public one (200.0.0.1) and a >>> private one (10.0.0.1). >>> >>> The orignation endppint is in the private network (IP TEL), the PSTN >>> gateway is in the public network. >>> >>> I receive a call from the IP TEL and send it to the gateway. >>> >>> In the INVITE that the Opensips sends to the PSTN gateway, I see the >>> Public IP in the CIN parameter, but in the 200 OK that the Opensips sends >>> to the TEL IP I see the public IP to, and call goes to one way audio. >>> The Opensips should send the private IP in the 200OK to the IP TEL. >>> >>> RTPPROXY run command: /usr/local/bin/rtpproxy -l 200.0.0.1 10.0.0.1 -s >>> udp:127.0.0.1 7890 -F -m 1 -M 2 -d DBUG >>> >>> Opensips: >>> if (is_method("INVITE")){ >>> rtpproxy_offer("","200.0.0.1"); >>> } >>> >>> onreply_route [ONREPLY] { >>> >>> rtpproxy_answer("","10.0.0.1"); >>> } >>> >>> I've tried some parametes in the rtpproxy like FW, I, E, but I had the >>> same result. >>> >>> I'am missing some thing? >>> >>> Please, help me guys. >>> >>> Thanks a lot >>> >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -- Wesley Volcov Email: wesleyvol...@gmail.com Messenger: vol...@live.com Skype: wesley.volcov Mobile: +55 11 7999-7444 Website: http://volcov.blogspot.com ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] modules/db_mysql help
Will you please elaborate how opensip connects with mysql.. And for what purpose it uses it. That connectivity,I need to deal with. On Dec 20, 2012 10:31 PM, "Ovidiu Sas" wrote: > If you want to use mysql with opensips, then you don't need to do anything. > If you want to use mysql without opensips, then you don't need the > opensips mysql module. > If you want to implement a connector to mysql, then you need to look > on the mysql website. > > -ovidiu > > On Thu, Dec 20, 2012 at 11:56 AM, Amit Mukherjee > wrote: > > Well can any one assist me on the topic that, how opensip is using mysql > > module.. > > It is provided in "modules/db_mysql" directory.. > > I need to understand mysql implantation by opensip.. > > Any function link in a main folder or clue would be so helpful.. > > Thanks in advance > > > > On Dec 18, 2012 2:44 PM, "Amit Mukherjee" wrote: > >> > >> i am need to use modules/db_mysql module for my project. > >> can you please assist me the way to use that module as a seperate one. > >> -- > >> thanks > >> > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] modules/db_mysql help
If you want to use mysql with opensips, then you don't need to do anything. If you want to use mysql without opensips, then you don't need the opensips mysql module. If you want to implement a connector to mysql, then you need to look on the mysql website. -ovidiu On Thu, Dec 20, 2012 at 11:56 AM, Amit Mukherjee wrote: > Well can any one assist me on the topic that, how opensip is using mysql > module.. > It is provided in "modules/db_mysql" directory.. > I need to understand mysql implantation by opensip.. > Any function link in a main folder or clue would be so helpful.. > Thanks in advance > > On Dec 18, 2012 2:44 PM, "Amit Mukherjee" wrote: >> >> i am need to use modules/db_mysql module for my project. >> can you please assist me the way to use that module as a seperate one. >> -- >> thanks >> ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] modules/db_mysql help
Well can any one assist me on the topic that, how opensip is using mysql module.. It is provided in "modules/db_mysql" directory.. I need to understand mysql implantation by opensip.. Any function link in a main folder or clue would be so helpful.. Thanks in advance On Dec 18, 2012 2:44 PM, "Amit Mukherjee" wrote: > i am need to use modules/db_mysql module for my project. > can you please assist me the way to use that module as a seperate one. > -- > thanks > > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] TM module Minor branching
Minor correction: Its "183 - Session Progress" instead of 182 in first line. On Thu, Dec 20, 2012 at 12:56 PM, SamyGo wrote: > Hi, > > I'm using the minor_branch flag for my calls to inject 182 session > progress for the calls to carriers. > > http://www.opensips.org/html/docs/modules/1.7.x/tm.html#id293272 > > Though this particular param states that this parallel "Fake RBT" minor > branch will stay active until we get any positive response from other > branch(es) > > However, what I am trying to achieve from this is stop playing any "Fake > RBT" from this parallel branch as soon as I receive 183-Session Progress > from the caller side. > > My False Ringer server only hangs up when the caller answers the call. Can > this event happen in case of 183 rather 200? > > *My Solution:* What I do is set a branch flag on fake ringing and As soon > as I receive 1183 from caller side I forcefully "*t_cancel_b("o")*" > CANCLE other branches which definitely has some serious issues for > processing CANCEL, for which I had to use fifo to CANCLE manually. > > exec_msg("opensipsctl fifo t_uac_cancel $ci $cs"); > sl_send_reply("200","OK"); > > This thing works but somehow my senior manager don't agree with the above > two lines. > > Can anyone suggest any better approach or comment if I'm heading in the > right direction. > > Thanks, > Sammy > > > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users