[asterisk-users] Calls being dropped - Cisco 7940 with SIP 8.12 image

2009-10-03 Thread James Stocks
Hi everyone,

I hope someone can help me with a problem I'm having with Cisco 7940  
phones on the SIP 8.12 image.  When I place a call from one of the  
handsets, the call proceeds as normal for 20 seconds and is then  
terminated by Asterisk (1.4.26.2):


[Oct  3 10:08:55] WARNING[1650]: chan_sip.c:1981 retrans_pkt: Maximum  
retries exceeded on transmission 00215553- 
ee04000c-0b5bc1f8-3407d...@172.16.3.245 for seqno 102 (Critical  
Response) -- See doc/sip-retransmit.txt.
[Oct  3 10:08:55] WARNING[1650]: chan_sip.c:2003 retrans_pkt: Hanging  
up call 00215553-ee04000c-0b5bc1f8-3407d...@172.16.3.245 - no reply to  
our critical packet (see doc/sip-retransmit.txt).
 -- Hungup 'Zap/1-1'
   == Spawn extension (my-phones, 917070, 1) exited non-zero on 'SIP/ 
200-103fa658'


Turning on SIP debugging shows that it tries to send the following  
data to the 7940 six times before giving up:


<--- Reliably Transmitting (no NAT) to 172.16.3.245:5061 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP  
172.16.3.245:5061;branch=z9hG4bK1d4425f3;received=172.16.3.245
From: "James" ;tag=00215553ee040030116ccaac-32c56370
To: ;tag=as680ce289
Call-ID: 00215553-ee04000c-0b5bc1f8-3407d...@172.16.3.245
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Contact: 
Content-Type: application/sdp
Content-Length: 258

v=0
o=root 1622 1622 IN IP4 172.16.3.2
s=session
c=IN IP4 172.16.3.2
t=0 0
m=audio 12388 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv


The following was observed on the 7940's telnet console:


SIP Phone>  Warning: Unrecognized attribute (silenceSupp)  Warning:  
Unrecognized attribute (silenceSupp) sip_sm_ccb_match_branch_cseq:  
Method index not found
SIPTaskProcessSIPMessage: Error: sip_sm_determine_ccb(): bad response.  
Dropping message.


As far as I can tell, the 'a=silenceSupp:off - - - -' header is not  
accepted by the 7940, which seems like a bug in the SIP image to me.   
However, I can't find a way to report this problem to Cisco without a  
support contract (which I do not have).  Reverting to version 7.5  
fixes the problem, but it is still present in 8.11.  The problem is  
not present if the PSTN initiates the call, nor is it present if I  
allow the handsets to reinvite each other.  Here's the sip.conf  
snippet if it helps:


[general]
port = 5060
bindaddr = 0.0.0.0
context = others
localnet=172.16.3.0/24

[200]
type=friend
host=dynamic
dtmfmode=rfc2833
nat=no
username=200
secret=*removed*
context=my-phones
canreinvite=no


Anyone else encountered this problem or have a workaround?

Regards,
James.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Calls being dropped - Cisco 7940 with SIP 8.12 image

2009-10-03 Thread James Stocks
On 3 Oct 2009, at 16:37, Jonathan Thurman wrote:

> On Sat, Oct 3, 2009 at 6:17 AM, James Stocks   
> wrote:
>> Hi everyone,
>>
>> I hope someone can help me with a problem I'm having with Cisco 7940
>> phones on the SIP 8.12 image.  When I place a call from one of the
>> handsets, the call proceeds as normal for 20 seconds and is then
>> terminated by Asterisk (1.4.26.2):
>>
>
> We are runing 08-12-00 on 7940/60s just fine (Asterisk 1.6.1.1), and
> have been for a while.
>
>>
>> As far as I can tell, the 'a=silenceSupp:off - - - -' header is not
>> accepted by the 7940, which seems like a bug in the SIP image to me.
>> However, I can't find a way to report this problem to Cisco without a
>> support contract (which I do not have).  Reverting to version 7.5
>> fixes the problem, but it is still present in 8.11.  The problem is
>> not present if the PSTN initiates the call, nor is it present if I
>> allow the handsets to reinvite each other.  Here's the sip.conf
>> snippet if it helps:
>>
>
> That all looks fine to me.  What do your SIPDefault.cnf and
> SIP.cnf files look like?
>
> -Jonathan

Hi Jonathan,

Thanks for your reply.  Here's the two files, SIPDefault.cnf:


# Image Version
image_version: "P0S3-8-12-00"

# Proxy Server
proxy1_address: "pabx.spruce" # IP address here alternatively

# Proxy Registration (0-disable (default), 1-enable)
proxy_register: "1"

# Setting for Message
messages_uri: "222"

# Time Server
sntp_mode: "unicast"
sntp_server: "snakebite.spruce" # IP address here alternatively
time_zone: "GMT"
dst_offset: "1"
dst_start_month: "March"
dst_start_day: ""
dst_start_day_of_week: "Sun"
dst_start_week_of_month: "4"
dst_start_time: "02"
dst_stop_month: "Oct"
dst_stop_day: ""
dst_stop_day_of_week: "Sunday"
dst_stop_week_of_month: "4"
dst_stop_time: "2"
dst_auto_adjust: "1"
date_format: "D/M/Y"

# XML file that specifies the dialplan desired
dial_template: "dialplan"

#Time Format (0-12hr, 1-24hr [default])
time_format_24hr: "1"

# URL for external Phone Services
services_url: "http://pabx.spruce/openxmldir/PhoneUI/index.php"; # IP  
address here alternatively

# URL for external Directory location
directory_url: "http://pabx.spruce/openxmldir/PhoneUI/index.php"; # IP  
address here alternatively

# URL for branding logo
logo_url: "http://pabx.spruce/cisco/asterisk.bmp"; # IP address here  
alternatively


and SIP.cnf:


# Image Version
image_version: "P0S3-8-12-00"
phone_label: " "

# Line 1 appearance
line1_displayname: "James"
line1_shortname:"200 James"
line1_name: 200
line1_authname: "200"
line1_password: "*removed*"

# Line 2 appearance
line2_displayname: "Work"
line2_shortname: "206 Work"
line2_name: 206
line2_authname: "206"
line2_password: "*removed*"

# Line 3 appearance
line3_displayname: ""
line3_shortname: ""
line3_name: UNPROVISIONED
line3_authname: "UNPROVISIONED"
line3_password: "UNPROVISIONED"

# Line 4 appearance
line4_displayname: ""
line4_shortname: ""
line4_name: UNPROVISIONED
line4_authname: "UNPROVISIONED"
line4_password: "UNPROVISIONED"

# Line 5 appearance
line5_displayname: ""
line5_shortname: ""
line5_name: UNPROVISIONED
line5_authname: "UNPROVISIONED"
line5_password: "UNPROVISIONED"

# Line 6 appearance
line6_displayname: ""
line6_shortname: ""
line6_name: UNPROVISIONED
line6_authname: "UNPROVISIONED"
line6_password: "UNPROVISIONED"

# Phone Prompt (The prompt that will be displayed on console and telnet)
phone_prompt: "SIP Phone" ; Limited to 15 characters (Default - SIP  
Phone)

# Phone Password (Password to be used for console or telnet login)
phone_password: "*removed*" ; Limited to 31 characters (Default - cisco)

# User classifcation used when Registering [ none(default), phone, ip ]
user_info: none


Regards,
James.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Calls being dropped - Cisco 7940 with SIP 8.12 image

2009-10-11 Thread James Stocks

On 3 Oct 2009, at 20:38, James Stocks wrote:

> On 3 Oct 2009, at 16:37, Jonathan Thurman wrote:
>
>> On Sat, Oct 3, 2009 at 6:17 AM, James Stocks 
>> wrote:
>>> Hi everyone,
>>>
>>> I hope someone can help me with a problem I'm having with Cisco 7940
>>> phones on the SIP 8.12 image.  When I place a call from one of the
>>> handsets, the call proceeds as normal for 20 seconds and is then
>>> terminated by Asterisk (1.4.26.2):
>>>
>>
>> We are runing 08-12-00 on 7940/60s just fine (Asterisk 1.6.1.1), and
>> have been for a while.
>>
>>>
>>> As far as I can tell, the 'a=silenceSupp:off - - - -' header is not
>>> accepted by the 7940, which seems like a bug in the SIP image to me.
>>> However, I can't find a way to report this problem to Cisco  
>>> without a
>>> support contract (which I do not have).  Reverting to version 7.5
>>> fixes the problem, but it is still present in 8.11.  The problem is
>>> not present if the PSTN initiates the call, nor is it present if I
>>> allow the handsets to reinvite each other.  Here's the sip.conf
>>> snippet if it helps:
>>>
>>
>> That all looks fine to me.  What do your SIPDefault.cnf and
>> SIP.cnf files look like?
>>
>> -Jonathan
>
> Hi Jonathan,
>
> Thanks for your reply.  Here's the two files, SIPDefault.cnf:
>
>
> # Image Version
> image_version: "P0S3-8-12-00"
>
> # Proxy Server
> proxy1_address: "pabx.spruce" # IP address here alternatively
>
> # Proxy Registration (0-disable (default), 1-enable)
> proxy_register: "1"
>
> # Setting for Message
> messages_uri: "222"
>
> # Time Server
> sntp_mode: "unicast"
> sntp_server: "snakebite.spruce" # IP address here alternatively
> time_zone: "GMT"
> dst_offset: "1"
> dst_start_month: "March"
> dst_start_day: ""
> dst_start_day_of_week: "Sun"
> dst_start_week_of_month: "4"
> dst_start_time: "02"
> dst_stop_month: "Oct"
> dst_stop_day: ""
> dst_stop_day_of_week: "Sunday"
> dst_stop_week_of_month: "4"
> dst_stop_time: "2"
> dst_auto_adjust: "1"
> date_format: "D/M/Y"
>
> # XML file that specifies the dialplan desired
> dial_template: "dialplan"
>
> #Time Format (0-12hr, 1-24hr [default])
> time_format_24hr: "1"
>
> # URL for external Phone Services
> services_url: "http://pabx.spruce/openxmldir/PhoneUI/index.php"; # IP
> address here alternatively
>
> # URL for external Directory location
> directory_url: "http://pabx.spruce/openxmldir/PhoneUI/index.php"; # IP
> address here alternatively
>
> # URL for branding logo
> logo_url: "http://pabx.spruce/cisco/asterisk.bmp"; # IP address here
> alternatively
>
>
> and SIP.cnf:
>
>
> # Image Version
> image_version: "P0S3-8-12-00"
> phone_label: " "
>
> # Line 1 appearance
> line1_displayname: "James"
> line1_shortname:"200 James"
> line1_name: 200
> line1_authname: "200"
> line1_password: "*removed*"
>
> # Line 2 appearance
> line2_displayname: "Work"
> line2_shortname: "206 Work"
> line2_name: 206
> line2_authname: "206"
> line2_password: "*removed*"
>
> # Line 3 appearance
> line3_displayname: ""
> line3_shortname: ""
> line3_name: UNPROVISIONED
> line3_authname: "UNPROVISIONED"
> line3_password: "UNPROVISIONED"
>
> # Line 4 appearance
> line4_displayname: ""
> line4_shortname: ""
> line4_name: UNPROVISIONED
> line4_authname: "UNPROVISIONED"
> line4_password: "UNPROVISIONED"
>
> # Line 5 appearance
> line5_displayname: ""
> line5_shortname: ""
> line5_name: UNPROVISIONED
> line5_authname: "UNPROVISIONED"
> line5_password: "UNPROVISIONED"
>
> # Line 6 appearance
> line6_displayname: ""
> line6_shortname: ""
> line6_name: UNPROVISIONED
> line6_authname: "UNPROVISIONED"
> line6_password: "UNPROVISIONED"
>
> # Phone Prompt (The prompt that will be displayed on console and  
> telnet)
> phone_prompt: "SIP Phone" ; Limited to 15 characters (Default - SIP
> Phone)
>
> # Phone Password (Password to be used for console or telnet login)
> phone_password: "*removed*" ; Limited to 31 characters (Default -  
> cisco)
>
> # User classifcation used when Registering [ none(default), phone,  
> ip ]
> user_info: none

OK.  For anyone finding this thread, the problem exists in Asterisk  
1.4, but upgrading to Asterisk 1.6.1.6 appears to eliminate the problem.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] call log, call detail

2009-11-15 Thread James Stocks

On 15 Nov 2009, at 11:39,  
 wrote:

> hi friends,
> 
> i had installed  postgres database for call log,call detail. it has restarted 
> succesfully but when i check  tcp connection i dont get any welcome message 
> by psql.
> 
> [r...@localhost ~]# # psql -h 127.0.0.1 -U asterisk password
> [r...@localhost ~]# 
> 

You have a '#' at the start of your command which causes the shell to ignore 
the whole line.
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Example to handle incoming calls without callerid at home?

2009-12-06 Thread James Stocks
On 6 Dec 2009, at 08:56, Remco Barendse wrote:

> I am using asterisk 1.6 at home and would like to send incoming calls 
> without caller id immediately to voicemail (i don't want to use the 
> privacy manager where people have to enter a number).
> 
> The config examples i found are all for the pretty obsolete 1.0 and 1.2 
> versions of asterisk.
> 
> Would anyone be willing to share a config example?
> 
> Thanks!

Well I don't claim to be a guru, but this is what I do:

; This is the context which receives calls:
[from-pstn]
exten => s,1,GotoIf($["${CALLERID(name)}" = "WITHHELD"]?nocid,s,1)
exten => s,n,GotoIf($["${CALLERID(name)}" = "INTERNATIONAL"]?nocid,s,1)
exten => s,n,GotoIf($["${CALLERID(name)}" = "UNAVAILABLE"]?nocid,s,1)
exten => s,n,GotoIf($["${CALLERID(name)}" = "PAYPHONE"]?nocid,s,1)
exten => s,n,Macro(call-house-phones)
exten => s,n,Hangup

[nocid]
; If no caller ID, here's where you specify what to do:
exten => s,1,Voicemail(401,u)
exten => s,n,Hangup

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] sendmail

2009-12-20 Thread James Stocks
On 19 Dec 2009, at 16:20, Thomas Perron wrote:

> Anyone have a cookbook on configuring sendmail to work with Asterisk?
> Or,a few config examples.

Postfix is a drop-in replacement for sendmail.  I find it to be far, far 
simpler to administer.

Take a look at http://www.postfix.org/documentation.html
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] compile issues.

2009-12-25 Thread James Stocks
On 25 Dec 2009, at 11:36, --[ UxBoD ]-- wrote:

> - "Aditya Kumar"  wrote: 
> 
> No. I am not installing as ROOT.
> I dont want to install in ROOT? if so what all should I do>

You need to become root in order to build and install Asterisk.  This doesn't 
mean that you have to run Asterisk as root after it is installed.  The default 
locations for Asterisk files are sane and sensible for the majority of systems. 
 If you are trying to do something special, perhaps you can elaborate a little 
so that we can assist better?

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Park() ignores 'r' option which should disable music on hold in favour of ringing tone

2012-02-16 Thread James Stocks
When I receive a call, I want to automatically park it from the dialplan so 
that I can retrieve it later.  However, I don't want callers to be aware that 
they are being parked, so I want to play a ringing tone to the caller.  Park() 
is supposed to be able to do this:

  
Park([timeout][,return_context[,return_exten[,return_priority[,options[,parking_lot_name])
  options
r: Send ringing instead of MOH to the parked call.
s: Silence announcement of the parking space number.

I've created an extension to test this with, here's what I have in 
extensions.conf:

exten => *10,1,Answer
exten => *10,n,Park(12,special,*59,1,rs)
exten => *10,n,Hangup()

Here's the output on the Asterisk console:

-- Executing [*10@house-phones:1] Answer("SIP/200-000a", "") in new stack
-- Executing [*10@house-phones:2] Park("SIP/200-000a", 
"12,special,*59,1,rs") in new stack
  == Parked SIP/200-000a on 701 (lot default). Will timeout back to 
extension [special] *59, 1 in 120 seconds
-- Added extension '701' priority 1 to parkedcalls
-- Started music on hold, class 'default', on SIP/200-000a
-- Executing [h@house-phones:1] NoOp("Parked/SIP/200-000a", "") 
in new stack

I can see that the call is parked OK and the 's' option is being respected, but 
the caller just hears the default MOH rather than ringing.  Does anyone have 
this working?

I was using Asterisk version 1.8.3.3, I've upgraded to 1.8.9.2, but it hasn't 
helped.

James.
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] chan_mobile with Nokia 6021 - incoming SMS causes call to drop

2012-04-30 Thread James Stocks
Hello,

I'm Using Asterisk 1.8.11.0 on Debian Squeeze.  I was experiencing problems 
with ${SMSSRC} being blank, so I applied this patch: 
https://issues.asterisk.org/jira/secure/attachment/42026/sms-sender-fix.diff 
but otherwise everything is standard.

As the subject says, if I am making a call through the phone when an SMS is 
received, the bluetooth connection drops and the call ends.  The SMS is 
delivered successfully.

This happens on two different 6021 handsets, one is connected to a DBT-120 
(csr) dongle and the other is connected to a no-name btusb dongle.  Nothing 
unexpected shows up in the Asterisk console:

-- Executing [*00@house-phones:4] Dial("SIP/200-0037", 
"MOBILE/JS6021/,60,rTK") in new stack
-- Called MOBILE/JS6021/
[2012-04-30 19:13:15] WARNING[25326]: channel.c:4913 ast_write: Codec mismatch 
on channel Mobile/JS6021-6e5b setting write format to alaw from slin native 
formats 0x40 (slin)
-- Mobile/JS6021-6e5b is making progress passing it to SIP/200-0037
-- Mobile/JS6021-6e5b answered SIP/200-0037
-- Executing [sms@from-stocksy-orange:1] Verbose("Mobile/JS6021-b05c", 
"Incoming SMS from  
") in new stack
Incoming SMS from  

-- Executing [sms@from-stocksy-orange:2] System("Mobile/JS6021-b05c", "echo 
"To: mymail" > /tmp/smsmail-stocksy") in new stack
-- Executing [sms@from-stocksy-orange:3] System("Mobile/JS6021-b05c", "echo 
"Subject: SMS from " >> /tmp/smsmail-stocksy") in new stack
-- Executing [sms@from-stocksy-orange:4] System("Mobile/JS6021-b05c", "echo 
"
" >> /tmp/smsmail-stocksy") in new stack
-- Executing [sms@from-stocksy-orange:5] System("Mobile/JS6021-b05c", 
"sendmail -t -f @sms.stocksy.co.uk < /tmp/smsmail-stocksy") in 
new stack
-- Executing [sms@from-stocksy-orange:6] Hangup("Mobile/JS6021-b05c", "") 
in new stack
  == Spawn extension (from-stocksy-orange, sms, 6) exited non-zero on 
'Mobile/JS6021-b05c'
-- Bluetooth Device JS6021 has disconnected.

I do get some messages in syslog at this time, I don't know if they are 
significant:

Apr 30 19:13:19 pabx kernel: [696331.658348] btusb_isoc_complete: hci1 
corrupted SCO packet
Apr 30 19:13:19 pabx kernel: [696331.658394] hci_scodata_packet: hci1 SCO 
packet for unknown connection handle 0

I have (I think!) loaded btusb with force_scofix by creating this file:

# more /etc/modprobe.d/btusb.conf 
options btusb force_scofix=1

and reloading the btusb module.

Is this a known problem?

Regards,
James.

smime.p7s
Description: S/MIME cryptographic signature
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Make outgoing calls through BroadWorks/BroadSoft SIP gateway from Asterisk

2012-08-18 Thread James Stocks
I've been given a SIP hard phone pre-configured to work with another party's 
BroadWorks system.  I want to use my Asterisk system to connect to this SIP 
service rather than the handset I've been given.  I have extracted the 
authentication details from the phone and have successfully registered Asterisk 
with the gateway (incoming calls work fine) using a line like this in sip.conf:

register => 
441000123123@auth.realm:password:authu...@nnn.nnn.nnn.nnn/441000123123

Outgoing calls are proving to be more challenging.  I have this so far:

[441000123123]
callerid="My Name" <441000123123>
type=peer
host=nnn.nnn.nnn.nnn
auth=authuser
realm=auth.realm
fromuser= 441000123123
secret=password
insecure=invite
context=from-sip
nat=yes
qualify=no
canreinvite=no
allow=all

The main part I'm confused about is that in most examples I've seen, the 
username and authname are the same value, whereas in this case we seem to have:

A username (the phone number)
An auth name (a different value)
An auth realm
A SIP realm (different value to auth realm)
A password
A gateway host

When I place a call with Dial(SIP/441000123123/somenumber), I get a 403 
response from the gateway.  Looking at a packet dump, I can see that Asterisk 
is not attempting to authenticate.  On the other hand, REGISTER requests do 
authenticate successfully - I can see the digest authentication taking place in 
tcpdump.

I have observed successful outgoing calls from the hard phone using tcpdump and 
I can see the phone using digest like so:

Authorization: DIGEST username="authuser", realm="BroadWorks", 
nonce="BroadWorksASHORTHASH", qop=auth, cnonce="ASHORTHASH", nc=0001, 
uri="sip:number@auth.realm:5060;user=phone", response="ALONGERHASH", 
algorithm=MD5 

What is the correct configuration to use - how do I get Asterisk to 
successfully authenticate outgoing calls?

Many thanks,
James.
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Make outgoing calls through BroadWorks/BroadSoft SIP gateway from Asterisk

2012-08-18 Thread James Stocks

On 18 Aug 2012, at 09:45, James Stocks  wrote:

> I've been given a SIP hard phone pre-configured to work with another party's 
> BroadWorks system.  I want to use my Asterisk system to connect to this SIP 
> service rather than the handset I've been given.  I have extracted the 
> authentication details from the phone and have successfully registered 
> Asterisk with the gateway (incoming calls work fine) using a line like this 
> in sip.conf:
> 
> register => 
> 441000123123@auth.realm:password:authu...@nnn.nnn.nnn.nnn/441000123123
> 
> Outgoing calls are proving to be more challenging.  I have this so far:
> 
> [441000123123]
> callerid="My Name" <441000123123>
> type=peer
> host=nnn.nnn.nnn.nnn
> auth=authuser
> realm=auth.realm
> fromuser= 441000123123
> secret=password
> insecure=invite
> context=from-sip
> nat=yes
> qualify=no
> canreinvite=no
> allow=all
> 
> The main part I'm confused about is that in most examples I've seen, the 
> username and authname are the same value, whereas in this case we seem to 
> have:
> 
> A username (the phone number)
> An auth name (a different value)
> An auth realm
> A SIP realm (different value to auth realm)
> A password
> A gateway host
> 
> When I place a call with Dial(SIP/441000123123/somenumber), I get a 403 
> response from the gateway.  Looking at a packet dump, I can see that Asterisk 
> is not attempting to authenticate.  On the other hand, REGISTER requests do 
> authenticate successfully - I can see the digest authentication taking place 
> in tcpdump.
> 
> I have observed successful outgoing calls from the hard phone using tcpdump 
> and I can see the phone using digest like so:
> 
> Authorization: DIGEST username="authuser", realm="BroadWorks", 
> nonce="BroadWorksASHORTHASH", qop=auth, cnonce="ASHORTHASH", nc=0001, 
> uri="sip:number@auth.realm:5060;user=phone", response="ALONGERHASH", 
> algorithm=MD5 
> 
> What is the correct configuration to use - how do I get Asterisk to 
> successfully authenticate outgoing calls?

I have answered my own question.

The remote host is reachable only by IP address.  Setting host=nnn.nnn.nnn.nnn 
causes Asterisk to send INVITEs to somenum...@nnn.nnn.nnn.nnn instead of some 
number@sip.domain.  This is what was causing the 403 response, it's not 
necessary to authenticate.

I haven't found a way to set the sip domain to be used for outgoing calls, so 
as a workaround I have inserted 'nnn.nnn.nnn.nnn sip.domain' into my /etc/hosts 
file.  Not elegant, but it works.

James.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users