Re: [asterisk-users] Forward error code beetwen legs

2017-06-01 Thread Loic Chabert
Exact Daniel, it'works with this line.

Thanks for your help.

Regards.

2017-06-01 21:16 GMT+02:00 Daniel Tryba :

> On Thu, Jun 01, 2017 at 09:06:25PM +0200, Loic Chabert wrote:
> > [gotoexternal]
> > exten => _X.,1,Dial(SIP/${EXTEN}@provider)
> >
> > When my SIP provider return to asterisk a 404 SIP error code, asterisk
> > return to phone a 503 error code.
> >
> > Why 503 error code has been returned, and not the original error = 404
> > error ?
> >
> > Asterisk's cli said: == Everyone is busy/congested at this time (1:0/0/1)
> >
> > How can i return the 404 error ? Forward this 404 error to the original
> leg
> > ?
>
> To lazy to look it up exactly, but add something like:
> exten => _X.,n,Hangup(${HANGUPCAUSE})
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 

*Loïc CHABERT - Responsable technique*

*Voxity - Libérez vos Télécoms*

85 Rue des Alliés 38100 Grenoble
Tel : 0975181257 - Fax : 04.816.801.14
Email : loic.chab...@voxity.fr 
Restons connectés : Site Web  - Twitter
 - Facebook  - L
inkedIn 
*Nouveau !* Découvrez Voxity en vidéo : Youtube

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

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

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

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

Re: [asterisk-users] Forward error code beetwen legs

2017-06-01 Thread Daniel Tryba
On Thu, Jun 01, 2017 at 09:06:25PM +0200, Loic Chabert wrote:
> [gotoexternal]
> exten => _X.,1,Dial(SIP/${EXTEN}@provider)
> 
> When my SIP provider return to asterisk a 404 SIP error code, asterisk
> return to phone a 503 error code.
> 
> Why 503 error code has been returned, and not the original error = 404
> error ?
> 
> Asterisk's cli said: == Everyone is busy/congested at this time (1:0/0/1)
> 
> How can i return the 404 error ? Forward this 404 error to the original leg
> ?

To lazy to look it up exactly, but add something like:
exten => _X.,n,Hangup(${HANGUPCAUSE})


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

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

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

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


[asterisk-users] Forward error code beetwen legs

2017-06-01 Thread Loic Chabert
Hello asterisk users,

I have a strange behaviour with asterisk and error code forwarding in
asterisk 11.

Please find below my setup:

Phone -> ASTERISK -> SIP TRUNK PROVIDER

A phone start a call, asterisk start a leg to my SIP trunk provider.
I have a simple dialplan to handle it:

[gotoexternal]
exten => _X.,1,Dial(SIP/${EXTEN}@provider)

When my SIP provider return to asterisk a 404 SIP error code, asterisk
return to phone a 503 error code.

Why 503 error code has been returned, and not the original error = 404
error ?

Asterisk's cli said: == Everyone is busy/congested at this time (1:0/0/1)

How can i return the 404 error ? Forward this 404 error to the original leg
?

Thanks in advance,
Regards.
--
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

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

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

Re: [asterisk-users] OT: Want to capture all SIP messages

2017-06-01 Thread Tony Mountifield
In article ,
Steve Edwards  wrote:
> On Wed, 31 May 2017, Steve Edwards wrote:
> 
> > I want to capture all SIP messages.
> >
> > I have about 30 hosts in about 6 colos.
> >
> > My first thought was dumpcap, but the output file name format bugs me.
> >
> > What do you use for long term SIP capture?
> 
> A little more specificity...
> 
> I'd like the capture to be in a series of files that can be 'rotated' or 
> 'aged out' so that I can always have x days of traffic on hand but not 
> have to prune the files to keep the storage requirements reasonable.

On most of my systems I have a script sip-capture:

---
#!/bin/sh

DATE=`date '+%Y%m%d-%H%M%S'`
FILE=sip-`hostname -s`-$DATE.pkt

cd /var/tmp

tcpdump -C 8 -i any -n -p -s 0 -w $FILE udp port 5060 /dev/null 
2>&1 &
---

I start it in /etc/rc.d/rc.local for want of anywhere better.

Being in /var/tmp, cron.daily/tmpwatch deletes files older than 30 days.
I could just have easily put them somewhere else and used the -W option
to tcpdump to remove old files on a rolling basis.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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

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

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

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