Nik Pakar | 19 Dec 12:44 2014
Picon

Multiple parameters for a custom osip field

Hello all,

I need to add a custom record-route header to an outgoing call with multiple parameters. If i separate it with ; it takes as a breaker in regexroute.

How to avoid this achieve some thing like below using osip_Record-Route from regex ?

I.e. Record-Route: <sip:192.168.3.34;lr=on;ftag=1563393420;did=f6.1612>

Thanks for any hint.

Best Rgds
Nik
Mark Chehovsky | 18 Dec 13:04 2014

SIP-T ISUP issue

hello all,
 
I have latest Yate installed from SVN
 
When i setup isup=yes i get extra "\r\n" in SIP message and my peer(Sonus) complains about this
part of message looks like this (captured with ngrep)
 
Content-Length: 423.
.
.
--400726184_1659700256.

 
but RFC2046 tells us to have just one "linebreak" at this place
 
so we need to have this way :
 
Content-Length: 423.
.
--400726184_1659700256.

 
after this - all works ok, i tried fast and changed message.cpp making
s << "Content-Length: " << body->getBody().length() << "\r\n\r\n";
to be

s << "Content-Length: " << body->getBody().length() << "\r\n";

and i have one linebreak & ISUP call works,but this (as expected) destroys normal SIP operation(no linebreak and packet is malformed/unusable)

Could somebody who knows the place where fix can be applied to tell me where this place is? :)

Thanks a lot in advance

Mark

 

 

 

 

 

 

 

 

 



Это сообщение свободно от вирусов и вредоносного ПО благодаря avast! Antivirus защита активна.


Bipin Patel | 18 Dec 11:19 2014

yate on raspberry pi (debian) routing issue

hi,

i managed to get yate from sources and compiled it on raspberry pi, thanks to the excellent guide, but there seems to be one small issue. I want to route all calls from a single regfile account to a specific line specified in accfile and my regexroute entry works fine when used on a windows machine using the below entry:

${username}^tom$=;line=tomgw;caller=1234

but when i use the same on raspberry pi i keep getting errors "call cant find target" where as yate has registered to remote gateway successfully and client also registered to yate.

when i use the below entry then it seems to work but its not what i want to achieve:

^.*$=line/\0;line=tomgw

can any1 guide me whats wrong in the regexroute entry that seems to work on a windows machine but not on linux


--
body { font-family: Verdana, sans-serif; font-size: 0.8em; color:#484848; } h1, h2, h3 { font-family: "Trebuchet MS", Verdana, sans-serif; margin:0in; margin-bottom:.0001pt; } p.footr { font-family: "Trebuchet MS", Verdana, sans-serif; margin:0in; margin-bottom:.0001pt; } h1 { font-size: 1.2em; } h2, h3 { font-size: 1.1em; } a, a:link, a:visited { color: #2A5685;} a:hover, a:active { color: #c61a1a; } a.wiki-anchor { display: none; } hr { width: 100%; height: 1px; background: #ccc; border: 0; } Regards,
Bipin


Arthur Taylor | 9 Dec 12:23 2014
Picon

Rare Race Condition in RefObject::ref()

Firstly, Hello, this is my first post to this mailing list.

Secondly, although rare, there exits a race condition in 
RefObject::ref() when atomic operations are enabled. The desired 
behaviour of the function is increment it the refcount if it is greater 
than zero atomically. Currently the function, when using atomics 
operations is:
(pseudo code)

if atomic(++refcount) > 1:
	return true
atomic(--refcount)
return false

Unfortunately while two components are atomic, together they are not, 
and it is possible for the code to be pre-empted between the increment 
and decrement. I have written a test program which does this by 
continually ref()'ing and if the ref() succeeds deref()'ing a dead 
(refcount == 0) object. The result is that an object with a ref-count 
of zero will be incremented twice by two inter-spliced ref() calls, one 
of which fails, the other succeeding. When the corresponding deref() 
for the succeeding call is executed the object will be destroyed again, 
causing a seg-fault.

Admittedly, this is only an issue with repeated attempts by different 
threads to ref() a destroyed object, a behaviour which is already a 
programing bug. To that end, I'm not sure how much point there is to 
decrementing the refcount and returning false, as surely it would be 
better to abort or print a loud warning.

However, there is a fix to make the ref() function atomic, using the 
atomic-compare-exchange-loop pattern (which is how gcc implements some 
of the __sync... functions on x86 anyways).
(pseudo code)

int i := refcount
while i > 0:
	int j
	int k := i + 1
	atomicly:
		j := refcount
		if refcount == i:
			refcount := k
	if j == i:
		return true
	i := j
return false

As a patch:

diff --git a/engine/TelEngine.cpp b/engine/TelEngine.cpp
index 185803b..ccd3e12 100644
--- a/engine/TelEngine.cpp
+++ b/engine/TelEngine.cpp
 <at>  <at>  -933,14 +933,15  <at>  <at>  bool RefObject::ref()
 {
 #ifdef ATOMIC_OPS
 #ifdef _WINDOWS
-    if (InterlockedIncrement((LONG*)&m_refcount) > 1)
-	return true;
-    InterlockedDecrement((LONG*)&m_refcount);
+    for (LONG i = m_refcount, j; i > 0; i = j) {
+	j = InterlockedCompareExchange((LONG*)&m_refcount, i + 1, i);
 #else
-    if (__sync_add_and_fetch(&m_refcount,1) > 1)
-	return true;
-    __sync_sub_and_fetch(&m_refcount,1);
+    for (int i = m_refcount, j; i > 0; i = j) {
+	j = __sync_val_compare_and_swap(&m_refcount, i, i + 1);
 #endif
+	if (i == j)
+	    return true;
+    }
 #else
     Lock lock(m_mutex);
     if (m_refcount > 0) {

Igor Projoga | 9 Dec 10:57 2014
Picon

302 and call.fork

Hello, I need a help,

when I make a fork in call.route and endpoint send to me 302(moved temporarily), nothing happens.
If call.route return without fork, all right work correct.
Module pbx.assist enabled.
pbxassist.conf
enabled=yes
default=yes
dtmfpass=yes
diversion=yes


How do I do that redirect work when I use call.fork?

thank you
Dragon | 7 Dec 13:12 2014

yate to pstn

hi,
   I want to YATE as call center,but connect PSTN is analog/digital line  ,no ISDN,such as sangoma card A200,A400.  which one module is analog /digital interface to PSTN? please give me a image of TOPO,thanks .
robben.
Dragon | 6 Dec 16:15 2014

转发:analog to PSTN




------------------ 原始邮件 ------------------
发件人: "我自己的邮箱";<23560450 <at> qq.com>;
发送时间: 2014年12月6日(星期六) 晚上11:10
收件人: "yate-info"<yate-info <at> voip.null.ro>; "yate-faq"<yate-faq <at> voip.null.ro>;
主题: analog to PSTN

hi,
   I want to YATE as call center,but connect PSTN is analog/digital line  ,no ISDN,such as sangoma card A200,A400.  which one module is analog /digital interface to PSTN? please give me a image of TOPO,thanks .
robben.
Kulkov Ivan | 5 Dec 13:42 2014
Picon

Re: Configuring SS7: Audiocodes Mediant 200


Hello,
Thanks for the advice, I learned about m2pa this late at night today )

Now my configuration files:
ysigchan.conf
....

[m2k-linkset0]
type=ss7-mtp3
netind2pctype=ITU,ITU,ANSI,ITU
netindicator=national
local=ITU,0-14-1
adjacent=ITU,0-75-3
link=m2k-link0
checklinks=true

[m2k-link0]
type=ss7-m2ua
sig=m2k-link0
iid=0
autostart=yes

Layer 2 works well:

%%+status:sig m2k-linkset0
module=sig,component=m2k-linkset0,type=ss7-mtp3;status=operational
%%-status

And what to do with Layer 3? Or it depends on the remote side?

status sig isup-tr0
%%+status:sig isup-tr0
module=sig,trunk=isup-tr0,type=ss7-isup;circuits=30,status=Remote unavailable,calls=0,available=30,resetting=0,locked=0,idle=30
%%-status

My second question. Can tell by routing it should be, what would make my first call, through the SS7 trunk?

I found this example:

${address}^192\.168\.x\.x\:=goto authorized

; then ask the indicators answer an incoming call with SS7
${module}^sig$=;message-oprefix=osig.
${module}^sig$=;osig.BackwardCallIndicators=charge,called-free,called-ordinary,isup-path,isdn-end,echodev
${module}^sig$=sip/sip:${called} <at> 192.168.x.x

.*=-;error=forbidden;reason=Protocol not allowed

[authorized]

;then set the indicators on the outgoing o in SS7
^[1-9][0-9]\{10,\}$=; sig.ForwardCallIndicators = international,isdn-orig,isup-path;
^[1-9][0-9]\{10,\}$=; sig.callerscreening = user-provided-passed;
^[1-9][0-9]\{10,\}$=; sig.TransmissionMediumRequirement = 3.1khz-audio; sig.inn = 0; caller = ${caller}
^[1-9][0-9]\{10,\}$= sig/${called}.; link = m2k-link0;

.*=return



04.12.2014 6:40, Romeu Medeiros пишет:
Hello Kulkov 

The mediant do not support m2pa, only the m2ua, change your configuration to use m2ua, if don't work tell us.

Thks 
Medeiros

Em quarta-feira, 3 de dezembro de 2014, Kulkov Ivan <i.kulkov-ZTT1BCyI+wQ@public.gmane.orgrttelecom.ru> escreveu:
Good day! I want to configure the Mediant 2000 gateway for calls from Yate.
But until they rise signaling links


status sig isup-tr0
%%+status:sig isup-tr0
module=sig,trunk=isup-tr0,type=ss7-isup;circuits=30,status=Layer 3 down,calls=0,available=30,resetting=0,locked=0,idle=30
%%-status
status sig m2k-linkset0
%%+status:sig m2k-linkset0
module=sig,component=m2k-linkset0,type=ss7-mtp3;status=non-operational
%%-status



My configuration files

sigtransport.conf


[m2k-link0] type=sctp stream=true local=192.168.x.x:3566 remote=192.168.x.x:3566 endpoint=true
mgcpca.conf


[gw ds/tr0] user=ds/tr0/1 version=MGCP 1.0 chans=31 host=192.168.x.x address=192.168.x.x voicechans=1-15.17-31 forward_rtp=yes bearer=alaw
ysigchan.conf

[isup-tr0] enable=yes type=ss7-isup pointcodetype=ITU pointcode=0-14-1 defaultpointcode=0-14-1 remotepointcode=0-75-3 netindicator=national service=5 voice=ds/tr0 sls=auto format=alaw lockgroup=yes earlyacm=yes strategy=increment strategy-restrict=even numplan=isdn presentation=allowed screening=user-provided [m2k-linkset0] type=ss7-m2u netind2pctype=ITU local=ITU,0-14-1 adjacent=ITU,0-75-3 link=m2k-link0 [m2k-link0] type=ss7-m2pa sig=m2k-link0 autostart=yes print-messages=yes extended-debug=yes

May be some settings incorrect?

Rodrigo Ricardo Passos | 23 Apr 14:36 2014
Picon

Get number in SAM

Hi Yate,

How can i get the digit in SAM message after receive an IAM using 
Javascript?

Regards,

Rodrigo

Dana cafe | 2 May 14:50 2014

queue.conf operators configuration

good afternoon,

I am trying to put calls in a queue and redistribute to operators 
(without using a database) but I don't know how to define these operators.

For testing i defined two users in regfile.conf:

[1000]
password=1234

[2000]
password=1234

Then in regexroute.conf I defined:

^100$=queue/test1

Finally test1 is defined  in the queue.conf file :

[channels]
incoming=external/nodata/queue_in.php
outgoing=external/nodata/queue_out.php

[queue test1]
mintime = 100
length= 100
maxout=10
;greeting=
onhold=wave/play/ test.wav
maxcall=10000
;prompt=
;notify
detail=true
single=true
;definition of the operator
${queue} = test1
${required} = 1
${current} = 1
;  ${waiting}
location=127.0.0.1
username=2000
  maxcall = 3000
;  prompt: string: Resource to play to the operator when it answers
enabled=true

using yate client logged as 1000 I call to 100 and the music on hold 
start but the call is not distributed to the user 2000 which is logged 
in another yate client. For sure the configuration of the operator is 
wrong, unfortunatelly I didn't find a useful example in the website and 
in internet.

thank you very much for your valuable help,

Jose

Moritz Orbach | 18 Mar 19:47 2014
Picon

Authentication-check in javascript

Hello all,

is there a javascript equivalent to regexroute's
${username}^$=-;error=noauth

Or more precisely: how can I (on call.route, in javascript)
1) verify that a client is registered in regfile.conf (allowed to make a
   certain call)
2) retrieve the true extension of the client (not based on any headers
   the client can set itself, but based on the registration)

I tried "msg.username", msg.params['username'] and similar properties of
the Message object in the call.route handler, but none of them seemed to
exist.

Best regards
Moritz


Gmane