[asterisk-users] SIP 603 Declined after AGI execution

amejia amejia amejia at gua.net
Thu May 19 08:11:43 CDT 2011


> Hello everyone.
>
> I'm using Asterisk 1.4.31 and A2Billing 1.7.0 to manage a small wholesale operation, so I configured A2Billing for not to answer the call nor play any greetings or balance notifications to the caller.
> I'm authenticating each customer by it's IP address, and each customer has it's own context, in which I set the following:
>
> ;=====in extensions.conf======
> [from-customerX]
> exten => _X.,1,Set(CDR(accountcode)=9999)  ;Here I change the accountcode depending on each customer
> exten => _X.,2,Set(CALLERID(dnid)=${EXTEN})
> exten => _X.,3,Goto(a2billing|${EXTEN}|1)
>
> [from-customerY]
> exten => _X.,1,Set(CDR(accountcode)=8888)
> exten => _X.,2,Set(CALLERID(dnid)=${EXTEN})
> exten => _X.,3,Goto(a2billing|${EXTEN}|1)
>
> [a2billing]
> exten => _X.,1,DeadAGI(a2billing.php|1)
> exten => _X.,2,Hangup(34)
> ;=============================
>
> A2Billing authenticates and routes the call properly, but when the termination gateway for the destination dialed by the customer rejects the call, my Asterisk box sends "603 Declined" to the customer.
> It also happens when A2Billing doesn't find any route for that destination, in which it should return "404 Not Found", but returns "603 Declined" instead.
> I tried to force every rejected attempt with "503 Service Unavailable" putting the Hangup(34) you see on my config, but it never seems to get there.
> The last thing I see on CLI running in verbose is: -- AGI Script a2billing.php completed, returning 0
>
> Is there anything I could do to return a different cause than "603 Declined"?
> I posted the same question on A2Billing's forum, but had no luck.
>
> Thanks in advance,
>
> Alejandro Mejia



More information about the asterisk-users mailing list