Problems Solved, Two Left
And I think they’re both small.
Solved: tcpdump showed no packets coming in, so I went to my DID
provider’s Website to discover to my intense embarrassment that the DID
number had been set up forwarded to their voicemail. I got egg on my face for this one. I changed that setting to SIP/IAX and packets now arrive and go where they should. Two problems remain.
1. Still can’t register my phone
The username and password are correct. I don’t know what else to try.
2. Asterisk can’t find the extension in my inbound context.
[May 23 18:34:12] NOTICE[46582]: res_pjsip_session.c:3968 new_invite:
voipms: Call (UDP:208.100.60.12:5060) to extension ‘s’ rejected because extension not found in context ‘voipms-inbound’.
I changed the name of the context in pjsip’s to ‘voipms-inbound’ and removed reference to ‘[mycontext]’ from pjsip.conf and extensions.conf as they were superfluous. The endpoint section of pjsip.conf now reads:
[voipms]
type = endpoint transport = transport-udp context = voipms-inbound
…
The bottom part of extensions.conf (with the phone number obfuscated) is now:
[voipms-inbound]
exten => 3115552368,1,Goto(hello,200,1)
[phones]
exten => 101,1,Dial(PJSIP/yealink)
[hello]
exten => 200,1,Answer()
same => n,Playback(hello-world)
same => n,Hangup()
The idea was for any inbound call to the public network number to immediately go to extension 200, play the message and hang up, and you could still call extension 200 to here it from inside.
—
7 thoughts on - Problems Solved, Two Left
Steve,
Could we see your dialplan for voipms-inbound?
I’m using voip.ms as well, but have not converted from chan_sip yet. My voip-ms inbound extensions.conf below (Phone number changed to protect the innocent)
[voipms]
include => voicemail
exten => 5175551212,1,Answer()
same => n,Gosub(check_blacklist,s,1)
same => n,Gosub(get_callerid,s,1)
same => n,Gosub(check_for_direct,s,1)
same => n,Set(_ARG1=4259)
same => n,Gosub(extension_timeouts,s,1(${ARG1}))
same => n,Queue(home,WwtTkKr,,,23)
same => n,NoOP(Dial Status: ${QUEUESTATUS})
same => n,NoOP(Hangup Cause: ${HANGUPCAUSE})
same => n,Gosub(s-${QUEUESTATUS},s,1(${ARG1}))
Doug
Am Tue, May 23, 2023 at 07:22:22PM -0400 schrieb Steve Matzura:
You can start a sip trace from the asterisk console.
pjsip set logger on
There should be a REGISTER from the phone, a Response 401 and an ACK
from the phone. Then asterisk should receive another REGISTER with an additional “WWW-Authenticate” header. The response could be 401
again or 403 or something else.
This can happen if there is no contact_user parameter.
“contact_user=” sets the SIP contact header’s user portion of the SIP URI
this will affect the extension reached in dialplan when the far end calls you at this ; registration. The default is ‘s’.
—
Stefan Tichy ( asterisk3 at pi4tel dot de )
—
Your inbound is being sent to s (start extension) instead of your DID, so it’s not matching. So, you’ll need to find out where in your dialplan it’s being mapped to s.
Did you know that voip.ms supports IAX2 natively? Working much better, in my opinion, that SIP.
Doug
—
Am Wed, May 24, 2023 at 09:40:18AM -0400 schrieb Steve Matzura:
….
In the endpoint section there is a parameter identify_by (default:
“username,ip”). “username” means, the the from-user is used.
Use “yealink” or “Steve” for both user names. Using different names for a phone make it just more complicated. You might have to change the phone configuration.
There should be no “contact” parameter for a phone. The phone sends the required information with the register request.
—
Stefan Tichy ( asterisk3 at pi4tel dot de )
—
Steve,
Please make sure you reply back to the list, so others can help also.
As for why it’s sending to the start extension, I cannot say since I am using IAX trunking with voip.ms and I get a DID for inbound matching.
Doug
Steve,
In your voip.ms console, go to Account Settings -> Inbound Settings, and set Device Type to “IP PBX Server…” instead of “ATA device…”
This will fix the ‘s’ instead of the number.
—
Thanks, Daryl. I fixed this before I saw this message by changing my connectivity from SIP to IVR/IAX on voip.ms’s Manage DID Numbers page. I’ll keep this one in my notes, though, should I ever do this again with SIP.
—