* You are viewing Posts Tagged ‘sip’

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

context = default allowguest = no realm = myrealm.com udpbindaddr =
qualify = yes subscribecontext = default localnet2.168.1.0/
externhost=myhost.com externrefresh0
dtmfmode = auto canreinvite = no jbenable = no sendrpid = yes trustrpid = no disallow=all allow=ulaw allow=alaw register => myuser:mypass@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

type=transport protocol=udp bind=

type=endpoint context=trusted disallow=all allow=ulaw allow=alaw transport=transport-udp auth=home aors=home

type=auth auth_type=userpass password=mypass username=myuser

type=aor max_contacts

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@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: (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)


Thanks in advance!


We can’t do much with part of your debug. You’ll want to post a pastebin link to your full SIP trace, and be sure that it includes at least VERBOSE messages turned up to 5.[1]

Work on WebRTC support is on-going, so you’ll want to test in the very latest Asterisk version in your branch (11 or above). That means you need to be on 11.9.0-rc2[2] at this moment.

[1]: https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information
[2]: http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11.9.0-rc2.tar.gz

DUNDi With SIP Mapping

From the reading and testing I have done it doesn’t look like SIP supports a username and password in the Dial string. I currently have the following mapping.

priv => dundi-extens,0,SIP, dundi:pass@${NUMBER},nounsolicited,nocomunsolicit,nopartial

On the sending side I see

NOTICE[31598] chan_sip.c: Conflicting extension values given. Using ‘dundi’
and not ’1001′

On the receiving side it will not match the SIP dundi user and tries to call dundi instead of 1001.

– Executing [dundi@from-sip-external:1] NoOp(“SIP/″,
“Received incoming SIP connection from unknown peer to dundi”) in new stack

Is there a way to configure DUNDi to use SIP or does it only work with IAX?

Thanks, Ryan

Alembic – Asterisk 11

I’ve had years of experience using ODBC for CDR, SIP, and extensions with Asterisk. One thing that has been problematic in the past is with documentation as far as database tables changing between versions (even within minor releases, though that was back in the 1.4 days). I was excited to see there is a plan for better managing that on Asterisk 12 via Alembic. All that being said, are there any plans to implement that with Asterisk 11, since that is the current LTS release? Or are we pretty sure the table structure won’t be changing within that version through the rest of its lifespan, making such an effort a waste?



No Voice When The Calls Come From Internet


I have trouble establishing a call between between two SIP phones. One sip phone is, with asterisk server, at home behind a firewall. The second sip phone is an iPhone with 3G wireless connection.

When I call from the SIP device at home the SIP account on the Internet
(iphone + 3G) I can hear voice on both devices. But when I call from the Internet to my home SIP I get the ring but when I answer I don’t hear any thing!

I have asterisk v11 installed at home all the incoming TCP/UDP 5060 and a defined UDP range in rtp.conf forwarded to my Asterisk server.

Do you have any idea when the voice is heard only when the call is from my local network to the Internet and not in the other direction ?

Nevertheless, when both SIP devices are in the same home IP network the call is made without any problem whatever who starts the call.


Dialplan To Reach External SIP Phone

If I have Asterisk setup with local SIP phones configured but need to call a SIP phone which is not local but actually on another VLAN, what would the dialplan need to look like?