[OpenSIPS-Users] via param : bad header field

2014-04-14 Thread Samuel Muller
Hello,

I'm so sorry to send this email, really boring.

With the last Opensips version compiled (lastest/src), on a Debian Sid :

Using dispatcher to send OPTIONS to the same opensips, to generate
automatic requests for my cachedb_redis tests (who crashes, new mail
for this especially) - ok, I know this is not the purpose of the
dispatcher module :


OPTIONS sip:192.168.0.34:5060 SIP/2.0
Via: SIP/2.0/UDP
192.168.0.34:5060;branch=z9hG4bK4321.fa1d7550.0
To: sip:192.168.0.34:5060
From: ;tag=2cfc24e1545fc83e633622233230dbf1-3d23
CSeq: 14 OPTIONS
Call-ID: 11e64b6f6d4f4853-30415@192.168.0.34
Max-Forwards: 70
Content-Length: 0
User-Agent: Red


  red[30411]: ERROR:core:parse_via_param: parse_via_param
  red[30411]: ERROR:core:parse_via:  
  red[30411]: ERROR:core:parse_via: parsed so far:
  red[30411]: ERROR:core:get_hdr_field: bad via
  red[30411]: INFO:core:parse_headers: bad header field
  red[30411]: ERROR:core:parse_msg: message=
  red[30411]: ERROR:core:receive_msg: Unable to parse msg received
from [192.168.0.34:5060]


If any idea, you're welcome.

Thanks a lot,


Samuel MULLER

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Rewrite Request uri

2014-04-14 Thread kostenftw
found out that prefix()  and rewritehost() was what i wanted



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Rewrite-Request-uri-tp7590729p7590731.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS send CANCEL to the call legs

2014-04-14 Thread Liviu Chircu

Hello all,

That's because those "latest" tarballs represent the current *release*, 
and nothing more.


However, since it seems to be a nice-to-have, Ra(zvan said he will also 
add a daily-updated link to an up-to-date source tarball of the latest 
release.


Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 04/14/2014 02:22 PM, samuel wrote:
I just downloaded GIT code and it has been solved. Why the latest 
tarball is from more than a month ago?


Thanks for all the help,
Samuel.


On 13 April 2014 06:40, H Yavari > wrote:


Hi Liviu,

I download the source from latest folder but this source is not
update. I used git to download the source and with this the
problem solved.
(I had so problems with 1.10.1 compilation and  but 1.11 is
better )

Thanks for your help Liviu.


Best Regards,
H.Yavari



Hello all,

I have tried to replicate this using the stock opensips.cfg, but
without much success. Both timeouts seem to trigger correctly...

So, in order to make progress with this, could you please provide
a SIP trace of this scenario? (using ngrep or tcpdump)

Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com  

On 04/10/2014 06:33 PM, samuel wrote:

___
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




___
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


[OpenSIPS-Users] Rewrite Request uri

2014-04-14 Thread Mike Claudi Pedersen
How do i rewrite the request uri, i know it says that rewriteuri(str); does
this, but i need to be able to do this with a variable something like:

$var(NEWURI) = "sip:+0245" + $tU + "@voip.mycompany.com";

and then rewrite the request with this ?

rewriteuri("$var(NEWURI)") isnt working, apparantly because im not allowed
to pass the result of a variable to this, like i can do in
xlog("L_INFO","var(NEWURI)")

any advice on how to achieve this would be greatly appreciated?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS send CANCEL to the call legs

2014-04-14 Thread samuel
I just downloaded GIT code and it has been solved. Why the latest tarball
is from more than a month ago?

Thanks for all the help,
Samuel.


On 13 April 2014 06:40, H Yavari  wrote:

> Hi Liviu,
>
> I download the source from latest folder but this source is not update. I
> used git to download the source and with this the problem solved.
> (I had so problems with 1.10.1 compilation and  but 1.11 is better )
>
> Thanks for your help Liviu.
>
> 
> Best Regards,
> H.Yavari
>
>   --
>
> Hello all,
>
> I have tried to replicate this using the stock opensips.cfg, but without
> much success. Both timeouts seem to trigger correctly...
>
> So, in order to make progress with this, could you please provide a SIP
> trace of this scenario? (using ngrep or tcpdump)
>
> Best regards,
>
> Liviu Chircu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 04/10/2014 06:33 PM, samuel wrote:
>
>   It does also happens to me with yesterday's  opensips 1.11.0beta-tls*. *I'm
> not using $T_fr_inv_timeout from config file explicitely.
>
>  Only got the following tm module parameters set:
>
> modparam("tm", "fr_timer", 5)
> modparam("tm", "fr_inv_timer", 30)
> modparam("tm", "restart_fr_on_each_reply", 0)
> modparam("tm", "onreply_avp_mode", 1)
>
>
>
> On 10 April 2014 13:06, Liviu Chircu  wrote:
>
>  Hi Yavari,
>
> What tm module parameters are you using? Are you setting the
> $T_fr_inv_timeout at all?
> Could you also please include a SIP trace, so I can successfully try to
> replicate this locally?
>
> Best regards,
>
> Liviu Chircu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
>   On 04/10/2014 07:29 AM, H Yavari wrote:
>
>  Hi Liviu,
> I did yesterday (4/9/2014).
>
>  Regards,
> H.Yavari
>
>   --
> Hello Yavari,
>
> When did you do the migration? There was a fix for this particular issue
> on Mar 21 [1]
>
> [1]: https://github.com/OpenSIPS/opensips/commit/ea6ab4d87ce03d2501
>
> Best regards,
>
> Liviu Chircu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 04/09/2014 12:21 PM, H Yavari wrote:
>
>  Hi all,
> I have this flow of calls :
> userA<-->asterisk1<->opensips<--->asterisk2<--->userB
>
>  in 1.9 every things was ok, but now after the migration to 1.11, when
> userA calls to userB, userB ringing one time and after that opensips send
> CANCEL to the caller and callee.
> I see in asterisk the CANCEL message that opensips sends, has this reason;
>  Reason: SIP;cause=480;text="NO_ANSWER"
>
>  I see in opensips logs :
>
>  DBG:tm:timer_routine: timer routine:1,tl=0x7fcf64891d20 next=(nil),
> timeout=672
> DBG:tm:cancel_branch: sending cancel...
> DBG:tm:set_timer: relative timeout is 50
> DBG:tm:insert_timer_unsafe: [4]: 0x7fcf64891db8 (67290)
> DBG:tm:insert_timer_unsafe: [0]: 0x7fcf64891de8 (682)
> DBG:tm:final_response_handler: Cancel sent out, sending 408
> (0x7fcf64891ad0)
>
>  I coudn't find any change log related to TM module or any timer. What is
> changed from 1.9 to 1.11 about timers?
> I changed the value of TM timers (like restart_fr_on_each_reply,... ) but
> they didn't help.
>  please help to me.
>  ( I'm so sorry for this migration)
>
>  Regards,
> H.Yavari
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ___
> 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
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Miliseconds precision for accounting module

2014-04-14 Thread Maciej Bylica
Hi Vlad,

Thanks for reply.
I am using OpenSIPS (1.9.1-notls (x86_64/linux)) so get_timestamp is
available there.
Let me check this.

Regards,
Mac


2014-04-14 10:57 GMT+02:00 Vlad Paiu :

>  Hello,
>
> Which OpenSIPS version are you using ?
> You could use get_timestamp [1] from the Core to get the current second
> and microsecond,
> and set the two variables at INVITE time, and set them as db_extra [2] .
>
> Then, at BYE time call again the get_timestamp function, store them in
> some AVPs and set those AVPs in [3]. This way you should get both the
> INVITE and BYE timestamps with microseconds precision in the CDR record.
>
> [1] http://www.opensips.org/Documentation/Script-CoreFunctions-1-10#toc18
> [2] http://www.opensips.org/html/docs/modules/1.10.x/acc.html#id295028
> [3] http://www.opensips.org/html/docs/modules/1.10.x/acc.html#id295056
>
> Best Regards,
>
> Vlad Paiu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 12.04.2014 23:44, Maciej Bylica wrote:
>
> Hello Ryan,
>
>  I am using dialog accounting, so each row is fully qualified cdr record,
> not only single transaction of a call.
> Couldn't i just use two extra db variables which will gather the $time
> inside INVITE {} and BYE {}?
>
>  Thanks,
> Mac
>
>
> 2014-04-12 6:39 GMT+02:00 Ryan Mitchell :
>
>> Hello Mac,
>>
>>  Each row in the acc table is for a transaction.  To make a proper CDR
>> out of the data, you have to combine rows to find the start and end of the
>> call.  That can be harder than it sounds, especially with forking
>> (parallel, or the more common case of serial forking when you are LCR
>> routing or simply sending calls to alt destinations after a timeout).  I
>> wrote scripts that implement a simple dialog state machine to make sense of
>> all the distinct legs of a call, though there should be an easier way with
>> the auto-cdr / multi call-legs accounting feature of the acc module (anyone
>> comment on this please?).
>>
>>  The time field in the acc table will be the timestamp of the response
>> for the given transaction.  If you assign an extra field for another
>> timestamp, it will depend on where you assign that var in your script.  In
>> my case I assign it in the main routing section so the timestamp indicates
>> the start of the transaction.
>>
>>  best regards,
>> Ryan
>>
>>
>>
>> On Fri, Apr 11, 2014 at 10:06 AM, Maciej Bylica  wrote:
>>
>>> Ryan,
>>>
>>>  One more question.
>>> Currently i have some db extra attrs setup. My acc table looks like
>>> following:
>>>
>>> ++--+--+-+-++
>>>
>>> | Field  | Type | Null | Key | Default | Extra  |
>>>
>>> ++--+--+-+-++
>>>
>>> | id | int(10) unsigned | NO   | PRI | NULL| auto_increment |
>>>
>>> | method | char(16) | NO   | | ||
>>>
>>> | from_tag   | char(64) | NO   | | ||
>>>
>>> | to_tag | char(64) | NO   | | ||
>>>
>>> | callid | char(64) | NO   | MUL | ||
>>>
>>> | sip_code   | char(3)  | NO   | | ||
>>>
>>> | sip_reason | char(32) | NO   | | ||
>>>
>>> | time   | datetime | NO   | | NULL||
>>>
>>> | duration   | int(11) unsigned | NO   | | 0   ||
>>>
>>> | setuptime  | int(11) unsigned | NO   | | 0   ||
>>>
>>> | SourceAddr | char(30) | NO   | | NULL||
>>>
>>> | DestAddr   | char(30) | NO   | | NULL||
>>>
>>> | Anum   | char(30) | NO   | | NULL||
>>>
>>> | Bnum_rU| char(30) | NO   | | NULL||
>>>
>>> | Bnum_tU| char(30) | NO   | | NULL||
>>>
>>> | created| datetime | YES  | | NULL||
>>>
>>> ++--+--+-+-++
>>>
>>>
>>>  modparam("acc", "db_extra", "SourceAddr=$si; DestAddr=$rd; Anum=$fU;
>>> Bnum_rU=$rU; Bnum_tU=$tU")
>>>
>>>
>>>  Now using additional data like $time will give me the exact moment the
>>> call is ended, nothing more, am i right?
>>>
>>> To have detailed call duration i need to know exact answer and
>>> disconnect timestamps.
>>>
>>>
>>>  Btw: i am using OpenSIPS (1.9.1-notls (x86_64/linux))
>>>
>>>
>>>  Thanks,
>>>
>>> Mac
>>>
>>>
>>>  2014-04-10 22:03 GMT+02:00 Ryan Mitchell :
>>>
 Using db_extra to stuff custom data into your acc table, use the $time
 var with a format such as "%s.%N" or similar.

  Or, as you suggested, do it on the database level with a trigger or
 auto-update column.



  On Thu, Apr 10, 2014 at 10:01 AM, Maciej Bylica wrote:

>   Hello
>
>  I just wa

Re: [OpenSIPS-Users] Issue in VIA Header

2014-04-14 Thread B. Buitenhuis
Also with the latest master branch I've got this problem.
After running opensips deamon for an hour the problems seems te be solved.

Is this a known bug?

Van: MT mailto:bern...@buitenhuis.nu>>
Beantwoorden - Aan: OpenSIPS users mailling list 
mailto:users@lists.opensips.org>>
Datum: zaterdag 12 april 2014 00:09
Aan: "users@lists.opensips.org" 
mailto:users@lists.opensips.org>>
Onderwerp: [OpenSIPS-Users] Issue in VIA Header

Hello,

I'm facing the same problem as:
https://github.com/OpenSIPS/opensips/issues/190

When I look at a wireshark, I see the following in the VIA header:
Via: SIP/2.0/UDP 
\000\000\000\000\000\000\000\000\000\000\000\000\000:5060;branch=z9hG4bK9414.22d66c76.0

As far as I can see it's only with the CANCEL method, in the config it looks 
like:

if (method=="CANCEL")
{
set_advertised_address(185.XX.XX.XX);

route("PROCESS_RTP_PROXY");
unforce_rtp_proxy();
if (t_check_trans())
t_relay();
exit;
}


I've tested it with 1.8.3 and 1.10.1

Does anyone has this same problem?


Regards,

Bernard Buitenhuis

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] redirection

2014-04-14 Thread Mike Claudi Pedersen
Hi im currently trying to use opensips to redirect calls to fixed
locations, how do i rewrite the TO-part of the sip header. im trying to
use

rewriteuri("sip:61433...@voip.mycompany.com")

what do i use to make sure this is used as the TO in the sip header.

i tried to use

sl_send_reply("302","redirected")

but this result in the rewritten uri being saved in the contact part of the
header, and this is not what i want.

any help would be appreciated
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Miliseconds precision for accounting module

2014-04-14 Thread Vlad Paiu

Hello,

Which OpenSIPS version are you using ?
You could use get_timestamp [1] from the Core to get the current second 
and microsecond,

and set the two variables at INVITE time, and set them as db_extra [2] .

Then, at BYE time call again the get_timestamp function, store them in 
some AVPs and set those AVPs in [3]. This way you should get both the 
INVITE and BYE timestamps with microseconds precision in the CDR record.


[1] http://www.opensips.org/Documentation/Script-CoreFunctions-1-10#toc18
[2] http://www.opensips.org/html/docs/modules/1.10.x/acc.html#id295028
[3] http://www.opensips.org/html/docs/modules/1.10.x/acc.html#id295056

Best Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com

On 12.04.2014 23:44, Maciej Bylica wrote:

Hello Ryan,

I am using dialog accounting, so each row is fully qualified cdr 
record, not only single transaction of a call.
Couldn't i just use two extra db variables which will gather the $time 
inside INVITE {} and BYE {}?


Thanks,
Mac


2014-04-12 6:39 GMT+02:00 Ryan Mitchell >:


Hello Mac,

Each row in the acc table is for a transaction.  To make a proper
CDR out of the data, you have to combine rows to find the start
and end of the call.  That can be harder than it sounds,
especially with forking (parallel, or the more common case of
serial forking when you are LCR routing or simply sending calls to
alt destinations after a timeout).  I wrote scripts that implement
a simple dialog state machine to make sense of all the distinct
legs of a call, though there should be an easier way with the
auto-cdr / multi call-legs accounting feature of the acc module
(anyone comment on this please?).

The time field in the acc table will be the timestamp of the
response for the given transaction.  If you assign an extra field
for another timestamp, it will depend on where you assign that var
in your script.  In my case I assign it in the main routing
section so the timestamp indicates the start of the transaction.

best regards,
Ryan



On Fri, Apr 11, 2014 at 10:06 AM, Maciej Bylica mailto:mb...@gazeta.pl>> wrote:

Ryan,

One more question.
Currently i have some db extra attrs setup. My acc table looks
like following:


++--+--+-+-++

| Field  | Type | Null | Key | Default |
Extra  |


++--+--+-+-++

| id | int(10) unsigned | NO   | PRI | NULL|
auto_increment |

| method | char(16) | NO   | | | 
  |


| from_tag   | char(64) | NO   | | | 
  |


| to_tag | char(64) | NO   | | | 
  |


| callid | char(64) | NO   | MUL | | 
  |


| sip_code   | char(3)  | NO   | | | 
  |


| sip_reason | char(32) | NO   | | | 
  |


| time   | datetime | NO   | | NULL| 
  |


| duration   | int(11) unsigned | NO   | | 0   | 
  |


| setuptime  | int(11) unsigned | NO   | | 0   | 
  |


| SourceAddr | char(30) | NO   | | NULL| 
  |


| DestAddr   | char(30) | NO   | | NULL| 
  |


| Anum   | char(30) | NO   | | NULL| 
  |


| Bnum_rU| char(30) | NO   | | NULL| 
  |


| Bnum_tU| char(30) | NO   | | NULL| 
  |


| created| datetime | YES  | | NULL| 
  |



++--+--+-+-++


modparam("acc", "db_extra", "SourceAddr=$si; DestAddr=$rd;
Anum=$fU; Bnum_rU=$rU; Bnum_tU=$tU")


Now using additional data like $time will give me the exact
moment the call is ended, nothing more, am i right?

To have detailed call duration i need to know exact answer and
disconnect timestamps.


Btw: i am using OpenSIPS (1.9.1-notls (x86_64/linux))


Thanks,

Mac



2014-04-10 22:03 GMT+02:00 Ryan Mitchell mailto:r...@tcl.net>>:

Using db_extra to stuff custom data into your acc table,
use the $time var with a format such as "%s.%N" or similar.

Or, as you suggested, do it on the database level with a
trigger or auto-update column.



On Thu, Apr 10, 2014 at 10:01 AM, Maciej Bylica
mailto:mb...@gazeta.pl>> wrote:

Hello

   

Re: [OpenSIPS-Users] UDP vs TCP/TLS

2014-04-14 Thread Răzvan Crainea

Hi, Leo!

This doesn't seem to be related to OpenSIPS. My suggestion is to trace 
this at the network layer and check if and why the TCP/TLS connection is 
taking 15-20 seconds.


Best regards,

Razvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 04/14/2014 01:17 AM, leo wrote:

Hello:

I'm using opensips 1.10 in a simple single domain scenario.
The UA are normally NATted.
The problem i'm having is that the call establishment using UDP is 1 or 2
sec while when i use TCP or TLS the call is taking 15-20 sec.
Is this normal? How could i have the same performance for TCP/TLS like with
UDP?
Thanks a lot.

Leo.



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/UDP-vs-TCP-TLS-tp7590719.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
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] SDP change issue

2014-04-14 Thread Răzvan Crainea

Hi, Chen-Che!

No, OpenSIPS does not have any built-in mechanism for this. As far as I 
understand, you sometimes need to rewrite the IP OpenSIPS advertises in 
the SDP. You can specify the new IP in the second parameter of the 
rtpproxy_offer/answer() function.


Best regards,

Razvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 04/14/2014 09:49 AM, microx wrote:

Dear all,

I'm encountering an issue as follows. In the system, there are one SIP
server (OpenSIPS) and multiple RTP proxies. Each RTP proxy serves for one
region and the users in that region will use the corresponding RTP proxy for
media streaming relay. To achieve this, I make the users in the same region
have the same prefix in their SIP numbers and create a mapping between the
prefix and the RTP proxy. With such setup, users will be served by a close
RTP proxy and the latency would be reduced. By setting the RTP proxy set
(id) to the corresponding prefix, such a scenario can be realized. However,
in the system, the RTP proxies listen on private interfaces for security
concern (an RTP proxy and some other applications run on a host behind NAT).
Thus, I need to rewrite the SDP connection IP with the corresponding NAT's
public IP for the RTP proxy. To do this, it seems somewhat complicated to do
configuration. I would like to know whether OpenSIPS has any built-in
mechanism for this issue (prefix + RTP proxy + NAT public IP). Many thanks
for any comment.

Best wishes,
Chen-Che



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/SDP-change-issue-tp7590721.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
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