Giter VIP home page Giter VIP logo

go-b2bua's People

Contributors

bambyster avatar braams avatar dunst0 avatar sobomax avatar yunginnanet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-b2bua's Issues

voiptests fail: RTP session is attempted to be deleted before it's created

Hi, we have seen this weird issue on the latest voiptests run here:

https://travis-ci.org/sippy/voiptests/jobs/338230478

go-b2bua is trying to delete RTP session before it allocates it:

324 00:00:06.451/DBUG:GLOBAL:get_command: received command "984048856af367c5c634c21d9b3c1e09 D )VN~C5GHh44YeMZh"O3g4ZF03jZBT\P>@ndCe>O2H3{y\PUYe-0 f0072e20c037b89f144f693fcbc5ba24 e4307521e5f67bf7ab826902cde53b3d"
325 00:00:06.451/INFO:GLOBAL:handle_command: delete request failed: session )VN~C5GHh44YeMZh"O3g4ZF03jZBT\P>@ndCe>O2H3{y\PUYe-0, tags f0072e20c037b89f144f693fcbc5ba24/e4307521e5f67bf7ab826902cde53b3d not found
326 00:00:06.451/DBUG:GLOBAL:rtpc_doreply: sending reply "E50\n"

Some 0.4 second later:

335 00:00:06.823/DBUG:GLOBAL:get_command: received command "b43e3a9b0bc98ba6957ea71d88b6b26f UR127.0.0.1 )VN~C5GHh44YeMZh"O3g4ZF03jZBT\P>@ndCe>O2H3{y\PUYe-0 225.152.201.188 63304 f0072e20c037b89f144f693fcbc5ba24 unix:/home/travis/build/sippy/voiptests/b2bua.sock r%2038"
336 00:00:06.823/INFO:GLOBAL:rtpp_command_ul_handle: new IPv4/IPv4 session )VN~C5GHh44YeMZh"O3g4ZF03jZBT\P>@ndCe>O2H3{y\PUYe-0, tag f0072e20c037b89f144f693fcbc5ba24 requested, type strong
337 00:00:06.823/INFO:)VN~C5GHh44YeMZh"O3g4ZF03jZBT\P>@ndCe>O2H3{y\PUYe-0:rtpp_command_ul_handle: new session on IPv4 port 12398 created, tag f0072e20c037b89f144f693fcbc5ba24
338 00:00:06.823/INFO:)VN~C5GHh44YeMZh"O3g4ZF03jZBT\P>@ndCe>O2H3{y\PUYe-0:rtpp_command_ul_handle: setting timeout handler
339 00:00:06.823/INFO:)VN~C5GHh44YeMZh"O3g4ZF03jZBT\P>@ndCe>O2H3{y\PUYe-0:rtpp_stream_prefill_addr: pre-filling caller's RTP address with 225.152.201.188:63304
340 00:00:06.823/INFO:)VN~C5GHh44YeMZh"O3g4ZF03jZBT\P>@ndCe>O2H3{y\PUYe-0:rtpp_stream_prefill_addr: pre-filling caller's RTCP address with 225.152.201.188:63305
341 00:00:06.823/DBUG:GLOBAL:rtpc_doreply: sending reply "12398 127.0.0.1\n"

INVITE Parse Failure using Linphone

Hi

I have an invite which causes b2bua to crash the sip call

Error Info

2019-12-26 07:12:50+00 ERROR: UasStateIdle::RecvRequest: #1: ParseSipAddress #1"

I did a little debugging and found that ParseSipAddress function gets input lime", which means something breaks in the Contact line.

The sip-client this happens is with LinPhone

Full Invite

INVITE sip:[email protected]:5060 SIP/2.0
Record-Route: <sip:192.168.0.150;transport=udp;r2=on;ftag=NBzRt6-Ol;lr=on;did=fa5.17f1;nat=yes>
Record-Route: <sip:192.168.0.150;transport=tcp;r2=on;ftag=NBzRt6-Ol;lr=on;did=fa5.17f1;nat=yes>
Via: SIP/2.0/UDP 192.168.0.150;branch=z9hG4bKe2a5.4a122eb8a4f73d90907b65cd4ddab597.0;i=2
Via: SIP/2.0/TCP 54.37.202.229;received=54.37.202.229;rport=42863;branch=z9hG4bK.aBayv28r73FXHeNXN1X33tZN5F
Record-Route: <sip:54.37.202.229:5060;lr>
Record-Route: <sips:sip6.linphone.org:5223;lr>
Via: SIP/2.0/TLS 172.29.148.147:42373;branch=z9hG4bK.ohnMpy4y~;rport=8040;received=115.110.204.52
From: <sip:[email protected]>;tag=NBzRt6-Ol
To: <sip:[email protected]>
CSeq: 20 INVITE
Call-ID: 0QHP26cRix
Max-Forwards: 68
Supported: replaces, outbound, gruu
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, UPDATE
Content-Type: application/sdp
Content-Length: 722
Contact: <sip:[email protected];gr=urn:uuid:3bc8f96e-2c58-00b7-9fb0-dcd54de6ce7d>;+org.linphone.specs="groupchat,lime"
User-Agent: LinphoneAndroid/4.2 (OnePlus 5T) LinphoneSDK/4.3 (tags/4.3^0)
P-hint: inbound

v=0
o=kinshuk 3627 2526 IN IP4 192.168.0.150
s=Talk
c=IN IP4 192.168.0.150
t=0 0
a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics
a=Ik:ZosOr+k8Y7VBT11EiuY/yFdNV0shWmlX+6AW0d/Qifc=
a=rtpengine:35ce461d2b76
m=audio 37574 RTP/AVPF 96 97 98 0 8 18 101 99 100
c=IN IP4 192.168.0.150
a=rtcp-fb:* trr-int 1000
a=rtcp-fb:* ccm tmmbr
a=rtpmap:96 opus/48000/2
a=rtpmap:97 speex/16000
a=rtpmap:98 speex/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/48000
a=rtpmap:99 telephone-event/16000
a=rtpmap:100 telephone-event/8000
a=fmtp:96 useinbandfec=1
a=fmtp:97 vbr=on
a=fmtp:98 vbr=on
a=fmtp:18 annexb=yes
a=sendrecv
a=rtcp:37575

b2bua_simple and rtpproxy

Hi,

I am looking for a way to use b2bua_simple with rtpproxy, but that seems not to be possible?
the b2bua_radius can use rtpproxy but is dependent of the radius client part which I dont want to use.

Is there any way to achieve this?

The goal is to use b2bua in combination with rtpproxy to forward/proxy both sip and rtp traffic for incoming calls to a sip and rtp media server behind b2bua and rtpproxy.

Any thoughts?

Go B2BUA - Radius Support

Dear team,
Taking a look at the perfect software you are using, I am interested to know if there will be any progress regarding development of GO B2BUA in Radius.
Also, I can sponsor such development if it will be required!

Hope to get a response.

Thank you,

Option -p

Option -p wont work.

I suggest to make opportunity to run app on several interfaces and ports. i.e.:
./b2bua_simple -n 10.125.184.2 -l 10.125.125.120:5060,8.8.8.8:5080
Now I cant use both interfaces when try to connect with 2 adat\pters. Somewhy connection dont look at routing table and try to connect with local IP in -n parameter from -l IP and it wrong.

I.E. i try to use kamailio and it conects according to routing table and my backend SIP server allowing conections from this IP

go fmt

First of all, thanks for this great library!
But I find it very inconvenient that the code is not formatted according to Go standards. The IDE tries to fix indentations and line breaks, one minimal change turns into hundreds. What do you think about applying go fmt to all code to conform to a common standard?

make test get error

I am complete rookie in GO. So after make I get compiled app and run it and try to register with soft phone (XXX - real IP address)

root@voip0:/usr/src/go-b2bua# ./b2bua_simple -n 10.125.184.2 -l XXX.XXX.XXX.XXX
2018-12-25 06:32:23+00 ERROR: runtime error: invalid memory address or nil pointer dereference
2018-12-25 06:32:23+00 ERROR: goroutine 10 [running]:
2018-12-25 06:32:23+00 ERROR: sippy/log.(*errorLogger).ErrorAndTraceback(0xc420012758, 0x5566ef154fc0, 0xc4200120b0)
2018-12-25 06:32:23+00 ERROR:   /usr/src/go-b2bua/src/sippy/log/error_logger.go:60 +0x126
2018-12-25 06:32:23+00 ERROR: sippy/utils.SafeCall.func1(0x5566ef4632c0, 0xc420012758)
2018-12-25 06:32:23+00 ERROR:   /usr/src/go-b2bua/src/sippy/utils/safe_call.go:40 +0x62
2018-12-25 06:32:23+00 ERROR: panic(0x5566ef154fc0, 0xc4200120b0)
2018-12-25 06:32:23+00 ERROR:   /usr/lib/go-1.7/src/runtime/panic.go:458 +0x243
2018-12-25 06:32:23+00 ERROR: sippy.(*clientTransaction).Lock(0xc4200fa270)
2018-12-25 06:32:23+00 ERROR:   /usr/src/go-b2bua/src/sippy/client_transaction.go:346 +0x28
2018-12-25 06:32:23+00 ERROR: sippy.(*sipTransactionManager).process_response(0xc42009a000, 0xc4200f4870, 0xc4200be000, 0x232, 0x2000, 0xc4200f2840, 0x20, 0xc4200f6610, 0x5566ef462f40, 0xc42009a0a0)
2018-12-25 06:32:23+00 ERROR:   /usr/src/go-b2bua/src/sippy/sip_transaction_manager.go:268 +0xd45
2018-12-25 06:32:23+00 ERROR: sippy.(*sipTransactionManager).handleIncoming(0xc42009a000, 0xc4200be000, 0x232, 0x2000, 0xc4200f6610, 0x5566ef462f40, 0xc42009a0a0, 0xc4200f4870)
2018-12-25 06:32:23+00 ERROR:   /usr/src/go-b2bua/src/sippy/sip_transaction_manager.go:194 +0x63f
2018-12-25 06:32:23+00 ERROR: sippy.(*sipTransactionManager).(sippy.handleIncoming)-fm(0xc4200be000, 0x232, 0x2000, 0xc4200f6610, 0x5566ef462f40, 0xc42009a0a0, 0xc4200f4870)
2018-12-25 06:32:23+00 ERROR:   /usr/src/go-b2bua/src/sippy/sip_transaction_manager.go:90 +0x73
2018-12-25 06:32:23+00 ERROR: sippy.(*udpServer).handle_read(0xc42009a0a0, 0xc4200be000, 0x232, 0x2000, 0x5566ef4620c0, 0xc4200f4840, 0xc4200f4870)
2018-12-25 06:32:23+00 ERROR:   /usr/src/go-b2bua/src/sippy/udp_server.go:322 +0xf0
2018-12-25 06:32:23+00 ERROR: sippy.(*asyncReceiver).run.func1()
2018-12-25 06:32:23+00 ERROR:   /usr/src/go-b2bua/src/sippy/udp_server.go:167 +0x6c
2018-12-25 06:32:23+00 ERROR: sippy/utils.SafeCall(0xc420047f38, 0x0, 0x0, 0x5566ef4632c0, 0xc420012758)
2018-12-25 06:32:23+00 ERROR:   /usr/src/go-b2bua/src/sippy/utils/safe_call.go:43 +0x65
2018-12-25 06:32:23+00 ERROR: sippy.(*asyncReceiver).run(0xc420014880, 0xc42009a0a0)
2018-12-25 06:32:23+00 ERROR:   /usr/src/go-b2bua/src/sippy/udp_server.go:167 +0x193
2018-12-25 06:32:23+00 ERROR: created by sippy.NewAsyncReciever
2018-12-25 06:32:23+00 ERROR:   /usr/src/go-b2bua/src/sippy/udp_server.go:151 +0xb5
2018-12-25 06:32:23+00 ERROR:

So i try to make test and get another error

cd /usr/src/go-b2bua/src/sippy; GOPATH=/usr/src/go-b2bua:/usr/local/share/go go test
# sippy
./lr_test.go:174: not enough arguments in call to bye.sipMsg.routes[1].sipAddressHF.GetBody
FAIL    sippy [build failed]
GNUmakefile:11: recipe for target 'test' failed
make: *** [test] Error 2

Unable to access custom header on incoming message

Hi,

In the call controller's RecvEvent function, I'd like to be able to read the value of a custom SIP header (like X-MyHeader:) from the INVITE. I've been unable to find a way to do that. How to access these?

I tried CCEventTry.GetExtraHeaders(), but that returns an empty list.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.