Dialplan issue asterisk

Hi,

We are having one or two issues setting up a gradwell SIP Trunk with our asterisk PBX and wondered if anyone might be able to shed any light on it.

Basically we have our asterisk PBX registered on gradwells server with no problems, but when we try to dial out we get an error response from gradwell “Forbidden” which related to us not sending our caller ID

We found this article on their website https://support.gradwell.com/entries/23669137-Configuring-an-outbound-SIP-trunk-on-an-Asterisk-PBX which states we must add our outgoing caller ID to the dial plan (Extensions) which we have now done (Gradwell require us to do this)

But we now get an error WARNING[8270]: pbx.c:4458 pbx_extension_helper: No application ‘SetCallerID’ for extension (default, 07900883755, 1)
[Jun 16 18:23:03] == Spawn extension (default, 07900883755, 1) exited non-zero on ‘SIP/8002-00000010’
[Jun 16 18:23:03] – Executing [h@default:1] AGI(“SIP/8002-00000010”, “agi://127.0.0.1:4577/call_log–HVcauses–PRI-----NODEBUG-----0---------------”) in new stack
[Jun 16 18:23:03] – <SIP/8002-00000010>AGI Script agi://127.0.0.1:4577/call_log–HVcauses–PRI-----NODEBUG-----0--------------- completed, returning 0

Its definitely a dialplan issue but its got us stumped, can anyone suggest anything ?

Kind regards

Try

exten => _X!,2,Set(CALLERID(NUM)=0123456789)

The application is Set and you use it on the CALLERID(num) function. SetCallerID may have existed in the dim and distance past.

However, normally one uses fromuser in sip.conf. Is there any reason why that won’t work in this case?

allowguest can only appear in the general section.
yes is deprecated as a parameter for nat; use the specific options that you need
username is a deprecated/obsolete name for defaultuser.

Although the default nat= settings are often sufficient for Asterisk inside case, if you have NAT you need to tell Asterisk how to find its external address, so you need to use one of the external address options and/or stunaddr. nat= doesn’t do that; it just applies various hacks to work round the damage caused by NAT, particularly Asterisk outside cases.

More generally, you need to provide sip debug logs, to show where the protocol is getting stuck.

Hi,

Gradwell replies with 403 Forbidden for some reason - may be caller ID you send is not in the correct format? It would be more helpful if you provided full SIP callflow using debug (sip set debug on from CLI).

NAT misconfiguration could also be the cause of this issue - if you send SIP INVITE with your private IPs in the body, Gradwell could reject them in this manner.

add the fromuser option to your trunk configuration

fromuser=835xxxx

This corrected a similar problem for me once with a different provider. Worth a try.

sendrpid=yes