I have it working. It was the dialplan. Assume my cell number is 123-456-7890. First I called the 7-digit version, then the 10-digit version, and finally the 11-digit version. All worked, but the 11-digit one I cannot figure out. It dials 10-digits instead of all 11. It works, but is not correct. Check the logs below. I censored my name, number, and extension in the logs.

```
[Jul 31 09:47:27] NOTICE[18331] Ext. 4567890: Dialing out from "Hidden Desk" <X> to 11234567890 through Nextiva
[Jul 31 09:47:43] NOTICE[18336] Ext. 1234567890: Dialing out from "Hidden Desk" <X> to 11234567890 through Nextiva
[Jul 31 09:48:03] NOTICE[18378] Ext. 11234567890: Dialing out from "Hidden Desk" <X> to 1234567890 through Nextiva
```

Here is the current dialplan.

```
; 11-digit full numbers with country code
exten => _1NXXNXXXXXX,1,Log(NOTICE, Dialing out from ${CALLERID(all)} to ${EXTEN:1} through Nextiva)
exten => _1NXXNXXXXXX,2,Dial(SIP/nextiva/${EXTEN:1},120)
exten => _1NXXNXXXXXX,n,Hangup()
; 10-digit cell-style numbers
exten => _NXXNXXXXXX,1,Log(NOTICE, Dialing out from ${CALLERID(all)} to 1${EXTEN} through Nextiva)
exten => _NXXNXXXXXX,2,Dial(SIP/nextiva/1${EXTEN},120)
exten => _NXXNXXXXXX,n,Hangup()
; 7-digit local numbers
exten => _NXXXXXX,1,Log(NOTICE, Dialing out from ${CALLERID(all)} to 1910${EXTEN} through Nextiva)
exten => _NXXXXXX,2,Dial(SIP/nextiva/1910${EXTEN},120)
exten => _NXXXXXX,n,Hangup()
```

I am not sure what is up here. Advice?

*UPDATE*

Fixed it. I forgot to remove “:1” from my variable. All is good now! For others who may need help, here is my dialplan.

```
; 11-digit full numbers with country code
exten => _1NXXNXXXXXX,1,Log(NOTICE, Dialing out from ${CALLERID(all)} to ${EXTEN} through Nextiva)
exten => _1NXXNXXXXXX,2,Dial(SIP/nextiva/${EXTEN},120)
exten => _1NXXNXXXXXX,n,Playtones(congestion)
exten => _1NXXNXXXXXX,n,Hangup()
; 10-digit cell-style numbers
exten => _NXXNXXXXXX,1,Log(NOTICE, Dialing out from ${CALLERID(all)} to 1${EXTEN} through Nextiva)
exten => _NXXNXXXXXX,2,Dial(SIP/nextiva/1${EXTEN},120)
exten => _NXXNXXXXXX,n,Playtones(congestion)
exten => _NXXNXXXXXX,n,Hangup()
; 7-digit local numbers
exten => _NXXXXXX,1,Log(NOTICE, Dialing out from ${CALLERID(all)} to 1910${EXTEN} through Nextiva)
exten => _NXXXXXX,2,Dial(SIP/nextiva/1910${EXTEN},120)
exten => _NXXXXXX,n,Playtones(congestion)
exten => _NXXXXXX,n,Hangup()
```

Note that my country is the United States and my area code is 910, hence the “1910${EXTEN}” on the local numbers and the “1${EXTEN}” on the 10-digit numbers. Adjust to your needs and it should work.