[asterisk-users] Multiple line phones with different contexts
Aaron Daniel
amdtech at shsu.edu
Mon Oct 23 14:08:27 MST 2006
Hey all,
Has anyone had any issues with phones having multiple lines that are in
different contexts? We've got a couple phones that we're testing
intercom functionality for, and I'm noticing that for some strange
reason, no matter what line we use, the phones tend to be completely in
one context or another, not segregated like I would expect.
Our contexts look like this:
context intercom {
_XXXX => {
Answer;
&check-cid();
Set(CALLERID(num)=${CALLERID(num)} (INT));
SIPAddHeader(Alert-Info: Ring Answer);
&createds(${EXTEN});
Dial(SIP/${ds}|20);
Hangup;
};
};
context long-distance {
includes {
local;
};
_9011 => &dialout(${EXTEN});
_91NXXNXXXXXX => &dialout(${EXTEN});
};
The phones are configured as such:
[0004F2100526_1]
canreinvite=no
context=long-distance
host=dynamic
nat=no
qualify=60000
secret=secret
type=peer
regexten=44198
[0004F2100526_2]
canreinvite=no
context=intercom
host=dynamic
nat=no
qualify=60000
secret=secret
type=peer
regexten=44198
A sip debug from one of the intercoms:
<-- SIP read from 10.20.136.130:5060:
INVITE sip:4000 at tcm1.shsu.edu:5060;user=phone SIP/2.0
Via: SIP/2.0/UDP 10.20.136.130;branch=z9hG4bK2a5fd1d91B78BACE
From: "Aaron Daniel"
<sip:0004F2100526_2 at tcm1.shsu.edu>;tag=DDF0722-FFF8D457
To: <sip:4000 at tcm1.shsu.edu;user=phone>
CSeq: 1 INVITE
Call-ID: dd12cb03-99065278-efdfa12d at 10.20.136.130
Contact: <sip:0004F2100526_2 at 10.20.136.130>
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE,
NOTIFY, PRACK, UPDATE, REFER
User-Agent: PolycomSoundPointIP-SPIP_430-UA/2.0.1.0291
Supported: 100rel,replaces
Allow-Events: talk,hold,conference
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: 251
v=0
o=- 1161637564 1161637564 IN IP4 10.20.136.130
s=Polycom IP Phone
c=IN IP4 10.20.136.130
t=0 0
a=sendrecv
m=audio 2240 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
--- (14 headers 11 lines)---
Using INVITE request as basis request -
dd12cb03-99065278-efdfa12d at 10.20.136.130
Sending to 10.20.136.130 : 5060 (non-NAT)
Found peer '0004F2100526_1'
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 18
Found RTP audio format 101
Peer audio RTP is at port 10.20.136.130:2240
Found description format PCMU
Found description format PCMA
Found description format G729
Found description format telephone-event
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0x10c
(ulaw|alaw|g729)/video=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1
(telephone-event), combined - 0x1 (telephone-event)
Looking for 4000 in long-distance (domain tcm1.shsu.edu)
Reliably Transmitting (no NAT) to 10.20.136.130:5060:
SIP/2.0 484 Address Incomplete
Via: SIP/2.0/UDP
10.20.136.130;branch=z9hG4bK2a5fd1d91B78BACE;received=10.20.136.130
From: "Aaron Daniel"
<sip:0004F2100526_2 at tcm1.shsu.edu>;tag=DDF0722-FFF8D457
To: <sip:4000 at tcm1.shsu.edu;user=phone>;tag=as04c17ab8
Call-ID: dd12cb03-99065278-efdfa12d at 10.20.136.130
CSeq: 1 INVITE
User-Agent: SCM1 - Sip Call Manager 1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:4000 at 10.20.136.6>
Content-Length: 0
---
tcm1*CLI>
<-- SIP read from 10.20.136.130:5060:
ACK sip:4000 at tcm1.shsu.edu:5060 SIP/2.0
Via: SIP/2.0/UDP 10.20.136.130;branch=z9hG4bK2a5fd1d91B78BACE
From: "Aaron Daniel"
<sip:0004F2100526_2 at tcm1.shsu.edu>;tag=DDF0722-FFF8D457
To: <sip:4000 at tcm1.shsu.edu;user=phone>;tag=as04c17ab8
CSeq: 1 ACK
Call-ID: dd12cb03-99065278-efdfa12d at 10.20.136.130
Contact: <sip:0004F2100526_2 at 10.20.136.130>
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE,
NOTIFY, PRACK, UPDATE, REFER
User-Agent: PolycomSoundPointIP-SPIP_430-UA/2.0.1.0291
Max-Forwards: 70
Content-Length: 0
--- (11 headers 0 lines)---
Destroying call 'dd12cb03-99065278-efdfa12d at 10.20.136.130'
Finally, a sip show peer on the intercom line proving asterisk knows
it's in the right context:
tcm1*CLI> sip show peer 0004F2100526_2
tcm1*CLI>
* Name : 0004F2100526_2
Secret : <Set>
MD5Secret : <Not set>
Context : intercom
Subscr.Cont. : <Not set>
Language :
AMA flags : Unknown
CallingPres : Presentation Allowed, Not Screened
Callgroup :
Pickupgroup :
Mailbox : 4198 at default
VM Extension : asterisk
LastMsgsSent : 0
Call limit : 0
Dynamic : Yes
Callerid : "" <>
Expire : 2252
Insecure : port,invite
Nat : RFC3581
ACL : No
CanReinvite : No
PromiscRedir : No
User=Phone : No
Trust RPID : No
Send RPID : Yes
DTMFmode : rfc2833
LastMsg : 0
ToHost :
Addr->IP : 10.20.136.130 Port 5060
Defaddr->IP : 0.0.0.0 Port 5060
Def. Username: 0004F2100526_2
SIP Options : (none)
Codecs : 0x8000e (gsm|ulaw|alaw|h263)
Codec Order : (none)
Status : OK (14 ms)
Useragent : PolycomSoundPointIP-SPIP_430-UA/2.0.1.0291
Reg. Contact : sip:0004F2100526_2 at 10.20.136.130
ANY help would be greatly appreciated :)
--
Aaron Daniel
Computer Systems Technician
Sam Houston State University
amdtech at shsu.edu
(936) 294-4198
More information about the asterisk-users
mailing list