Re: [asterisk-users] SIPp scenario file for testing UAC Authentication with Asterisk ?

2018-10-25 Thread Kevin Harwell
On Thu, Oct 25, 2018 at 4:32 AM Olivier  wrote:

> Hello,
>
> I'm testing an Asterisk instance.
> At the moment, I'm focusing on its capability to receive and challenge
> incoming SIP Registrations.
>
>
If all you want to do is test inbound registrations you can find an example
SIPp scenario in the Asterisk testsuite[1]. You'll want to remove the
 section from the 200 response and the variable reference. Then
you'll want to execute the scenario with something like the following
(replacing with your values of course):

sipp  -m 1 -sf register-auth.xml -s  -ap 

Another example can be found here[2]. Both the README and register.xml file
have instructions on how to execute the test. Currently the test is setup
to test a few thousand endpoints though. However you can adjust that number
by modifying the register.csv (injection file) or by not using the
injection file and modifying the register.xml scenario itself.

[1]
https://github.com/asterisk/testsuite/blob/master/tests/channels/pjsip/registration/inbound/nominal/single_contact/authed/sipp/register-auth.xml
[2]
http://blogs.asterisk.org/wp-content/uploads/2018/09/performance_inbound_registration.tar.gz



> For various reasons, I would prefer to use SIPp instead of Asterisk to act
> as SIP Client.
>
> Has someone successfully done this ?
> If negative, what explains this ?
> If positive, can you give an example of a successful SIPp scenario file ?
> I've played with both embeded branchc and [1] but met no success yet
>
> Best regards
>
> [1] https://github.com/rkday/sipp-samples/blob/master/uac-auth.xml
>
>

-- 
Kevin Harwell
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: https://digium.com & https://asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] How to force Asterisk to reply with floating IP with chan_sip ?

2018-10-25 Thread Olivier
Hello,

I'm setting up a new cluster that must replace several old Asterisk
instances.
For various reasons, this new cluster must use chan_sip (migration to PJSIP
is planned in a later phase).

This new cluster uses VRRP in active/passive mode:
- at any time, only one cluster member is active,
- when a member becomes active, it inherits several floating IP addresses,
it changes its IP configuration (with ip rule or ip route statements) and
it starts Asterisk.

Beside tweaking Linux IP configuration, is there a way to teach Asterisk's
chan_sip "to always reply using as IP source, the destination IP it got the
SIP request from" ?

For instance, if Asterisk's chan_sip listen on IPs IP A, Ip B and IP C, all
belonging to the same network, then I want Asterisk to reply with IP A for
any request it received through IP A.

Looking at ASTDB SIP/Registry instances, Asterisk does not save the IP
address it heard an incoming REGISTER with.

Did I miss something ?
Suggestions ?

Best regards
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] pjsip aor stays in status created

2018-10-25 Thread Richard Mudgett
On Thu, Oct 25, 2018 at 6:58 AM marek cervenka  wrote:

> hi,
>
> i have webrtc client chrome69/jssip which is connecting to asterisk
> 13.23.1/pjsip
>
> i have strange problem where pjsip aor stays in status "created"
>
> sip trace on asterisk looks ok.
>
>
> do you think if this can be bug?
>

It is not a bug.  The contact has been "created".  It will stay in that
state unless
you are also going to qualify the endpoint.  Asterisk 16 simply renames the
state to
"NonQualified" to be more explicit.

Richard


>
> test*CLI> pjsip show aors
>
>Aor: 
> 
>  Contact:   
>  
>
> ==
>
>Aor:  vr1k50   1
>  Contact:  vr1k50/sip:6i2b9766@1.1.1.1:34434;tran b2ad914030
> Created   0.000
>
>
>
>
> <--- Received SIP request (566 bytes) from WSS:1.1.1.1:34434 --->
> REGISTER sip:sip.example.com SIP/2.0
> Via: SIP/2.0/WSS v0i0at11ojbn.invalid;branch=z9hG4bK2155317
> Max-Forwards: 69
> To: 
> From: "vr1k50" ;tag=d56ij3vuo3
> Call-ID: 0mm678kf72bc9b5ur7ea8d
> CSeq: 13 REGISTER
> Contact:
>  ;transport=ws>;+sip.ice;reg-id=1;+sip.instance="";expires=60
> Expires: 60
> Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
> Supported: path,gruu,outbound
> User-Agent: JsSIP 3.2.9
> Content-Length: 0
>
>
> <--- Transmitting SIP response (484 bytes) to WSS:1.1.1.1:34434 --->
> SIP/2.0 401 Unauthorized
> Via: SIP/2.0/WSS
> v0i0at11ojbn.invalid;rport=34434;received=1.1.1.1;branch=z9hG4bK2155317
> Call-ID: 0mm678kf72bc9b5ur7ea8d
> From: "vr1k50" ;tag=d56ij3vuo3
> To: ;tag=z9hG4bK2155317
> CSeq: 13 REGISTER
> WWW-Authenticate: Digest
>
> realm="asterisk",nonce="1540467808/121f72ae15612cc46a72e2861657a940",opaque="3060464337b28725",algorithm=md5,qop="auth"
> Server: Asterisk PBX 13.23.1
> Content-Length:  0
>
>
> <--- Received SIP request (837 bytes) from WSS:1.1.1.1:34434 --->
> REGISTER sip:sip.example.com SIP/2.0
> Via: SIP/2.0/WSS v0i0at11ojbn.invalid;branch=z9hG4bK9799804
> Max-Forwards: 69
> To: 
> From: "vr1k50" ;tag=d56ij3vuo3
> Call-ID: 0mm678kf72bc9b5ur7ea8d
> CSeq: 14 REGISTER
> Authorization: Digest algorithm=MD5, username="vr1k50",
> realm="asterisk", nonce="1540467808/121f72ae15612cc46a72e2861657a940",
> uri="sip:sip.example.com", response="376b4ac58b01dde2e043931467bba55a",
> opaque="3060464337b28725", qop=auth, cnonce="v8i7444gio8r", nc=0001
> Contact:
>  ;transport=ws>;+sip.ice;reg-id=1;+sip.instance="";expires=60
> Expires: 60
> Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
> Supported: path,gruu,outbound
> User-Agent: JsSIP 3.2.9
> Content-Length: 0
>
>
> <--- Transmitting SIP response (446 bytes) to WSS:1.1.1.1:34434 --->
> SIP/2.0 200 OK
> Via: SIP/2.0/WSS
> v0i0at11ojbn.invalid;rport=34434;received=1.1.1.1;branch=z9hG4bK9799804
> Call-ID: 0mm678kf72bc9b5ur7ea8d
> From: "vr1k50" ;tag=d56ij3vuo3
> To: ;tag=z9hG4bK9799804
> CSeq: 14 REGISTER
> Date: Thu, 25 Oct 2018 11:43:28 GMT
> Contact: ;expires=59
> Expires: 60
> Server: Asterisk PBX 13.23.1
> Content-Length:  0
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Astricon is coming up October 9-11!  Signup is available at:
> https://www.asterisk.org/community/astricon-user-conference
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] pjsip aor stays in status created

2018-10-25 Thread marek cervenka

hi,

i have webrtc client chrome69/jssip which is connecting to asterisk 
13.23.1/pjsip


i have strange problem where pjsip aor stays in status "created"

sip trace on asterisk looks ok.


do you think if this can be bug?


test*CLI> pjsip show aors

  Aor:  
    Contact:    
 

==

  Aor:  vr1k50   1
    Contact:  vr1k50/sip:6i2b9766@1.1.1.1:34434;tran b2ad914030 
Created   0.000





<--- Received SIP request (566 bytes) from WSS:1.1.1.1:34434 --->
REGISTER sip:sip.example.com SIP/2.0
Via: SIP/2.0/WSS v0i0at11ojbn.invalid;branch=z9hG4bK2155317
Max-Forwards: 69
To: 
From: "vr1k50" ;tag=d56ij3vuo3
Call-ID: 0mm678kf72bc9b5ur7ea8d
CSeq: 13 REGISTER
Contact: 
;+sip.ice;reg-id=1;+sip.instance="";expires=60

Expires: 60
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
Supported: path,gruu,outbound
User-Agent: JsSIP 3.2.9
Content-Length: 0


<--- Transmitting SIP response (484 bytes) to WSS:1.1.1.1:34434 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/WSS 
v0i0at11ojbn.invalid;rport=34434;received=1.1.1.1;branch=z9hG4bK2155317

Call-ID: 0mm678kf72bc9b5ur7ea8d
From: "vr1k50" ;tag=d56ij3vuo3
To: ;tag=z9hG4bK2155317
CSeq: 13 REGISTER
WWW-Authenticate: Digest 
realm="asterisk",nonce="1540467808/121f72ae15612cc46a72e2861657a940",opaque="3060464337b28725",algorithm=md5,qop="auth"

Server: Asterisk PBX 13.23.1
Content-Length:  0


<--- Received SIP request (837 bytes) from WSS:1.1.1.1:34434 --->
REGISTER sip:sip.example.com SIP/2.0
Via: SIP/2.0/WSS v0i0at11ojbn.invalid;branch=z9hG4bK9799804
Max-Forwards: 69
To: 
From: "vr1k50" ;tag=d56ij3vuo3
Call-ID: 0mm678kf72bc9b5ur7ea8d
CSeq: 14 REGISTER
Authorization: Digest algorithm=MD5, username="vr1k50", 
realm="asterisk", nonce="1540467808/121f72ae15612cc46a72e2861657a940", 
uri="sip:sip.example.com", response="376b4ac58b01dde2e043931467bba55a", 
opaque="3060464337b28725", qop=auth, cnonce="v8i7444gio8r", nc=0001
Contact: 
;+sip.ice;reg-id=1;+sip.instance="";expires=60

Expires: 60
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
Supported: path,gruu,outbound
User-Agent: JsSIP 3.2.9
Content-Length: 0


<--- Transmitting SIP response (446 bytes) to WSS:1.1.1.1:34434 --->
SIP/2.0 200 OK
Via: SIP/2.0/WSS 
v0i0at11ojbn.invalid;rport=34434;received=1.1.1.1;branch=z9hG4bK9799804

Call-ID: 0mm678kf72bc9b5ur7ea8d
From: "vr1k50" ;tag=d56ij3vuo3
To: ;tag=z9hG4bK9799804
CSeq: 14 REGISTER
Date: Thu, 25 Oct 2018 11:43:28 GMT
Contact: ;expires=59
Expires: 60
Server: Asterisk PBX 13.23.1
Content-Length:  0


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

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] How can I connect an existing Confbridge to a new SIP channel when DIALEDPEERNAME is empty?

2018-10-25 Thread Jonathan H
Would really appreciate some help here - into day 4 of trying to bridge a
PJSIP call to an existing confbridge.

There's a fair amount of dialplan and log to show which doesn't really work
well via plain text email, so I've taken it over to the forum at
https://community.asterisk.org/t/bridging-an-existing-conference-to-a-new-call/76806/7

Many thanks in advance.

On Wed, 24 Oct 2018 at 17:17, Jonathan H  wrote:

> Asterisk 16.0, PJSIP
>
> For the first caller to a conference, I want to dial out and bridge that
> conference to a new PJSIP external call.
>
> For the next callers, I just want them to join the local Asterisk
> conference.
>
> After the last caller leaves the conference, I want to hangup the call it
> initiated.
>
> Most of this works, but there are two problems - after the dial string and
> username is done sending, no further audio flows between the Confbridge
> conference and the external call.
>
> Secondly, I understand that I need the name of the "dialling out" channel:
>
> https://wiki.asterisk.org/wiki/display/AST/Pre-Bridge+Handlers
> > This application sets the following channel variables:
> > DIALEDPEERNAME - The name of the outbound channel that answered the call.
>
> But  DIALEDPEERNAME is  empty. Can anyone please suggest where I might be
> going wrong here, and how to complete this? Thank you!
>
> [bcab-dial-zoom]
> exten => s,1,Answer()
> same => n,Dial(PJSIP/0203456789@voipfone-201,,U(bcab-send-dtmf))
>
> [bcab-send-dtmf]
> exten => s,1,Wait(1)
> same => n,Verbose(1,***Dialled channel is ${DIALEDPEERNAME});  just
> gives :**Dialled channel is
> same => n,Set(dialedname=${DIALEDPEERNAME})
> same => n,SendDTMF(WW123456#W#W)
> same => n,Playback(technical-support)
> same => n,SendDTMF(#)
>
> same => n,SET(GOSUB_RESULT=GOTO:bcab-bridge-conference^s^1)
> same => n,Return()
>
> [bcab-bridge-conference]
> exten => s,1,Verbose(1,*** Entered bcab-bridge-conference)
> same => n,Answer()
> same => n,ConfBridge(1234)
> same => n,Wait(55)
> same => n,Hangup()
>
>
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] SIPp scenario file for testing UAC Authentication with Asterisk ?

2018-10-25 Thread Olivier
Hello,

I'm testing an Asterisk instance.
At the moment, I'm focusing on its capability to receive and challenge
incoming SIP Registrations.

For various reasons, I would prefer to use SIPp instead of Asterisk to act
as SIP Client.

Has someone successfully done this ?
If negative, what explains this ?
If positive, can you give an example of a successful SIPp scenario file ?
I've played with both embeded branchc and [1] but met no success yet

Best regards

[1] https://github.com/rkday/sipp-samples/blob/master/uac-auth.xml
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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