Cdr Postgresql write directly

Hi All,
can Asterisk write directly after a beginnig call in a Postgresql Database?
My configuration write in Postgresql after ending a call.
I need Data directly in my CRM.
Thanks Ronny

Asterisk can interact with DB (not only Postgre) at any point of dialplan execution. Read about func_odbc.conf. (search will give many links, for example this one: )

Thx for the quick answer. I installed odbc and connected it with postgresql.
I want the telephonenumbers of incoming and outgoing calls to be insert in postgresql database.
What do I have to add in extensions.conf and in func_odbc.conf?


;exten => 2000,1,Dial(SIP/2000)
;exten => _0[1-9].,1,Dial(SIP/${EXTEN}@364433-ext-sip)
exten => _0.,1,Dial,SIP/${EXTEN}@364433-ext-sip|45|r

exten => _0.,1,Dial,SIP/${EXTEN}@364434-ext-sip|45|r

exten => 49xxx,1,Dial(SIP/2000)

exten => 49xxx,1,Dial(SIP/2000)

exten => 49xxx,1,Dial(SIP/2001)

greatings ronny