here’s my extension.conf

[a2billing]

exten => _X.,1,NoOp(a2billing start)

exten => _X.,n,Set(A2BACCOUNTCODE=${CDR(accountcode)})

exten => _X.,n,MYSQL(Connect CONNID ${A2BDBHOST} ${A2BDBUSER} ${A2BDBPASSW} ${A2BDBNAME})

exten => _X.,n,MYSQL(Query RESULTID ${CONNID} SELECT `max_concurrent`

FROM `cc_card`

WHERE `username`

= ${A2BACCOUNTCODE})

exten => _X.,n,GotoIf($[“${MYSQL_STATUS}” = “-1”]?lbl_a2billing_0:)

exten => _X.,n,MYSQL(Fetch vdp_tmp ${RESULTID} MAXCHANNELS)

exten => _X.,n,GotoIf($[“${MYSQL_STATUS}” = “-1”]?lbl_a2billing_0:)

exten => _X.,n,MYSQL(Clear ${RESULTID})

exten => _X.,n,MYSQL(Disconnect ${CONNID})

exten => _X.,n,NoOp(Maximum Channels Allowed = ${MAXCHANNELS})

exten => _X.,n,NoOp(Channels in use = ${GROUP_COUNT(${A2BACCOUNTCODE}@OUT)})

exten => _X.,n,Set(CURRENTCHANNELS=${GROUP_COUNT(${A2BACCOUNTCODE}@OUT)})

exten => _X.,n,Set(REMAININGCHANNELS=${MATH(${MAXCHANNELS}-${CURRENTCHANNELS})})

exten => _X.,n,NoOp(Remaining channels available = ${REMAININGCHANNELS})

exten => _X.,n,Set(GROUP(OUT)=${A2BACCOUNTCODE})

exten => _X.,n,GotoIf($[“${REMAININGCHANNELS}” > “1”]?:lbl_a2billing_1)

exten => _X.,n,NoOp(Call Allowed as channels available)

exten => _X.,n,AGI(a2billing.php,2)

exten => _X.,n,Hangup()

exten => _X.,n(lbl_a2billing_1),NoOp(No More Channels available)

exten => _X.,n,Congestion()

exten => _X.,n(lbl_a2billing_0),MYSQL(Clear ${RESULTID})

exten => _X.,n,MYSQL(Disconnect ${CONNID})

exten => _X.,n,Goto(lbl_a2billing_1)

here’s my sip.conf

[airtel]

type = friend

host = 1.1.1.1

insecure = port,invite

disallow = all

allow = g729

allow = alaw

allow = ulaw

qualify = yes

context = a2billing

canreinvite = no

nat=yes

nat=force_rport,comedia

rtptimeout = 60

rtpholdtimeout = 300

;P-Early-Media=supported

sendrpid=pai

trusrpid=yes

usereqphone=yes

;trust_id_outbound=yes

provider send this report showing trunk status is fault

in my pcap I am returning 404

I appreciate any help to fix this please