Gervasio Marchand Cassataro
2014-Apr-16 21:26 UTC
[asterisk-users] Connecting 2 asterisks, one with PJSIP and other SIP returning 401
It's my first post here, so I'll cut to the chase I have 2 Asterisk servers and want to connect them using sip on one and pjsip on the other one. One is running at home and another at a VPS. The first one will be the client (with dynamic ip) and the 2nd the server. The client uses sip and the server pjsip. This is the client's sip.conf [general] context = default allowguest = no realm = myrealm.com udpbindaddr = 0.0.0.0 qualify = yes subscribecontext = default localnet=192.168.1.0/255.255.255.0 externhost=myhost.com externrefresh=30 dtmfmode = auto canreinvite = no jbenable = no sendrpid = yes trustrpid = no disallow=all allow=ulaw allow=alaw register => myuser:mypass at vpsserver [vpsserver] type=friend secret=myuser defaultuser=mypass host=vpsserver.domain.com context=inbound canreinvite=no insecure=port,invite And this is the server's pjsip.conf [transport-udp] type=transport protocol=udp bind=0.0.0.0 [home] type=endpoint context=trusted disallow=all allow=ulaw allow=alaw transport=transport-udp auth=home aors=home [home] type=auth auth_type=userpass password=mypass username=myuser [home] type=aor max_contacts=10 When I check on the client, executing sip show registry I get Host dnsmgr Username Refresh State Reg.Time vpsserver:5060 N myuser 104 Registered Tue, 15 Apr 2014 22:57:34 which I guess means everything is ok... on the client side, I have on my extensions.conf exten => 66,1,Dial(SIP/1 at vpsserver) and on the server's extensions.conf (in the trusted context) I have exten => 1,1,Playback(hello-world) So far so good... but when I dial 66 on my client Asterisk, I see the following SIP dialog on the server... the only weird thing is that I see some From: 192.168.1.112 (that's my home Asterisk's internal IP... the externhost works fine for all the providers I'm using, so I doubt that's an issue) http://pastebin.com/hkFezB8j Thanks in advance! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140416/f7dfa651/attachment.html>
Gervasio Marchand Cassataro
2014-Apr-16 23:02 UTC
[asterisk-users] Connecting 2 asterisks, one with PJSIP and other SIP returning 401
Just a heads up... Enabled NOTICEs on the server and I see this every 10 seconds or so [Apr 16 18:58:28] NOTICE[2138]: res_pjsip/pjsip_distributor.c:246 log_unidentified_request: Request from '"asterisk" <sip:asterisk at 179.25.158.95>' failed for '179.25.158.95:5060' (callid: 477ca2fd0db3a5542dcf2afd50673b89 at 179.25.158.95:5060) - No matching endpoint found Thanks in advance for any help / ideas / clues or something! I'm scratching my head around this and at this point On Wed, Apr 16, 2014 at 6:26 PM, Gervasio Marchand Cassataro <gmc at gmc.uy>wrote:> It's my first post here, so I'll cut to the chase > > I have 2 Asterisk servers and want to connect them using sip on one and > pjsip on the other one. One is running at home and another at a VPS. The > first one will be the client (with dynamic ip) and the 2nd the server. > > The client uses sip and the server pjsip. > > This is the client's sip.conf > > [general] > context = default > allowguest = no > realm = myrealm.com > udpbindaddr = 0.0.0.0 > qualify = yes > subscribecontext = default > localnet=192.168.1.0/255.255.255.0 > externhost=myhost.com <http://192.168.1.0/255.255.255.0externhost=myhost.com> > externrefresh=30 > dtmfmode = auto > canreinvite = no > jbenable = no > sendrpid = yes > trustrpid = no > disallow=all > allow=ulaw > allow=alaw > register => myuser:mypass at vpsserver > > [vpsserver] > type=friend > secret=myuser > defaultuser=mypass > host=vpsserver.domain.com > context=inbound > canreinvite=no > insecure=port,invite > > And this is the server's pjsip.conf > > [transport-udp] > type=transport > protocol=udp > bind=0.0.0.0 > > [home] > type=endpoint > context=trusted > disallow=all > allow=ulaw > allow=alaw > transport=transport-udp > auth=home > aors=home > > [home] > type=auth > auth_type=userpass > password=mypass > username=myuser > > [home] > type=aor > max_contacts=10 > > When I check on the client, executing sip show registry I get > > Host dnsmgr Username Refresh State Reg.Time > vpsserver:5060 N myuser 104 Registered Tue, 15 Apr 2014 22:57:34 > > which I guess means everything is ok... on the client side, I have on my > extensions.conf > > exten => 66,1,Dial(SIP/1 at vpsserver) > > and on the server's extensions.conf (in the trusted context) I have > > exten => 1,1,Playback(hello-world) > > So far so good... but when I dial 66 on my client Asterisk, I see the > following SIP dialog on the server... the only weird thing is that I see > some From: 192.168.1.112 (that's my home Asterisk's internal IP... the > externhost works fine for all the providers I'm using, so I doubt that's an > issue) > > http://pastebin.com/hkFezB8j > > Thanks in advance! >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140416/19153608/attachment.html>