[asterisk-dev] res_geolocation wIki is missing the suppress_empty_ca_elements setting

2022-09-29 Thread Dan Cropp
I see there are some code reviews for some res_geolocation wiki changes.

Just wanted to mention the suppress_empty_ca_elements is missing from the 
profile settings list.

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

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

Re: [asterisk-dev] Out of the media call forwarding.

2022-09-12 Thread Dan Cropp
If the transfer is using SIP REFER, the carrier/switch (equipment that sends 
call into Asterisk) would be required to support it.

SIP REFER tends to be used with switch vendors as opposed to SIP providers.
Not sure if there are any SIP providers who support the REFER feature.
Generally, SIP REFER requires SIP Provider or Switch equipment to perform an 
internal patch/bridge for the 2 parties to hear each other.

Dan


From: asterisk-dev  On Behalf Of John 
Bittner
Sent: Monday, September 12, 2022 12:11 AM
To: asterisk-dev@lists.digium.com
Subject: [External] [asterisk-dev] Out of the media call forwarding.

Hello,

Having an issue with call delay and it got more noticeable as more an more 
customers start to forward there inbound calls to cell phones. Calling from 
cell to office then transfer to another cell has the most delays.

To avoid this I am trying to figure out how to get out of the audio stream and 
transfer via the carrier. I tried a few options, like asterisk transfer feature 
that works great from asterisk to asterisk but not directed to a carrier.
Do I need to get the carrier to enable a feature to do this ?

Anyone know the best way to solve this problem. I have researched this and cant 
find a solid answer. Is sip redirect the answer ?

Any help is much appreciated.

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

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

[asterisk-dev] geo location segmentation fault occurring on inbound call

2022-09-07 Thread Dan Cropp
I have two asterisk VMs setup.  One Asterisk VM calls the other, passing geo 
location information.

On one box, I initiate an Originate via AMI

I pass in a blank A2 value (attempting to replicate a blank A2 field a 
customer's SIP passes to them).  Everything is fine when I don't pass the A2=, 
portion.
The easy answer is not to send the A2=, portion.

However, it seems like it might be important to make sure Asterisk doesn't 
generate a segmentation fault when a packet like this is received.



Action: Originate^M
ActionID: S29^M
Channel: PJSIP/@192.168.33.33^M
Exten: createcall^M
Context: IS^M
Priority: 1^M
Timeout: 6^M
CallerID: John Doe <1234>^M
Variable: 
CALLERID(num-pres)=allowed_passed_screen,TrunkAllocateId=3,OriginateCallId=3^M
Variable: 
GEOLOC_PROFILE(usage_rules)="retransmission-allowed=true",GEOLOC_PROFILE(allow_routing_use)="yes",GEOLOC_PROFILE(pidf_element)="tuple",GEOLOC_PROFILE(confidence)="pdf=Normal,value=80",GEOLOC_PROFILE(location_info)="country=CA,\
A1=QC,A2=,A3=COOKSHIRE EATON,HNO=160,RD=POPE,PC=J0B 1M0,NAM=CENTRE DE SANTE 
COOKSHIRE",GEOLOC_PROFILE(method)="Manual",GEOLOC_PROFILE(format)="civicAddress"^M
Async: true^M
Codecs: ulaw^M
^M


The second box sees the INVITE and starts processing it but then outputs a 
Segmentation fault.



<--- Received SIP request (2262 bytes) from UDP:192.168.33.31:5060 --->
INVITE sip:@192.168.33.33 SIP/2.0
Via: SIP/2.0/UDP 
192.168.33.31:5060;rport;branch=z9hG4bKPj62f47e49-29fd-420e-97fb-d9a1970aba48
From: "John Doe" 
;tag=36ae7a5e-8264-4a38-8468-873aa245985e
To: 
Contact: 
Call-ID: 0ab86466-cbca-4d11-a0dd-b8d14b9e687c
CSeq: 1996 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, 
UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Geolocation: 
Geolocation-Routing: yes
Max-Forwards: 70
User-Agent: Asterisk PBX 18.14.0
Content-Type: multipart/mixed;boundary=1ffe84bc-e538-44a4-a860-788994f54a28
Content-Length:  1479


--1ffe84bc-e538-44a4-a860-788994f54a28
Content-Type: application/sdp
Content-Length:   181

v=0
o=- 812269913 812269913 IN IP4 192.168.33.31
s=Asterisk
c=IN IP4 192.168.33.31
t=0 0
m=audio 10742 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=ptime:20
a=maxptime:150
a=sendrecv

--1ffe84bc-e538-44a4-a860-788994f54a28
Content-ID: 
Content-Type: application/pidf+xml
Content-Length:  1018


http://www.w3.org/2005/xpath-functions"; 
xmlns:gbp="urn:ietf:params:xml:ns:pidf:geopriv10:basicPolicy" 
xmlns:gml="http://www.opengis.net/gml"; 
xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10" 
xmlns:gs="http://www.opengis.net/pidflo/1.0"; 
xmlns:con="urn:ietf:params:xml:ns:geopriv:conf" 
xmlns:date="http://exslt.org/dates-and-times"; 
entity="PJSIP/192.168.33.33-0002">
  

  

  
  80


  true

Manual
  

2022-09-07T21:10:45Z
  


--1ffe84bc-e538-44a4-a860-788994f54a28--

<--- Transmitting SIP response (376 bytes) to UDP:192.168.33.31:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 
192.168.33.31:5060;rport=5060;received=192.168.33.31;branch=z9hG4bKPj62f47e49-29fd-420e-97fb-d9a1970aba48
Call-ID: 0ab86466-cbca-4d11-a0dd-b8d14b9e687c
From: "John Doe" 
;tag=36ae7a5e-8264-4a38-8468-873aa245985e
To: 
CSeq: 1996 INVITE
Server: Asterisk PBX 18.14.0
Content-Length:  0


Segmentation fault



[09/07 16:10:45.813] DEBUG[102650] res_pjsip/pjsip_distributor.c: Could not 
find matching transaction for Request msg INVITE/cseq=1996 (rdata0x7f509c002578)
[09/07 16:10:45.813] DEBUG[102650] res_pjsip/pjsip_distributor.c: Calculated 
serializer pjsip/distributor-0059 to use for Request msg INVITE/cseq=1996 
(rdata0x7f509c002578)
[09/07 16:10:45.813] DEBUG[102651] res_pjsip_endpoint_identifier_ip.c: Source 
address 192.168.33.31:5060 does not match identify 'identify55'
[09/07 16:10:45.813] DEBUG[102651] res_pjsip_endpoint_identifier_ip.c: Source 
address 192.168.33.31:5060 does not match identify 'identify57'
[09/07 16:10:45.813] DEBUG[102651] res_pjsip_endpoint_identifier_ip.c: Source 
address 192.168.33.31:5060 does not match identify 'identify59'
[09/07 16:10:45.813] DEBUG[102651] res_pjsip_endpoint_identifier_ip.c: Source 
address 192.168.33.31:5060 matches identify 'identify61'
[09/07 16:10:45.813] DEBUG[102651] res_pjsip_endpoint_identifier_ip.c: Identify 
'identify61' SIP message matched to endpoint 192.168.33.31
[09/07 16:10:45.813] DEBUG[102651] res_pjsip_session.c:  (null session) 
Request: INVITE
[09/07 16:10:45.813] DEBUG[102651] res_pjsip_session.c:  Request:
[09/07 16:10:45.813] DEBUG[102651] res_pjsip/pjsip_distributor.c: Calculated 
serializer pjsip/distributor-0059 to use for Request msg INVITE/cseq=1996 
(rdata0x7f509c016b98)
[09/07 16:10:45.813] DEBUG[102651] chan_pjsip.c:  192.168.33.31
[09/07 16:10:45.813] DEBUG[102651] chan_pjsip.c:  Direct media no glare 
mitigation
[09/07 16:10:45.813] DEBUG[102651] res_pjsip_session.c:  192.168.33.31
[09/07 16:10:45.81

[asterisk-dev] PJSIP doesn't seem to process tokens with percent characters correctly

2021-09-21 Thread Dan Cropp
We have a SIP provider who sends an INVITE with a Branch header.
Everything is fine in most cases.  However, there are times they send a Branch 
header with a % character.
>From what I have been told, the header is a token, so it is acceptable to 
>include the % character.


There seem to be two different issues with PJSIP processing of headers with the 
% character in tokenized fields.

Example.
branch=z9hG4bKf5s1psess0KGj0gRsgyJIBWEYL%QWIjkWmDXr8xnPVgaOBzOLSV28


In one case, it can receive the portion and process it, but when sending out 
the same token it changes it to lower case.  Example, received %8A portion, but 
sent %8a.  This means it's not a match for the token so the other side will not 
match.
Received
branch=z9hG4bKf5s1psess0gbkeviMkQYREmK31pLWRKQ+FRmVzHQNG1Xv%8AnzLVA!;extension=QKIT3jRNBcmZT7yu5m7absBxXxlfn1kLwfYKYT0MOyY!
Sent
branch=z9hG4bKf5s1psess0gbkeviMkQYREmK31pLWRKQ+FRmVzHQNG1Xv%8anzLVA!;extension=QKIT3jRNBcmZT7yu5m7absBxXxlfn1kLwfYKYT0MOyY!


It another case, seems PJSIP has another scenario where the % character is 
processed as the escaped character if it would be printable character.  
Example, received %4C.  The send replaces that portion with upper case L

Received
branch=z9hG4bKf5s1psess0gbkeviMkQYREmK31pLWRKQ+FRmVzHQNG1Xv%4CnzLVA!;extension=QKIT3jRNBcmZT7yu5m7absBxXxlfn1kLwfYKYT0MOyY!
Sent
branch=z9hG4bKf5s1psess0gbkeviMkQYREmK31pLWRKQ+FRmVzHQNG1XvLnzLVA!;extension=QKIT3jRNBcmZT7yu5m7absBxXxlfn1kLwfYKYT0MOyY!


Dan

This email is intended only for the use of the party to which it is addressed 
and may contain information that is privileged, confidential, or protected by 
law. If you are not the intended recipient you are hereby notified that any 
dissemination, copying or distribution of this email or its contents is 
strictly prohibited. If you have received this message in error, please notify 
us immediately by replying to the message and deleting it from your computer.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] Asterisk crash

2021-06-14 Thread Dan Cropp
I think you are onto something with the system time being slewed backwards.
Logs showed this happened at the same time things went down

systemd-timesyncd[684]: Synchronized to time server …..


I’m looking at the coredump from my own box (same executable, just different 
box).
Here is the output from the coredump you asked for.

If it needs to be on the customer box, let me know.  Pretty sure I can have 
someone with permissions access the box and do the same work I did.

(gdb) frame 6
#6  0x5588eef3a392 in hook_event_cb (chan=, frame=, event=, data=0x7f017411f4e0) at abstract_jb.c:1127
1127abstract_jb.c: No such file or directory.
(gdb) p now
$1 = 18446744073709550143
(gdb) p now_tv
$2 = 
(gdb) p *framedata
$3 = {jb_impl = 0x5588ef40b3e0 , jb_conf = {flags = 0, max_size = 
200, resync_threshold = 1000, impl = "fixed\000\000\000䚗@", target_extra = 40}, 
start_tv = {tv_sec = 1623549920, tv_usec = 123464}, last_format = 0x0,
  timer = 0x7f0174150fc0, timer_interval = 20, timer_fd = 379, first = 0, 
audio_stream_id = -1, audio_stream_sync = {timestamp = 0, ntp = {tv_sec = 0, 
tv_usec = 0}}, video_stream_id = -1, video_stream_sync = {timestamp = 0, ntp = {
  tv_sec = 0, tv_usec = 0}}, early_frames = {first = 0x0, last = 0x0}, 
early_frame_count = 0, last_audio_ntp_timestamp = {tv_sec = 0, tv_usec = 0}, 
audio_flowing = 0, jb_obj = 0x7f01741b1990}

Dan

From: asterisk-dev  On Behalf Of George 
Joseph
Sent: Monday, June 14, 2021 1:58 PM
To: Asterisk Developers Mailing List 
Subject: Re: [asterisk-dev] Asterisk crash

That's pretty weird.   The ASSERT in frame 4 makes sure that the time 
difference between the frame's timestamp and the current time is positive so a 
negative value will cause the assert.   Actually, I think there's a bug there.  
Most asserts in Asterisk are enabled only when it's built with 
--enable-dev-mode.  This assert seems to trigger even without --enable-dev-mode.

Anyway, if you still have the actual coredump, it'd be interesting to do the 
following in gdb...

gdb> frame 6
gdb> p now
gdb> p now_tv
gdb> p *framedata

I'm wondering if the system time is being slewed backwards by ntpd, chronyd, 
systemd-timesyncd, etc.


On Mon, Jun 14, 2021 at 10:49 AM Dan Cropp 
mailto:d...@amtelco.com>> wrote:
We have a customer with asterisk 16.17.0 installed.  Every once in a while, we 
have been seeing a crash.  We have upgraded the version a couple times, but 
this random crashing issue has been going on for some time.

Over the weekend, it happened again.  This time, I have a .crash file from it.
Put it through apport-unpack and think I have a good CoreDump from it.
Running asterisk 16.17.0 here is what the gdb backtrace is showing.

Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51  ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7f014097d700 (LWP 20262))]
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x7f027877a921 in __GI_abort () at abort.c:79
#2  0x7f027876a48a in __assert_fail_base (fmt=0x7f02788f1750 "%s%s%s:%u: 
%s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5588ef1864a9 "now 
>= 0",
file=file@entry=0x5588ef18645a "fixedjitterbuf.c", line=line@entry=293, 
function=function@entry=0x5588ef1864f8 <__PRETTY_FUNCTION__.9166> 
"fixed_jb_get")
at assert.c:92
#3  0x7f027876a502 in __GI___assert_fail 
(assertion=assertion@entry=0x5588ef1864a9 "now >= 0", 
file=file@entry=0x5588ef18645a "fixedjitterbuf.c",
line=line@entry=293, function=function@entry=0x5588ef1864f8 
<__PRETTY_FUNCTION__.9166> "fixed_jb_get") at assert.c:101
#4  0x5588eeffe999 in fixed_jb_get (jb=, 
frame=frame@entry=0x7f01409785c0, now=, interpl=) 
at fixedjitterbuf.c:293
#5  0x5588eef39ee2 in jb_get_fixed (jb=, 
fout=0x7f0140978628, now=, interpl=) at 
abstract_jb.c:675
#6  0x5588eef3a392 in hook_event_cb (chan=, frame=, event=, data=0x7f017411f4e0) at abstract_jb.c:1127
#7  0x5588ef008935 in framehook_list_push_event (framehooks=0x7f01741bca40, 
frame=frame@entry=0x5588ef416aa0 ,
event=event@entry=AST_FRAMEHOOK_EVENT_READ) at framehook.c:116
#8  0x5588ef009177 in ast_framehook_list_read_event (framehooks=, frame=frame@entry=0x5588ef416aa0 ) at framehook.c:320
#9  0x5588eefbb1b1 in __ast_read (chan=chan@entry=0x7f016c1abf30, 
dropaudio=dropaudio@entry=0, dropnondefault=dropnondefault@entry=1) at 
channel.c:3779
#10 0x5588eefbd40c in ast_read (chan=chan@entry=0x7f016c1abf30) at 
channel.c:4285
#11 0x7f01cbf77b9c in async_agi_read_frame (chan=0x7f016c1abf30) at 
res_agi.c:1763
#12 launch_asyncagi (efd=0x0, argv=0x7f0140978ae8, argc=, 
chan=0x7f016c1abf30) at res_agi.c:1960
#13 launch_script (opid=, efd=0x0, fds=0x7f0140978a30, 
argv=0x7f

[asterisk-dev] Asterisk crash

2021-06-14 Thread Dan Cropp
We have a customer with asterisk 16.17.0 installed.  Every once in a while, we 
have been seeing a crash.  We have upgraded the version a couple times, but 
this random crashing issue has been going on for some time.

Over the weekend, it happened again.  This time, I have a .crash file from it.
Put it through apport-unpack and think I have a good CoreDump from it.
Running asterisk 16.17.0 here is what the gdb backtrace is showing.

Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51  ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7f014097d700 (LWP 20262))]
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x7f027877a921 in __GI_abort () at abort.c:79
#2  0x7f027876a48a in __assert_fail_base (fmt=0x7f02788f1750 "%s%s%s:%u: 
%s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5588ef1864a9 "now 
>= 0",
file=file@entry=0x5588ef18645a "fixedjitterbuf.c", line=line@entry=293, 
function=function@entry=0x5588ef1864f8 <__PRETTY_FUNCTION__.9166> 
"fixed_jb_get")
at assert.c:92
#3  0x7f027876a502 in __GI___assert_fail 
(assertion=assertion@entry=0x5588ef1864a9 "now >= 0", 
file=file@entry=0x5588ef18645a "fixedjitterbuf.c",
line=line@entry=293, function=function@entry=0x5588ef1864f8 
<__PRETTY_FUNCTION__.9166> "fixed_jb_get") at assert.c:101
#4  0x5588eeffe999 in fixed_jb_get (jb=, 
frame=frame@entry=0x7f01409785c0, now=, interpl=) 
at fixedjitterbuf.c:293
#5  0x5588eef39ee2 in jb_get_fixed (jb=, 
fout=0x7f0140978628, now=, interpl=) at 
abstract_jb.c:675
#6  0x5588eef3a392 in hook_event_cb (chan=, frame=, event=, data=0x7f017411f4e0) at abstract_jb.c:1127
#7  0x5588ef008935 in framehook_list_push_event (framehooks=0x7f01741bca40, 
frame=frame@entry=0x5588ef416aa0 ,
event=event@entry=AST_FRAMEHOOK_EVENT_READ) at framehook.c:116
#8  0x5588ef009177 in ast_framehook_list_read_event (framehooks=, frame=frame@entry=0x5588ef416aa0 ) at framehook.c:320
#9  0x5588eefbb1b1 in __ast_read (chan=chan@entry=0x7f016c1abf30, 
dropaudio=dropaudio@entry=0, dropnondefault=dropnondefault@entry=1) at 
channel.c:3779
#10 0x5588eefbd40c in ast_read (chan=chan@entry=0x7f016c1abf30) at 
channel.c:4285
#11 0x7f01cbf77b9c in async_agi_read_frame (chan=0x7f016c1abf30) at 
res_agi.c:1763
#12 launch_asyncagi (efd=0x0, argv=0x7f0140978ae8, argc=, 
chan=0x7f016c1abf30) at res_agi.c:1960
#13 launch_script (opid=, efd=0x0, fds=0x7f0140978a30, 
argv=0x7f0140978ae8, argc=, script=, 
chan=0x7f016c1abf30)
at res_agi.c:2213
#14 agi_exec_full (chan=0x7f016c1abf30, data=, 
enhanced=, dead=0) at res_agi.c:4521
#15 0x5588ef04bf92 in pbx_exec (c=c@entry=0x7f016c1abf30, 
app=app@entry=0x5588efbed4b0, data=data@entry=0x7f014097ac00 "agi:async") at 
pbx_app.c:492
#16 0x5588ef03d062 in pbx_extension_helper (c=c@entry=0x7f016c1abf30, 
context=0x7f016c1ac8f0 "IS", exten=exten@entry=0x7f016c1ac940 "1234",
priority=priority@entry=15, label=label@entry=0x0, 
callerid=callerid@entry=0x0, action=E_SPAWN, found=0x7f014097ccac, 
combined_find_spawn=1, con=0x0) at pbx.c:2947
#17 0x5588ef041143 in ast_spawn_extension (combined_find_spawn=1, 
found=0x7f014097ccac, callerid=0x0, priority=15, exten=0x7f016c1ac940 "1234",
context=, c=0x7f016c1abf30) at pbx.c:4206
#18 __ast_pbx_run (c=c@entry=0x7f016c1abf30, args=args@entry=0x0) at pbx.c:4380
#19 0x5588ef04282b in pbx_thread (data=data@entry=0x7f016c1abf30) at 
pbx.c:4704
#20 0x5588ef0cf41f in dummy_start (data=) at utils.c:1299
#21 0x7f02793216db in start_thread (arg=0x7f014097d700) at 
pthread_create.c:463
#22 0x7f027885b71f in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:95


Any suggestions of what I could try?

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

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

Re: [asterisk-dev] Text-to-Speech and Speech-to-Text

2021-03-22 Thread Dan Cropp
Thank you Ben.

Looking at the TTS, would that language property be language and country?  
Example en-US, en-GB, etc.
Will we use SSML to specify a specific voice for the language?  Examplt, Amazon 
Polly en-US language supports 4 female and 4 male voices.  Or might this be an 
additional parameter (similar to the language)?

Will there be a mechanism to stop the TTS on one stream when speech to text 
detects someone speaking?  Many people will interrupt automated phone systems.  
Example, the system answers the call and plays something, a person familiar 
with the system will start speaking and they expect the TTS/prompts to stop 
playing.

Have a great day!
Dan

From: asterisk-dev  On Behalf Of Ben Ford
Sent: Monday, March 22, 2021 2:14 PM
To: Asterisk Developers Mailing List 
Subject: [asterisk-dev] Text-to-Speech and Speech-to-Text


Hello everyone,

The Asterisk team has been working on planning better text-to-speech and 
speech-to-text functionality for Asterisk. We’ll be using a speech service in 
conjunction with an external application that connects it to Asterisk. More 
information on the protocol used for this and the overall project can be found 
here:

https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=45482453

After reading the wiki page, if there is anything you feel could be improved, 
we’d love to hear about it. The goal for the protocol is to make it generic 
enough to where we would be able to use it for other things besides 
text-to-speech and speech-to-text in the future. This means it should remain as 
simple as possible. We tried to come up with basic scenarios and give examples 
of what it might look like, but this may not cover all bases. If you see a case 
that the protocol would not be able to handle, we want to hear about that, too!


--
Benjamin Ford
Software Engineer
256-428-6147
Check us out at www.sangoma.com and 
www.asterisk.org

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

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

[asterisk-dev] Looking for guidance on what I'm missing to be able to build

2021-01-19 Thread Dan Cropp
Last year, I had no issue working on a feature I submitted for a different 
issue.

I am running Ubuntu 16.
I made a branch from master for a feature I am working on.
When I run make menuselect, I am seeing the following output.

Any suggestions?

***
  The existing menuselect.makeopts file did not specify
  that 'test_mwi' should not be included.  However, either some
  dependencies for this module were not found or a
  conflict exists.

  Either run 'make menuselect' or remove the existing
  menuselect.makeopts file to resolve this issue.
***


***
  The existing menuselect.makeopts file did not specify
  that 'test_res_pjsip_session_caps' should not be included.  However, either 
some
  dependencies for this module were not found or a
  conflict exists.

  Either run 'make menuselect' or remove the existing
  menuselect.makeopts file to resolve this issue.
***


***
  The existing menuselect.makeopts file did not specify
  that 'test_stasis_state' should not be included.  However, either some
  dependencies for this module were not found or a
  conflict exists.

  Either run 'make menuselect' or remove the existing
  menuselect.makeopts file to resolve this issue.
***


***
  The existing menuselect.makeopts file did not specify
  that 'test_res_prometheus' should not be included.  However, either some
  dependencies for this module were not found or a
  conflict exists.

  Either run 'make menuselect' or remove the existing
  menuselect.makeopts file to resolve this issue.
***

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

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

Re: [asterisk-dev] Looking to input on a feature I would like to write...in depth Transfer (REFER) failure reasons

2021-01-08 Thread Dan Cropp
Thank you Jean

From: asterisk-dev  On Behalf Of Jean 
Aunis
Sent: Friday, January 8, 2021 8:47 AM
To: asterisk-dev@lists.digium.com
Subject: Re: [asterisk-dev] Looking to input on a feature I would like to 
write...in depth Transfer (REFER) failure reasons

Le 08/01/2021 à 15:40, Dan Cropp a écrit :
Before I submit a feature request and take ownership of it, trying to gather 
some feedback.

I'm looking to write code for an additional feature in asterisk.
Currently, when performing a Transfer (REFER), the channel variable 
TRANSFERSTATUS only reports 3 values: SUCCESS, FAILURE, UNSUPPORTED.

We have some customers asking for a few additional results: 404 Not Found, 408 
Request Timeout, and 486 Busy Here.
>From past experience, these same customers will likely come up with some 
>additional results they think should be returned.

Would it be better to add support where the TRANSFERSTATUS had new values for 
each of the additional result codes I make asterisk look for?
Or would it be better to add a new variable, example TRANSFERSTATUSCODE and 
have it return the SIP error code for the failure notification?  Personally, I 
like this approach because it means not having to add values for each possible 
sip error code that anyone would ever look for.

Dan



Hello Dan,

I would prefer the second approach of using a new variable, otherwise it may 
break existing dialplan.

Regards

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

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

Re: [asterisk-dev] Looking to input on a feature I would like to write...in depth Transfer (REFER) failure reasons

2021-01-08 Thread Dan Cropp
Thank you Joshua

From: asterisk-dev  On Behalf Of Joshua 
C. Colp
Sent: Friday, January 8, 2021 8:43 AM
To: Asterisk Developers Mailing List 
Subject: Re: [asterisk-dev] Looking to input on a feature I would like to 
write...in depth Transfer (REFER) failure reasons

On Fri, Jan 8, 2021 at 10:41 AM Dan Cropp 
mailto:d...@amtelco.com>> wrote:
Before I submit a feature request and take ownership of it, trying to gather 
some feedback.

I’m looking to write code for an additional feature in asterisk.
Currently, when performing a Transfer (REFER), the channel variable 
TRANSFERSTATUS only reports 3 values: SUCCESS, FAILURE, UNSUPPORTED.

We have some customers asking for a few additional results: 404 Not Found, 408 
Request Timeout, and 486 Busy Here.
From past experience, these same customers will likely come up with some 
additional results they think should be returned.

Would it be better to add support where the TRANSFERSTATUS had new values for 
each of the additional result codes I make asterisk look for?
Or would it be better to add a new variable, example TRANSFERSTATUSCODE and 
have it return the SIP error code for the failure notification?  Personally, I 
like this approach because it means not having to add values for each possible 
sip error code that anyone would ever look for.

It would be best if it were a separate variable, and that it also stated it was 
protocol specific. TRANSFERSTATUSPROTOCOL for example.

--
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com<http://www.sangoma.com/> and 
www.asterisk.org<http://www.asterisk.org/>
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-dev] Looking to input on a feature I would like to write...in depth Transfer (REFER) failure reasons

2021-01-08 Thread Dan Cropp
Before I submit a feature request and take ownership of it, trying to gather 
some feedback.

I'm looking to write code for an additional feature in asterisk.
Currently, when performing a Transfer (REFER), the channel variable 
TRANSFERSTATUS only reports 3 values: SUCCESS, FAILURE, UNSUPPORTED.

We have some customers asking for a few additional results: 404 Not Found, 408 
Request Timeout, and 486 Busy Here.
>From past experience, these same customers will likely come up with some 
>additional results they think should be returned.

Would it be better to add support where the TRANSFERSTATUS had new values for 
each of the additional result codes I make asterisk look for?
Or would it be better to add a new variable, example TRANSFERSTATUSCODE and 
have it return the SIP error code for the failure notification?  Personally, I 
like this approach because it means not having to add values for each possible 
sip error code that anyone would ever look for.

Dan

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

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

Re: [asterisk-dev] session channel locks

2020-12-09 Thread Dan Cropp
Thank you Joshua.

From: asterisk-dev  On Behalf Of Joshua 
C. Colp
Sent: Wednesday, December 9, 2020 10:27 AM
To: Asterisk Developers Mailing List 
Subject: Re: [asterisk-dev] session channel locks

On Wed, Dec 9, 2020 at 12:02 PM Dan Cropp 
mailto:d...@amtelco.com>> wrote:
We are working on a patch for the REFER support and have a question on whether 
a lock is needed or not.

In chan_pjsip.c function xfer_client_on_evsub_state, code is processing the 
REFER-NOTIFY subscription.

It gets an ast_sip_session reference, then it acquires a ast_channel reference.
Should we make the code bump the lock count for the session’s channel while we 
use it?  Unlocking when done using it?

Is it safe to assume the channel will not be deleted while this routine is 
running?
Obviously, the safest approach is to increment/decrement the reference count 
while using, but is that the necessary/preferred approach?

The PJSIP implementation in Asterisk doesn't heavily use locks. Instead it 
approaches things from a serializer perspective - that is ensuring that things 
related to a dialog/session can't be done in multiple threads at the same time. 
To that end the xfer_client_on_evsub_state function should allocate a structure 
with the appropriate information and queue it up using ast_sip_push_task. You 
can find this being done in the chan_pjsip_transfer function. This will give 
you a guarantee that session won't go away, the channel pointer won't go away, 
and that other threads aren't doing things at the same time.

--
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com<http://www.sangoma.com> and 
www.asterisk.org<http://www.asterisk.org>
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-dev] session channel locks

2020-12-09 Thread Dan Cropp
We are working on a patch for the REFER support and have a question on whether 
a lock is needed or not.

In chan_pjsip.c function xfer_client_on_evsub_state, code is processing the 
REFER-NOTIFY subscription.

It gets an ast_sip_session reference, then it acquires a ast_channel reference.
Should we make the code bump the lock count for the session's channel while we 
use it?  Unlocking when done using it?

Is it safe to assume the channel will not be deleted while this routine is 
running?
Obviously, the safest approach is to increment/decrement the reference count 
while using, but is that the necessary/preferred approach?


chan = ao2_bump(session->channel);
<>
ao2_cleanup(chan);


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

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

Re: [asterisk-dev] Question on gerrit and git review

2020-12-08 Thread Dan Cropp
Thank you Joshua


From: asterisk-dev  On Behalf Of Joshua 
C. Colp
Sent: Tuesday, December 8, 2020 3:37 AM
To: Asterisk Developers Mailing List 
Subject: Re: [asterisk-dev] Question on gerrit and git review

On Mon, Dec 7, 2020 at 7:23 PM Dan Cropp 
mailto:d...@amtelco.com>> wrote:
Thanks Joshua.

That’s my problem.
I’ll switch to a newer Ubuntu VM and do the work there.

Ah, the fun of working with customers who refuse to upgrade from Ubuntu 16.

If pip is functional you can also install/upgrade using it.

--
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com<http://www.sangoma.com> and 
www.asterisk.org<http://www.asterisk.org>
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] Question on gerrit and git review

2020-12-07 Thread Dan Cropp
Thanks Joshua.

That’s my problem.
I’ll switch to a newer Ubuntu VM and do the work there.

Ah, the fun of working with customers who refuse to upgrade from Ubuntu 16.

Dan

From: asterisk-dev  On Behalf Of Joshua 
C. Colp
Sent: Monday, December 7, 2020 5:09 PM
To: Asterisk Developers Mailing List 
Subject: Re: [asterisk-dev] Question on gerrit and git review

On Mon, Dec 7, 2020 at 7:02 PM Dan Cropp 
mailto:d...@amtelco.com>> wrote:
Could someone tell me what I’m doing wrong?

I’m attempting to submit a patch

I thought followed all the steps from 
https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage

When I attempt to submit…

git review master
remote: error: branch refs/publish/master/ASTERISK-29201:
remote: You need 'Create' rights to create new references.
remote: User: myuser
remote: Contact an administrator to fix the permissions
remote: Processing changes: refs: 1, done
To ssh:// myuser 
@gerrit.asterisk.org:29418/asterisk.git<http://gerrit.asterisk.org:29418/asterisk.git>
! [remote rejected] HEAD -> refs/publish/master/ASTERISK-29201 (prohibited by 
Gerrit: not permitted: create)
error: failed to push some refs to 'ssh:// myuser 
@gerrit.asterisk.org:29418/asterisk.git<http://gerrit.asterisk.org:29418/asterisk.git>'

What version of git-review do you have installed (git review --version)? You 
need at least 1.27.0, but newer is better.

--
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com<http://www.sangoma.com> and 
www.asterisk.org<http://www.asterisk.org>
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-dev] Question on gerrit and git review

2020-12-07 Thread Dan Cropp
Could someone tell me what I'm doing wrong?

I'm attempting to submit a patch

I thought followed all the steps from 
https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage

When I attempt to submit...

git review master
remote: error: branch refs/publish/master/ASTERISK-29201:
remote: You need 'Create' rights to create new references.
remote: User: myuser
remote: Contact an administrator to fix the permissions
remote: Processing changes: refs: 1, done
To ssh:// myuser @gerrit.asterisk.org:29418/asterisk.git
! [remote rejected] HEAD -> refs/publish/master/ASTERISK-29201 (prohibited by 
Gerrit: not permitted: create)
error: failed to push some refs to 'ssh:// myuser 
@gerrit.asterisk.org:29418/asterisk.git'

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

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

Re: [asterisk-dev] Encountered a crash on asterisk 16.9.0 with a PJSIP SUBSCRIBE response

2020-11-19 Thread Dan Cropp
Thank you.

Unfortunately, custom has already been rolled back to asterisk 16.3.0 and we 
don’t have a coredump from the crash.
We will setup a 16.15 box inhouse and attempt to replicate this.

Dan

From: asterisk-dev  On Behalf Of George 
Joseph
Sent: Thursday, November 19, 2020 2:15 PM
To: Asterisk Developers Mailing List 
Subject: Re: [asterisk-dev] Encountered a crash on asterisk 16.9.0 with a PJSIP 
SUBSCRIBE response



On Thu, Nov 19, 2020 at 12:38 PM Dan Cropp 
mailto:d...@amtelco.com>> wrote:
We have a customer who was running 16.3.0 yesterday.  Almost identical packets 
worked yesterday.
We upgraded them to 16.9.0 today and the very first time it sends the SUBSCRIBE 
to the number/ip, the response crashes with the following backtrace.

Customer required we revert back to 16.3.0 so I'm not sure I can replicate this.
Any suggestions of what to do or what to try?

First, I'd suggest trying 16.15 but we'd need a full coredump/backtrace to 
debug further.



[11/19 08:22:55.815] VERBOSE[1406] res_pjsip_logger.c: <--- Transmitting SIP 
request (690 bytes) to UDP:z.z.z.z:5060 --->
SUBSCRIBE sip:1234567890@y.y.y.y;user=phone SIP/2.0
Via: SIP/2.0/UDP 
x.x.x.x:5060;rport;branch=z9hG4bKPj363c70fc-88e2-4d05-b2ed-d8af5bbea7a2
From: ;tag=12277ed8-61f7-4b3b-a6b0-b544cc04cd64
To: "1234567890" ;tag=16a1f36c
Contact: 
Call-ID: mailto:36b40b3bC2_jPc@y.y.y.y<mailto:36b40b3bC2_jPc@y.y.y.y>
CSeq: 27685 SUBSCRIBE
Route: 
Event: refer
Expires: 600
Supported: 100rel, timer, replaces, norefersub
Accept: message/sipfrag;version=2.0
Allow-Events: message-summary, presence, dialog, refer
Max-Forwards: 70
User-Agent: Asterisk PBX 16.9.0
Content-Length:  0


[11/19 08:22:55.817] VERBOSE[1406] res_pjsip_logger.c: <--- Received SIP 
response (447 bytes) from UDP:z.z.z.z:5060 --->
SIP/2.0 405 Method Not Allowed
Via: SIP/2.0/UDP 
x.x.x.x:5060;received=x.x.x.x;rport=5060;branch=z9hG4bKPj363c70fc-88e2-4d05-b2ed-d8af5bbea7a2
From: ;tag=12277ed8-61f7-4b3b-a6b0-b544cc04cd64
To: "1234567890" ;tag=16a1f36c
Call-ID: mailto:36b40b3bC2_jPc@y.y.y.y<mailto:36b40b3bC2_jPc@y.y.y.y>
CSeq: 27685 SUBSCRIBE
Allow: INVITE, ACK, BYE, CANCEL, PRACK, REFER, NOTIFY
Content-Length: 0


[11/19 08:22:55.817] ERROR[1745] channel.c: FRACK!, Failed assertion bad magic 
number 0x0 for object 0x7ff974095ac8 (0)
[11/19 08:22:55.821] ERROR[1745] : Got 22 backtrace records
# 0: /usr/sbin/asterisk(__ao2_lock+0x89) [0x45c5f9]
# 1: /usr/sbin/asterisk() [0x493965]
# 2: /usr/sbin/asterisk(ast_queue_control_data+0x4d) [0x4987cd]
# 3: /usr/lib/asterisk/modules/chan_pjsip.so(+0x7f07) [0x7ff8ecf47f07]
# 4: /usr/lib/libasteriskpj.so.2(+0x746e8) [0x7ff9985616e8]
# 5: /usr/lib/libasteriskpj.so.2(+0x74c88) [0x7ff998561c88]
# 6: /usr/lib/libasteriskpj.so.2(+0x75f16) [0x7ff998562f16]
# 7: /usr/lib/libasteriskpj.so.2(pjsip_dlg_on_tsx_state+0x5d) [0x7ff99859566d]
# 8: /usr/lib/libasteriskpj.so.2(+0xa1203) [0x7ff99858e203]
# 9: /usr/lib/libasteriskpj.so.2(+0xa2431) [0x7ff99858f431]
#10: /usr/lib/libasteriskpj.so.2(+0xa33f4) [0x7ff9985903f4]
#11: /usr/lib/libasteriskpj.so.2(pjsip_tsx_recv_msg+0x8f) [0x7ff9985929af]
#12: /usr/lib/libasteriskpj.so.2(+0xa5a75) [0x7ff998592a75]
#13: /usr/lib/libasteriskpj.so.2(pjsip_endpt_process_rx_data+0x157) 
[0x7ff998576bd7]
#14: /usr/lib/asterisk/modules/res_pjsip.so(+0x2bcdc) [0x7ff8f259ccdc]
#15: /usr/sbin/asterisk(ast_taskprocessor_execute+0xce) [0x599e2e]
#16: /usr/sbin/asterisk() [0x5a1520]
#17: /usr/sbin/asterisk(ast_taskprocessor_execute+0xce) [0x599e2e]
#18: /usr/sbin/asterisk() [0x5a1cc0]
#19: /usr/sbin/asterisk() [0x5a9b2c]
#20: /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7ff9968f86ba]
#21: /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7ff995ed241d]


Dan

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

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


--
George Joseph
Asterisk Software Developer
direct/fax +1 256 428 6012
Check us out at www.sangoma.com<http://www.sangoma.com/> and 
www.asterisk.org<http://www.asterisk.org>
[cid:image001.png@01D6BE7F.0D4D1D90]
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-dev] Encountered a crash on asterisk 16.9.0 with a PJSIP SUBSCRIBE response

2020-11-19 Thread Dan Cropp
We have a customer who was running 16.3.0 yesterday.  Almost identical packets 
worked yesterday.
We upgraded them to 16.9.0 today and the very first time it sends the SUBSCRIBE 
to the number/ip, the response crashes with the following backtrace.

Customer required we revert back to 16.3.0 so I'm not sure I can replicate this.
Any suggestions of what to do or what to try?


[11/19 08:22:55.815] VERBOSE[1406] res_pjsip_logger.c: <--- Transmitting SIP 
request (690 bytes) to UDP:z.z.z.z:5060 --->
SUBSCRIBE sip:1234567890@y.y.y.y;user=phone SIP/2.0
Via: SIP/2.0/UDP 
x.x.x.x:5060;rport;branch=z9hG4bKPj363c70fc-88e2-4d05-b2ed-d8af5bbea7a2
From: ;tag=12277ed8-61f7-4b3b-a6b0-b544cc04cd64
To: "1234567890" ;tag=16a1f36c
Contact: 
Call-ID: mailto:36b40b3bC2_jPc@y.y.y.y
CSeq: 27685 SUBSCRIBE
Route: 
Event: refer
Expires: 600
Supported: 100rel, timer, replaces, norefersub
Accept: message/sipfrag;version=2.0
Allow-Events: message-summary, presence, dialog, refer
Max-Forwards: 70
User-Agent: Asterisk PBX 16.9.0
Content-Length:  0


[11/19 08:22:55.817] VERBOSE[1406] res_pjsip_logger.c: <--- Received SIP 
response (447 bytes) from UDP:z.z.z.z:5060 --->
SIP/2.0 405 Method Not Allowed
Via: SIP/2.0/UDP 
x.x.x.x:5060;received=x.x.x.x;rport=5060;branch=z9hG4bKPj363c70fc-88e2-4d05-b2ed-d8af5bbea7a2
From: ;tag=12277ed8-61f7-4b3b-a6b0-b544cc04cd64
To: "1234567890" ;tag=16a1f36c
Call-ID: mailto:36b40b3bC2_jPc@y.y.y.y
CSeq: 27685 SUBSCRIBE
Allow: INVITE, ACK, BYE, CANCEL, PRACK, REFER, NOTIFY
Content-Length: 0


[11/19 08:22:55.817] ERROR[1745] channel.c: FRACK!, Failed assertion bad magic 
number 0x0 for object 0x7ff974095ac8 (0)
[11/19 08:22:55.821] ERROR[1745] : Got 22 backtrace records
# 0: /usr/sbin/asterisk(__ao2_lock+0x89) [0x45c5f9]
# 1: /usr/sbin/asterisk() [0x493965]
# 2: /usr/sbin/asterisk(ast_queue_control_data+0x4d) [0x4987cd]
# 3: /usr/lib/asterisk/modules/chan_pjsip.so(+0x7f07) [0x7ff8ecf47f07]
# 4: /usr/lib/libasteriskpj.so.2(+0x746e8) [0x7ff9985616e8]
# 5: /usr/lib/libasteriskpj.so.2(+0x74c88) [0x7ff998561c88]
# 6: /usr/lib/libasteriskpj.so.2(+0x75f16) [0x7ff998562f16]
# 7: /usr/lib/libasteriskpj.so.2(pjsip_dlg_on_tsx_state+0x5d) [0x7ff99859566d]
# 8: /usr/lib/libasteriskpj.so.2(+0xa1203) [0x7ff99858e203]
# 9: /usr/lib/libasteriskpj.so.2(+0xa2431) [0x7ff99858f431]
#10: /usr/lib/libasteriskpj.so.2(+0xa33f4) [0x7ff9985903f4]
#11: /usr/lib/libasteriskpj.so.2(pjsip_tsx_recv_msg+0x8f) [0x7ff9985929af]
#12: /usr/lib/libasteriskpj.so.2(+0xa5a75) [0x7ff998592a75]
#13: /usr/lib/libasteriskpj.so.2(pjsip_endpt_process_rx_data+0x157) 
[0x7ff998576bd7]
#14: /usr/lib/asterisk/modules/res_pjsip.so(+0x2bcdc) [0x7ff8f259ccdc]
#15: /usr/sbin/asterisk(ast_taskprocessor_execute+0xce) [0x599e2e]
#16: /usr/sbin/asterisk() [0x5a1520]
#17: /usr/sbin/asterisk(ast_taskprocessor_execute+0xce) [0x599e2e]
#18: /usr/sbin/asterisk() [0x5a1cc0]
#19: /usr/sbin/asterisk() [0x5a9b2c]
#20: /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7ff9968f86ba]
#21: /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7ff995ed241d]


Dan

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

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

Re: [asterisk-dev] Encountering a crash when answering calls since upgrading from 16.3.0 to newer versions

2019-10-17 Thread Dan Cropp
Thanks for the responses.

As Joshua pointed out, I filed an issue.

We are compiling with BUILD_NATIVE disabled.  
We are going to try creating a brand new VM to replace the one having problems. 
 I suspect that VM has become corrupted.

I am able to install and run the exact same install pkg on other VMs (different 
VM server), which is why I suspect that one has been corrupted.

Very strange the VM having problems is able to work when I run the exact same 
script to compile but use asterisk 16.3.0 tarball instead of 16.4.1, 16.5.0, 
and 16.6.0 tarballs.

Dan

-Original Message-
From: asterisk-dev  On Behalf Of Joshua 
C. Colp
Sent: Thursday, October 17, 2019 5:29 AM
To: asterisk-dev@lists.digium.com
Subject: Re: [asterisk-dev] Encountering a crash when answering calls since 
upgrading from 16.3.0 to newer versions

On Thu, Oct 17, 2019, at 7:25 AM, Tony Mountifield wrote:
> In article 
> <752a8134df5047daaf037aa16e3cc...@am-mail2012b.amtelco.com>,
> Dan Cropp  wrote:
> > When I enable both DONT_OPTIMIZE and BETTER_BACKTRACES, compile, and 
> > install this on the VM where Asterisk has been crashing, it no longer 
> > crashes.
> > 
> > I have tried compiling and installing twice (both enabled and both 
> > disabled) confirming it is not crashing with both enabled.
> > 
> > Would it be acceptable to enable BETTER_BACKTRACES but disable 
> > DONT_OPTIMIZE?
> 
> Are you building with BUILD_NATIVE enabled? And are the build host and 
> the VM on different CPU architectures?
> 
> I believe if you are building for binary portability you need to 
> disable BUILD_NATIVE.

Indeed, Dan filed an issue[1] yesterday and I suggested disabling that.

[1] https://issues.asterisk.org/jira/browse/ASTERISK-28587

--
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: 
www.digium.com & www.asterisk.org

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

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] Encountering a crash when answering calls since upgrading from 16.3.0 to newer versions

2019-10-16 Thread Dan Cropp
When I enable both DONT_OPTIMIZE and BETTER_BACKTRACES, compile, and install 
this on the VM where Asterisk has been crashing, it no longer crashes.

I have tried compiling and installing twice (both enabled and both disabled) 
confirming it is not crashing with both enabled.

Would it be acceptable to enable BETTER_BACKTRACES but disable DONT_OPTIMIZE?


-Original Message-
From: asterisk-dev  On Behalf Of Joshua 
C. Colp
Sent: Tuesday, October 15, 2019 4:06 PM
To: asterisk-dev@lists.digium.com
Subject: Re: [asterisk-dev] Encountering a crash when answering calls since 
upgrading from 16.3.0 to newer versions

On Tue, Oct 15, 2019, at 6:01 PM, Dan Cropp wrote:



> 
> 
> The only thing I can think of is we do include unimrcp asterisk 
> support and their latest package is currently for asterisk 16.3.0.
> 
> Could this be causing the crashes?

It's possible, depending on what exactly it does.
 
> Anyone have any thoughts on what I could try or do to diagnose the issue?

You'd need to get a backtrace[1] to see where it is crashing.

[1] https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace

--
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: 
www.digium.com & www.asterisk.org

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

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] Encountering a crash when answering calls since upgrading from 16.3.0 to newer versions

2019-10-15 Thread Dan Cropp
Thanks Joshua

-Original Message-
From: asterisk-dev  On Behalf Of Joshua 
C. Colp
Sent: Tuesday, October 15, 2019 4:06 PM
To: asterisk-dev@lists.digium.com
Subject: Re: [asterisk-dev] Encountering a crash when answering calls since 
upgrading from 16.3.0 to newer versions

On Tue, Oct 15, 2019, at 6:01 PM, Dan Cropp wrote:



> 
> 
> The only thing I can think of is we do include unimrcp asterisk 
> support and their latest package is currently for asterisk 16.3.0.
> 
> Could this be causing the crashes?

It's possible, depending on what exactly it does.
 
> Anyone have any thoughts on what I could try or do to diagnose the issue?

You'd need to get a backtrace[1] to see where it is crashing.

[1] https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace

--
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: 
www.digium.com & www.asterisk.org

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

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-dev] Encountering a crash when answering calls since upgrading from 16.3.0 to newer versions

2019-10-15 Thread Dan Cropp
We have been running asterisk 16.3.0 for some time without problems in house 
and at customer sites.

I submitted some patches which are now part of asterisk 16.6.0.  I have been 
able to use those patches with 16.3.0 and no issues.

Last week, I attempted to convert to 16.6.0.  Everything works fine on my own 
VMs (Hyper-V and VMWare Workstation).
However, we have a VM (VMWare ESXi) in our quality assurance testing 
department.  This box doesn't have source code, we install asterisk on the box 
through our own package.  Haven't had any problems over the decade or so we've 
been doing this.

On this box, everything installs correctly.  Asterisk comes up and I see 
devices registering.
I then place a call into the system.
We use AMI through our own software and send the action to answer the call.  
Asterisk then crashes on this VM.
To rule out our software, I have fired up asterisk standalone and used a telnet 
session to connect up issuing actions through telnet.  This also crashes.

I decided to try asterisk 16.5.0 and the same crashing problem happens on this 
VM.
Next, I tried asterisk 16.4.1 and I'm encountering the same issue.

I decided to go back to 16.3.0 and compile without any of our patch 
submissions.  This had no problems.

Summary, everything is great on asterisk 16.3.0 (with and without the patches 
we added to asterisk future versions).
I have no issues with the version when I install on a separate VM on my own 
box.  I have tried VMs locally using VMWare Workstation and Hyper-V without any 
issues.

The only thing I can think of is we do include unimrcp asterisk support and 
their latest package is currently for asterisk 16.3.0.
Could this be causing the crashes?

Anyone have any thoughts on what I could try or do to diagnose the issue?

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

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

Re: [asterisk-dev] PJSIP issue with NEC

2019-08-20 Thread Dan Cropp
Thank you Joshua.


-Original Message-
From: asterisk-dev  On Behalf Of Joshua 
C. Colp
Sent: Tuesday, August 20, 2019 3:39 PM
To: asterisk-dev@lists.digium.com
Subject: Re: [asterisk-dev] PJSIP issue with NEC

On Tue, Aug 20, 2019, at 5:36 PM, Dan Cropp wrote:
>  
> We encountered an issue with PJSIP authenticated registration to an 
> NEC SIP Station interface. We tracked the problem down to PJSIP (on 
> Linux) sending a 36 character cnonce. NEC developers confirmed they 
> only support up to 32 characters.
> 
> 
> We have a support contract with Teluu and they developed a patch for us.
> 
> 
> I have used Teluu’s PJSIP patch with asterisk. Copying it to 
> third-party/pjproject/patches and compiling Asterisk. Then testing it 
> with NEC’s switch.
> 
> 
> If I want to add Teluu’s patch to the Asterisk source code, should I 
> start this as an issue and then work on the issue through gerrit?

If you would like it in the tree now, yes, otherwise it'll be brought in 
automatically when we pull in the next PJSIP release if it is present upstream.

--
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: 
www.digium.com & www.asterisk.org

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

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-dev] PJSIP issue with NEC

2019-08-20 Thread Dan Cropp
We encountered an issue with PJSIP authenticated registration to an NEC SIP 
Station interface.  We tracked the problem down to PJSIP (on Linux) sending a 
36 character cnonce.  NEC developers confirmed they only support up to 32 
characters.

We have a support contract with Teluu and they developed a patch for us.

I have used Teluu's PJSIP patch with asterisk.  Copying it to 
third-party/pjproject/patches and compiling Asterisk.  Then testing it with 
NEC's switch.

If I want to add Teluu's patch to the Asterisk source code, should I start this 
as an issue and then work on the issue through gerrit?

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

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

Re: [asterisk-dev] Audio to/from Asterisk

2019-07-24 Thread Dan Cropp
Out of curiosity, would this be an alternative to unimrcp’s asterisk support 
for MRCP (TTS/ASR)?


From: asterisk-dev  On Behalf Of Luca 
Pradovera
Sent: Monday, July 22, 2019 3:12 AM
To: Asterisk Developers Mailing List 
Subject: Re: [asterisk-dev] Audio to/from Asterisk

Hello,
I remember this being talked about, and it's essentially tied to the mechanism 
that would allow streaming ASR/TTS services to be used.
+1 on this feature!

On Mon, Jul 22, 2019 at 10:01 AM Dan Jenkins 
mailto:d...@nimblea.pe>> wrote:
Also coming back to this with some real-life case issues I'm currently facing 
and why I can't use audiosocket :(

I need to be able to ask the ARI/AGI/AMI for an IP/port combo and for an 
external app to then connect into asterisk rather than asterisk connecting to a 
URI elsewhere. Lets say I already have a nodejs (or any other language) process 
taking care of controlling that call via ARI or even AGI (all the different 
ways) - I need that same process to handle the media I'm sending and receiving 
to/from asterisk and so if I already have that process up and then Asterisk 
calls out to a generic URI then that media will never make it back to the 
original nodejs process.

I think its of upmost importance that I be able to ask asterisk for a host:port 
pair and then be able to connect to that port from my external application.

What do people think? I thought we'd talked about this mechanism at devcon?

Dan

On Sat, Jul 20, 2019 at 2:39 PM Dan Jenkins 
mailto:d...@nimblea.pe>> wrote:
Just  going to chime in and say I don't see a one way audio solution as enough 
and I'd worry that doing that would lead to "oh but only so many people need to 
chuck audio in". This has been discussed at at least 3 devcons now.

On Thu, Jul 18, 2019 at 2:09 PM Seán C. McCord 
mailto:ule...@gmail.com>> wrote:
I certainly don't mind if a better-designed system comes along and obviates my 
AudioSocket implementation.  I built it because I needed it.  However, 
bidirectional audio flow is critical for me (speech synthesis, external 
interfacing, real-time processed audio, processed injections, etc).  While I 
would actually prefer a system which was a bit beefier than my own (simple 
protocol aside, there's a good deal of range between my protocol and MRCP), my 
meagre C skills (and patience) don't allow me to venture forth into those 
difficult waters.

I do like the separate connection (unlike Wazo's) and the support of TLS 
(unlike mine)... and yours is certainly (even without looking) more performant. 
 Mine also probably needs a multi-threaded, dedicated-receiver approach like 
most of the other channels which handle socket-received media, rather than the 
simple non-blocking I/O with null frame insertion.  No perfect solution yet.



On Thu, Jul 18, 2019 at 8:01 AM George Joseph 
mailto:gjos...@digium.com>> wrote:
Hey Guys,

I was on vacation when this thread happened but I'm also working on this now.  
The implementation uses the existing ARI channel and bridge recording endpoints 
ands add the ability to specify a URI in the form of 
(udp|tcp|tls)://hostname:port to stream the media.  This makes use of the 
existing chan_bridge_media driver and only requires a scheme handler similar to 
Seán's res_audiosocket.   This implementation is more targeted to real-time 
speech recognition/transcription/captioning and is therefore one way 
(outbound).  A future enhancement is planned that would send each channel in a 
bridge as a separate audio channel in a multi-channel container.

I'm not suggesting that this should replace Seán's audiosocket stuff but I did 
want to let you know what was in the pipeline.

george

On Fri, Jul 5, 2019 at 7:38 AM Seán C. McCord 
mailto:ule...@gmail.com>> wrote:
Solutions such as Jack are non-network oriented and severely limited in 
scalability.  There are, of course, many other options, but the closest are 
chan_rtp and chan_nbs.  RTP is a good option except for the difficulty for 
non-telephony people to interact with it.  NBS is deprecated, undocumented, and 
unsupported by any locatable resources.

While the original app interface from last year required dialplan, the channel 
interface does not.  It is a plain channel which can be used by ARI directly.


On Fri, Jul 5, 2019, 15:28 Sylvain Boily 
mailto:sylv...@wazo.io>> wrote:
Hello Seán,
On 2019-07-05 4:45 a.m., Seán C. McCord wrote:
A brief update:

I have adapted my app_audiosocket from last year to become chan_audiosocket, a 
full bidirectional audio channel interface for Asterisk to any AudioSocket 
service (which itself is a dead-simple implementation).  I'll be demoing it in 
my talk next week at CommCon, for anyone who might be interested.  I'm going to 
try to have it ready to push to gerrit for review this weekend.

I'll be there.


For now, you can see it in the 'channel' branch of 
github.com/CyCoreSystems/audiosocket.

This is very different from what we did. You need dialpl

Re: [asterisk-dev] How are alembic scripts named?

2019-04-17 Thread Dan Cropp
Thank you Joshua.


-Original Message-
From: asterisk-dev  On Behalf Of Joshua 
C. Colp
Sent: Wednesday, April 17, 2019 9:24 AM
To: asterisk-dev@lists.digium.com
Subject: Re: [asterisk-dev] How are alembic scripts named?

On Wed, Apr 17, 2019, at 11:18 AM, Dan Cropp wrote:
> Thank you Joshua.
> 
> Alembic is not one of the packages installed on my VM.  When I look at 
> install_prereq, I do not see it in there.
> Is there asterisk related documentation on alembic?

Alembic isn't part of building Asterisk, so install_prereq doesn't have it 
included. It's also only necessary for database usage or creating migration 
scripts, so it has to be manually installed.

> 
> I installed the alembic and alembic3 packages based on Linux output
> 
> alembic revision -m "pjsip add norefersub"
> The program 'alembic' can be found in the following packages:
>  * python-alembic
>  * python3-alembic
> Try: sudo apt install 
> 
> 
> However, after this, I am receiving an error indicating no alembic.ini 
> file
> 
> alembic revision -m "pjsip add norefersub"
>   FAILED: No config file 'alembic.ini' found, or file has no 
> '[alembic]' section
> 
> Any suggestions as to where to find asterisk instructions for alembic?

I don't believe we have anything specific except the normal usage for users of 
it[1]. This is because we don't do anything special with alembic or modify it. 
If you do the following:

cd contrib/ast-db-manage
alembic -c config.ini.sample revision -m "pjsip add norefersub"

It should work though.

[1] 
https://wiki.asterisk.org/wiki/display/AST/Managing+Realtime+Databases+with+Alembic

--
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: 
www.digium.com & www.asterisk.org

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

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] How are alembic scripts named?

2019-04-17 Thread Dan Cropp
Thank you Joshua.

Alembic is not one of the packages installed on my VM.  When I look at 
install_prereq, I do not see it in there.
Is there asterisk related documentation on alembic?

I installed the alembic and alembic3 packages based on Linux output

alembic revision -m "pjsip add norefersub"
The program 'alembic' can be found in the following packages:
 * python-alembic
 * python3-alembic
Try: sudo apt install 


However, after this, I am receiving an error indicating no alembic.ini file

alembic revision -m "pjsip add norefersub"
  FAILED: No config file 'alembic.ini' found, or file has no '[alembic]' section

Any suggestions as to where to find asterisk instructions for alembic?

-Original Message-
From: asterisk-dev  On Behalf Of Joshua 
C. Colp
Sent: Wednesday, April 17, 2019 9:01 AM
To: asterisk-dev@lists.digium.com
Subject: Re: [asterisk-dev] How are alembic scripts named?

On Wed, Apr 17, 2019, at 10:58 AM, Dan Cropp wrote:
>  
> For a patch I’m working on, I need to add an alembic script.
> 
> It was recommended I use the following file as a reference 
> 2bb1a85135ad_pjsip_add_use_callerid_contact.py
> 
> 
> How is the Revision and Revises determined? Is this automatically 
> generated and added to the script when it’s uploaded?
> 
> Also, is the Create Date something I set or will this be automatically 
> generated when it’s uploaded?

The alembic tool[1] populates this information and creates the base file. You 
then have to fill it.

[1] 
https://alembic.sqlalchemy.org/en/latest/tutorial.html#create-a-migration-script

--
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: 
www.digium.com & www.asterisk.org

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

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-dev] How are alembic scripts named?

2019-04-17 Thread Dan Cropp
For a patch I'm working on, I need to add an alembic script.
It was recommended I use the following file as a reference 
2bb1a85135ad_pjsip_add_use_callerid_contact.py

How is the Revision and Revises determined?  Is this automatically generated 
and added to the script when it's uploaded?
Also, is the Create Date something I set or will this be automatically 
generated when it's uploaded?

Have a great day!

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

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

Re: [asterisk-dev] Questions on feature/patch process

2019-04-08 Thread Dan Cropp
Thanks again Joshua

-Original Message-
From: asterisk-dev  On Behalf Of Joshua 
C. Colp
Sent: Monday, April 8, 2019 5:16 AM
To: asterisk-dev@lists.digium.com
Subject: Re: [asterisk-dev] Questions on feature/patch process

On Fri, Apr 5, 2019, at 7:05 PM, Dan Cropp wrote:
>  
> I submitted a patch to git review earlier this week. I submitted it 
> based on master branch for the issue I worked on.
> 
> If we would like this to be part of a future asterisk 16 version, do I 
> need to do any additional work for this using asterisk 16 as the 
> source branch?

Generally if you add a new option it would be a new feature, and for inclusion 
into release branches (such as 16) it would also need a test to confirm the 
functionality going forward. Otherwise it really depends on the change whether 
it will go cleanly into 16. Usually it does and you can just cherry pick. If it 
doesn't you have to manually resolve any conflicts.

--
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: 
www.digium.com & www.asterisk.org

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

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] PJSIP REFER question

2019-04-08 Thread Dan Cropp
Thank you Joshua


-Original Message-
From: asterisk-dev  On Behalf Of Joshua 
C. Colp
Sent: Monday, April 8, 2019 5:14 AM
To: asterisk-dev@lists.digium.com
Subject: Re: [asterisk-dev] PJSIP REFER question

On Thu, Apr 4, 2019, at 3:53 PM, Dan Cropp wrote:
> For a PSJIP configurable setting on whether to include the norefersub 
> or not, is it acceptable to use a setting in the pjsip.conf under the 
> global type section?

Yes, that should be fine.

> Ideally this would be a per endpoint setting but we're having trouble 
> with that because it seems the capability is loaded in the 
> res_pjsip_refer load_module function.
> Since Cisco doesn't adhere to the standard, we're concerned they may 
> detect norefersub Supported in other packets and decide to process it 
> incorrectly if it's only excluded from the REFER packet.
> Would it even be possible to toggle the Supported capabilities for 
> endpoints based on the command being sent?

I don't know if PJSIP would allow such a thing easily but with effort it's 
probably possible, by modifying the outgoing traffic as it goes out.

--
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: 
www.digium.com & www.asterisk.org

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

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] Questions on feature/patch process

2019-04-08 Thread Dan Cropp
Thank you Florian


From: asterisk-dev  On Behalf Of 
Floimair Florian
Sent: Monday, April 8, 2019 2:46 AM
To: Asterisk Developers Mailing List 
Subject: Re: [asterisk-dev] Questions on feature/patch process

Yes, you need to cherry-pick your patch to branch 16.
You can do this directly in gerrit though.
Be prepared however, that there might be modifications necessary.
I therefore personally prefer to do such things locally first in separate 
branches and then submit the changes on each branch individually for review.



With best regards

Florian Floimair
Innovation - Software-Development

COMMEND INTERNATIONAL GMBH
A-5020 Salzburg, Saalachstraße 51
http://www.commend.com<http://www.commend.com/>

Security and Communication by Commend

FN 178618z | LG Salzburg

Von: asterisk-dev 
mailto:asterisk-dev-boun...@lists.digium.com>>
 im Auftrag von Dan Cropp mailto:d...@amtelco.com>>
Antworten an: Asterisk Developers Mailing List 
mailto:asterisk-dev@lists.digium.com>>
Datum: Samstag, 6. April 2019 um 00:05
An: Asterisk Developers Mailing List 
mailto:asterisk-dev@lists.digium.com>>
Betreff: [asterisk-dev] Questions on feature/patch process

I submitted a patch to git review earlier this week.  I submitted it based on 
master branch for the issue I worked on.
If we would like this to be part of a future asterisk 16 version, do I need to 
do any additional work for this using asterisk 16 as the source branch?

Also, I have code to allow enabling/disabling the norefersub on PJSIP.  This is 
due to issues with Cisco not adhering to the standard.
From what we’ve been able to tell, PJPROJECT has a way to add the capability, 
but no way to remove it.  Based on this, we believe the setting would be a 
global PJSIP setting to enable the norefersub by default, but allow it not to 
be added as a capability for PJPROJECT if the setting is no (pjsip_refer load 
module).
Does this sound like the reasonable approach?  Ideally, the setting would be 
per endpoint, but that doesn’t seem possible with PJPROJECT.

Have a great day!

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

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

[asterisk-dev] Questions on feature/patch process

2019-04-05 Thread Dan Cropp
I submitted a patch to git review earlier this week.  I submitted it based on 
master branch for the issue I worked on.
If we would like this to be part of a future asterisk 16 version, do I need to 
do any additional work for this using asterisk 16 as the source branch?

Also, I have code to allow enabling/disabling the norefersub on PJSIP.  This is 
due to issues with Cisco not adhering to the standard.
>From what we've been able to tell, PJPROJECT has a way to add the capability, 
>but no way to remove it.  Based on this, we believe the setting would be a 
>global PJSIP setting to enable the norefersub by default, but allow it not to 
>be added as a capability for PJPROJECT if the setting is no (pjsip_refer load 
>module).
Does this sound like the reasonable approach?  Ideally, the setting would be 
per endpoint, but that doesn't seem possible with PJPROJECT.

Have a great day!

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

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

Re: [asterisk-dev] PJSIP REFER question

2019-04-04 Thread Dan Cropp
For a PSJIP configurable setting on whether to include the norefersub or not, 
is it acceptable to use a setting in the pjsip.conf under the global type 
section?

Ideally this would be a per endpoint setting but we're having trouble with that 
because it seems the capability is loaded in the res_pjsip_refer load_module 
function.
Since Cisco doesn't adhere to the standard, we're concerned they may detect 
norefersub Supported in other packets and decide to process it incorrectly if 
it's only excluded from the REFER packet.
Would it even be possible to toggle the Supported capabilities for endpoints 
based on the command being sent?

Dan

-Original Message-
From: asterisk-dev  On Behalf Of Joshua 
C. Colp
Sent: Thursday, March 28, 2019 4:18 PM
To: asterisk-dev@lists.digium.com
Subject: Re: [asterisk-dev] PJSIP REFER question

On Thu, Mar 28, 2019, at 5:47 PM, Dan Cropp wrote:
>  
> Joshua helped answer some questions on the asterisk-users list.
> 
> 
> With Cisco switch, we’ve encountered a problem where Cisco does not 
> send NOTIFY subscription updates if the Supported header includes 
> norefersub.
> 
> Cisco is not handling this correctly, but getting Cisco (or any of the 
> large switch vendors) to fix their bugs is impossible.
> 
> 
> In Asterisk, chan_sip we are able to perform REFER (transfer) with 
> Cisco. SIP debugging shows chan_sip does not include the norefersub.
> 
> The easy solution is for us to keep using chan_sip and not PJSIP. 
> However, PJSIP is much better overall and chan_sip is basically 
> deprecated.
> 
> We really want to stop using chan_sip for some systems, but we can’t 
> without PJSIP handling all these.
> 
> 
> I’m wondering if any asterisk developers can provide more insight on 
> including the norefersub in the res_pjsip_refer when the load module?
> 
> Is this setting really needed?

According to the RFC[1] it's supposed to exist to indicate support for the 
functionality in the first place. Removing it would essentially be removing 
support for suppressing it most likely. It ultimately depends on the remote 
implementation as to whether they take it into account.
 
> If setting needs to remain, how difficult would it be to write code to 
> make this setting configurable?

I don't think it would be too difficult to do such a thing, but that's only a 
guess.
 
> In our use case, we need to REFER calls to Cisco endpoint. However, 
> Cisco will not REFER calls to us.

[1] https://www.ietf.org/rfc/rfc4488.txt

--
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: 
www.digium.com & www.asterisk.org

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

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] Looking for help with gerrit for submitting an issue fix for review

2019-04-02 Thread Dan Cropp
Thank you Joshua.

That solves my mistake.  It's cloning right now.

Have a great day!

Dan

-Original Message-
From: asterisk-dev  On Behalf Of Joshua 
C. Colp
Sent: Tuesday, April 2, 2019 9:31 AM
To: asterisk-dev@lists.digium.com
Subject: Re: [asterisk-dev] Looking for help with gerrit for submitting an 
issue fix for review

On Tue, Apr 2, 2019, at 11:24 AM, Dan Cropp wrote:
> Attempting to go through the Gerrit Usage instructions again this week.
> 
> Last week, I was able to clone from gerrit, I branched the issue I was 
> working on, made changes and ran tests.  I was able to commit locally,
> but could not push the changes back to gerrit.   I receive the prompt 
> for the Username https://gerrit.asterisk.org and password for 
> https://myusern...@gerrit.asterisk.org
> 
> I have confirmed my credentials on gerrit.
> 
> When I execute git remote -v
> origin  http://gerrit.asterisk.org/asterisk (fetch) origin  
> http://gerrit.asterisk.org/asterisk (push)

This would appear to be an anonymous clone which is likely why it did not work.



> Can anyone provide some guidance?

The address to clone from, in the case of asterisk, would be:
ssh://@gerrit.asterisk.org:29418/asterisk

The default branch will be master.

--
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: 
www.digium.com & www.asterisk.org

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

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] Looking for help with gerrit for submitting an issue fix for review

2019-04-02 Thread Dan Cropp
Thank you Ben.

I do have the username set.

From: asterisk-dev  On Behalf Of Ben Ford
Sent: Tuesday, April 2, 2019 9:30 AM
To: Asterisk Developers Mailing List 
Subject: Re: [asterisk-dev] Looking for help with gerrit for submitting an 
issue fix for review

This may be unrelated to your issue, or you may have already done this, but 
there is a field in Gerrit under your profile where you actually have to set 
your username. I ran into issues with this awhile back, and after manually 
setting the username, I was able to successfully clone via SSH.

On Tue, Apr 2, 2019 at 9:24 AM Dan Cropp 
mailto:d...@amtelco.com>> wrote:
Attempting to go through the Gerrit Usage instructions again this week.

Last week, I was able to clone from gerrit, I branched the issue I was working 
on, made changes and ran tests.  I was able to commit locally, but could not 
push the changes back to gerrit.   I receive the prompt for the Username 
https://gerrit.asterisk.org and password for 
https://myusern...@gerrit.asterisk.org

I have confirmed my credentials on gerrit.

When I execute git remote -v
origin  http://gerrit.asterisk.org/asterisk (fetch)
origin  http://gerrit.asterisk.org/asterisk (push)


This week, I decided to create a different directory on my Linux VM and attempt 
to follow the Gerrit Usage instructions again.
Now, I'm having trouble cloning from gerrit.

git clone ssh://asterisk/master
Cloning into 'master'...
fatal: project master not found
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Also tried...

git clone 
ssh://myusern...@gerrit.asterisk.org:29418/master<http://myusern...@gerrit.asterisk.org:29418/master>
Cloning into 'master'...
fatal: project master not found
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


It would seem this statement would be true.
"Failure to set your username will result in clones using SSH failing, despite 
adding your SSH key. If you can not clone using SSH please ensure you have set 
your username."

However, I have re-entered my SSH key and it's still failing.

Can anyone provide some guidance?

Dan

-Original Message-
From: asterisk-dev 
mailto:asterisk-dev-boun...@lists.digium.com>>
 On Behalf Of Matt Fredrickson
Sent: Friday, March 29, 2019 3:39 PM
To: Asterisk Developers Mailing List 
mailto:asterisk-dev@lists.digium.com>>
Subject: Re: [asterisk-dev] Looking for help with gerrit for submitting an 
issue fix for review

On Fri, Mar 29, 2019 at 3:18 PM Dan Cropp 
mailto:d...@amtelco.com>> wrote:
>
> I have an issue fix I would like to commit for review.
>
>
>
> I was able to retrieve the asterisk master code from gerrit, edit the code, 
> and put it through tests.
>
> I believe I have everything completed with the git message.
>
>
>
> When I try to submit it for review… (git review master)
>
>
>
> I am seeing the following…
>
>
>
> Could not connect to gerrit.
>
> Enter your gerrit username: daninmadison
>
> Trying again with
> ssh://daninmadi...@gerrit.asterisk.org:29418/asterisk.git<http://daninmadi...@gerrit.asterisk.org:29418/asterisk.git>
>
> 
>
> We don't know where your gerrit is. Please manually create a remote
>
> named "gerrit" and try again.
>
> Could not connect to gerrit at
> ssh://daninmadi...@gerrit.asterisk.org:29418/asterisk.git<http://daninmadi...@gerrit.asterisk.org:29418/asterisk.git>
>
> Traceback (most recent call last):
>
>   File "/usr/bin/git-review", line 10, in 
>
> sys.exit(main())
>
>   File "/usr/lib/python2.7/dist-packages/git_review/cmd.py", line
> 1534, in main
>
> sys.exit(e.EXIT_CODE)
>
> AttributeError: 'GitReviewException' object has no attribute 'EXIT_CODE'
>
>
>
> Could someone provide some guidance on what I am doing wrong?

Do you have a remote called gerrit when you type git remote?

If you're not using it, the page that I usually use when setting up a new 
contribution repo is https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage

Best wishes!

--
Matthew Fredrickson
Digium - A Sangoma Company | Asterisk Project Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA

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

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.di

Re: [asterisk-dev] Looking for help with gerrit for submitting an issue fix for review

2019-04-02 Thread Dan Cropp
Attempting to go through the Gerrit Usage instructions again this week.

Last week, I was able to clone from gerrit, I branched the issue I was working 
on, made changes and ran tests.  I was able to commit locally, but could not 
push the changes back to gerrit.   I receive the prompt for the Username 
https://gerrit.asterisk.org and password for 
https://myusern...@gerrit.asterisk.org

I have confirmed my credentials on gerrit.

When I execute git remote -v
origin  http://gerrit.asterisk.org/asterisk (fetch)
origin  http://gerrit.asterisk.org/asterisk (push)


This week, I decided to create a different directory on my Linux VM and attempt 
to follow the Gerrit Usage instructions again.
Now, I'm having trouble cloning from gerrit.

git clone ssh://asterisk/master
Cloning into 'master'...
fatal: project master not found
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Also tried...

git clone ssh://myusern...@gerrit.asterisk.org:29418/master
Cloning into 'master'...
fatal: project master not found
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


It would seem this statement would be true.  
"Failure to set your username will result in clones using SSH failing, despite 
adding your SSH key. If you can not clone using SSH please ensure you have set 
your username."

However, I have re-entered my SSH key and it's still failing.

Can anyone provide some guidance?

Dan

-Original Message-
From: asterisk-dev  On Behalf Of Matt 
Fredrickson
Sent: Friday, March 29, 2019 3:39 PM
To: Asterisk Developers Mailing List 
Subject: Re: [asterisk-dev] Looking for help with gerrit for submitting an 
issue fix for review

On Fri, Mar 29, 2019 at 3:18 PM Dan Cropp  wrote:
>
> I have an issue fix I would like to commit for review.
>
>
>
> I was able to retrieve the asterisk master code from gerrit, edit the code, 
> and put it through tests.
>
> I believe I have everything completed with the git message.
>
>
>
> When I try to submit it for review… (git review master)
>
>
>
> I am seeing the following…
>
>
>
> Could not connect to gerrit.
>
> Enter your gerrit username: daninmadison
>
> Trying again with 
> ssh://daninmadi...@gerrit.asterisk.org:29418/asterisk.git
>
> 
>
> We don't know where your gerrit is. Please manually create a remote
>
> named "gerrit" and try again.
>
> Could not connect to gerrit at 
> ssh://daninmadi...@gerrit.asterisk.org:29418/asterisk.git
>
> Traceback (most recent call last):
>
>   File "/usr/bin/git-review", line 10, in 
>
> sys.exit(main())
>
>   File "/usr/lib/python2.7/dist-packages/git_review/cmd.py", line 
> 1534, in main
>
> sys.exit(e.EXIT_CODE)
>
> AttributeError: 'GitReviewException' object has no attribute 'EXIT_CODE'
>
>
>
> Could someone provide some guidance on what I am doing wrong?

Do you have a remote called gerrit when you type git remote?

If you're not using it, the page that I usually use when setting up a new 
contribution repo is https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage

Best wishes!

--
Matthew Fredrickson
Digium - A Sangoma Company | Asterisk Project Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA

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

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] Looking for help with gerrit for submitting an issue fix for review

2019-03-29 Thread Dan Cropp
Thank you Matt.

When I type git remote, it returns origin.

I thought I followed the instructions from the wiki link you provided.  
However, I will retry from scratch next week.

Have a great weekend!

Dan

-Original Message-
From: asterisk-dev  On Behalf Of Matt 
Fredrickson
Sent: Friday, March 29, 2019 3:39 PM
To: Asterisk Developers Mailing List 
Subject: Re: [asterisk-dev] Looking for help with gerrit for submitting an 
issue fix for review

On Fri, Mar 29, 2019 at 3:18 PM Dan Cropp  wrote:
>
> I have an issue fix I would like to commit for review.
>
>
>
> I was able to retrieve the asterisk master code from gerrit, edit the code, 
> and put it through tests.
>
> I believe I have everything completed with the git message.
>
>
>
> When I try to submit it for review… (git review master)
>
>
>
> I am seeing the following…
>
>
>
> Could not connect to gerrit.
>
> Enter your gerrit username: daninmadison
>
> Trying again with 
> ssh://daninmadi...@gerrit.asterisk.org:29418/asterisk.git
>
> 
>
> We don't know where your gerrit is. Please manually create a remote
>
> named "gerrit" and try again.
>
> Could not connect to gerrit at 
> ssh://daninmadi...@gerrit.asterisk.org:29418/asterisk.git
>
> Traceback (most recent call last):
>
>   File "/usr/bin/git-review", line 10, in 
>
> sys.exit(main())
>
>   File "/usr/lib/python2.7/dist-packages/git_review/cmd.py", line 
> 1534, in main
>
> sys.exit(e.EXIT_CODE)
>
> AttributeError: 'GitReviewException' object has no attribute 'EXIT_CODE'
>
>
>
> Could someone provide some guidance on what I am doing wrong?

Do you have a remote called gerrit when you type git remote?

If you're not using it, the page that I usually use when setting up a new 
contribution repo is https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage

Best wishes!

--
Matthew Fredrickson
Digium - A Sangoma Company | Asterisk Project Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA

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

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-dev] Looking for help with gerrit for submitting an issue fix for review

2019-03-29 Thread Dan Cropp
I have an issue fix I would like to commit for review.

I was able to retrieve the asterisk master code from gerrit, edit the code, and 
put it through tests.
I believe I have everything completed with the git message.

When I try to submit it for review... (git review master)

I am seeing the following...

Could not connect to gerrit.
Enter your gerrit username: daninmadison
Trying again with ssh://daninmadi...@gerrit.asterisk.org:29418/asterisk.git

We don't know where your gerrit is. Please manually create a remote
named "gerrit" and try again.
Could not connect to gerrit at 
ssh://daninmadi...@gerrit.asterisk.org:29418/asterisk.git
Traceback (most recent call last):
  File "/usr/bin/git-review", line 10, in 
sys.exit(main())
  File "/usr/lib/python2.7/dist-packages/git_review/cmd.py", line 1534, in main
sys.exit(e.EXIT_CODE)
AttributeError: 'GitReviewException' object has no attribute 'EXIT_CODE'

Could someone provide some guidance on what I am doing wrong?

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

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

Re: [asterisk-dev] PJSIP REFER question

2019-03-29 Thread Dan Cropp
Thank you Joshua


-Original Message-
From: asterisk-dev  On Behalf Of Joshua 
C. Colp
Sent: Thursday, March 28, 2019 4:18 PM
To: asterisk-dev@lists.digium.com
Subject: Re: [asterisk-dev] PJSIP REFER question

On Thu, Mar 28, 2019, at 5:47 PM, Dan Cropp wrote:
>  
> Joshua helped answer some questions on the asterisk-users list.
> 
> 
> With Cisco switch, we’ve encountered a problem where Cisco does not 
> send NOTIFY subscription updates if the Supported header includes 
> norefersub.
> 
> Cisco is not handling this correctly, but getting Cisco (or any of the 
> large switch vendors) to fix their bugs is impossible.
> 
> 
> In Asterisk, chan_sip we are able to perform REFER (transfer) with 
> Cisco. SIP debugging shows chan_sip does not include the norefersub.
> 
> The easy solution is for us to keep using chan_sip and not PJSIP. 
> However, PJSIP is much better overall and chan_sip is basically 
> deprecated.
> 
> We really want to stop using chan_sip for some systems, but we can’t 
> without PJSIP handling all these.
> 
> 
> I’m wondering if any asterisk developers can provide more insight on 
> including the norefersub in the res_pjsip_refer when the load module?
> 
> Is this setting really needed?

According to the RFC[1] it's supposed to exist to indicate support for the 
functionality in the first place. Removing it would essentially be removing 
support for suppressing it most likely. It ultimately depends on the remote 
implementation as to whether they take it into account.
 
> If setting needs to remain, how difficult would it be to write code to 
> make this setting configurable?

I don't think it would be too difficult to do such a thing, but that's only a 
guess.
 
> In our use case, we need to REFER calls to Cisco endpoint. However, 
> Cisco will not REFER calls to us.

[1] https://www.ietf.org/rfc/rfc4488.txt

--
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: 
www.digium.com & www.asterisk.org

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

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-dev] PJSIP REFER question

2019-03-28 Thread Dan Cropp
Joshua helped answer some questions on the asterisk-users list.

With Cisco switch, we've encountered a problem where Cisco does not send NOTIFY 
subscription updates if the Supported header includes norefersub.
Cisco is not handling this correctly, but getting Cisco (or any of the large 
switch vendors) to fix their bugs is impossible.

In Asterisk, chan_sip we are able to perform REFER (transfer) with Cisco.  SIP 
debugging shows chan_sip does not include the norefersub.
The easy solution is for us to keep using chan_sip and not PJSIP.  However, 
PJSIP is much better overall and chan_sip is basically deprecated.
We really want to stop using chan_sip for some systems, but we can't without 
PJSIP handling all these.

I'm wondering if any asterisk developers can provide more insight on including 
the norefersub in the res_pjsip_refer when the load module?
Is this setting really needed?
If setting needs to remain, how difficult would it be to write code to make 
this setting configurable?
In our use case, we need to REFER calls to Cisco endpoint.  However, Cisco will 
not REFER calls to us.

Have a great day!

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

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

[asterisk-dev] Problem with PJSIP and Blind Transfers

2017-04-20 Thread Dan Cropp
Just upgraded to Asterisk 14.4.0 and verified it's happening on this version.  
Previously ran tests on 14.2.1 with the same behavior.

We are using AMI to tell Asterisk to perform a Transfer (really a blind 
transfer).

When we perform this with a chan_sip endpoint, everything works fine for both 
success and failed transfers.

Success receives a NOTIFY with a "Subscription-State: terminated" and SIP/2.0 
200 OK.  Asterisk responds with an OK to the other end.  Then, I see the SIP 
trace showing Asterisk ending the call (BYE).
This success all happens at the same time we see an AMI Event with the 
TRANSFERSTATUS of SUCCESS.

Failure condition with chan_sip.  Again, working correctly.
Sends the REFER packet, receives 202 Accepted, receives a NOTIFY of Trying, 
replies with OK (response to NOTIFY).  Then, Asterisk receives a NOTIFY with a 
SIP/2.0 404 Not Found, replies with OK.
When the NOTIFY 404 Not Found is processed, Asterisk sends an AMI event with 
the TRANSFERSTATUS of FAILURE.


With PJSIP, it seems as though the success/failure of the Transfer dial plan 
command occurs when it sends the REFER.  It never waits to know if it succeeds 
or fails.
Looking at the PJSIP messages, this TRANSFERSTATUS is sent even before the 
other side has responded with the 202 Accepted packet.

When logging the PJSIP messages, I see the so valid number case sends the 
REFER, receives 202 Accepted, but the trace doesn't write the Notify/OK 
response with the Verbosity and PJSIP debug enabled.

For failures, I do not even see the 404 Not Found in the log.  Asterisk replies 
with a TRANSFERSTATUS of SUCCESS when the other end sends the 404 Not Found.

Is the correct next step to submit an Issue?

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

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

Re: [asterisk-dev] Transfer cmd (PJSIP not sending Referred-By but chan_sip does)

2015-08-26 Thread Dan Cropp
Thank you Mark.

I applied for the license agreement.
Read through the coding guidelines and made some slight modifications to meet 
the guidelines.
I'm reading the Gerrit Usage.

I plan to submit for approval once I have read everything and receive approval.

From: asterisk-dev-boun...@lists.digium.com 
[mailto:asterisk-dev-boun...@lists.digium.com] On Behalf Of Mark Michelson
Sent: Tuesday, August 25, 2015 4:53 PM
To: Asterisk Developers Mailing List
Subject: Re: [asterisk-dev] Transfer cmd (PJSIP not sending Referred-By but 
chan_sip does)

Yep, that looks like what I would expect it to look like. The only thing that 
immediately jumps out as unnecessary is the

if (ref_by_val && !ast_strlen_zero(ref_by_val))

line. You can get rid of the initial NULL check because ast_strlen_zero() does 
that for you.

If you wanted to submit this for inclusion in Asterisk, feel free to upload a 
review to https://gerrit.asterisk.org. Instructions can be found on the wiki 
[1]. Before submitting, I'd also be sure to read the Asterisk coding guidelines 
[2] since the current code would have coding guidelines findings on it.

[1] https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage
[2] https://wiki.asterisk.org/wiki/display/AST/Coding+Guidelines

On 08/25/2015 04:35 PM, Dan Cropp wrote:
Thank you Mark for the tips.

Is the code below close to what you were thinking?

I ran some initial tests and it seems to be working.  I can override the 
default Referred-By value by setting the SIPREFERREDBYHDR variable.

static void transfer_refer(struct ast_sip_session *session, const char *target)
{
pjsip_evsub *sub;
enum ast_control_transfer message = AST_TRANSFER_SUCCESS;
pj_str_t tmp;
pjsip_tx_data *packet;

if (pjsip_xfer_create_uac(session->inv_session->dlg, NULL, &sub) != 
PJ_SUCCESS) {
message = AST_TRANSFER_FAILED;
ast_queue_control_data(session->channel, AST_CONTROL_TRANSFER, 
&message, sizeof(message));

return;
}

if (pjsip_xfer_initiate(sub, pj_cstr(&tmp, target), &packet) != 
PJ_SUCCESS) {
message = AST_TRANSFER_FAILED;
ast_queue_control_data(session->channel, AST_CONTROL_TRANSFER, 
&message, sizeof(message));
pjsip_evsub_terminate(sub, PJ_FALSE);

return;
}

/ Start of changes /
pjsip_hdr *hdr;
const pj_str_t str_ref_by = { "Referred-By", 11 };

const char *ref_by_val = pbx_builtin_getvar_helper(session->channel, 
"SIPREFERREDBYHDR");
pj_str_t tmp2;
if (ref_by_val && !ast_strlen_zero(ref_by_val))
  {
hdr = (pjsip_hdr*)pjsip_generic_string_hdr_create(packet->pool, 
&str_ref_by, pj_cstr(&tmp2, ref_by_val));
  }
else
  {
/* Add Referred-By header */
hdr = (pjsip_hdr*)pjsip_generic_string_hdr_create(packet->pool, 
&str_ref_by, &session->inv_session->dlg->local.info_str);
  }
pjsip_msg_add_hdr(packet->msg, hdr);
/ End of changes /

pjsip_xfer_send_request(sub, packet);
ast_queue_control_data(session->channel, AST_CONTROL_TRANSFER, 
&message, sizeof(message));
}

From: 
asterisk-dev-boun...@lists.digium.com<mailto:asterisk-dev-boun...@lists.digium.com>
 [mailto:asterisk-dev-boun...@lists.digium.com] On Behalf Of Mark Michelson
Sent: Tuesday, August 25, 2015 1:17 PM
To: Asterisk Developers Mailing List
Subject: Re: [asterisk-dev] Transfer cmd (PJSIP not sending Referred-By but 
chan_sip does)

That code gets you about 95% of the way there.

The biggest difference would be that the pjsip_msg_add_hdr() call may need to 
be broken up based on whether the SIPREFERREDBYHDR channel variable is set or 
not. To determine that, you can use the pbx_builtin_getvar_helper() function 
call declared in include/asterisk/pbx.h to retrieve the variable value, and the 
ast_strlen_zero() function to determine if the channel variable value is 
zero-length or not.

Other than that, you should be able to omit the call to 
pjsua_process_msg_data() since Asterisk doesn't use pjsua.

On 08/25/2015 12:35 PM, Dan Cropp wrote:

In doing a little research, it seems the Referred-By header could be added 
after the pjsip_xfer_initiate.

This is the approach PJSIP did for some code as far back as PJSIP 1.6.



/*

 * Create REFER request.

 */

status = pjsip_xfer_initiate(sub, dest, &tdata);

if (status != PJ_SUCCESS) {

pjsua_perror(THIS_FILE, "Unable to create REFER request", 
status);

pjsip_dlg_dec_lock(dlg);

return status;

}



/* Add Referred-By header */

gs_hdr = pjsip_generic_string_hdr_create(tdata->pool, &str_ref_by,

 

Re: [asterisk-dev] Transfer cmd (PJSIP not sending Referred-By but chan_sip does)

2015-08-25 Thread Dan Cropp
Thank you Mark for the tips.

Is the code below close to what you were thinking?

I ran some initial tests and it seems to be working.  I can override the 
default Referred-By value by setting the SIPREFERREDBYHDR variable.

static void transfer_refer(struct ast_sip_session *session, const char *target)
{
pjsip_evsub *sub;
enum ast_control_transfer message = AST_TRANSFER_SUCCESS;
pj_str_t tmp;
pjsip_tx_data *packet;

if (pjsip_xfer_create_uac(session->inv_session->dlg, NULL, &sub) != 
PJ_SUCCESS) {
message = AST_TRANSFER_FAILED;
ast_queue_control_data(session->channel, AST_CONTROL_TRANSFER, 
&message, sizeof(message));

return;
}

if (pjsip_xfer_initiate(sub, pj_cstr(&tmp, target), &packet) != 
PJ_SUCCESS) {
message = AST_TRANSFER_FAILED;
ast_queue_control_data(session->channel, AST_CONTROL_TRANSFER, 
&message, sizeof(message));
pjsip_evsub_terminate(sub, PJ_FALSE);

return;
}

/ Start of changes /
pjsip_hdr *hdr;
const pj_str_t str_ref_by = { "Referred-By", 11 };

const char *ref_by_val = pbx_builtin_getvar_helper(session->channel, 
"SIPREFERREDBYHDR");
pj_str_t tmp2;
if (ref_by_val && !ast_strlen_zero(ref_by_val))
  {
hdr = (pjsip_hdr*)pjsip_generic_string_hdr_create(packet->pool, 
&str_ref_by, pj_cstr(&tmp2, ref_by_val));
  }
else
  {
/* Add Referred-By header */
hdr = (pjsip_hdr*)pjsip_generic_string_hdr_create(packet->pool, 
&str_ref_by, &session->inv_session->dlg->local.info_str);
  }
pjsip_msg_add_hdr(packet->msg, hdr);
/ End of changes /

pjsip_xfer_send_request(sub, packet);
ast_queue_control_data(session->channel, AST_CONTROL_TRANSFER, 
&message, sizeof(message));
}

From: asterisk-dev-boun...@lists.digium.com 
[mailto:asterisk-dev-boun...@lists.digium.com] On Behalf Of Mark Michelson
Sent: Tuesday, August 25, 2015 1:17 PM
To: Asterisk Developers Mailing List
Subject: Re: [asterisk-dev] Transfer cmd (PJSIP not sending Referred-By but 
chan_sip does)

That code gets you about 95% of the way there.

The biggest difference would be that the pjsip_msg_add_hdr() call may need to 
be broken up based on whether the SIPREFERREDBYHDR channel variable is set or 
not. To determine that, you can use the pbx_builtin_getvar_helper() function 
call declared in include/asterisk/pbx.h to retrieve the variable value, and the 
ast_strlen_zero() function to determine if the channel variable value is 
zero-length or not.

Other than that, you should be able to omit the call to 
pjsua_process_msg_data() since Asterisk doesn't use pjsua.

On 08/25/2015 12:35 PM, Dan Cropp wrote:

In doing a little research, it seems the Referred-By header could be added 
after the pjsip_xfer_initiate.

This is the approach PJSIP did for some code as far back as PJSIP 1.6.



/*

 * Create REFER request.

 */

status = pjsip_xfer_initiate(sub, dest, &tdata);

if (status != PJ_SUCCESS) {

pjsua_perror(THIS_FILE, "Unable to create REFER request", 
status);

pjsip_dlg_dec_lock(dlg);

return status;

}



/* Add Referred-By header */

gs_hdr = pjsip_generic_string_hdr_create(tdata->pool, &str_ref_by,


 &dlg->local.info_str);

pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)gs_hdr);





/* Add additional headers etc */

pjsua_process_msg_data( tdata, msg_data);



/* Send. */

status = pjsip_xfer_send_request(sub, tdata);

if (status != PJ_SUCCESS) {

pjsua_perror(THIS_FILE, "Unable to send REFER request", status);

pjsip_dlg_dec_lock(dlg);

return status;

}



Could anyone provider some insight into how difficult this might be for me to 
add and submit for approval?  Depending on the answer, my manager may be 
willing to let me work on this.

I've developed in C/C++ for over 25 years so I'm plenty familiar with the 
language.

I'm less familiar with the syntax and coding standards of Asterisk.  I know the 
group is very good at letting people know about their mistakes and how to fix 
them.



Have a great day!
Dan

From: 
asterisk-dev-boun...@lists.digium.com<mailto:asterisk-dev-boun...@lists.digium.com>
 [mailto:asterisk-dev-boun...@lists.digium.com] On Behalf Of Dan Cropp
Sent: Tuesday, August 25, 2015 10:50 AM
To: Asterisk Developers Mailing List
Subject: Re: [asterisk-dev] Transfer cmd (PJSIP not sending Referred-By but 
chan_sip does)

Thank you Mark

From: 
asterisk-dev-boun...@lists.digi

Re: [asterisk-dev] Transfer cmd (PJSIP not sending Referred-By but chan_sip does)

2015-08-25 Thread Dan Cropp
In doing a little research, it seems the Referred-By header could be added 
after the pjsip_xfer_initiate.

This is the approach PJSIP did for some code as far back as PJSIP 1.6.



/*

 * Create REFER request.

 */

status = pjsip_xfer_initiate(sub, dest, &tdata);

if (status != PJ_SUCCESS) {

pjsua_perror(THIS_FILE, "Unable to create REFER request", 
status);

pjsip_dlg_dec_lock(dlg);

return status;

}



/* Add Referred-By header */

gs_hdr = pjsip_generic_string_hdr_create(tdata->pool, &str_ref_by,


 &dlg->local.info_str);

pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)gs_hdr);





/* Add additional headers etc */

pjsua_process_msg_data( tdata, msg_data);



/* Send. */

status = pjsip_xfer_send_request(sub, tdata);

if (status != PJ_SUCCESS) {

pjsua_perror(THIS_FILE, "Unable to send REFER request", status);

pjsip_dlg_dec_lock(dlg);

return status;

}



Could anyone provider some insight into how difficult this might be for me to 
add and submit for approval?  Depending on the answer, my manager may be 
willing to let me work on this.

I've developed in C/C++ for over 25 years so I'm plenty familiar with the 
language.

I'm less familiar with the syntax and coding standards of Asterisk.  I know the 
group is very good at letting people know about their mistakes and how to fix 
them.



Have a great day!
Dan

From: asterisk-dev-boun...@lists.digium.com 
[mailto:asterisk-dev-boun...@lists.digium.com] On Behalf Of Dan Cropp
Sent: Tuesday, August 25, 2015 10:50 AM
To: Asterisk Developers Mailing List
Subject: Re: [asterisk-dev] Transfer cmd (PJSIP not sending Referred-By but 
chan_sip does)

Thank you Mark

From: 
asterisk-dev-boun...@lists.digium.com<mailto:asterisk-dev-boun...@lists.digium.com>
 [mailto:asterisk-dev-boun...@lists.digium.com] On Behalf Of Mark Michelson
Sent: Tuesday, August 25, 2015 10:30 AM
To: Asterisk Developers Mailing List
Subject: Re: [asterisk-dev] Transfer cmd (PJSIP not sending Referred-By but 
chan_sip does)

The answer to this is actually pretty simple: adding Referred-By in outgoing 
SIP REFERs is simply not implemented in chan_pjsip's chan_pjsip_transfer() 
function.

As far as the syntax required for the Transfer() application, that's probably a 
case where that needs to be clarified in documentation. There are lots of 
places in PJSIP configuration where we require full SIP URIs rather than just 
IP addresses or bare URIs (user@domain).

On 08/25/2015 10:00 AM, Dan Cropp wrote:
I asked the question on asterisk-users but did not receive a response, so I am 
sending the question here.

I am running Asterisk 13.5.0.

A call comes in, Asterisk answers it.  After some actions, the call needs to be 
Transferred (SIP REFER) to another number.  The other switch is responsible for 
accepting the Transfer and tromboning the lines internally.  It will also send 
a BYE so Asterisk no longer has the call.

The behavior works when I have the endpoint configured at chan_sip.  It does 
not work when the endpoint is configured as PJSIP.  I worked with the other 
switch vendor and he determined chan_sip includes the Referred-By header.  
PJSIP does not include the Referred-By header.  The other switch requires the 
Referred-By header to be present.

I tried setting the channel's SIPREFERREDBYHDR variable before the Transfer 
command and that still did not force the Referred-By header to be part of the 
REFER packet.
I tried the PJSIP_HEADER add and it still did not add the Referred-By header to 
the REFER packet.

Is there a PJSIP setting to force the Referred-By to be part of the REFER 
packet?

chan_sip (succeeds)
19:27:32.512123 IP (tos 0x0, ttl 64, id 11492, offset 0, flags [none], proto 
UDP (17), length 630)
192.168.xxx.xxx.sip > 192.168.yyy.yyy.sip: SIP, length: 602
REFER sip:3...@192.168.yyy.yyy:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.xxx.xxx:5060;branch=z9hG4bK58f4bd1d
Max-Forwards: 70
From: ;tag=as44000cf4
To: ;tag=7Iy0JkwDC
Contact: 
Call-ID: 
jdeuqpak-00...@192.168.yyy.yyy<mailto:jdeuqpak-00...@192.168.yyy.yyy>
CSeq: 102 REFER
User-Agent: Asterisk PBX 13.5.0
Date: Thu, 20 Aug 2015 19:27:32 GMT
Refer-To: 
Referred-By: 
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, 
INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

Pjsip
18:46:58.386372 IP (tos 0x0, ttl 64, id 38690, offset 0, flags [DF], proto UDP 
(17), length 654)
192.168.xxx.xxx.sip > 192.168.yyy.yyy.sip: SIP, length: 626
REFER sip:3...@192.168.yyy.yyy:5060 SIP/2.0
Via: SIP/2.0/UDP 
192.168.xxx.xxx:5060;rport;branch=

Re: [asterisk-dev] Transfer cmd (PJSIP not sending Referred-By but chan_sip does)

2015-08-25 Thread Dan Cropp
Thank you Mark

From: asterisk-dev-boun...@lists.digium.com 
[mailto:asterisk-dev-boun...@lists.digium.com] On Behalf Of Mark Michelson
Sent: Tuesday, August 25, 2015 10:30 AM
To: Asterisk Developers Mailing List
Subject: Re: [asterisk-dev] Transfer cmd (PJSIP not sending Referred-By but 
chan_sip does)

The answer to this is actually pretty simple: adding Referred-By in outgoing 
SIP REFERs is simply not implemented in chan_pjsip's chan_pjsip_transfer() 
function.

As far as the syntax required for the Transfer() application, that's probably a 
case where that needs to be clarified in documentation. There are lots of 
places in PJSIP configuration where we require full SIP URIs rather than just 
IP addresses or bare URIs (user@domain).

On 08/25/2015 10:00 AM, Dan Cropp wrote:
I asked the question on asterisk-users but did not receive a response, so I am 
sending the question here.

I am running Asterisk 13.5.0.

A call comes in, Asterisk answers it.  After some actions, the call needs to be 
Transferred (SIP REFER) to another number.  The other switch is responsible for 
accepting the Transfer and tromboning the lines internally.  It will also send 
a BYE so Asterisk no longer has the call.

The behavior works when I have the endpoint configured at chan_sip.  It does 
not work when the endpoint is configured as PJSIP.  I worked with the other 
switch vendor and he determined chan_sip includes the Referred-By header.  
PJSIP does not include the Referred-By header.  The other switch requires the 
Referred-By header to be present.

I tried setting the channel's SIPREFERREDBYHDR variable before the Transfer 
command and that still did not force the Referred-By header to be part of the 
REFER packet.
I tried the PJSIP_HEADER add and it still did not add the Referred-By header to 
the REFER packet.

Is there a PJSIP setting to force the Referred-By to be part of the REFER 
packet?

chan_sip (succeeds)
19:27:32.512123 IP (tos 0x0, ttl 64, id 11492, offset 0, flags [none], proto 
UDP (17), length 630)
192.168.xxx.xxx.sip > 192.168.yyy.yyy.sip: SIP, length: 602
REFER sip:3...@192.168.yyy.yyy:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.xxx.xxx:5060;branch=z9hG4bK58f4bd1d
Max-Forwards: 70
From: ;tag=as44000cf4
To: ;tag=7Iy0JkwDC
Contact: 
Call-ID: 
jdeuqpak-00...@192.168.yyy.yyy<mailto:jdeuqpak-00...@192.168.yyy.yyy>
CSeq: 102 REFER
User-Agent: Asterisk PBX 13.5.0
Date: Thu, 20 Aug 2015 19:27:32 GMT
Refer-To: 
Referred-By: 
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, 
INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

Pjsip
18:46:58.386372 IP (tos 0x0, ttl 64, id 38690, offset 0, flags [DF], proto UDP 
(17), length 654)
192.168.xxx.xxx.sip > 192.168.yyy.yyy.sip: SIP, length: 626
REFER sip:3...@192.168.yyy.yyy:5060 SIP/2.0
Via: SIP/2.0/UDP 
192.168.xxx.xxx:5060;rport;branch=z9hG4bKPjec41c3b9-d734-482d-82c1-2a6f8d9452a3
From: 
;tag=3c10f423-e468-42ea-87a1-658ae106581c
To: ;tag=WITKDakt
Contact: 
Call-ID: 
s6wk6l6q-00...@192.168.yyy.yyy<mailto:s6wk6l6q-00...@192.168.yyy.yyy>
CSeq: 981 REFER
Event: refer
Expires: 600
Supported: 100rel, timer, replaces, norefersub
Accept: message/sipfrag;version=2.0
Allow-Events: message-summary, presence, dialog, refer
Refer-To: 
Max-Forwards: 70
User-Agent: Asterisk PBX 13.5.0
Content-Length:  0



One other slight oddity.
To get chan_sip to Transfer
3...@192.168.yyy.yyy<mailto:3...@192.168.yyy.yyy>

To get PJSIP to Transfer with the correct Refer-To header, I had to include the 
<> and sip:



Have a great day!
Dan



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

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

[asterisk-dev] Transfer cmd (PJSIP not sending Referred-By but chan_sip does)

2015-08-25 Thread Dan Cropp
I asked the question on asterisk-users but did not receive a response, so I am 
sending the question here.

I am running Asterisk 13.5.0.

A call comes in, Asterisk answers it.  After some actions, the call needs to be 
Transferred (SIP REFER) to another number.  The other switch is responsible for 
accepting the Transfer and tromboning the lines internally.  It will also send 
a BYE so Asterisk no longer has the call.

The behavior works when I have the endpoint configured at chan_sip.  It does 
not work when the endpoint is configured as PJSIP.  I worked with the other 
switch vendor and he determined chan_sip includes the Referred-By header.  
PJSIP does not include the Referred-By header.  The other switch requires the 
Referred-By header to be present.

I tried setting the channel's SIPREFERREDBYHDR variable before the Transfer 
command and that still did not force the Referred-By header to be part of the 
REFER packet.
I tried the PJSIP_HEADER add and it still did not add the Referred-By header to 
the REFER packet.

Is there a PJSIP setting to force the Referred-By to be part of the REFER 
packet?

chan_sip (succeeds)
19:27:32.512123 IP (tos 0x0, ttl 64, id 11492, offset 0, flags [none], proto 
UDP (17), length 630)
192.168.xxx.xxx.sip > 192.168.yyy.yyy.sip: SIP, length: 602
REFER sip:3...@192.168.yyy.yyy:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.xxx.xxx:5060;branch=z9hG4bK58f4bd1d
Max-Forwards: 70
From: ;tag=as44000cf4
To: ;tag=7Iy0JkwDC
Contact: 
Call-ID: 
jdeuqpak-00...@192.168.yyy.yyy
CSeq: 102 REFER
User-Agent: Asterisk PBX 13.5.0
Date: Thu, 20 Aug 2015 19:27:32 GMT
Refer-To: 
Referred-By: 
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, 
INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

Pjsip
18:46:58.386372 IP (tos 0x0, ttl 64, id 38690, offset 0, flags [DF], proto UDP 
(17), length 654)
192.168.xxx.xxx.sip > 192.168.yyy.yyy.sip: SIP, length: 626
REFER sip:3...@192.168.yyy.yyy:5060 SIP/2.0
Via: SIP/2.0/UDP 
192.168.xxx.xxx:5060;rport;branch=z9hG4bKPjec41c3b9-d734-482d-82c1-2a6f8d9452a3
From: 
;tag=3c10f423-e468-42ea-87a1-658ae106581c
To: ;tag=WITKDakt
Contact: 
Call-ID: 
s6wk6l6q-00...@192.168.yyy.yyy
CSeq: 981 REFER
Event: refer
Expires: 600
Supported: 100rel, timer, replaces, norefersub
Accept: message/sipfrag;version=2.0
Allow-Events: message-summary, presence, dialog, refer
Refer-To: 
Max-Forwards: 70
User-Agent: Asterisk PBX 13.5.0
Content-Length:  0



One other slight oddity.
To get chan_sip to Transfer
3...@192.168.yyy.yyy

To get PJSIP to Transfer with the correct Refer-To header, I had to include the 
<> and sip:



Have a great day!
Dan
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-dev] Asterisk and video conferencing

2014-03-31 Thread Dan Cropp
"I've been lobbying hardware manufacturers to provide video cards for Asterisk 
where we can have licenses to do transcoding and reformatting, so far with no 
success."

I passed this onto someone in our hardware department to look into.

I do worry about the thought of hardware for a video solution.  We go into a 
lot of hospitals.  They only want virtual servers.  Not sure that a hardware 
based video solution will go over very well in many markets.

For those worried about bandwidth of video, would it be possible to offload 
that work to another Asterisk box B?  Put audio on box A.  If you need video 
conferencing, have box A send that to box B? 


-Original Message-
From: asterisk-dev-boun...@lists.digium.com 
[mailto:asterisk-dev-boun...@lists.digium.com] On Behalf Of Olle E. Johansson
Sent: Monday, March 31, 2014 6:42 AM
To: Asterisk Developers Mailing List
Cc: Olle E Johansson
Subject: Re: [asterisk-dev] Asterisk and video conferencing


On 31 Mar 2014, at 12:47, Johan Wilfer  wrote:

> Hi!
> 
> I've spent some time scratching my head thinking about video conferencing and 
> how to go about it. Right now we use Meetme as a audio bridge for pstn 
> connectivity and so on. But our users ask for video and screen sharing. I can 
> see four distinct ways to go about this:
> 
> 1. Asterisk right now - supports 1-1 video, and with confbridge 1 video 
> stream can be sent to the other participants. (The codec must match thought, 
> and a key-frame are not sent immediate if the video source is changed so 
> there will be a garbled video stream until next key-frame.)
> 
> 2. MCU - multiple video streams encoded in single stream. For video do the 
> same as with audio. That means decode each stream, compose a new stream with 
> all the participants layered out nicely. While this works for audio it 
> consumes huge amounts of cpu to do this for video.
> 
> 3. p2p - multiple video streams sent peer to peer. Each participant sends the 
> audio/video to every other participant. This eats a lot of bandwidth for the 
> users and can work for smaller conferences, but in a conference with 10 
> participants each will have to have a very good upstream connection.
> 
> 4. Jitsi Videobridge - multiple video streams from server, but send only your 
> stream to the server. The jitsi videobridge the distributes the stream to all 
> other clients. This will eat a lot of bandwidth for the server, but not for 
> the clients. This is also how Google Hangouts works. So if you are 10 
> participants you will send one stream to the server with your audio/video and 
> receive 9 streams from the server for the other participants.
> 
> 
> To be able to scale reasonably I think option 2 is out of the question. And 
> option 3, p2p, eats to much bandwidth for the clients (and doesn't require an 
> asterisk anyway).
> 
> What you lose with option 4 is everything asterisk excels at: pstn 
> connectivity, fine-grained control of each participant in the bridge.
> 
> What are your thoughts on adding Jitsis approach in regards to video to 
> Asterisk for confbridge or even ARI? No composing of video, just relaying the 
> other participants streams to each other in the bridge. Then it's up to the 
> client in the other end to display these streams in a reasonable way (like 
> Google Hangout, and https://meet.jit.si/).

Why? The jitsi video bridge exists and work fine :-)

What you are forgetting here is the thing that has stopped us from doing really 
cool stuff with video - patents and licensing. The jitsi video bridge is a nice 
workaround, but not optimal if you have a lot of different devices. You put the 
load on the device and in bandwidth-constrained environments that's not good.

Video is heavily dependend on peer2peer negotiation and doesn't really fit well 
in a PBX b2bua architecture... The jitsi model could work - but the SDP o/a 
handling would be really hard to get right in Asterisk.

I've been lobbying hardware manufacturers to provide video cards for Asterisk 
where we can have licenses to do transcoding and reformatting, so far with no 
success. Cisco's H264 codecs recently became available for us in the Open 
Source world thanks to a generous solution by Cisco. I guess funding is needed 
to add anything cool to Asterisk using them. We can do MCU-style stuff, 
reformatting - but to do transcoding we need another codec :-)

Google VP8 is around, I don't know what Digium's legal team have to say about 
us using it.

Random thoughts...

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

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

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

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://