Installed latest FreePBX DID not working on one trunk

The provided configuration is for sip chan and not pjsip.

what it does show instead of the DID is an ‘s’, I’ve tried various configurations this ahs been driving me insane for the past few days. Anyone any idea?

pbx.c: Executing [s@from-trunk:19] NoOp("PJSIP/LocalPhone
_Trunk-00000001", "CallerID Entry Point") in new stack

This always worked on my previous pbx which uses sip. For some reason now when there’s an incomming call the CID is shown however the DID isn’t and so goes to default route.

Configure Asterisk

You can find you SIP registration details under the VoIP section of your Localphone Dashboard.

Asterisk is an open source PBX designed to switch calls, manage routes, enable features and connect callers with the outside world over IP, analogue and digital connections. This guide describes how to configure your Asterisk installation to work with your Localphone account.

This guide should work for Asterisk version 1.2.4 and above. You will need to edit two configuration files on your Asterisk server; sip.conf and extension.conf. These files are usually located in the directory /etc/asterisk/.

Open sip.conf and check that the [general] section contains the following configuration values:

[general]
port = 5060
bindaddr = 0.0.0.0
qualify = no
disable = all
allow = alaw
allow = ulaw
dtmfmode = rfc2833
srvlookup = yes
Register with the Localphone Service

Next, configure Asterisk to register with the Localphone service. This will enable Localphone’s proxy to route incoming calls to your Asterisk server.

register => xxuserid:[email protected]/xxuserid
Create the Localphone Account

Add your Localphone service to Asterisk. Add the following to the bottom of sip.conf:

[localphone]
type = friend
insecure = very
nat = no
canreinvite = no
authuser = xxuserid
username = xxuserid
fromuser = xxuserid
fromdomain = localphone.com
secret = 92143612

host = localphone.com
dtmfmode = rfc2833
context = localphone-in ;extensions.conf context for inbound calls
disallow = all
allow = ulaw
allow = alaw
Test Your Configuration

Check that your Asterisk server has successfully registered with the Localphone proxy. At the Asterisk console enter the command sip reload, followed by the command sip show registry. The output should resemble the following:

localhost*CLI> sip reload
Reloading SIP>
== Parsing '/etc/asterisk/sip.conf': Found
== Parsing '/etc/asterisk/users.conf': Found
== Parsing '/etc/asterisk/sip_notify.conf': Found

localhost*CLI> sip show registry
Host Username Refresh State Reg.Time
localphone.com:5060 xxuserid 105 Registered Tue, 18 May 2010 14:51:06
Create the Incoming Context

Configure Asterisk to send calls to your chosen device(s) when a call is received via your Localphone account. You do this by creating the context specified in step #3. Add the following to extension.conf:

[localphone-in]
exten => xxuserid,1,Dial(SIP/sipphone,60,tr) ; phone must be registered
exten => xxuserid,2,Hangup
Create the Outgoing Context

Now Asterisk is able to receive calls, we need to set it up to make outbound calls. To do this you need to create an outgoing context similar to [localphone-out] defined below.

[localphone-out]
exten => _9.,1,Dial(SIP/${EXTEN:1}@localphone,30,tr)
exten => _9.,2,Playback(invalid)
exten => _9.,3,Hangup

This won’t work and all incoming calls will get rejected, if you actually use this configuration. The “very” value went from deprecated to deleted long ago, and will now simply trigger this warning:

ast_log(LOG_WARNING, "Unknown insecure mode '%s' on line %d\n", value, lineno);

What you typically need here is:

insecure=invite

although your logs indicate you got beyond this stage, but using a different configuration.

You appear to have quoted the provider’s documentation, which is for raw Asterisk but not shown how you have implemented it, in FreePBX terms, nor the result of that.

In FreePBX terms, the bit after the / is Contact User, and that is what is currently set to the default, s.

type=friend should be type=peer, for best security. username isn’t used and canreinvite was renamed long ago, but, I think, still works. nat=no is only really needed for some Cisco phones.

Your log messages indicate that the configuration you are actually using has:

[LocalPhone_Trunk]

here.

Providers tend to copy and paste other providers’ configurations without checking them, and most are based on Asterisk from 10 to 15 years ago.

I’m not saying I copied that configuration, … I set I set it up from the webinterface. But for some reason the incomming did isn’t there.

Let me take some screenshots of the current configuration. Did not include the registration url because didn’t matter if it was there or not.





Here is the complete call log

[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:1] Set("PJSIP/LocalPhone_Trunk-0000001c", "__DIRECTION=INBOUND") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:2] Gosub("PJSIP/LocalPhone_Trunk-0000001c", "sub-record-check,s,1(in,s,dontcare)") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@sub-record-check:1] GotoIf("PJSIP/LocalPhone_Trunk-0000001c", "0?initialized") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@sub-record-check:2] Set("PJSIP/LocalPhone_Trunk-0000001c", "__REC_STATUS=INITIALIZED") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@sub-record-check:3] Set("PJSIP/LocalPhone_Trunk-0000001c", "NOW=1666005008") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@sub-record-check:4] Set("PJSIP/LocalPhone_Trunk-0000001c", "__DAY=17") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@sub-record-check:5] Set("PJSIP/LocalPhone_Trunk-0000001c", "__MONTH=10") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@sub-record-check:6] Set("PJSIP/LocalPhone_Trunk-0000001c", "__YEAR=2022") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@sub-record-check:7] Set("PJSIP/LocalPhone_Trunk-0000001c", "__TIMESTR=20221017-131008") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@sub-record-check:8] Set("PJSIP/LocalPhone_Trunk-0000001c", "__FROMEXTEN=unknown") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@sub-record-check:9] Set("PJSIP/LocalPhone_Trunk-0000001c", "__MON_FMT=wav") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@sub-record-check:10] NoOp("PJSIP/LocalPhone_Trunk-0000001c", "Recordings initialized") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@sub-record-check:11] ExecIf("PJSIP/LocalPhone_Trunk-0000001c", "0?Set(ARG3=dontcare)") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@sub-record-check:12] Set("PJSIP/LocalPhone_Trunk-0000001c", "REC_POLICY_MODE_SAVE=") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@sub-record-check:13] ExecIf("PJSIP/LocalPhone_Trunk-0000001c", "0?Set(REC_STATUS=NO)") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@sub-record-check:14] GotoIf("PJSIP/LocalPhone_Trunk-0000001c", "2?checkaction") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx_builtins.c: Goto (sub-record-check,s,17)
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@sub-record-check:17] GotoIf("PJSIP/LocalPhone_Trunk-0000001c", "1?sub-record-check,in,1") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx_builtins.c: Goto (sub-record-check,in,1)
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [in@sub-record-check:1] NoOp("PJSIP/LocalPhone_Trunk-0000001c", "Inbound Recording Check to s") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [in@sub-record-check:2] Set("PJSIP/LocalPhone_Trunk-0000001c", "FROMEXTEN=unknown") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [in@sub-record-check:3] ExecIf("PJSIP/LocalPhone_Trunk-0000001c", "11?Set(FROMEXTEN=32486xxxxxx)") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [in@sub-record-check:4] Gosub("PJSIP/LocalPhone_Trunk-0000001c", "recordcheck,1(dontcare,in,s)") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/LocalPhone_Trunk-0000001c", "Starting recording check against dontcare") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [recordcheck@sub-record-check:2] Goto("PJSIP/LocalPhone_Trunk-0000001c", "dontcare") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx_builtins.c: Goto (sub-record-check,recordcheck,3)
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [recordcheck@sub-record-check:3] Return("PJSIP/LocalPhone_Trunk-0000001c", "") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [in@sub-record-check:5] Return("PJSIP/LocalPhone_Trunk-0000001c", "") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:3] Set("PJSIP/LocalPhone_Trunk-0000001c", "CHANNEL(tonezone)=be") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:4] ExecIf("PJSIP/LocalPhone_Trunk-0000001c", "1?Set(__FROM_DID=s)") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:5] Set("PJSIP/LocalPhone_Trunk-0000001c", "returnhere=1") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:6] Gosub("PJSIP/LocalPhone_Trunk-0000001c", "app-blacklist-check,s,1()") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@app-blacklist-check:1] GotoIf("PJSIP/LocalPhone_Trunk-0000001c", "0?blacklisted") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@app-blacklist-check:2] Set("PJSIP/LocalPhone_Trunk-0000001c", "CALLED_BLACKLIST=1") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@app-blacklist-check:3] Return("PJSIP/LocalPhone_Trunk-0000001c", "") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:7] Set("PJSIP/LocalPhone_Trunk-0000001c", "CDR(did)=s") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:8] GotoIf("PJSIP/LocalPhone_Trunk-0000001c", "0?") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:9] ExecIf("PJSIP/LocalPhone_Trunk-0000001c", "0 ?Set(CALLERID(name)=32486xxxxxx)") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:10] Set("PJSIP/LocalPhone_Trunk-0000001c", "__MOHCLASS=") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:11] Set("PJSIP/LocalPhone_Trunk-0000001c", "__REVERSAL_REJECT=FALSE") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:12] GotoIf("PJSIP/LocalPhone_Trunk-0000001c", "1?post-reverse-charge") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx_builtins.c: Goto (from-pstn,s,14)
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:14] NoOp("PJSIP/LocalPhone_Trunk-0000001c", "") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:15] Set("PJSIP/LocalPhone_Trunk-0000001c", "__CALLINGNAMEPRES_SV=allowed_not_screened") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:16] Set("PJSIP/LocalPhone_Trunk-0000001c", "__CALLINGNUMPRES_SV=allowed_not_screened") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:17] Set("PJSIP/LocalPhone_Trunk-0000001c", "CALLERID(name-pres)=allowed_not_screened") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:18] Set("PJSIP/LocalPhone_Trunk-0000001c", "CALLERID(num-pres)=allowed_not_screened") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:19] NoOp("PJSIP/LocalPhone_Trunk-0000001c", "CallerID Entry Point") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:20] Set("PJSIP/LocalPhone_Trunk-0000001c", "__CRM_DIRECTION=INBOUND") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:21] Set("PJSIP/LocalPhone_Trunk-0000001c", "__CRM_SOURCE=32486xxxxxx") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:22] Set("PJSIP/LocalPhone_Trunk-0000001c", "__CRM_LINKEDID=1666005008.28") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:23] AGI("PJSIP/LocalPhone_Trunk-0000001c", "agi://127.0.0.1/sangomacrm.agi,true") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] res_agi.c: <PJSIP/LocalPhone_Trunk-0000001c>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:24] ExecIf("PJSIP/LocalPhone_Trunk-0000001c", "1?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@from-pstn:25] Goto("PJSIP/LocalPhone_Trunk-0000001c", "timeconditions,2,1") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx_builtins.c: Goto (timeconditions,2,1)
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [2@timeconditions:1] Set("PJSIP/LocalPhone_Trunk-0000001c", "DB(TC/2/INUSESTATE)=INUSE") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [2@timeconditions:2] Set("PJSIP/LocalPhone_Trunk-0000001c", "DB(TC/2/NOT_INUSESTATE)=NOT_INUSE") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [2@timeconditions:3] AGI("PJSIP/LocalPhone_Trunk-0000001c", "agi://127.0.0.1/calendar.agi,calendar,goto,73073b42-e45f-47be-a36d-65277eec2ab3,default,dHJ1ZXN0YXRl,ZmFsc2VzdGF0ZQ==") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] res_agi.c: agi://127.0.0.1/calendar.agi,calendar,goto,73073b42-e45f-47be-a36d-65277eec2ab3,default,dHJ1ZXN0YXRl,ZmFsc2VzdGF0ZQ==: Checking Calendar
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] res_agi.c: agi://127.0.0.1/calendar.agi,calendar,goto,73073b42-e45f-47be-a36d-65277eec2ab3,default,dHJ1ZXN0YXRl,ZmFsc2VzdGF0ZQ==: Calendar: False
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] res_agi.c: agi://127.0.0.1/calendar.agi,calendar,goto,73073b42-e45f-47be-a36d-65277eec2ab3,default,dHJ1ZXN0YXRl,ZmFsc2VzdGF0ZQ==: Goto:falsestate
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] res_agi.c: AGI Script Executing Application: (Goto) Options: (falsestate)
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx_builtins.c: Goto (timeconditions,2,4)
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] res_agi.c: <PJSIP/LocalPhone_Trunk-0000001c>AGI Script agi://127.0.0.1/calendar.agi completed, returning 0
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [2@timeconditions:4] GotoIf("PJSIP/LocalPhone_Trunk-0000001c", "0?truegoto") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [2@timeconditions:5] ExecIf("PJSIP/LocalPhone_Trunk-0000001c", "0?Set(DB(TC/2)=)") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [2@timeconditions:6] Set("PJSIP/LocalPhone_Trunk-0000001c", "DEVICE_STATE(Custom:TC2)=INUSE") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [2@timeconditions:7] ExecIf("PJSIP/LocalPhone_Trunk-0000001c", "0?Set(DEVICE_STATE(Custom:TCSTICKY)=INUSE)") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [2@timeconditions:8] GotoIf("PJSIP/LocalPhone_Trunk-0000001c", "1?timeconditions,1,1") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx_builtins.c: Goto (timeconditions,1,1)
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [1@timeconditions:1] Set("PJSIP/LocalPhone_Trunk-0000001c", "DB(TC/1/INUSESTATE)=INUSE") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [1@timeconditions:2] Set("PJSIP/LocalPhone_Trunk-0000001c", "DB(TC/1/NOT_INUSESTATE)=NOT_INUSE") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [1@timeconditions:3] NoOp("PJSIP/LocalPhone_Trunk-0000001c", "TIMENOW: 13:10,Mon,17,Oct") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [1@timeconditions:4] NoOp("PJSIP/LocalPhone_Trunk-0000001c", "TIMEMATCHED: TRUE") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [1@timeconditions:5] GotoIfTime("PJSIP/LocalPhone_Trunk-0000001c", "09:00-18:00,mon-fri,*,*?truestate") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx_builtins.c: Goto (timeconditions,1,14)
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [1@timeconditions:14] GotoIf("PJSIP/LocalPhone_Trunk-0000001c", "0?falsegoto") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [1@timeconditions:15] ExecIf("PJSIP/LocalPhone_Trunk-0000001c", "0?Set(DB(TC/1)=)") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [1@timeconditions:16] Set("PJSIP/LocalPhone_Trunk-0000001c", "DEVICE_STATE(Custom:TC1)=NOT_INUSE") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [1@timeconditions:17] ExecIf("PJSIP/LocalPhone_Trunk-0000001c", "0?Set(DEVICE_STATE(Custom:TCSTICKY)=INUSE)") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [1@timeconditions:18] GotoIf("PJSIP/LocalPhone_Trunk-0000001c", "1?app-announcement-4,s,1") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx_builtins.c: Goto (app-announcement-4,s,1)
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@app-announcement-4:1] GotoIf("PJSIP/LocalPhone_Trunk-0000001c", "0?begin") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@app-announcement-4:2] Answer("PJSIP/LocalPhone_Trunk-0000001c", "") in new stack
[2022-10-17 13:10:08] VERBOSE[2769][C-00000010] pbx.c: Executing [s@app-announcement-4:3] Wait("PJSIP/LocalPhone_Trunk-0000001c", "1") in new stack
[2022-10-17 13:10:09] VERBOSE[2769][C-00000010] pbx.c: Executing [s@app-announcement-4:4] NoOp("PJSIP/LocalPhone_Trunk-0000001c", "Playing announcement Welkom Bericht IVR") in new stack
[2022-10-17 13:10:09] VERBOSE[2769][C-00000010] pbx.c: Executing [s@app-announcement-4:5] Playback("PJSIP/LocalPhone_Trunk-0000001c", "custom/main_ivr,noanswer") in new stack
[2022-10-17 13:10:09] VERBOSE[2769][C-00000010] file.c: <PJSIP/LocalPhone_Trunk-0000001c> Playing 'custom/main_ivr.slin' (language 'nl')
[2022-10-17 13:10:12] VERBOSE[2769][C-00000010] app_stack.c: PJSIP/LocalPhone_Trunk-0000001c Internal Gosub(crm-hangup,s,1) start
[2022-10-17 13:10:12] VERBOSE[2769][C-00000010] pbx.c: Executing [s@crm-hangup:1] NoOp("PJSIP/LocalPhone_Trunk-0000001c", "Sending Hangup to CRM") in new stack
[2022-10-17 13:10:12] VERBOSE[2769][C-00000010] pbx.c: Executing [s@crm-hangup:2] NoOp("PJSIP/LocalPhone_Trunk-0000001c", "HANGUP CAUSE: 16") in new stack
[2022-10-17 13:10:12] VERBOSE[2769][C-00000010] pbx.c: Executing [s@crm-hangup:3] ExecIf("PJSIP/LocalPhone_Trunk-0000001c", "0?Set(__CRM_VOICEMAIL=)") in new stack
[2022-10-17 13:10:12] VERBOSE[2769][C-00000010] pbx.c: Executing [s@crm-hangup:4] NoOp("PJSIP/LocalPhone_Trunk-0000001c", "MASTER CHANNEL: 1666005008.28 = 1666005008.28") in new stack
[2022-10-17 13:10:12] VERBOSE[2769][C-00000010] pbx.c: Executing [s@crm-hangup:5] GotoIf("PJSIP/LocalPhone_Trunk-0000001c", "0?return") in new stack
[2022-10-17 13:10:12] VERBOSE[2769][C-00000010] pbx.c: Executing [s@crm-hangup:6] Set("PJSIP/LocalPhone_Trunk-0000001c", "__CRM_HANGUP=1") in new stack
[2022-10-17 13:10:12] VERBOSE[2769][C-00000010] pbx.c: Executing [s@crm-hangup:7] AGI("PJSIP/LocalPhone_Trunk-0000001c", "agi://127.0.0.1/sangomacrm.agi") in new stack
[2022-10-17 13:10:12] VERBOSE[2769][C-00000010] res_agi.c: <PJSIP/LocalPhone_Trunk-0000001c>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0
[2022-10-17 13:10:12] VERBOSE[2769][C-00000010] pbx.c: Executing [s@crm-hangup:8] Return("PJSIP/LocalPhone_Trunk-0000001c", "") in new stack
[2022-10-17 13:10:12] VERBOSE[2769][C-00000010] app_stack.c: Spawn extension (app-announcement-4, s, 5) exited non-zero on 'PJSIP/LocalPhone_Trunk-0000001c'
[2022-10-17 13:10:12] VERBOSE[2769][C-00000010] app_stack.c: PJSIP/LocalPhone_Trunk-0000001c Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

image

If you leave this blank, it will use s.

So what should I put there the username?

EDIT: I mean I tried that and that didn’t work. Just tried that again and doesn’t work.

You should put in the DID that you have on the inbound route.

All of them?

When I check with wireshark the DID Is on all these blurred places in the header how do I tell freepbx to use it?

I was telling you how to get the request URI to reflect the intended DID, so that the default DID extraction will work

If, instead, you want to use the To header, with a random request URI, you can use the built-in context from-pstn-toheader., in place of from-pstn.

1 Like

When going to the configuration I found this

So when I set Context to

It not now works

1 Like

[ Comment was based on a typo negating the intended meaning ]

1 Like

What do you mean?

EDIT: it now works. not “it not works”

Thank you for your help. Appreciate it.

Thanks for finding this! I think I’m going through a very similar problem. This is amazing and probably exactly what I need to get pjsip trunk config to work! :smiley:

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