Trunk DID is alphanumeric

Hi everyone.
I wanted to switch from pure asterisk to freePBX. I managed a lot through contexts in asterisk, but I think this is not the general idea of freePBX.
Anyway. I am using a sipgate account/trunk and I have two different numbers. The DID-format is: 123456e0 and 123456e1. As you can see I have to distinguish between the e0 and e1 in the end for the inbound routes. (The pattern _X.e0 is not working)
FreePBX is not supporting alphanumeric as I found out. How do I manage this now?

Thank you for any help.

Hello,

Are you sure that the DIDs that sipgate send to your pbx are in an alphanumeric format? can you upload a sip debug log from the provider?

Thank you,

Daniel Friedman
Trixton LTD.

Thank you for the quick reply.
I canā€™t access any logfiles of the provider, but I can show you the relevant lines in my asterisk log: (I think FROM DID is the relevant part)

Thanks for your help!

[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [1234567e0@from-trunk:1] Set("SIP/Sipgate-00000000", "__DIRECTION=INBOUND") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [1234567e0@from-trunk:2] Gosub("SIP/Sipgate-00000000", "sub-record-check,s,1(in,1234567e0,dontcare)") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [s@sub-record-check:1] GotoIf("SIP/Sipgate-00000000", "0?initialized") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [s@sub-record-check:2] Set("SIP/Sipgate-00000000", "__REC_STATUS=INITIALIZED") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [s@sub-record-check:3] Set("SIP/Sipgate-00000000", "NOW=1487524492") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [s@sub-record-check:4] Set("SIP/Sipgate-00000000", "__DAY=19") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [s@sub-record-check:5] Set("SIP/Sipgate-00000000", "__MONTH=02") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [s@sub-record-check:6] Set("SIP/Sipgate-00000000", "__YEAR=2017") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [s@sub-record-check:7] Set("SIP/Sipgate-00000000", "__TIMESTR=20170219-181452") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [s@sub-record-check:8] Set("SIP/Sipgate-00000000", "__FROMEXTEN=unknown") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [s@sub-record-check:9] Set("SIP/Sipgate-00000000", "__MON_FMT=wav") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [s@sub-record-check:10] NoOp("SIP/Sipgate-00000000", "Recordings initialized") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [s@sub-record-check:11] ExecIf("SIP/Sipgate-00000000", "0?Set(ARG3=dontcare)") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [s@sub-record-check:12] Set("SIP/Sipgate-00000000", "REC_POLICY_MODE_SAVE=") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [s@sub-record-check:13] ExecIf("SIP/Sipgate-00000000", "0?Set(REC_STATUS=NO)") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [s@sub-record-check:14] GotoIf("SIP/Sipgate-00000000", "2?checkaction") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx_builtins.c: Goto (sub-record-check,s,17)
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [s@sub-record-check:17] GotoIf("SIP/Sipgate-00000000", "1?sub-record-check,in,1") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx_builtins.c: Goto (sub-record-check,in,1)
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [in@sub-record-check:1] NoOp("SIP/Sipgate-00000000", "Inbound Recording Check to 1234567e0") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [in@sub-record-check:2] Set("SIP/Sipgate-00000000", "FROMEXTEN=unknown") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [in@sub-record-check:3] ExecIf("SIP/Sipgate-00000000", "11?Set(FROMEXTEN=08999999999)") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [in@sub-record-check:4] Gosub("SIP/Sipgate-00000000", "recordcheck,1(dontcare,in,1234567e0)") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [recordcheck@sub-record-check:1] NoOp("SIP/Sipgate-00000000", "Starting recording check against dontcare") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [recordcheck@sub-record-check:2] Goto("SIP/Sipgate-00000000", "dontcare") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx_builtins.c: Goto (sub-record-check,recordcheck,3)
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [recordcheck@sub-record-check:3] Return("SIP/Sipgate-00000000", "") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [in@sub-record-check:5] Return("SIP/Sipgate-00000000", "") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [1234567e0@from-trunk:3] Set("SIP/Sipgate-00000000", "__FROM_DID=1234567e0") in new stack
[2017-02-19 18:14:52] VERBOSE[3281][C-00000000] pbx.c: Executing [1234567e0@from-trunk:4] Set("SIP/Sipgate-00000000", "CDR(did)=1234567e0") in new stack

Hi!

Through contexts? :wink:

I donā€™t understand why they do something as weird as that and I guess the best thing would be to have support for it in FreePBX but the only way I can see right now of dealing with this is to remap those weird DIDs to something entirely numericalā€¦

ie something like 1234567e0 to 12345670 (or something more complex but still with numbers only if there is a risk of collision with a real phone number).

You would do something similar to from-pstn-e164-us which we use in North America to convert caller IDs in e164 format to something more like we are used to but for DIDs insteadā€¦

You would do a context like from-pstn-custom-sipgate which you would put in extensions_custom.conf and assign to your trunk which would do this remapping and then go to from-pstnā€¦

None of the providers/trunk I have are like that so I never had to do something as weird as this but the idea is sound I thinkā€¦

As you already have experience doing this kind of thing without using FreePBX you probably wonā€™t have much trouble doing something like this I believeā€¦

Good luck and have a nice day!

Nick

Hi!

I have been reading up a little on this and it seems like these are (sub)account number as well and would normally be assigned to different devices (so normally your PBX would be using only one of them and the other one would be used for an ATA, a SIP phone, etcā€¦).

Do you currently have two trunks using these (sub) account numbers?

It looks like sipgate is apparently sending those as if they were DIDs and not sending the DIDs in the normal wayā€¦

Can you please do a

asterisk -rvvvvvvvvvvvvvvvvvvv
sip set debug on

do a call and then

sip set debug off

And post the resultā€¦

This will be extremely chatty and will contain information you most likely donā€™t want to postā€¦ Please modify them in a consistent way and let us know in which SIP headers (most likely) the real DID number is present inā€¦

It might have worked this way in the past but I donā€™t think it is necessary to use both (sub)accounts to get calls from two different DIDsā€¦

By the way, is there a place in sipgateā€™s web interface where you assign the DIDs to the (sub)accounts? Would it be possible to assign both DIDs to the same (sub)account?

Good luck and have a nice day!

Nick

Perhaps (and I donā€™t know, Iā€™m just thinking while my fingers try to keep up) is that the system (and not the provider) is assigning the DIDs from his E1 line (E0) that number, and another E1 (E1, in this case) the same DID, but with the differentiator so that the contexts can handle something.

This doesnā€™t sound like something most SIP providers would do ā€œout of the boxā€, Itā€™s way outside my scope of experience, but it also isnā€™t the first time weā€™ve seen alphanumeric characters in a SIP extension.

As @Marbled points out, thereā€™s nothing in the system preventing you from using one of the ā€œearly customā€ contexts in the process to redefine the incoming DID into something more ā€œgeneral userā€ friendly.

@cynjut, since I wrote that I have a feeling that there must be a simpler way to deal with thisā€¦

From what I read 123456e0 and 123456e1 are most likely usernames you use for your trunks/devices (what other providers would call sub-accountsā€¦). That number after the ā€œeā€ is apparently a sequence, each new sub-account has a different oneā€¦

If these are indeed sub-accounts as what I read suggested it sounds like he might have two different trunks with that provider (one for each of these usernames) and that this provider doesnā€™t provide the DID in the conventional way. He possibly assigned a DID to each of these sub-accounts/trunksā€¦

One trunk per DID is not quite scalable so it would be better if he could use only one and differentiate the DIDs another wayā€¦

I still think that what I suggested earlier would work but there is most likely an easier way to do it, the info is most likely put somewhere else and just need to be obtained and possibly parsedā€¦

We will see once he posts his FreePBX box logs with SIP debug activatedā€¦

Have a nice day!

Nick

Hi Nick,

there is a way to assign 2 numbers to one account (like e0) so I could use it in one trunk, but only in the same account. I have a private and a business sipgate account and Iā€™d like to use both with sipgate which brings me back to differentiating between the DID, because both accounts come in the from-trunk context. It would be really nice to differantiate in the inbound routes.

Using contexts and manipulating files takes me back to core asterisk. Iā€™ll loose the functions like Inbound Routes etc. of freepbx wonā€™t I?

I am wondering why freePBX is taking away asterisks build in functions like handling alphanumerics.

Here is the requested Log. I manipulated my IPs and numbers, but kept it consistent through the DOC.

[2017-02-21 20:07:53] WARNING[1225]: res_pjsip_pubsub.c:3164 pubsub_on_rx_publish_request: No registered publish handler for event presence
[2017-02-21 20:07:53] WARNING[1225]: res_pjsip_pubsub.c:640 subscription_get_handler_from_rdata: No registered subscribe handler for event presence.winfo
-- Added contact 'sip:[email protected]:5160;line=9m4vgdv3' to AOR '1002' with expiration of 3600 seconds
  == Contact 1002/sip:[email protected]:5160;line=9m4vgdv3 has been created
  == Endpoint 1002 is now Reachable
-- Contact 1002/sip:[email protected]:5160;line=9m4vgdv3 is now Reachable.  RTT: 181.683 msec

<--- SIP read from UDP:217.10.79.9:5060 --->
INVITE sip:[email protected]:5160 SIP/2.0
Record-Route: <sip:217.10.79.9;lr;ftag=as46b5ef13>
Record-Route: <sip:172.20.40.8;lr>
Record-Route: <sip:217.10.68.137;lr;ftag=as46b5ef13>
Via: SIP/2.0/UDP 217.10.79.9;branch=z9hG4bK0ace.fbc71fa816fd94334ed0ae883fdf834b.0
Via: SIP/2.0/UDP 172.20.40.8;branch=z9hG4bK0ace.439ee4d32d4887facb60d7afa1db2057.3
Via: SIP/2.0/UDP 217.10.68.137;branch=z9hG4bK0ace.a97741e1ae58ee9b7c02f54fe8c81084.0
Via: SIP/2.0/UDP 217.10.77.120:5060;branch=z9hG4bK41b24263
Max-Forwards: 67
From: "01621234567" <sip:[email protected]>;tag=as46b5ef13
To: <sip:[email protected]>
Contact: <sip:[email protected]:5060>
Call-ID: [email protected]
CSeq: 103 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Content-Type: application/sdp
Content-Length: 403

v=0
o=root 1975977481 1975977482 IN IP4 217.10.77.120
s=sipgate VoIP GW
c=IN IP4 217.10.77.120
t=0 0
m=audio 29402 RTP/AVP 8 0 3 97 18 112 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:112 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
<------------->
--- (18 headers 18 lines) ---
Sending to 217.10.79.9:5060 (NAT)
Sending to 217.10.79.9:5060 (NAT)
Using INVITE request as basis request - [email protected]
Found peer 'Sipgate' for '01621234567' from 217.10.79.9:5060
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 3
Found RTP audio format 97
Found RTP audio format 18
Found RTP audio format 112
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format PCMU for ID 0
Found audio description format GSM for ID 3
Found audio description format iLBC for ID 97
Found audio description format G729 for ID 18
Found audio description format G726-32 for ID 112
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw), peer - audio=(ulaw|gsm|alaw|g729|ilbc|g726)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 217.10.77.120:29402
Looking for 7280000e0 in from-trunk (domain 84.200.1.1)
sip_route_dump: route/path hop: <sip:217.10.79.9;lr;ftag=as46b5ef13>
sip_route_dump: route/path hop: <sip:172.20.40.8;lr>
sip_route_dump: route/path hop: <sip:217.10.68.137;lr;ftag=as46b5ef13>

<--- Transmitting (no NAT) to 217.10.79.9:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 217.10.79.9;branch=z9hG4bK0ace.fbc71fa816fd94334ed0ae883fdf834b.0;received=217.10.79.9
Via: SIP/2.0/UDP 172.20.40.8;branch=z9hG4bK0ace.439ee4d32d4887facb60d7afa1db2057.3
Via: SIP/2.0/UDP 217.10.68.137;branch=z9hG4bK0ace.a97741e1ae58ee9b7c02f54fe8c81084.0
Via: SIP/2.0/UDP 217.10.77.120:5060;branch=z9hG4bK41b24263
Record-Route: <sip:217.10.79.9;lr;ftag=as46b5ef13>
Record-Route: <sip:172.20.40.8;lr>
Record-Route: <sip:217.10.68.137;lr;ftag=as46b5ef13>
From: "01621234567" <sip:[email protected]>;tag=as46b5ef13
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 103 INVITE
Server: FPBX-13.0.190.20(13.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:[email protected]:5160>
Content-Length: 0


<------------>
-- Executing [7280000e0@from-trunk:1] Set("SIP/Sipgate-00000000", "__DIRECTION=INBOUND") in new stack
-- Executing [7280000e0@from-trunk:2] Gosub("SIP/Sipgate-00000000", "sub-record-check,s,1(in,7280000e0,dontcare)") in new stack
-- Executing [s@sub-record-check:1] GotoIf("SIP/Sipgate-00000000", "0?initialized") in new stack
-- Executing [s@sub-record-check:2] Set("SIP/Sipgate-00000000", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s@sub-record-check:3] Set("SIP/Sipgate-00000000", "NOW=1487704094") in new stack
-- Executing [s@sub-record-check:4] Set("SIP/Sipgate-00000000", "__DAY=21") in new stack
-- Executing [s@sub-record-check:5] Set("SIP/Sipgate-00000000", "__MONTH=02") in new stack
-- Executing [s@sub-record-check:6] Set("SIP/Sipgate-00000000", "__YEAR=2017") in new stack
-- Executing [s@sub-record-check:7] Set("SIP/Sipgate-00000000", "__TIMESTR=20170221-200814") in new stack
-- Executing [s@sub-record-check:8] Set("SIP/Sipgate-00000000", "__FROMEXTEN=unknown") in new stack
-- Executing [s@sub-record-check:9] Set("SIP/Sipgate-00000000", "__MON_FMT=wav") in new stack
-- Executing [s@sub-record-check:10] NoOp("SIP/Sipgate-00000000", "Recordings initialized") in new stack
-- Executing [s@sub-record-check:11] ExecIf("SIP/Sipgate-00000000", "0?Set(ARG3=dontcare)") in new stack
-- Executing [s@sub-record-check:12] Set("SIP/Sipgate-00000000", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s@sub-record-check:13] ExecIf("SIP/Sipgate-00000000", "0?Set(REC_STATUS=NO)") in new stack
-- Executing [s@sub-record-check:14] GotoIf("SIP/Sipgate-00000000", "2?checkaction") in new stack
-- Goto (sub-record-check,s,17)
-- Executing [s@sub-record-check:17] GotoIf("SIP/Sipgate-00000000", "1?sub-record-check,in,1") in new stack
-- Goto (sub-record-check,in,1)
-- Executing [in@sub-record-check:1] NoOp("SIP/Sipgate-00000000", "Inbound Recording Check to 7280000e0") in new stack
-- Executing [in@sub-record-check:2] Set("SIP/Sipgate-00000000", "FROMEXTEN=unknown") in new stack
-- Executing [in@sub-record-check:3] ExecIf("SIP/Sipgate-00000000", "11?Set(FROMEXTEN=01621234567)") in new stack
-- Executing [in@sub-record-check:4] Gosub("SIP/Sipgate-00000000", "recordcheck,1(dontcare,in,7280000e0)") in new stack
-- Executing [recordcheck@sub-record-check:1] NoOp("SIP/Sipgate-00000000", "Starting recording check against dontcare") in new stack
-- Executing [recordcheck@sub-record-check:2] Goto("SIP/Sipgate-00000000", "dontcare") in new stack
-- Goto (sub-record-check,recordcheck,3)
-- Executing [recordcheck@sub-record-check:3] Return("SIP/Sipgate-00000000", "") in new stack
-- Executing [in@sub-record-check:5] Return("SIP/Sipgate-00000000", "") in new stack
-- Executing [7280000e0@from-trunk:3] Set("SIP/Sipgate-00000000", "__FROM_DID=7280000e0") in new stack
-- Executing [7280000e0@from-trunk:4] Set("SIP/Sipgate-00000000", "CDR(did)=7280000e0") in new stack
-- Executing [7280000e0@from-trunk:5] ExecIf("SIP/Sipgate-00000000", "0 ?Set(CALLERID(name)=01621234567)") in new stack
-- Executing [7280000e0@from-trunk:6] Set("SIP/Sipgate-00000000", "__MOHCLASS=") in new stack
-- Executing [7280000e0@from-trunk:7] Set("SIP/Sipgate-00000000", "__REVERSAL_REJECT=FALSE") in new stack
-- Executing [7280000e0@from-trunk:8] GotoIf("SIP/Sipgate-00000000", "1?post-reverse-charge") in new stack
-- Goto (from-trunk,7280000e0,10)
-- Executing [7280000e0@from-trunk:10] NoOp("SIP/Sipgate-00000000", "") in new stack
-- Executing [7280000e0@from-trunk:11] Set("SIP/Sipgate-00000000", "__CALLINGNAMEPRES_SV=allowed_not_screened") in new stack
-- Executing [7280000e0@from-trunk:12] Set("SIP/Sipgate-00000000", "__CALLINGNUMPRES_SV=allowed_not_screened") in new stack
-- Executing [7280000e0@from-trunk:13] Set("SIP/Sipgate-00000000", "CALLERID(name-pres)=allowed_not_screened") in new stack
-- Executing [7280000e0@from-trunk:14] Set("SIP/Sipgate-00000000", "CALLERID(num-pres)=allowed_not_screened") in new stack
-- Executing [7280000e0@from-trunk:15] NoOp("SIP/Sipgate-00000000", "CallerID Entry Point") in new stack
-- Executing [7280000e0@from-trunk:16] Goto("SIP/Sipgate-00000000", "ext-group,5001,1") in new stack
-- Goto (ext-group,5001,1)
-- Executing [5001@ext-group:1] GotoIf("SIP/Sipgate-00000000", "0?cid") in new stack
-- Executing [5001@ext-group:2] PlayTones("SIP/Sipgate-00000000", "ring") in new stack
-- Executing [5001@ext-group:3] Progress("SIP/Sipgate-00000000", "") in new stack
Audio is at 14292
Adding codec ulaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Transmitting (no NAT) to 217.10.79.9:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 217.10.79.9;branch=z9hG4bK0ace.fbc71fa816fd94334ed0ae883fdf834b.0;received=217.10.79.9
Via: SIP/2.0/UDP 172.20.40.8;branch=z9hG4bK0ace.439ee4d32d4887facb60d7afa1db2057.3
Via: SIP/2.0/UDP 217.10.68.137;branch=z9hG4bK0ace.a97741e1ae58ee9b7c02f54fe8c81084.0
Via: SIP/2.0/UDP 217.10.77.120:5060;branch=z9hG4bK41b24263
Record-Route: <sip:217.10.79.9;lr;ftag=as46b5ef13>
Record-Route: <sip:172.20.40.8;lr>
Record-Route: <sip:217.10.68.137;lr;ftag=as46b5ef13>
From: "01621234567" <sip:[email protected]>;tag=as46b5ef13
To: <sip:[email protected]>;tag=as3eddb37e
Call-ID: [email protected]
CSeq: 103 INVITE
Server: FPBX-13.0.190.20(13.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:[email protected]:5160>
Content-Type: application/sdp
Content-Length: 252

v=0
o=root 1519454722 1519454722 IN IP4 84.200.1.1
s=Asterisk PBX 13.14.0
c=IN IP4 84.200.1.1
t=0 0
m=audio 14292 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<------------>
-- Executing [5001@ext-group:4] Macro("SIP/Sipgate-00000000", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/Sipgate-00000000", "TOUCH_MONITOR=1487704094.0") in new stack
-- Executing [s@macro-user-callerid:2] Set("SIP/Sipgate-00000000", "AMPUSER=01621234567") in new stack
-- Executing [s@macro-user-callerid:3] GotoIf("SIP/Sipgate-00000000", "0?report") in new stack
-- Executing [s@macro-user-callerid:4] ExecIf("SIP/Sipgate-00000000", "1?Set(REALCALLERIDNUM=01621234567)") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/Sipgate-00000000", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/Sipgate-00000000", "0?limit") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/Sipgate-00000000", "AMPUSERCIDNAME=") in new stack
-- Executing [s@macro-user-callerid:8] GotoIf("SIP/Sipgate-00000000", "1?report") in new stack
-- Goto (macro-user-callerid,s,15)
-- Executing [s@macro-user-callerid:15] GotoIf("SIP/Sipgate-00000000", "0?continue") in new stack
-- Executing [s@macro-user-callerid:16] Set("SIP/Sipgate-00000000", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:17] GotoIf("SIP/Sipgate-00000000", "1?continue") in new stack
-- Goto (macro-user-callerid,s,28)
-- Executing [s@macro-user-callerid:28] Set("SIP/Sipgate-00000000", "CALLERID(number)=01621234567") in new stack
-- Executing [s@macro-user-callerid:29] Set("SIP/Sipgate-00000000", "CALLERID(name)=01621234567") in new stack
-- Executing [s@macro-user-callerid:30] GotoIf("SIP/Sipgate-00000000", "0?cnum") in new stack
-- Executing [s@macro-user-callerid:31] Set("SIP/Sipgate-00000000", "CDR(cnam)=01621234567") in new stack
-- Executing [s@macro-user-callerid:32] Set("SIP/Sipgate-00000000", "CDR(cnum)=01621234567") in new stack
-- Executing [s@macro-user-callerid:33] Set("SIP/Sipgate-00000000", "CHANNEL(language)=en_GB") in new stack
-- Executing [5001@ext-group:5] Macro("SIP/Sipgate-00000000", "blkvm-setifempty,") in new stack
-- Executing [s@macro-blkvm-setifempty:1] GotoIf("SIP/Sipgate-00000000", "1?init") in new stack
-- Goto (macro-blkvm-setifempty,s,4)
-- Executing [s@macro-blkvm-setifempty:4] Set("SIP/Sipgate-00000000", "__BLKVM_CHANNEL=SIP/Sipgate-00000000") in new stack
-- Executing [s@macro-blkvm-setifempty:5] Set("SIP/Sipgate-00000000", "SHARED(BLKVM,SIP/Sipgate-00000000)=TRUE") in new stack
-- Executing [s@macro-blkvm-setifempty:6] Set("SIP/Sipgate-00000000", "GOSUB_RETVAL=TRUE") in new stack
-- Executing [s@macro-blkvm-setifempty:7] MacroExit("SIP/Sipgate-00000000", "") in new stack
-- Executing [5001@ext-group:6] GotoIf("SIP/Sipgate-00000000", "1?skipov") in new stack
-- Goto (ext-group,5001,9)
-- Executing [5001@ext-group:9] Set("SIP/Sipgate-00000000", "RRNODEST=") in new stack
-- Executing [5001@ext-group:10] Set("SIP/Sipgate-00000000", "__NODEST=5001") in new stack
-- Executing [5001@ext-group:11] GosubIf("SIP/Sipgate-00000000", "0?sub-rgsetcid,s,1()") in new stack
-- Executing [5001@ext-group:12] Gosub("SIP/Sipgate-00000000", "sub-record-check,s,1(rg,5001,dontcare)") in new stack
-- Executing [s@sub-record-check:1] GotoIf("SIP/Sipgate-00000000", "11?initialized") in new stack
-- Goto (sub-record-check,s,10)
-- Executing [s@sub-record-check:10] NoOp("SIP/Sipgate-00000000", "Recordings initialized") in new stack
-- Executing [s@sub-record-check:11] ExecIf("SIP/Sipgate-00000000", "0?Set(ARG3=dontcare)") in new stack
-- Executing [s@sub-record-check:12] Set("SIP/Sipgate-00000000", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s@sub-record-check:13] ExecIf("SIP/Sipgate-00000000", "0?Set(REC_STATUS=NO)") in new stack
-- Executing [s@sub-record-check:14] GotoIf("SIP/Sipgate-00000000", "2?checkaction") in new stack
-- Goto (sub-record-check,s,17)
-- Executing [s@sub-record-check:17] GotoIf("SIP/Sipgate-00000000", "0?sub-record-check,rg,1") in new stack
-- Executing [s@sub-record-check:18] NoOp("SIP/Sipgate-00000000", "Generic rg Recording Check - 01621234567 5001") in new stack
-- Executing [s@sub-record-check:19] Gosub("SIP/Sipgate-00000000", "recordcheck,1(dontcare,rg,5001)") in new stack
-- Executing [recordcheck@sub-record-check:1] NoOp("SIP/Sipgate-00000000", "Starting recording check against dontcare") in new stack
-- Executing [recordcheck@sub-record-check:2] Goto("SIP/Sipgate-00000000", "dontcare") in new stack
-- Goto (sub-record-check,recordcheck,3)
-- Executing [recordcheck@sub-record-check:3] Return("SIP/Sipgate-00000000", "") in new stack
-- Executing [s@sub-record-check:20] Return("SIP/Sipgate-00000000", "") in new stack
-- Executing [5001@ext-group:13] Set("SIP/Sipgate-00000000", "RingGroupMethod=ringall") in new stack
-- Executing [5001@ext-group:14] Macro("SIP/Sipgate-00000000", "dial,30,Ttr,1002-1003") in new stack
-- Executing [s@macro-dial:1] NoOp("SIP/Sipgate-00000000", "Blind Transfer: , Attended Transfer: , User: , Alert Info: ") in new stack
-- Executing [s@macro-dial:2] ExecIf("SIP/Sipgate-00000000", "0?Set(ALERT_INFO=)") in new stack
-- Executing [s@macro-dial:3] ExecIf("SIP/Sipgate-00000000", "0?Set(ALERT_INFO=)") in new stack
-- Executing [s@macro-dial:4] ExecIf("SIP/Sipgate-00000000", "0?Set(ALERT_INFO=)") in new stack
-- Executing [s@macro-dial:5] ExecIf("SIP/Sipgate-00000000", "0?Set(CHANNEL(musicclass)=)") in new stack
-- Executing [s@macro-dial:6] AGI("SIP/Sipgate-00000000", "dialparties.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
 dialparties.agi: Starting New Dialparties.agi
 dialparties.agi: Caller ID name is '01621234567' number is '01621234567'
 dialparties.agi: CW Ignore is:
 dialparties.agi: CF Ignore is:
 dialparties.agi: CW IN_USE/BUSY is: 1
   > dialparties.agi: USE_CONFIRMATION:  'FALSE'
   > dialparties.agi: RINGGROUP_INDEX:   ''
 dialparties.agi: Methodology of ring is  'ringall'
-- dialparties.agi: Added extension 1002 to extension map
-- dialparties.agi: Added extension 1003 to extension map
-- dialparties.agi: Extension 1002 cf is disabled
-- dialparties.agi: Extension 1003 cf is disabled
-- dialparties.agi: Extension 1002 do not disturb is disabled
-- dialparties.agi: Extension 1003 do not disturb is disabled
   > dialparties.agi: extnum 1002 has:  cw: 1; hascfb: 0 [] hascfu: 0 []
  == dialparties.agi: Discovered PJSIP Endpoint PJSIP/1002
-- dialparties.agi: Ended up with real PJSIP Dial string PJSIP/1002/sip:[email protected]:5160;line=9m4vgdv3
-- dialparties.agi: dbset CALLTRACE/1002 to 01621234567
   > dialparties.agi: extnum 1003 has:  cw: 1; hascfb: 0 [] hascfu: 0 []
  == dialparties.agi: Discovered PJSIP Endpoint PJSIP/1003
-- dialparties.agi: Ended up with real PJSIP Dial string PJSIP/1003/sip:[email protected]:5260;rinstance=496361c31e701c5c
-- dialparties.agi: dbset CALLTRACE/1003 to 01621234567
-- dialparties.agi: Filtered ARG3: 1002-1003
   > dialparties.agi: NODEST: 5001 adding M(auto-blkvm) to dialopts: TtrM(auto-blkvm)
   > dialparties.agi: NODEST: 5001 blkvm enabled macro already in dialopts: TtrM(auto-blkvm)
-- <SIP/Sipgate-00000000>AGI Script dialparties.agi completed, returning 0
-- Executing [s@macro-dial:9] NoOp("SIP/Sipgate-00000000", "Returned from dialparties with groups to dial") in new stack
-- Executing [s@macro-dial:10] Set("SIP/Sipgate-00000000", "LOOPCNT=2") in new stack
-- Executing [s@macro-dial:11] Set("SIP/Sipgate-00000000", "ITER=1") in new stack
-- Executing [s@macro-dial:12] Set("SIP/Sipgate-00000000", "EXTTOCALL=1002") in new stack
-- Executing [s@macro-dial:13] NoOp("SIP/Sipgate-00000000", "Working with 1002") in new stack
-- Executing [s@macro-dial:14] ExecIf("SIP/Sipgate-00000000", "0?Set(HASH(__SIPHEADERS,Alert-Info)=;volume=)") in new stack
-- Executing [s@macro-dial:15] ExecIf("SIP/Sipgate-00000000", "0?Set(HASH(__SIPHEADERS,Alert-Info)=;volume=)") in new stack
-- Executing [s@macro-dial:16] Set("SIP/Sipgate-00000000", "ITER=2") in new stack
-- Executing [s@macro-dial:17] GotoIf("SIP/Sipgate-00000000", "1?ndloopbegin") in new stack
-- Goto (macro-dial,s,12)
-- Executing [s@macro-dial:12] Set("SIP/Sipgate-00000000", "EXTTOCALL=1003") in new stack
-- Executing [s@macro-dial:13] NoOp("SIP/Sipgate-00000000", "Working with 1003") in new stack
-- Executing [s@macro-dial:14] ExecIf("SIP/Sipgate-00000000", "0?Set(HASH(__SIPHEADERS,Alert-Info)=;volume=)") in new stack
-- Executing [s@macro-dial:15] ExecIf("SIP/Sipgate-00000000", "0?Set(HASH(__SIPHEADERS,Alert-Info)=;volume=)") in new stack
-- Executing [s@macro-dial:16] Set("SIP/Sipgate-00000000", "ITER=3") in new stack
-- Executing [s@macro-dial:17] GotoIf("SIP/Sipgate-00000000", "0?ndloopbegin") in new stack
-- Executing [s@macro-dial:18] Macro("SIP/Sipgate-00000000", "dial-ringall-predial-hook,") in new stack
-- Executing [s@macro-dial-ringall-predial-hook:1] MacroExit("SIP/Sipgate-00000000", "") in new stack
-- Executing [s@macro-dial:19] Dial("SIP/Sipgate-00000000", "PJSIP/1002/sip:[email protected]:5160;line=9m4vgdv3&PJSIP/1003/sip:[email protected]:5260;rinstance=496361c31e701c5c,30,trM(auto-blkvm)b(func-apply-sipheaders^s^1),") in new stack
-- PJSIP/1002-00000000 Internal Gosub(func-apply-sipheaders,s,1) start
-- Executing [s@func-apply-sipheaders:1] NoOp("PJSIP/1002-00000000", "Applying SIP Headers to channel") in new stack
-- Executing [s@func-apply-sipheaders:2] Set("PJSIP/1002-00000000", "SIPHEADERKEYS=") in new stack
-- Executing [s@func-apply-sipheaders:3] While("PJSIP/1002-00000000", "0") in new stack
-- Jumping to priority 7
-- Executing [s@func-apply-sipheaders:8] Return("PJSIP/1002-00000000", "") in new stack
  == Spawn extension (from-internal, 5001, 1) exited non-zero on 'PJSIP/1002-00000000'
-- PJSIP/1002-00000000 Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
-- PJSIP/1003-00000001 Internal Gosub(func-apply-sipheaders,s,1) start
-- Executing [s@func-apply-sipheaders:1] NoOp("PJSIP/1003-00000001", "Applying SIP Headers to channel") in new stack
-- Executing [s@func-apply-sipheaders:2] Set("PJSIP/1003-00000001", "SIPHEADERKEYS=") in new stack
-- Executing [s@func-apply-sipheaders:3] While("PJSIP/1003-00000001", "0") in new stack
-- Jumping to priority 7
-- Executing [s@func-apply-sipheaders:8] Return("PJSIP/1003-00000001", "") in new stack
  == Spawn extension (from-internal, 5001, 1) exited non-zero on 'PJSIP/1003-00000001'
-- PJSIP/1003-00000001 Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
-- Called PJSIP/1002/sip:[email protected]:5160;line=9m4vgdv3
-- Called PJSIP/1003/sip:[email protected]:5260;rinstance=496361c31e701c5c
-- PJSIP/1003-00000001 connected line has changed. Saving it until answer for SIP/Sipgate-00000000
-- PJSIP/1002-00000000 connected line has changed. Saving it until answer for SIP/Sipgate-00000000
-- PJSIP/1003-00000001 is ringing
-- PJSIP/1002-00000000 is ringing
-- PJSIP/1002-00000000 is ringing

<--- SIP read from UDP:217.10.79.9:5060 --->
CANCEL sip:[email protected]:5160 SIP/2.0
Record-Route: <sip:217.10.79.9;lr;ftag=as46b5ef13>
Via: SIP/2.0/UDP 217.10.79.9;branch=z9hG4bK0ace.fbc71fa816fd94334ed0ae883fdf834b.0
Via: SIP/2.0/UDP 172.20.40.8;branch=z9hG4bK0ace.439ee4d32d4887facb60d7afa1db2057.3
Max-Forwards: 67
From: "01621234567" <sip:[email protected]>;tag=as46b5ef13
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 103 CANCEL
Content-Length: 0

<------------->
--- (10 headers 0 lines) ---
Sending to 217.10.79.9:5060 (no NAT)

<--- Reliably Transmitting (no NAT) to 217.10.79.9:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 217.10.79.9;branch=z9hG4bK0ace.fbc71fa816fd94334ed0ae883fdf834b.0;received=217.10.79.9
Via: SIP/2.0/UDP 172.20.40.8;branch=z9hG4bK0ace.439ee4d32d4887facb60d7afa1db2057.3
Via: SIP/2.0/UDP 217.10.68.137;branch=z9hG4bK0ace.a97741e1ae58ee9b7c02f54fe8c81084.0
Via: SIP/2.0/UDP 217.10.77.120:5060;branch=z9hG4bK41b24263
From: "01621234567" <sip:[email protected]>;tag=as46b5ef13
To: <sip:[email protected]>;tag=as3eddb37e
Call-ID: [email protected]
CSeq: 103 INVITE
Server: FPBX-13.0.190.20(13.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>

<--- Transmitting (no NAT) to 217.10.79.9:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 217.10.79.9;branch=z9hG4bK0ace.fbc71fa816fd94334ed0ae883fdf834b.0;received=217.10.79.9
Via: SIP/2.0/UDP 172.20.40.8;branch=z9hG4bK0ace.439ee4d32d4887facb60d7afa1db2057.3
Record-Route: <sip:217.10.79.9;lr;ftag=as46b5ef13>
From: "01621234567" <sip:[email protected]>;tag=as46b5ef13
To: <sip:[email protected]>;tag=as3eddb37e
Call-ID: [email protected]
CSeq: 103 CANCEL
Server: FPBX-13.0.190.20(13.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
  == Spawn extension (macro-dial, s, 19) exited non-zero on 'SIP/Sipgate-00000000' in macro 'dial'
  == Spawn extension (ext-group, 5001, 14) exited non-zero on 'SIP/Sipgate-00000000'
-- Executing [h@ext-group:1] Macro("SIP/Sipgate-00000000", "hangupcall,") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/Sipgate-00000000", "1?theend") in new stack
-- Goto (macro-hangupcall,s,3)
-- Executing [s@macro-hangupcall:3] ExecIf("SIP/Sipgate-00000000", "0?Set(CDR(recordingfile)=)") in new stack
-- Executing [s@macro-hangupcall:4] Hangup("SIP/Sipgate-00000000", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/Sipgate-00000000' in macro 'hangupcall'
  == Spawn extension (ext-group, h, 1) exited non-zero on 'SIP/Sipgate-00000000'

<--- SIP read from UDP:217.10.79.9:5060 --->
ACK sip:[email protected]:5160 SIP/2.0
Via: SIP/2.0/UDP 217.10.79.9;branch=z9hG4bK0ace.fbc71fa816fd94334ed0ae883fdf834b.0
Via: SIP/2.0/UDP 172.20.40.8;branch=z9hG4bK0ace.439ee4d32d4887facb60d7afa1db2057.3
Max-Forwards: 67
From: "01621234567" <sip:[email protected]>;tag=as46b5ef13
To: <sip:[email protected]>;tag=as3eddb37e
Call-ID: [email protected]
CSeq: 103 ACK
Content-Length: 0
X-hint: rr-enforced

<------------->
--- (10 headers 0 lines) ---
Really destroying SIP dialog '[email protected]' Method: ACK
[2017-02-21 20:08:17] WARNING[1225]: res_pjsip_pubsub.c:3164 pubsub_on_rx_publish_request: No registered publish handler for event presence
[2017-02-21 20:08:17] WARNING[1225]: res_pjsip_pubsub.c:640 subscription_get_handler_from_rdata: No registered subscribe handler for event presence.winfo

Hi Maximilian!

Okā€¦ So you have a trunk for each one of them, right?

They donā€™t need toā€¦

If you have two trunks each trunk can have its own context (or the same, more on that later) which later goes to the from-trunk oneā€¦

No, not if you make sure that once your custom context goes to the from-trunk/ext-did context your DID has been set appropriatelyā€¦

Your sipgate business account could have a context called from-trunk-sipgate-business that sets the right business DID and then goes to from-trunk.

Similarly sipgate business account count have a context called from-trunk-sipgate-private that sets the right private DID and then goes to from-trunk.

Now, this is not scalableā€¦ If you later add other DIDs to either your business or private account that would force you to have one account per DID which is a painā€¦

In the log you just posted, did you see the real DID somewhere? If so, what did you replace it with?

If you did you could do a from-trunk-sipgate context that gets the DID from wherever it was, set it and then goes to the real from-trunkā€¦

As I said, as long as you do all the necessary manipulations in your custom context (which you will put in extensions_custom.conf) you will be able to use the FreePBX inbound routes as if you had used a provider that passes the DID in the normal/usual wayā€¦

Good luck and have a nice day!

Nick

A couple of weeks ago, we were trying to help a guy in a similar spot. None of his trunks had DID information, so he had to write a context that pulled the DID info out of a different header.

Now, having said that, it should be possible to find a SIP header (or request a SIP header from the ITSP) that has the DID in it. If you can find/request that, you should be able to write a simple context that sets in inbound DID to something appropriate and have the call get routed through ā€œfrom-trunkā€.

Another possibility is that you can have two inbound routes. One is a default ā€œno DID/no CIDā€ route that grabs everything and the other reacts to something in the DID information. This would work if your ā€œbusinessā€ account actually transferred a DID to you in a relatively standard DID header, but the personal trunk didnā€™t.

Another possibility is to grab the E0 or E1 part and add your own ā€œextensionā€ number to it.

An important part of any solution is going to be changing the inbound route context so that you can split the calls into one of two (or more) destinations. A couple of years ago, I had a DAHDI connected system that would do an immediate answer. This would mean I would get no DID information at all. I set it up so that DAHDI0 and DAHDI1 went to different inbound contexts, set the DID for the incoming line, and then dropped the call into ā€œfrom-pstnā€.

Presumably the e0 account is one did , the e1 another, a quick remap in a custom context that goes to from-did-direct should work, there is no requirement that sip endpoints be numeric anywhere but freepbx, perhaps a feature request to correct that oversight?

There is a sip alias concept, but i think that only kicks in on internal calls, i might be wrong . . .

1 Like

Hi!

If no SIP header contains the information the easiest way to deal with this would be something like

[from-trunk-sipgate-business]
exten => _.,1,Noop(Setting DID to 123123123)
exten => _.,n,Goto(from-trunk,123123123,1)

[from-trunk-sipgate-private]
exten => _.,1,Noop(Setting DID to 456456456)
exten => _.,n,Goto(from-trunk,456456456,1)

in extensions_custom.conf

and assign these context to the appropriate trunksā€¦

In my example 123123123 is the business DID, 456456456 is the private DIDā€¦

I donā€™t like this since it is not scalable but if there are no other wayā€¦

Good luck and have a nice day!

Nick

1 Like

Just to say that Iā€™m also having issues with Sipgateā€™s DID and the fact itā€™s not just numbers. My setup works with no DID for the Sipgate inbound routeā€¦can I just leave it or am I experiencing problems I donā€™t even know about??
My Sipgate DID is in the format 1443361e0

OK. Iā€™m not sure whatā€™s going on with your system, but Iā€™m just going to verify that the words you use mean the same things as everyone else.

You should always have an ā€œany/anyā€ inbound route (no DID and no CID) to catch calls that come in that donā€™t match your configured routes.

DID is Direct Inbound Dial number and itā€™s the number people call to connect to you. The Sipgate DID you are saying you were assigned doesnā€™t make sense - thereā€™s no way for anyone else to dial it.

CID is Caller ID and it has two parts, the CallerID Name and CallerID Number. For Inbound Routes, the CID Number is the only part you can parse and mess with.

So, your specific question: you do not need to identify all of the inbound DIDs for your system. Your ā€œany/anyā€ route will catch anything that hits your system and will process it to the ā€œdefault destinationā€ for your system (typically like an IVR or voicemail).

Thanks, Dave, think I got it sorted - I changed the register string to user:pass/did from user:pass/user and Sipgate started sending me the DID instead of the username! Thank you!

Changing the Sipgate register string didnā€™t work for me, so I worked out a hack to get around the numeric only input field restriction.

When entering your DIDs on Inbound Routes page enter them without the alpha e.g. 1234567e0 -> 12345670. Submit them but do not click the red apply changes button yet.

ssh to your FreePBX server and update its mysql incoming table, e.g.

mysql
use asterisk;
update incoming set extension='1234567e0' where extension='12345670';
update incoming set extension='2345678e1' where extension='23456781';

etc. Confirm the tables have been updated and quit mysql:

select * from incoming;
quit

Now go back to FreePBX and click on the red apply changes button. Re-open your Inbound Routes page you will see the correct DIDs :wink:

If you ever need to edit an inbound route in the future you will have to edit the ā€˜eā€™ from the DID before submitting, then run the SQL as above.

Perhaps create a bash script to automatically do this, e.g. (all one line)

echo > didfix.sh "mysql -D asterisk -e \"update incoming set extension='1234567e0' where extension='12345670'; update incoming set extension='2345678e1' where extension='23456781'; select * from incoming;\""

Then make it executable:

chmod 755 didfix.sh

When ever you alter a route just ssh in and run

./didfix.sh

Sorry if Iā€™m teaching grandma to suck eggs here :wink:

Faced with the same problem, I would solve it very differently: DID from provider breaks incoming routes (DID matching)

2 Likes

Lorne, thanks for that - itā€™s all a bit double dutch right now as I am a total newb at Asterisk/FreePBX. My method works but Iā€™m sure yours is far superior. I will figure it out. :+1:

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