Incoming calls

I am having problems getting incoming calls working with my sip provider and I’m hoping I could get some help. My provider is https://diamondcard.us/ and their support is really bad so I’m hoping that someone here has an idea of how to get it working. I have outgoing calls working just fine but incoming won’t work. Here is my trunk information,

Outgoing
Trunk Name:
diamondcard

PEER Details:
type=friend
username=XXXXX
fromuser=XXXXX
secret=XXXXXXXXXXXXXXX
host=sip.diamondcard.us
disallow=all
allow=gsm,ulaw
insecure=invite
context=from-diamondcard
fromdomain=sip.diamondcard.us

Incoming
USER Context:
from-diamondcard

USER Details:

Register String:
XXXXX:[email protected]

I’m following their documentation found here
https://wiki.diamondcard.us/podwiki?page=Trixbox

When I try and make an incoming call it rings busy and I get this when I debug asterisk,
[2018-10-08 18:24:38] NOTICE[2267][C-0000000d]: chan_sip.c:26458 handle_request_invite: Call from ‘XXXXX’ (69.65.34.202:5060) to extension ‘s’ rejected because extension not found in context ‘from-diamondcard’.

I’m on a fresh install of the latest FreePBX, I’ve created my extensions and I can call between them and make outgoing calls, I just can’t receive incoming. I assume that I need to add something to the incoming user details but I haven’t figured that out yet. I’ve tried this on 2 different installs so I’m sure that there isn’t a problem with the PBX. I’m going on 3 days now and I know I’m missing something but I can’t tell what it is, please help if you can.

Step one is to change the context line to:

context=from-trunk

Create an inbound route with ANY CID / ANY DID.

edit - I’m not sure why I’m offering assistance for this provider. Trixbox hasn’t been relevant for most of a decade now, which means they haven’t bothered to touch their documentation in a very long time. I recommend a better provider.

1 Like

Thanks, that worked. but if I put the DID in the incoming route it stops working. Don’t I need the DID, how to I route calls when I have multiple DIDs?

You are probably specifying the DID wrong in the Inbound Route.
Make a Any/Any route, call your DID, then go to CDR, and copy the DID exactly how it’s displayed there to your Inbound Route.

Ok, I tried that and the DID in the CDR is either blank or just an ‘s’. Here is what I now get when I debug an incoming call

== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
[2018-10-08 20:46:09] ERROR[15186][C-00000023]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2018-10-08 20:46:09] ERROR[15186][C-00000023]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2018-10-08 20:46:09] ERROR[15186][C-00000023]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2018-10-08 20:46:09] ERROR[15186][C-00000023]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2018-10-08 20:46:09] ERROR[15186][C-00000023]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2018-10-08 20:46:09] ERROR[15186][C-00000023]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2018-10-08 20:46:09] ERROR[15186][C-00000023]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2018-10-08 20:46:09] ERROR[15186][C-00000023]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2018-10-08 20:46:09] ERROR[15186][C-00000023]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2018-10-08 20:46:09] ERROR[15186][C-00000023]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2018-10-08 20:46:09] ERROR[15186][C-00000023]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
[2018-10-08 20:46:09] ERROR[15186][C-00000023]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Spawn extension (from-internal, 53328, 1) exited non-zero on ‘SIP/53328-0000002a’
== Spawn extension (from-internal, 53328, 1) exited non-zero on ‘SIP/53328-0000002a’
== Spawn extension (macro-dial-one, s, 55) exited non-zero on ‘SIP/diamondcard-00000029’ in macro ‘dial-one’
== Spawn extension (macro-exten-vm, s, 26) exited non-zero on ‘SIP/diamondcard-00000029’ in macro ‘exten-vm’
== Spawn extension (ext-local, 53328, 2) exited non-zero on ‘SIP/diamondcard-00000029’
== Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘SIP/diamondcard-00000029’ in macro ‘hangupcall’
== Spawn extension (ext-local, h, 1) exited non-zero on ‘SIP/diamondcard-00000029’
== Spawn extension (ext-local, h, 1) exited non-zero on ‘SIP/diamondcard-00000029’

The called number is probably in the To header. Try changing the trunk context to from-pstn-toheader and repeat your test. If you still have trouble, at the Asterisk command prompt, type
sip set debug on
and call in again. Look at the incoming INVITE and see where the DID appears and what format it is in.

However, I agree with @lgaetz that diamondcard looks like a poor value. For what they charge, they ought to have an awesome ticket system and possibly phone support.

If you want first class trunks by the channel, look at https://www.sipstation.com/ . Pay-per-minute, top class, see Flowroute, Vitelity, Twilio, Callcentric. Pay-per-minute ‘value’ service, check out AnveoDirect, Voxbeam. Really cheap, look at CircleNet.biz, AlcazarNetworks.

2 Likes

That fixed it, Thanks for all the help. I agree, I would like to drop Diamondcard, their documentation and support is horrible.

This is part of the problem right here. They are sending all the calls to the CONTACT in the Location that was generated when the trunk REGISTERed. There’s nothing in the REGISTER string for that so they send all the calls to [email protected] That needs to be

The XXXXX after that / should match the XXXXX in the start of the string. And as pointed out the actual DID the call is going to would be in the TO header.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.