Koozali.org: home of the SME Server

Alias cuts off extensions

Offline fred2k3

  • ***
  • 49
  • +0/-0
Alias cuts off extensions
« on: May 17, 2013, 07:13:34 PM »
SAIL 3.1.2-22

I have setup an alias with standard options except:
Type: Ring
Target: 6000 07xxxxxxxxx (i.e. 1 extension and 1 mobile)

When I dial the alias, the extension rings once then stops, and then the mobile rings. I can't work out why the extension stops ringing. It's nothing to do with Ring time or hunt groups and I've tried changing those options. Here is the SIP trace:

Code: [Select]
  == Using SIP RTP CoS mark 5
    -- Executing [2000@internal:1] AGI("SIP/6005-00000185", "sarkhpe,Alias,SIP/6000 Local/07xxxxxxxxx@internal,2000,") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/sarkhpe
    -- AGI Script Executing Application: (Set) Options: (CALLERID(rdnis)=2000)
    -- AGI Script Executing Application: (Dial) Options: (SIP/6000&Local/07xxxxxxxxx@internal,150,ctI)
  == Using SIP RTP CoS mark 5
    -- Called SIP/6000
    -- Called SIP/07xxxxxxxxx@peer2150


!! NOT CODE !!! At this point 6000 stops ringing !! NOT CODE !!!


    -- SIP/peer2150-00000196 is making progress passing it to Local/07xxxxxxxxx@internal-a4bf;2
    -- Local/07xxxxxxxxx@internal-a4bf;2 requested special control 20, passing it to SIP/peer2150-00000196
    -- Local/07xxxxxxxxx@internal-a4bf;2 requested special control 20, passing it to SIP/peer2150-00000196
    -- SIP/peer2150-00000196 is ringing


Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Alias cuts off extensions
« Reply #1 on: May 19, 2013, 09:32:03 PM »
what happens if you remove the mobile from the group?

S

Offline fred2k3

  • ***
  • 49
  • +0/-0
Re: Alias cuts off extensions
« Reply #2 on: May 20, 2013, 11:40:28 AM »
If there are no mobile numbers then the extensions carry on ringing, and it works fine with several extensions. It's just when a mobile number is entered that it causes the extension to stop after 1 ring.

Offline fred2k3

  • ***
  • 49
  • +0/-0
Re: Alias cuts off extensions
« Reply #3 on: May 23, 2013, 12:36:31 PM »
Anyone else get this problem or know how to get around it?

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Alias cuts off extensions
« Reply #4 on: May 28, 2013, 01:05:01 AM »
HI there

I can't recreate this.  It works just fine on the reference system.  I think you will need to provide a SIP trace (what you've posted is an Asterisk console trace).   To get a SIP trace for your SIP carrier; at the asterisk console do

Code: [Select]
sip set debug peer peer2150
Then run your call again and post the console output or send it to admin@aelintra.com

Kind Regards
S

Offline fred2k3

  • ***
  • 49
  • +0/-0
Re: Alias cuts off extensions
« Reply #5 on: May 29, 2013, 03:07:29 PM »
Thanks. Here's the SIP trace:

Code: [Select]

  == Using SIP RTP CoS mark 5
    -- Executing [2000@internal:1] AGI("SIP/6005-000004af", "sarkhpe,Alias,SIP/6000 Local/07xxxxxxxxx@internal,2000,") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/sarkhpe
    -- AGI Script Executing Application: (Set) Options: (CALLERID(rdnis)=2000)
    -- AGI Script Executing Application: (Dial) Options: (SIP/6000&Local/07xxxxxxxxx@internal,150,ctI)
  == Using SIP RTP CoS mark 5
    -- Called SIP/6000
    -- Called Local/07xxxxxxxxx@internal
    -- Connected line update to SIP/6005-000004af prevented.
    -- Executing [07xxxxxxxxx@internal:1] AGI("Local/07xxxxxxxxx@internal-5983;2", "sarkhpe,OutRoute,Mobile,,") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/sarkhpe
    -- Local/07xxxxxxxxx@internal-5983;1 answered SIP/6005-000004af
    -- AGI Script Executing Application: (Set) Options: (TIMEOUT(absolute)=14400)
Channel will hangup at 2013-05-29 17:39:27.280 BST.
    -- AGI Script Executing Application: (Dial) Options: (SIP/07xxxxxxxxx@peer2150,,T)
  == Using SIP RTP CoS mark 5
Audio is at 5060
Adding codec 0x100 (g729) to SDP
Adding codec 0x8 (alaw) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to **SIP provider IP**:5060:
INVITE sip:07xxxxxxxxx@**SIP provider domain name** SIP/2.0
Via: SIP/2.0/UDP **PBX Ext IP**:5060;branch=z9hG4bK5c3d7df1
Max-Forwards: 70
From: "**ISDN number**" <sip:**ISDN number**@**PBX Ext IP**>;tag=as3f8f18b3
To: <sip:07xxxxxxxxx@**SIP provider domain name**>
Contact: <sip:**ISDN number**@**PBX Ext IP**:5060>
Call-ID: 5ee1ad47173ff0b7515c664041b196a1@**PBX Ext IP**:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.8.7.0
Date: Wed, 29 May 2013 12:39:27 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Diversion: <sip:2000@**PBX Ext IP**>;reason=unknown
Content-Type: application/sdp
Content-Length: 309

v=0
o=root 1365188724 1365188724 IN IP4 **PBX Ext IP**
s=Asterisk PBX 1.8.7.0
c=IN IP4 **PBX Ext IP**
t=0 0
m=audio 15940 RTP/AVP 18 8 0 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
    -- Called SIP/07xxxxxxxxx@peer2150

<--- SIP read from UDP:**SIP provider IP**:5060 --->
SIP/2.0 100 Giving a try
Via: SIP/2.0/UDP **PBX Ext IP**:5060;branch=z9hG4bK5c3d7df1
From: "**ISDN number**" <sip:**ISDN number**@**PBX Ext IP**>;tag=as3f8f18b3
To: <sip:07xxxxxxxxx@**SIP provider domain name**>
Call-ID: 5ee1ad47173ff0b7515c664041b196a1@**PBX Ext IP**:5060
CSeq: 102 INVITE
Server: OpenSIPS (1.6.4-2-notls (x86_64/linux))
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---
Reliably Transmitting (no NAT) to **SIP provider IP**:5060:
OPTIONS sip:**SIP provider domain name** SIP/2.0
Via: SIP/2.0/UDP **PBX Ext IP**:5060;branch=z9hG4bK4d335944
Max-Forwards: 70
From: "asterisk" <sip:asterisk@**PBX Ext IP**>;tag=as2731a4ce
To: <sip:**SIP provider domain name**>
Contact: <sip:asterisk@**PBX Ext IP**:5060>
Call-ID: 433e18fb50afef3c6f46649731d814da@**PBX Ext IP**:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.8.7.0
Date: Wed, 29 May 2013 12:39:37 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


---

<--- SIP read from UDP:**SIP provider IP**:5060 --->
SIP/2.0 500 Method/domain not supported on SIP Trunk Out
Via: SIP/2.0/UDP **PBX Ext IP**:5060;branch=z9hG4bK4d335944
From: "asterisk" <sip:asterisk@**PBX Ext IP**>;tag=as2731a4ce
To: <sip:**SIP provider domain name**>;tag=7377d6fcaaaac332b0d1d095d1ff234a.6d0c
Call-ID: 433e18fb50afef3c6f46649731d814da@**PBX Ext IP**:5060
CSeq: 102 OPTIONS
Server: OpenSIPS (1.6.4-2-notls (x86_64/linux))
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---
Really destroying SIP dialog '433e18fb50afef3c6f46649731d814da@**PBX Ext IP**:5060' Method: OPTIONS

<--- SIP read from UDP:**SIP provider IP**:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP **PBX Ext IP**:5060;branch=z9hG4bK5c3d7df1
From: "**ISDN number**" <sip:**ISDN number**@**PBX Ext IP**>;tag=as3f8f18b3
To: <sip:07xxxxxxxxx@**SIP provider domain name**>;tag=as6ff9a8c8
Call-ID: 5ee1ad47173ff0b7515c664041b196a1@**PBX Ext IP**:5060
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:*77136147%2307xxxxxxxxx@212.11.91.73>
Content-Length: 0

<------------->
--- (10 headers 0 lines) ---
    -- SIP/peer2150-000004b1 is ringing
    -- Local/07xxxxxxxxx@internal-5983;2 requested special control 20, passing it to SIP/peer2150-000004b1
    -- Local/07xxxxxxxxx@internal-5983;2 requested special control 20, passing it to SIP/peer2150-000004b1

<--- SIP read from UDP:**SIP provider IP**:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP **PBX Ext IP**:5060;branch=z9hG4bK5c3d7df1
From: "**ISDN number**" <sip:**ISDN number**@**PBX Ext IP**>;tag=as3f8f18b3
To: <sip:07xxxxxxxxx@**SIP provider domain name**>;tag=as6ff9a8c8
Call-ID: 5ee1ad47173ff0b7515c664041b196a1@**PBX Ext IP**:5060
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:*77136147%2307xxxxxxxxx@212.11.91.73>
Content-Type: application/sdp
Content-Length: 240

v=0
o=root 12059 12059 IN IP4 212.11.91.73
s=session
c=IN IP4 212.11.91.73
t=0 0
m=audio 14766 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
<------------->
--- (11 headers 12 lines) ---
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - 0x10c (ulaw|alaw|g729), peer - audio=0x8 (alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 212.11.91.73:14766
    -- SIP/peer2150-000004b1 is making progress passing it to Local/07xxxxxxxxx@internal-5983;2
    -- Local/07xxxxxxxxx@internal-5983;2 requested special control 20, passing it to SIP/peer2150-000004b1
    -- Local/07xxxxxxxxx@internal-5983;2 requested special control 20, passing it to SIP/peer2150-000004b1
    -- Executing [h@internal:1] Hangup("SIP/6005-000004af", "") in new stack
  == Spawn extension (internal, h, 1) exited non-zero on 'SIP/6005-000004af'
    -- Local/07xxxxxxxxx@internal-5983;2 requested special control 20, passing it to SIP/peer2150-000004b1
Scheduling destruction of SIP dialog '5ee1ad47173ff0b7515c664041b196a1@**PBX Ext IP**:5060' in 6400 ms (Method: INVITE)
Reliably Transmitting (no NAT) to **SIP provider IP**:5060:
CANCEL sip:07xxxxxxxxx@**SIP provider domain name** SIP/2.0
Via: SIP/2.0/UDP **PBX Ext IP**:5060;branch=z9hG4bK5c3d7df1
Max-Forwards: 70
From: "**ISDN number**" <sip:**ISDN number**@**PBX Ext IP**>;tag=as3f8f18b3
To: <sip:07xxxxxxxxx@**SIP provider domain name**>
Call-ID: 5ee1ad47173ff0b7515c664041b196a1@**PBX Ext IP**:5060
CSeq: 102 CANCEL
User-Agent: Asterisk PBX 1.8.7.0
Reason: SIP;cause=200;text="Call completed elsewhere"
Content-Length: 0


---
Scheduling destruction of SIP dialog '5ee1ad47173ff0b7515c664041b196a1@**PBX Ext IP**:5060' in 6400 ms (Method: INVITE)
    -- <SIP/6005-000004af>AGI Script sarkhpe completed, returning 4
  == Spawn extension (internal, 2000, 1) exited non-zero on 'SIP/6005-000004af'
    -- <Local/07xxxxxxxxx@internal-5983;2>AGI Script sarkhpe completed, returning 4
  == Spawn extension (internal, 07xxxxxxxxx, 1) exited non-zero on 'Local/07xxxxxxxxx@internal-5983;2'
    -- Executing [h@internal:1] Hangup("Local/07xxxxxxxxx@internal-5983;2", "") in new stack
  == Spawn extension (internal, h, 1) exited non-zero on 'Local/07xxxxxxxxx@internal-5983;2'

<--- SIP read from UDP:**SIP provider IP**:5060 --->
SIP/2.0 200 canceling
Via: SIP/2.0/UDP **PBX Ext IP**:5060;branch=z9hG4bK5c3d7df1
From: "**ISDN number**" <sip:**ISDN number**@**PBX Ext IP**>;tag=as3f8f18b3
To: <sip:07xxxxxxxxx@**SIP provider domain name**>;tag=e679694d172e7ed7ac82cbbb8045e301-fc13
Call-ID: 5ee1ad47173ff0b7515c664041b196a1@**PBX Ext IP**:5060
CSeq: 102 CANCEL
Server: OpenSIPS (1.6.4-2-notls (x86_64/linux))
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:**SIP provider IP**:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP **PBX Ext IP**:5060;branch=z9hG4bK5c3d7df1
From: "**ISDN number**" <sip:**ISDN number**@**PBX Ext IP**>;tag=as3f8f18b3
To: <sip:07xxxxxxxxx@**SIP provider domain name**>;tag=as6ff9a8c8
Call-ID: 5ee1ad47173ff0b7515c664041b196a1@**PBX Ext IP**:5060
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
Transmitting (no NAT) to **SIP provider IP**:5060:
ACK sip:07xxxxxxxxx@**SIP provider domain name** SIP/2.0
Via: SIP/2.0/UDP **PBX Ext IP**:5060;branch=z9hG4bK5c3d7df1
Max-Forwards: 70
From: "**ISDN number**" <sip:**ISDN number**@**PBX Ext IP**>;tag=as3f8f18b3
To: <sip:07xxxxxxxxx@**SIP provider domain name**>;tag=as6ff9a8c8
Contact: <sip:**ISDN number**@**PBX Ext IP**:5060>
Call-ID: 5ee1ad47173ff0b7515c664041b196a1@**PBX Ext IP**:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.8.7.0
Content-Length: 0


---
Really destroying SIP dialog '5ee1ad47173ff0b7515c664041b196a1@**PBX Ext IP**:5060' Method: INVITE


Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Alias cuts off extensions
« Reply #6 on: May 29, 2013, 06:18:15 PM »
Hi There

You might want to show this trace to your SIP carrier.   They look to be terminating the 07 call earlier than they should (i.e. before they've pushed it onto the PSTN network).  This is causing the local extension call to be cancelled.   Suggest you try the same call with another carrier to see what happens.

Kind Regards

S

 

Offline fred2k3

  • ***
  • 49
  • +0/-0
Re: Alias cuts off extensions
« Reply #7 on: May 29, 2013, 06:31:24 PM »
Ok, thank you for the suggestion - I'll speak to the SIP carrier.

Offline fred2k3

  • ***
  • 49
  • +0/-0
Re: Alias cuts off extensions
« Reply #8 on: June 13, 2013, 06:07:10 PM »
Our SIP carrier has run further traces and found what is causing the problem. The difference between a normal call via our carrier's SIP trunk and a diversion is the FROM FIELD IN THE sip headers:

Successful outbound calls are presenting - From: "01*********" i.e.
sip:01*********@PBX-IP-Address which is acceptable:

However on a diversion (through the call group) it is presenting From: "asterisk" i.e.
sip:asterisk@PBX-IP-Address which is not acceptable.

We need to be presenting sip:number@ipaddress not sip:asterisk@ipaddress

How can this be resolved?

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Alias cuts off extensions
« Reply #9 on: June 19, 2013, 01:39:22 PM »
Maybe I'm reading your sip trace wrongly but that's not consistent with the trace you posted.   In all cases (except for routine options/notifies which asterisk sent to the carrier), the from address contains the inbound ISDN caller number.  However, be that as it may, I think you have a flag switched on in globals->Call-Control.  It is called CFWD ANSWER.   Please set it to disabled.   This will cause the internal phones to continue ringing.  Whether it will cause your carrier to honour the call I can't say until you run it.

Kind Regards
S

Offline fred2k3

  • ***
  • 49
  • +0/-0
Re: Alias cuts off extensions
« Reply #10 on: June 19, 2013, 02:22:40 PM »
Fantastic, disabling CFWD ANSWER appears to have done the trick. Many thanks.